mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Added party to Gridania opening, fixed BattleActionx18 and made it so x18 is used for packets with more than 10 targets. Changed how death works. Added respawn time and roam modifiers. Added TryAggro functions and moved aggroing out of roaming and helpplayers. Fixed high cpu usage in zone's OnUpdate function. Fixed work value in player update
This commit is contained in:
parent
520ae7a119
commit
1275c8b5da
61 changed files with 1226 additions and 223 deletions
|
@ -34,9 +34,10 @@ function allyGlobal.onDespawn(ally)
|
|||
|
||||
end
|
||||
|
||||
--tryAggro serves the same purpose for now, keeping this around just in case
|
||||
function allyGlobal.HelpPlayers(ally, contentGroupCharas, pickRandomTarget)
|
||||
if contentGroupCharas then
|
||||
for _, chara in pairs(contentGroupCharas) do
|
||||
if contentGroupCharas and not ally.IsEngaged() then
|
||||
for chara in contentGroupCharas do
|
||||
if chara then
|
||||
-- probably a player, or another ally
|
||||
-- todo: queue support actions, heal, try pull hate off player etc
|
||||
|
@ -44,12 +45,14 @@ function allyGlobal.HelpPlayers(ally, contentGroupCharas, pickRandomTarget)
|
|||
-- do stuff
|
||||
if not ally.IsEngaged() then
|
||||
if chara.IsEngaged() then
|
||||
allyGlobal.EngageTarget(ally, chara.target, nil)
|
||||
allyGlobal.EngageTarget(ally, chara.target, nil);
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif chara.IsMonster() and chara.IsEngaged() then
|
||||
if not ally.IsEngaged() then
|
||||
allyGlobal.EngageTarget(ally, chara.target, nil)
|
||||
allyGlobal.EngageTarget(ally, chara, nil);
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -57,6 +60,36 @@ function allyGlobal.HelpPlayers(ally, contentGroupCharas, pickRandomTarget)
|
|||
end
|
||||
end
|
||||
|
||||
--Iterate over characters in contentGroup, if a player is in combat, assist them.
|
||||
function allyGlobal.tryAggro(ally, contentGroupCharas)
|
||||
local count = 0;
|
||||
if contentGroupCharas and not ally.IsEngaged() then
|
||||
for i = 0, #contentGroupCharas - 1 do
|
||||
if contentGroupCharas[i] and ally then
|
||||
if contentGroupCharas[i].IsPlayer() then
|
||||
-- probably a player, or another ally
|
||||
-- todo: queue support actions, heal, try pull hate off player etc
|
||||
if contentGroupCharas[i].target then
|
||||
if ally.aiContainer:GetTargetFind():CanTarget(contentGroupCharas[i].target) and contentGroupCharas[i].target.IsMonster() and contentGroupCharas[i].target.hateContainer:HasHateForTarget(contentGroupCharas[i]) then
|
||||
-- do stuff
|
||||
allyGlobal.EngageTarget(ally, contentGroupCharas[i].target, nil);
|
||||
break;
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
elseif contentGroupCharas[i].IsMonster() and contentGroupCharas[i].IsEngaged() then
|
||||
if not ally.IsEngaged() then
|
||||
print("Engaging monster that is engaged");
|
||||
allyGlobal.EngageTarget(ally, contentGroupCharas[i], nil);
|
||||
break;
|
||||
end]]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function allyGlobal.HealPlayer(ally, player)
|
||||
|
||||
end
|
||||
|
@ -67,14 +100,16 @@ 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)
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif target then
|
||||
ally.Engage(target)
|
||||
ally.hateContainer.AddBaseHate(target);
|
||||
end
|
||||
end
|
13
data/scripts/commands/AbilityCure.lua
Normal file
13
data/scripts/commands/AbilityCure.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
local shortCommandId = bit32.bxor(command, 2700083200);
|
||||
local ability = worldManager:GetAbility(shortCommandId);
|
||||
|
||||
--player:PlayAnimation(ability.modelAnimation);
|
||||
|
||||
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/ArrowReloadCommand.lua
Normal file
14
data/scripts/commands/ArrowReloadCommand.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation, 0x756D, command.actorId, ability.animationType);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/AttackAbility.lua
Normal file
14
data/scripts/commands/AttackAbility.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation, 0x756D, command.actorId, ability.animationType);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
6
data/scripts/commands/ChangeJobCommand.lua
Normal file
6
data/scripts/commands/ChangeJobCommand.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
function onEventStarted(player, caller, commandRequest, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
|
||||
|
||||
player:SetCurrentJob(17);
|
||||
|
||||
player:EndEvent();
|
||||
end
|
3
data/scripts/commands/CureMagic.lua
Normal file
3
data/scripts/commands/CureMagic.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
end
|
14
data/scripts/commands/CuregaMagic.lua
Normal file
14
data/scripts/commands/CuregaMagic.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation, 0x756D, command.actorId, ability.animationType);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/EffectMagic.lua
Normal file
14
data/scripts/commands/EffectMagic.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetBattleCommand(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/EsunaMagic.lua
Normal file
14
data/scripts/commands/EsunaMagic.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation, 0x756D, command.actorId, ability.animationType);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
7
data/scripts/commands/PointSearchAbility.lua
Normal file
7
data/scripts/commands/PointSearchAbility.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/RaiseMagic.lua
Normal file
14
data/scripts/commands/RaiseMagic.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/ShotCommand.lua
Normal file
14
data/scripts/commands/ShotCommand.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
14
data/scripts/commands/SongMagic.lua
Normal file
14
data/scripts/commands/SongMagic.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
require("global")
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
local worldManager = GetWorldManager();
|
||||
--local shortCommandId = command.actorId;--bit32:bxor(command.actorId, 2700083200);
|
||||
local ability = worldManager:GetAbility(command.actorId);
|
||||
|
||||
if ability then
|
||||
player.SendBattleActionX01Packet(ability.modelAnimation, ability.effectAnimation, 0x756D, command.actorId, ability.animationType);
|
||||
end
|
||||
|
||||
player:endEvent();
|
||||
end
|
|
@ -152,8 +152,11 @@ function onTrigger(player, argc, skillName, level)
|
|||
--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 );
|
||||
local actor = player.GetZone().SpawnActor(2104001, 'ass', x, y, z, rot, 0, 0, true );
|
||||
|
||||
if player.currentContentGroup then
|
||||
player.currentContentGroup:AddMember(actor.actorId)
|
||||
end
|
||||
--actor.FollowTarget(player, 3.2);
|
||||
end;
|
||||
return;
|
||||
|
|
24
data/scripts/commands/magic/Distortion.lua
Normal file
24
data/scripts/commands/magic/Distortion.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/Healing Trap.lua
Normal file
24
data/scripts/commands/magic/Healing Trap.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/Homing Missle.lua
Normal file
24
data/scripts/commands/magic/Homing Missle.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/Return Trap.lua
Normal file
24
data/scripts/commands/magic/Return Trap.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/Stun II.lua
Normal file
24
data/scripts/commands/magic/Stun II.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/Stun.lua
Normal file
24
data/scripts/commands/magic/Stun.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/Transfer Trap.lua
Normal file
24
data/scripts/commands/magic/Transfer Trap.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/blizzard.lua
Normal file
24
data/scripts/commands/magic/blizzard.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/buff trap.lua
Normal file
24
data/scripts/commands/magic/buff trap.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
27
data/scripts/commands/magic/burst.lua
Normal file
27
data/scripts/commands/magic/burst.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(1000, 2500);
|
||||
|
||||
-- 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/magic/fira.lua
Normal file
27
data/scripts/commands/magic/fira.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
-- 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/magic/firaga.lua
Normal file
27
data/scripts/commands/magic/firaga.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(1000, 2500);
|
||||
|
||||
-- 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/magic/fire.lua
Normal file
27
data/scripts/commands/magic/fire.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
-- 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/magic/flare.lua
Normal file
27
data/scripts/commands/magic/flare.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(1000, 2500);
|
||||
|
||||
-- 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/magic/freeze.lua
Normal file
27
data/scripts/commands/magic/freeze.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
-- 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/magic/holy.lua
Normal file
27
data/scripts/commands/magic/holy.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(1000, 2500);
|
||||
|
||||
-- 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;
|
24
data/scripts/commands/magic/thundaga.lua
Normal file
24
data/scripts/commands/magic/thundaga.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
24
data/scripts/commands/magic/thundara.lua
Normal file
24
data/scripts/commands/magic/thundara.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, spell)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicFinish(caster, target, spell, action)
|
||||
local damage = math.random(10, 100);
|
||||
|
||||
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);
|
||||
|
||||
if target.hateContainer then
|
||||
target.hateContainer.UpdateHate(caster, damage);
|
||||
end;
|
||||
return damage;
|
||||
end;
|
26
data/scripts/commands/weaponskill/simian_thrash.lua
Normal file
26
data/scripts/commands/weaponskill/simian_thrash.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(0, 0);
|
||||
|
||||
-- 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;
|
|
@ -10,12 +10,12 @@ function onCreate(starterPlayer, contentArea, director)
|
|||
--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);
|
||||
--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.currentParty:AddMember(papalymo.actorId);
|
||||
starterPlayer.currentParty:AddMember(yda.actorId);
|
||||
starterPlayer:SetMod(modifiersGlobal.MinimumHpLock, 1);
|
||||
|
||||
|
||||
|
@ -35,6 +35,47 @@ end
|
|||
|
||||
function onDestroy()
|
||||
|
||||
|
||||
end
|
||||
|
||||
--Iterating over allies using the for...in syntax throws an except and lags the server.
|
||||
--This function probably isn't needed either way, it does the smae thing as TryAggro in ally
|
||||
function onUpdate(tick, area)
|
||||
if area then
|
||||
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
|
||||
|
||||
if allies then
|
||||
for i = 0, #allies - 1 do
|
||||
if allies[i] then
|
||||
if not allies[i]:IsEngaged() then
|
||||
if player:IsEngaged() and player.target then
|
||||
|
||||
allies[i].neutral = false
|
||||
allies[i].isAutoAttackEnabled = true
|
||||
allies[i]:SetMod(modifiersGlobal.Speed, 8)
|
||||
allyGlobal.EngageTarget(allies[i], player.target)
|
||||
exitLoop = true
|
||||
break
|
||||
-- todo: support scripted paths
|
||||
elseif allies[i]:GetSpeed() > 0 then
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if exitLoop then
|
||||
resumeChecks = false
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not resumeChecks then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
|
@ -10,55 +10,71 @@ function init()
|
|||
return "/Director/Quest/QuestDirectorMan0g001";
|
||||
end
|
||||
|
||||
--Should we be using this to spawn mobs and drop Simplecontent?
|
||||
function onCreateContentArea(players, director, contentArea, contentGroup)
|
||||
director:StartContentGroup();
|
||||
end
|
||||
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
man0g0Quest = player:GetQuest("Man0g0");
|
||||
player:SendMessage(0x20, "", "Starting");
|
||||
startTutorialMode(player);
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl001", nil, nil, nil);
|
||||
player:EndEvent();
|
||||
player:SendMessage(0x20, "", "Waiting for player active");
|
||||
waitForSignal("playerActive");
|
||||
player:SendMessage(0x20, "", "player active");
|
||||
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:SendMessage(0x20, "", "processTtrBtl002 called");
|
||||
player:EndEvent();
|
||||
waitForSignal("playerAttack");
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
|
||||
wait(3);
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
|
||||
waitForSignal("tpOver1000");
|
||||
closeTutorialWidget(player);
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
|
||||
|
||||
--Combat portion of tutorial
|
||||
if player:IsDiscipleOfWar() then
|
||||
waitForSignal("weaponskillUsed"); --Should be wait for weaponskillUsed signal
|
||||
waitForSignal("playerAttack");
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
|
||||
waitForSignal("tpOver1000");
|
||||
closeTutorialWidget(player);
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
|
||||
waitForSignal("weaponskillUsed");
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
|
||||
elseif player:IsDiscipleOfMagic() then
|
||||
waitForSignal("spellUsed")
|
||||
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_CASTING);
|
||||
waitForSignal("spellUsed");
|
||||
closeTutorialWidget(player);
|
||||
elseif player:IsDiscipleOfHand() then
|
||||
waitForSignal("abilityUsed")
|
||||
waitForSignal("abilityUsed");
|
||||
elseif player:IsDiscipleOfLand() then
|
||||
waitForSignal("abilityUsed")
|
||||
waitForSignal("abilityUsed");
|
||||
end
|
||||
closeTutorialWidget(player);
|
||||
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
|
||||
|
||||
waitForSignal("mobkill"); --Should be wait for mobkill
|
||||
--Currently this requires the player to pass all the other signals first, need a way for signals to work out of order
|
||||
waitForSignal("mobkill");
|
||||
waitForSignal("mobkill");
|
||||
waitForSignal("mobkill");
|
||||
worldMaster = GetWorldMaster();
|
||||
wait(5);--Debug waits, get rid of these later
|
||||
player:Disengage(0x0000);
|
||||
wait(5);
|
||||
man0g0Quest:NextPhase(10);
|
||||
wait(5);
|
||||
--This doesn't work
|
||||
player:RemoveFromCurrentPartyAndCleanup();
|
||||
player:SendDataPacket("attention", worldMaster, "", 51073, 2);
|
||||
wait(7);
|
||||
wait(5);
|
||||
player:ChangeMusic(7);
|
||||
player:ChangeState(0);
|
||||
wait(5);
|
||||
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
|
||||
wait(5);
|
||||
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);
|
||||
wait(5);
|
||||
player:GetZone():ContentFinished();
|
||||
--player:EndEvent();
|
||||
--GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
|
||||
--[[
|
||||
IF DoW:
|
||||
OpenWidget (TP)
|
||||
|
@ -69,13 +85,12 @@ function onEventStarted(player, actor, triggerName)
|
|||
Success
|
||||
CloseWidget
|
||||
ELSE MAGIC:
|
||||
OpenWidget (DEFEAT ENEMY)
|
||||
OpenWidget (DEFEAT ENEMY)
|
||||
]]
|
||||
|
||||
--man0g0Quest:NextPhase(10);
|
||||
--player:EndEvent();
|
||||
|
||||
--GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
|
||||
player:EndEvent();
|
||||
wait(5);
|
||||
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
|
||||
|
||||
end
|
||||
|
||||
|
|
79
data/scripts/modifiers.lua
Normal file
79
data/scripts/modifiers.lua
Normal file
|
@ -0,0 +1,79 @@
|
|||
modifiersGlobal =
|
||||
{
|
||||
None = 0,
|
||||
Hp = 1,
|
||||
HpPercent = 2,
|
||||
Mp = 3,
|
||||
MpPercent = 4,
|
||||
Tp = 5,
|
||||
TpPercent = 6,
|
||||
Regen = 7,
|
||||
Refresh = 8,
|
||||
Strength = 9,
|
||||
Vitality = 10,
|
||||
Dexterity = 11,
|
||||
Intelligence = 12,
|
||||
Mind = 13,
|
||||
Piety = 14,
|
||||
Attack = 15,
|
||||
Accuracy = 16,
|
||||
Defense = 17,
|
||||
Evasion = 18,
|
||||
MagicAttack = 19,
|
||||
MagicHeal = 20, -- is this needed? shouldnt it just be calc'd from mind
|
||||
MagicAccuracy = 21,
|
||||
MagicEvasion = 22,
|
||||
MagicDefense = 23,
|
||||
MagicEnhancePotency = 24,
|
||||
MagicEnfeeblingPotency = 25,
|
||||
ResistFire = 26,
|
||||
ResistIce = 27,
|
||||
ResistWind = 28,
|
||||
ResistLightning = 29,
|
||||
ResistEarth = 30,
|
||||
ResistWater = 31, -- <3 u jorge
|
||||
AttackRange = 32,
|
||||
Speed = 33,
|
||||
AttackDelay = 34,
|
||||
|
||||
CraftProcessing = 35,
|
||||
CraftMagicProcessing = 36,
|
||||
CraftProcessControl = 37,
|
||||
|
||||
HarvestPotency = 38,
|
||||
HarvestLimit = 39,
|
||||
HarvestRate = 40,
|
||||
|
||||
Raise = 41,
|
||||
MinimumHpLock = 42, -- hp cannot fall below this value
|
||||
}
|
||||
|
||||
mobModifiersGlobal =
|
||||
{
|
||||
None = 0,
|
||||
SpawnLeash = 1, -- how far can i move before i deaggro target
|
||||
SightRange = 2, -- how close does target need to be for me to detect by sight
|
||||
SoundRange = 3, -- how close does target need to be for me to detect by sound
|
||||
BuffChance = 4,
|
||||
HealChance = 5,
|
||||
SkillUseChance = 6,
|
||||
LinkRadius = 7,
|
||||
MagicDelay = 8,
|
||||
SpecialDelay = 9,
|
||||
ExpBonus = 10, --
|
||||
IgnoreSpawnLeash = 11, -- pursue target forever
|
||||
DrawIn = 12, -- do i suck people in around me
|
||||
HpScale = 13, --
|
||||
Assist = 14, -- gotta call the bois
|
||||
NoMove = 15, -- cant move
|
||||
ShareTarget = 16, -- use this actor's id as target id
|
||||
AttackScript = 17, -- call my script's onAttack whenever i attack
|
||||
DefendScript = 18, -- call my script's onDamageTaken whenever i take damage
|
||||
SpellScript = 19, -- call my script's onSpellCast whenever i finish casting
|
||||
WeaponskillScript = 20, -- call my script's onWeaponSkill whenever i finish using a weaponskill
|
||||
AbilityScript = 21, -- call my script's onAbility whenever i finish using an ability
|
||||
CallForHelp = 22, -- actor with this id outside of target's party with this can attack me
|
||||
FreeForAll = 23, -- any actor can attack me
|
||||
Roams = 24, -- Do I walk around?
|
||||
RoamDelay = 25 -- What is the delay between roam ticks
|
||||
}
|
|
@ -19,4 +19,9 @@ function onRoam(ally, contentGroupCharas)
|
|||
ally.neutral = false
|
||||
ally.animationId = 0
|
||||
allyGlobal.onCombatTick(ally, nil, nil, contentGroupCharas)
|
||||
end
|
||||
|
||||
|
||||
function tryAggro(ally, contentGroupCharas)
|
||||
allyGlobal.tryAggro(ally, contentGroupCharas)
|
||||
end
|
|
@ -13,10 +13,14 @@ function onCombatTick(ally, target, tick, contentGroupCharas)
|
|||
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
end
|
||||
|
||||
function tryAggro(ally, contentGroupCharas)
|
||||
allyGlobal.tryAggro(ally, contentGroupCharas)
|
||||
end
|
||||
|
||||
function onRoam(ally, contentGroupCharas)
|
||||
ally.detectionType = 0xFF
|
||||
ally.isMovingToSpawn = false
|
||||
ally.neutral = false
|
||||
ally.animationId = 0
|
||||
allyGlobal.onCombatTick(ally, contentGroupCharas)
|
||||
--allyGlobal.onCombatTick(ally, contentGroupCharas)
|
||||
end
|
|
@ -7,10 +7,9 @@ end
|
|||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0g0Quest = player:GetQuest("Man0g0");
|
||||
print("hi");
|
||||
if (man0g0Quest ~= nil) then
|
||||
|
||||
print("hi2");
|
||||
print("Got Quest Man0g0");
|
||||
if (man0g0Quest ~= nil) then
|
||||
print("Man0g0Quest is not nil");
|
||||
if (triggerName == "pushDefault") then
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrNomal002", nil, nil, nil);
|
||||
elseif (triggerName == "talkDefault") then
|
||||
|
@ -23,8 +22,8 @@ function onEventStarted(player, npc, triggerName)
|
|||
man0g0Quest:SaveData();
|
||||
player:GetDirector("OpeningDirector"):onTalkEvent(player, npc);
|
||||
--Was she talked to after papalymo?
|
||||
print("hi3");
|
||||
else
|
||||
print("Making content area");
|
||||
if (man0g0Quest:GetQuestFlag(MAN0G0_FLAG_MINITUT_DONE1) == true) then
|
||||
|
||||
player:EndEvent();
|
||||
|
@ -37,14 +36,15 @@ function onEventStarted(player, npc, triggerName)
|
|||
end
|
||||
|
||||
director = contentArea:GetContentDirector();
|
||||
player:AddDirector(director);
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(false);
|
||||
|
||||
player:KickEvent(director, "noticeEvent", true);
|
||||
player:SetLoginDirector(director);
|
||||
|
||||
print("hi5");
|
||||
print("Content area and director made");
|
||||
GetWorldManager():DoZoneChangeContent(player, contentArea, 362.4087, 4, -703.8168, 1.5419, 16);
|
||||
print("Zone Change");
|
||||
return;
|
||||
else
|
||||
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent000_1", nil, nil, nil);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue