mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 14:04:41 +02:00
Merge branch 'ai-open' of https://bitbucket.org/skeletonhorn/ffxiv-classic-server-ai-fork into ai
This commit is contained in:
commit
bb31bb0f23
70 changed files with 1688 additions and 420 deletions
|
@ -36,21 +36,22 @@ end
|
|||
|
||||
function allyGlobal.HelpPlayers(ally, contentGroupCharas, pickRandomTarget)
|
||||
if contentGroupCharas then
|
||||
for _, chara in pairs(contentGroupCharas) do
|
||||
print("assssss")
|
||||
if chara then
|
||||
-- probably a player, or another ally
|
||||
-- todo: queue support actions, heal, try pull hate off player etc
|
||||
if chara.IsPlayer() then
|
||||
if chara:IsPlayer() then
|
||||
-- do stuff
|
||||
if not ally.IsEngaged() then
|
||||
if chara.IsEngaged() then
|
||||
if not ally:IsEngaged() then
|
||||
if chara:IsEngaged() then
|
||||
print("ass")
|
||||
allyGlobal.EngageTarget(ally, chara.target, nil)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif chara.IsMonster() and chara.IsEngaged() then
|
||||
if not ally.IsEngaged() then
|
||||
allyGlobal.EngageTarget(ally, chara.target, nil)
|
||||
end
|
||||
elseif chara:IsMonster() and chara:IsEngaged() then
|
||||
allyGlobal.EngageTarget(ally, chara, nil)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -67,14 +68,15 @@ end
|
|||
|
||||
function allyGlobal.EngageTarget(ally, target, contentGroupCharas)
|
||||
if contentGroupCharas then
|
||||
for _, chara in pairs(contentGroupCharas) do
|
||||
for chara in contentGroupCharas do
|
||||
if chara.IsMonster() then
|
||||
if chara.allegiance ~= ally.allegiance then
|
||||
ally.Engage(chara)
|
||||
ally:Engage(chara)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif target then
|
||||
ally.Engage(target)
|
||||
ally:Engage(target)
|
||||
ally.hateContainer:AddBaseHate(target);
|
||||
end
|
||||
end
|
|
@ -10,8 +10,10 @@ function onEventStarted(player, equipAbilityWidget, triggername, slot, commandid
|
|||
local worldManager = GetWorldManager();
|
||||
local ability = worldManager:GetBattleCommand(commandid);
|
||||
|
||||
|
||||
--Equip
|
||||
if (commandid > 0) then
|
||||
--[[]]
|
||||
--Can the player equip any more cross class actions
|
||||
if (player.charaWork.parameterTemp.otherClassAbilityCount[0] >= player.charaWork.parameterTemp.otherClassAbilityCount[1]) then
|
||||
--"You cannot set any more actions."
|
||||
|
@ -19,30 +21,65 @@ function onEventStarted(player, equipAbilityWidget, triggername, slot, commandid
|
|||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
|
||||
--Is the player high enough level in that class to equip the ability
|
||||
if (player.charaWork.battleSave.skillLevel[ability.job] < ability.level) then
|
||||
|
||||
--"You have not yet acquired that action"
|
||||
if (player.charaWork.battleSave.skillLevel[ability.job - 1] < ability.level) then
|
||||
--"You have not yet acquired that action."
|
||||
player:SendGameMessage(GetWorldMaster(), 30742, 0x20, 0, 0);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
--Equip the ability
|
||||
player:EquipAbility(slot, commandid);
|
||||
|
||||
local oldSlot = player:FindFirstCommandSlotById(commandid);
|
||||
local isEquipped = oldSlot < player.charaWork.commandBorder + 30;
|
||||
--If slot is 0, find the first open slot
|
||||
if (slot == 0) then
|
||||
--If the ability is already equipped and slot is 0, then it can't be equipped again
|
||||
--If the slot isn't 0, it's a move or a swap command
|
||||
if (isEquipped == true) then
|
||||
--"That action is already set to an action slot."
|
||||
player:SendGameMessage(GetWorldMaster(), 30719, 0x20, 0);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
slot = player:FindFirstCommandSlotById(0) - player.charaWork.commandBorder;
|
||||
|
||||
--If the first open slot is outside the hotbar, then the hotbar is full
|
||||
if(slot >= 30) then
|
||||
--"You cannot set any more actions."
|
||||
player:SendGameMessage(Server.GetWorldManager().GetActor(), 30720, 0x20, 0);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
else
|
||||
slot = slot - 1;
|
||||
end
|
||||
|
||||
if(isEquipped == true) then
|
||||
player:SwapAbilities(oldSlot, slot + player.charaWork.commandBorder);
|
||||
else
|
||||
local tslot = slot + player.charaWork.commandBorder;
|
||||
player:EquipAbility(player.GetJob(), commandid, tslot, true);
|
||||
end
|
||||
|
||||
--Unequip
|
||||
elseif (commandid == 0) then
|
||||
commandid = player.charaWork.command[slot + player.charaWork.commandBorder];
|
||||
|
||||
commandid = player.charaWork.command[slot + player.charaWork.commandBorder - 1];
|
||||
ability = worldManager.GetBattleCommand(commandid);
|
||||
--Is the ability a part of the player's current class?
|
||||
--This check isn't correct because of jobs having different ids
|
||||
if(worldManager:GetBattleCommand(commandid).job == player.charaWork.parameterSave.state_mainSkill[0]) then
|
||||
--"Actions of your current class or job cannot be removed."
|
||||
player:SendGameMessage(GetWorldMaster(), 30745, 0x20, 0, 0);
|
||||
local classId = player:GetJob();
|
||||
local jobId = player:ConvertClassIdToJobId(classId);
|
||||
|
||||
if(ability.job == classId or ability.job == jobId) then
|
||||
--"Actions of your current class or job cannot be removed."
|
||||
player:SendGameMessage(GetWorldMaster(), 30745, 0x20, 0, 0);
|
||||
elseif (commandid != 0) then
|
||||
player:UnequipAbility(slot);
|
||||
end
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
34
data/scripts/commands/gm/eaction.lua
Normal file
34
data/scripts/commands/gm/eaction.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "s",
|
||||
description =
|
||||
[[
|
||||
Equips <commandid> in the first open slot without checking if you can.
|
||||
!eaction <commandid>
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, commandid)
|
||||
local sender = "[givegil] ";
|
||||
|
||||
print(commandid);
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
if player then
|
||||
classid = player:GetCurrentClassOrJob();
|
||||
commandid = tonumber(commandid) or 0;
|
||||
|
||||
local added = player:EquipAbilityInFirstOpenSlot(classid, commandid);
|
||||
|
||||
else
|
||||
print(sender.."unable to add command, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
34
data/scripts/commands/gm/giveexp.lua
Normal file
34
data/scripts/commands/gm/giveexp.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Adds experience <qty> to player or <targetname>.
|
||||
!giveexp <qty> |
|
||||
!giveexp <qty> <targetname> |
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, qty, name, lastName)
|
||||
local sender = "[giveexp] ";
|
||||
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
if player then
|
||||
currency = 1000001;
|
||||
qty = tonumber(qty) or 1;
|
||||
location = INVENTORY_CURRENCY;
|
||||
|
||||
player:AddExp(qty, player.charaWork.parameterSave.state_mainSkill[0], 5);
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
33
data/scripts/commands/gm/setmaxhp.lua
Normal file
33
data/scripts/commands/gm/setmaxhp.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Sets player or <targetname>'s maximum hp to <hp> and heals them to full.
|
||||
!setmaxhp <hp> |
|
||||
!setmaxhp <hp> <targetname>
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, hp, name, lastName)
|
||||
local sender = "[setmaxhp] ";
|
||||
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
if player then
|
||||
hp = tonumber(hp) or 1;
|
||||
location = INVENTORY_CURRENCY;
|
||||
|
||||
player:hpstuff(hp);
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
33
data/scripts/commands/gm/setmaxmp.lua
Normal file
33
data/scripts/commands/gm/setmaxmp.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Sets player or <targetname>'s maximum hp to <hp> and heals them to full.
|
||||
!setmaxhp <hp> |
|
||||
!setmaxhp <hp> <targetname>
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, hp, name, lastName)
|
||||
local sender = "[setmaxhp] ";
|
||||
|
||||
if name then
|
||||
if lastName then
|
||||
player = GetWorldManager():GetPCInWorld(name.." "..lastName) or nil;
|
||||
else
|
||||
player = GetWorldManager():GetPCInWorld(name) or nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
if player then
|
||||
hp = tonumber(hp) or 1;
|
||||
location = INVENTORY_CURRENCY;
|
||||
|
||||
player:hpstuff(hp);
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
178
data/scripts/commands/gm/yolo.lua
Normal file
178
data/scripts/commands/gm/yolo.lua
Normal file
|
@ -0,0 +1,178 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "ssss",
|
||||
description =
|
||||
[[
|
||||
yolo
|
||||
]],
|
||||
}
|
||||
|
||||
local quests =
|
||||
{
|
||||
[111807] = { level = 25, weight = 4, rewardexp = 1080 },
|
||||
[110868] = { level = 50, weight = 4, rewardexp = 4400 },
|
||||
[111603] = { level = 22, weight = 5, rewardexp = 1100 },
|
||||
[111602] = { level = 22, weight = 5, rewardexp = 1100 },
|
||||
[111420] = { level = 45, weight = 5, rewardexp = 4450 },
|
||||
[110811] = { level = 18, weight = 6, rewardexp = 780 },
|
||||
[110814] = { level = 18, weight = 6, rewardexp = 780 },
|
||||
[110707] = { level = 25, weight = 6, rewardexp = 1620 },
|
||||
[110682] = { level = 34, weight = 6, rewardexp = 3180 },
|
||||
[111202] = { level = 35, weight = 6, rewardexp = 3360 },
|
||||
[111222] = { level = 35, weight = 6, rewardexp = 3360 },
|
||||
[111302] = { level = 35, weight = 6, rewardexp = 3360 },
|
||||
[111223] = { level = 40, weight = 6, rewardexp = 4260 },
|
||||
[110819] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[111224] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[111225] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[110867] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[110869] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[110708] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[110627] = { level = 45, weight = 6, rewardexp = 5340 },
|
||||
[111434] = { level = 50, weight = 6, rewardexp = 6600 },
|
||||
[110850] = { level = 1, weight = 7, rewardexp = 40 },
|
||||
[110851] = { level = 1, weight = 7, rewardexp = 40 },
|
||||
[110841] = { level = 20, weight = 7, rewardexp = 1120 },
|
||||
[110642] = { level = 20, weight = 7, rewardexp = 1120 },
|
||||
[110840] = { level = 20, weight = 7, rewardexp = 1120 },
|
||||
[110727] = { level = 21, weight = 7, rewardexp = 1401 },
|
||||
[111221] = { level = 30, weight = 7, rewardexp = 2661 },
|
||||
[111241] = { level = 30, weight = 7, rewardexp = 2661 },
|
||||
[110687] = { level = 28, weight = 9, rewardexp = 2970 },
|
||||
[110016] = { level = 34, weight = 50, rewardexp = 26500 },
|
||||
[110017] = { level = 38, weight = 50, rewardexp = 32500 },
|
||||
[110019] = { level = 46, weight = 50, rewardexp = 46000 }
|
||||
};
|
||||
|
||||
local expTable = {
|
||||
570, -- 1
|
||||
700,
|
||||
880,
|
||||
1100,
|
||||
1500,
|
||||
1800,
|
||||
2300,
|
||||
3200,
|
||||
4300,
|
||||
5000, -- 10
|
||||
5900,
|
||||
6800,
|
||||
7700,
|
||||
8700,
|
||||
9700,
|
||||
11000,
|
||||
12000,
|
||||
13000,
|
||||
15000,
|
||||
16000, -- 20
|
||||
20000,
|
||||
22000,
|
||||
23000,
|
||||
25000,
|
||||
27000,
|
||||
29000,
|
||||
31000,
|
||||
33000,
|
||||
35000,
|
||||
38000, -- 30
|
||||
45000,
|
||||
47000,
|
||||
50000,
|
||||
53000,
|
||||
56000,
|
||||
59000,
|
||||
62000,
|
||||
65000,
|
||||
68000,
|
||||
71000, -- 40
|
||||
74000,
|
||||
78000,
|
||||
81000,
|
||||
85000,
|
||||
89000,
|
||||
92000,
|
||||
96000,
|
||||
100000,
|
||||
100000,
|
||||
110000 -- 50
|
||||
};
|
||||
|
||||
local commandCost = {
|
||||
["raise"] = 150,
|
||||
["cure"] = 40,
|
||||
["cura"] = 100,
|
||||
["curaga"] = 150,
|
||||
};
|
||||
-- stone: (1, 9) (5, 12) (10, )
|
||||
-- cure: (1, 5) (5, 6) (10, )
|
||||
-- aero: (1, 9) (5, 12) (10, )
|
||||
-- protect: (1, 9) (5, 12) (10, )
|
||||
--[[
|
||||
function onTrigger(player, argc, id, level, weight)
|
||||
id = tonumber(id) or 111807;
|
||||
level = tonumber(level) or quests[id].level;
|
||||
weight = tonumber(weight) or quests[id].weight;
|
||||
local messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "yolo";
|
||||
|
||||
if id == 1 then
|
||||
return
|
||||
end
|
||||
local message = calcSkillPoint(player, level, weight);
|
||||
if player then
|
||||
player.SendMessage(messageId, sender, string.format("calculated %s | expected %s", message, quests[id].rewardexp));
|
||||
end;
|
||||
printf("calculated %s | expected %s", message, quests[id].rewardexp);
|
||||
end;
|
||||
]]
|
||||
|
||||
function onTrigger(player, argc, skillName, level)
|
||||
local messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "yolo";
|
||||
|
||||
if player then
|
||||
if false then
|
||||
local effectId = 223004;
|
||||
|
||||
player.statusEffects.RemoveStatusEffect(effectId);
|
||||
player.statusEffects.AddStatusEffect(effectId, 1, 0, 5);
|
||||
return;
|
||||
end;
|
||||
|
||||
local pos = player:GetPos();
|
||||
local x = tonumber(pos[0]);
|
||||
local y = tonumber(pos[1]);
|
||||
local z = tonumber(pos[2]);
|
||||
local rot = tonumber(pos[3]);
|
||||
local zone = pos[4];
|
||||
|
||||
printf("%f %f %f", x, y, z);
|
||||
--local x, y, z = player.GetPos();
|
||||
for i = 1, 1 do
|
||||
|
||||
local actor = player.GetZone().SpawnActor(2207303, 'ass', x, y, z, rot, 0, 0, true );
|
||||
|
||||
--actor.FollowTarget(player, 3.2);
|
||||
end;
|
||||
return;
|
||||
end
|
||||
level = tonumber(level) or 1;
|
||||
if player then
|
||||
player.SendMessage(messageId, sender, string.format("name %s | cost %d | level %u", skillName, calculateCommandCost(player, skillName, level), level));
|
||||
end;
|
||||
end;
|
||||
|
||||
function calculateCommandCost(player, skillName, level)
|
||||
if skillName and level and commandCost[skillName] then
|
||||
return math.ceil((8000 + (level - 70) * 500) * (commandCost[skillName] * 0.001));
|
||||
end;
|
||||
return 1;
|
||||
end
|
||||
|
||||
function calcSkillPoint(player, lvl, weight)
|
||||
weight = weight / 100
|
||||
|
||||
return math.ceil(expTable[lvl] * weight)
|
||||
end
|
26
data/scripts/commands/weaponskill/chaos_thrust.lua
Normal file
26
data/scripts/commands/weaponskill/chaos_thrust.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/default.lua
Normal file
26
data/scripts/commands/weaponskill/default.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
action.effectId = bit32.bxor(0x8000000, skill.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/doom_spike.lua
Normal file
26
data/scripts/commands/weaponskill/doom_spike.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/dread_spike.lua
Normal file
26
data/scripts/commands/weaponskill/dread_spike.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/feint.lua
Normal file
26
data/scripts/commands/weaponskill/feint.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/flat_blade.lua
Normal file
26
data/scripts/commands/weaponskill/flat_blade.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/full_thrust.lua
Normal file
26
data/scripts/commands/weaponskill/full_thrust.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
27
data/scripts/commands/weaponskill/heavy_thrust.lua
Normal file
27
data/scripts/commands/weaponskill/heavy_thrust.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
action.effectId = bit32.bxor(0x8000000, skill.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/impulse_drive.lua
Normal file
26
data/scripts/commands/weaponskill/impulse_drive.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/leg_sweep.lua
Normal file
26
data/scripts/commands/weaponskill/leg_sweep.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/pummel.lua
Normal file
26
data/scripts/commands/weaponskill/pummel.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/true_thrust.lua
Normal file
26
data/scripts/commands/weaponskill/true_thrust.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
action.effectId = bit32.bxor(0x8000000, skill.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/vorpal_thrust.lua
Normal file
26
data/scripts/commands/weaponskill/vorpal_thrust.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action)
|
||||
local damage = math.random(100, 200);
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
action.worldMasterTextId = 0x765D;
|
||||
|
||||
-- todo: populate a global script with statuses and modifiers
|
||||
-- magic.HandleAttackMagic(caster, target, spell, action)
|
||||
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
--action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
|
@ -1,28 +1,75 @@
|
|||
require ("global")
|
||||
require ("ally")
|
||||
require ("modifiers")
|
||||
|
||||
function onCreate(starterPlayer, contentArea, director)
|
||||
--papalymo = contentArea:SpawnActor(2290005, "papalymo", 365.89, 4.0943, -706.72, -0.718);
|
||||
--yda = contentArea:SpawnActor(2290006, "yda", 365.266, 4.122, -700.73, 1.5659);
|
||||
|
||||
--mob1 = contentArea:SpawnActor(2201407, "mob1", 374.427, 4.4, -698.711, -1.942);
|
||||
--mob2 = contentArea:SpawnActor(2201407, "mob2", 375.377, 4.4, -700.247, -1.992);
|
||||
--mob3 = contentArea:SpawnActor(2201407, "mob3", 375.125, 4.4, -703.591, -1.54);
|
||||
yda = GetWorldManager().SpawnBattleNpcById(6, contentArea);
|
||||
papalymo = GetWorldManager().SpawnBattleNpcById(7, contentArea);
|
||||
yda:ChangeState(2);
|
||||
mob1 = GetWorldManager().SpawnBattleNpcById(3, contentArea);
|
||||
mob2 = GetWorldManager().SpawnBattleNpcById(4, contentArea);
|
||||
mob3 = GetWorldManager().SpawnBattleNpcById(5, contentArea);
|
||||
starterPlayer.currentParty.members:Add(yda.actorId);
|
||||
starterPlayer.currentParty.members:Add(papalymo.actorId);
|
||||
starterPlayer:SetMod(modifiersGlobal.MinimumHpLock, 1);
|
||||
|
||||
papalymo = contentArea:SpawnActor(2290005, "papalymo", 365.89, 4.0943, -706.72, -0.718);
|
||||
yda = contentArea:SpawnActor(2290006, "yda", 365.266, 4.122, -700.73, 1.5659);
|
||||
yda:ChangeState(2);
|
||||
|
||||
mob1 = contentArea:SpawnActor(2201407, "mob1", 374.427, 4.4, -698.711, -1.942);
|
||||
mob2 = contentArea:SpawnActor(2201407, "mob2", 375.377, 4.4, -700.247, -1.992);
|
||||
mob3 = contentArea:SpawnActor(2201407, "mob3", 375.125, 4.4, -703.591, -1.54);
|
||||
|
||||
openingStoper = contentArea:SpawnActor(1090384, "openingstoper", 356.09, 3.74, -701.62, -1.41);
|
||||
|
||||
director:AddMember(starterPlayer);
|
||||
director:AddMember(director);
|
||||
director:AddMember(papalymo);
|
||||
director:AddMember(papalymo);
|
||||
director:AddMember(yda);
|
||||
director:AddMember(mob1);
|
||||
director:AddMember(mob2);
|
||||
director:AddMember(mob3);
|
||||
|
||||
director:StartContentGroup();
|
||||
--director:StartContentGroup();
|
||||
|
||||
end
|
||||
|
||||
function onUpdate(area, tick)
|
||||
local players = area:GetPlayers()
|
||||
local mobs = area:GetMonsters()
|
||||
local allies = area:GetAllies()
|
||||
local resumeChecks = true
|
||||
for player in players do
|
||||
if player then
|
||||
local exitLoop = false
|
||||
for ally in allies do
|
||||
if ally then
|
||||
if not ally:IsEngaged() then
|
||||
if player:IsEngaged() then
|
||||
ally.neutral = false
|
||||
ally.isAutoAttackEnabled = true
|
||||
ally:SetMod(modifiersGlobal.Speed, 8)
|
||||
allyGlobal.EngageTarget(ally, player.target)
|
||||
exitLoop = true
|
||||
break
|
||||
-- todo: support scripted paths
|
||||
elseif ally:GetSpeed() > 0 then
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if exitLoop then
|
||||
resumeChecks = false
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not resumeChecks then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
function onDestroy()
|
||||
|
||||
|
||||
|
|
|
@ -11,71 +11,54 @@ function init()
|
|||
end
|
||||
|
||||
function onCreateContentArea(players, director, contentArea, contentGroup)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
|
||||
yshtola = GetWorldManager().SpawnBattleNpcById(6, contentArea);
|
||||
stahlmann = GetWorldManager().SpawnBattleNpcById(7, contentArea);
|
||||
|
||||
mob1 = GetWorldManager().SpawnBattleNpcById(3, contentArea);
|
||||
mob2 = GetWorldManager().SpawnBattleNpcById(4, contentArea);
|
||||
mob3 = GetWorldManager().SpawnBattleNpcById(5, contentArea);
|
||||
|
||||
local added = false;
|
||||
for i = 0, players.Count do
|
||||
local player = players[i];
|
||||
print("asses "..players.Count)
|
||||
if player.currentParty and not added then
|
||||
print("shitness")
|
||||
player.currentParty.members:Add(yshtola.actorId);
|
||||
print("cunt")
|
||||
player.currentParty.members:Add(stahlmann.actorId);
|
||||
print("dickbag")
|
||||
added = true;
|
||||
end;
|
||||
-- dont let player die
|
||||
player:SetMod(modifiersGlobal.MinimumHpLock, 1);
|
||||
contentGroup:AddMember(player)
|
||||
print("shittttt")
|
||||
break
|
||||
end;
|
||||
print("shit")
|
||||
contentGroup:AddMember(director);
|
||||
print("shit2");
|
||||
contentGroup:AddMember(yshtola);
|
||||
print("shit3")
|
||||
contentGroup:AddMember(stahlmann);
|
||||
print("shit4")
|
||||
contentGroup:AddMember(mob1);
|
||||
print("shit5")
|
||||
contentGroup:AddMember(mob2);
|
||||
print("shit6")
|
||||
contentGroup:AddMember(mob3);
|
||||
print("dicks")
|
||||
director:StartContentGroup();
|
||||
end
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
man0g0Quest = player:GetQuest("Man0g0");
|
||||
startTutorialMode(player);
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl001", nil, nil, nil);
|
||||
player:EndEvent();
|
||||
waitForSignal("playerActive");
|
||||
wait(2); --If this isn't here, the scripts bugs out. TODO: Find a better alternative.
|
||||
wait(1); --If this isn't here, the scripts bugs out. TODO: Find a better alternative.
|
||||
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl002", nil, nil, nil);
|
||||
player:EndEvent();
|
||||
|
||||
waitForSignal("playerAttack");
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
|
||||
wait(3);
|
||||
|
||||
man0g0Quest:NextPhase(5);
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
|
||||
wait(5);
|
||||
|
||||
man0g0Quest:NextPhase(6);
|
||||
waitForSignal("tpOver1000");
|
||||
closeTutorialWidget(player);
|
||||
print("ass")
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
|
||||
|
||||
if player:IsDiscipleOfWar() then
|
||||
waitForSignal("weaponskillUsed"); --Should be wait for weaponskillUsed signal
|
||||
elseif player:IsDiscipleOfMagic() then
|
||||
waitForSignal("spellUsed")
|
||||
elseif player:IsDiscipleOfHand() then
|
||||
waitForSignal("abilityUsed")
|
||||
elseif player:IsDiscipleOfLand() then
|
||||
waitForSignal("abilityUsed")
|
||||
end
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
|
||||
|
||||
waitForSignal("mobkill"); --Should be wait for mobkill
|
||||
waitForSignal("mobkill");
|
||||
waitForSignal("mobkill");
|
||||
worldMaster = GetWorldMaster();
|
||||
player:SendDataPacket("attention", worldMaster, "", 51073, 2);
|
||||
wait(7);
|
||||
player:ChangeMusic(7);
|
||||
player:ChangeState(0);
|
||||
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent020_1", nil, nil, nil);
|
||||
|
||||
player:GetZone():ContentFinished();
|
||||
player:EndEvent();
|
||||
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
|
||||
--[[
|
||||
IF DoW:
|
||||
OpenWidget (TP)
|
||||
|
@ -97,7 +80,6 @@ function onEventStarted(player, actor, triggerName)
|
|||
end
|
||||
|
||||
function onUpdate(deltaTime, area)
|
||||
print("fuck")
|
||||
end
|
||||
|
||||
function onTalkEvent(player, npc)
|
||||
|
@ -118,7 +100,5 @@ function onCommand(player, command)
|
|||
end
|
||||
|
||||
function main(director, contentGroup)
|
||||
print("shitstain")
|
||||
onCreateContentArea(director:GetPlayerMembers(), director, director:GetZone(), contentGroup);
|
||||
player:EndEvent();
|
||||
end;
|
|
@ -116,6 +116,14 @@ DAMAGE_TAKEN_TYPE_MAGIC = 2;
|
|||
DAMAGE_TAKEN_TYPE_WEAPONSKILL = 3;
|
||||
DAMAGE_TAKEN_TYPE_ABILITY = 4;
|
||||
|
||||
-- CLASSID
|
||||
CLASSID_PUG = 2;
|
||||
CLASSID_GLA = 3;
|
||||
CLASSID_MRD = 4;
|
||||
CLASSID_ARC = 7;
|
||||
CLASSID_LNC = 8;
|
||||
CLASSID_THM = 22;
|
||||
CLASSID_CNJ = 23;
|
||||
|
||||
|
||||
--UTILS
|
||||
|
|
19
data/scripts/spells/blizzara.lua
Normal file
19
data/scripts/spells/blizzara.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
function onSpellPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSpellStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSpellFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
print("fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuckkk")
|
||||
|
||||
action.param = damage;
|
||||
if target.hateContainer then
|
||||
target.hateContainer.AddBaseHate(caster);
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
18
data/scripts/spells/thunder.lua
Normal file
18
data/scripts/spells/thunder.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
function onSpellPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSpellStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSpellFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
print("fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuckkk")
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.AddBaseHate(caster);
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
|
@ -1,58 +1,22 @@
|
|||
require ("global")
|
||||
require ("modifiers")
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(mob)
|
||||
mob:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
||||
|
||||
end;
|
||||
function onDamageTaken(mob, attacker, damage)
|
||||
if not attacker:IsPlayer() and mob:GetHP() - damage < 0 then
|
||||
mob:addHP(damage)
|
||||
end
|
||||
end
|
||||
|
||||
function onDamageTaken(mob, attacker, damage, damageType)
|
||||
if attacker.IsPlayer() then
|
||||
local man0g0Quest = attacker:GetQuest("Man0g0");
|
||||
if damageType == DAMAGE_TAKEN_TYPE_ATTACK then
|
||||
if man0g0Quest:GetPhase() == 5 then
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
|
||||
man0g0Quest:NextPhase(6);
|
||||
end;
|
||||
elseif damageType == DAMAGE_TAKEN_TYPE_WEAPONSKILL or damageType == DAMAGE_TAKEN_TYPE_MAGIC then
|
||||
if man0g0Quest:GetPhase() == 6 then
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
|
||||
man0g0Quest:NextPhase(7);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
function onCombatTick(mob, target, tick, contentGroupCharas)
|
||||
if mob:GetSpeed() == 0 then
|
||||
mob:SetMod(modifiersGlobal.Speed, 8)
|
||||
end
|
||||
end
|
||||
|
||||
function onDeath(mob, player, lastAttacker)
|
||||
if player then
|
||||
local man0g0Quest = player:GetQuest("Man0g0");
|
||||
if man0g0Quest and man0g0Quest:GetPhase() >= 7 then
|
||||
man0g0Quest:NextPhase(man0g0Quest:GetPhase() + 1);
|
||||
mob:SetTempVar("playerId", player.actorId);
|
||||
if man0g0Quest:GetPhase() == 10 then
|
||||
local worldMaster = GetWorldMaster();
|
||||
player:SendDataPacket("attention", worldMaster, "", 51073, 1);
|
||||
kickEventContinue(player, director, "noticeEvent", "noticeEvent");
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent020_1", nil, nil, nil);
|
||||
player:ChangeMusic(7);
|
||||
player:Disengage(0x0000);
|
||||
mob:SetTempVar("complete", 1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function onDespawn(mob)
|
||||
if zone then
|
||||
local player = zone.FindActorInArea(mob:GetTempVar("playerId"));
|
||||
|
||||
if player and mob:GetTempVar("complete") == 1 then
|
||||
local man0g0Quest = player:GetQuest("Man0g0");
|
||||
player:GetZone():ContentFinished();
|
||||
player:EndEvent();
|
||||
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
function onDisengage(mob)
|
||||
mob:SetMod(modifiersGlobal.Speed, 0)
|
||||
mob:Despawn()
|
||||
end
|
|
@ -1,11 +1,11 @@
|
|||
require ("global")
|
||||
|
||||
require ("modifiers")
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(ally)
|
||||
ally:SetMaxHP(69420)
|
||||
ally:SetHP(ally:GetMaxHP())
|
||||
ally.isAutoAttackEnabled = false;
|
||||
end;
|
||||
|
||||
function onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas);
|
||||
end;
|
||||
ally.neutral = false
|
||||
ally:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
|
@ -1,11 +1,10 @@
|
|||
require ("global")
|
||||
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(ally)
|
||||
ally.isAutoAttackEnabled = false
|
||||
ally:SetMaxHP(69420)
|
||||
ally:SetHP(ally:GetMaxHP())
|
||||
ally.isAutoAttackEnabled = false;
|
||||
ally.neutral = false
|
||||
ally:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
||||
|
||||
function onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
end
|
|
@ -7,9 +7,10 @@ end
|
|||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0g0Quest = player:GetQuest("Man0g0");
|
||||
|
||||
print("hi");
|
||||
if (man0g0Quest ~= nil) then
|
||||
|
||||
|
||||
print("hi2");
|
||||
if (triggerName == "pushDefault") then
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil);
|
||||
elseif (triggerName == "talkDefault") then
|
||||
|
@ -22,6 +23,7 @@ function onEventStarted(player, npc, triggerName)
|
|||
man0g0Quest:SaveData();
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
--Was she talked to after papalymo?
|
||||
print("hi3");
|
||||
else
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
|
||||
|
||||
|
@ -41,6 +43,7 @@ function onEventStarted(player, npc, triggerName)
|
|||
player:KickEvent(director, "noticeEvent", true);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
print("hi5");
|
||||
GetWorldManager():DoZoneChangeContent(player, contentArea, 362.4087, 4, -703.8168, 1.5419, 16);
|
||||
return;
|
||||
else
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_hill_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithTask_board_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithGagaroon_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithLouisoix_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_carver_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_holmes_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_kirk_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_stone_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithSerpent_private_white_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultSea = GetStaticActor("DftSea");
|
||||
callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithRubh_hob_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue