mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Merging
This commit is contained in:
commit
205d3619d6
49 changed files with 118 additions and 491 deletions
|
@ -41,14 +41,14 @@ function allyGlobal.HelpPlayers(ally, contentGroupCharas, pickRandomTarget)
|
|||
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
|
||||
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, nil);
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
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
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,6 +0,0 @@
|
|||
function onEventStarted(player, caller, commandRequest, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
|
||||
|
||||
player:SetCurrentJob(17);
|
||||
|
||||
player:EndEvent();
|
||||
end
|
|
@ -1,3 +0,0 @@
|
|||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
|
||||
player.Cast(command.actorId, targetActor);
|
||||
player:endEvent();
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,14 +0,0 @@
|
|||
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
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -19,9 +19,6 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -17,8 +17,5 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
|
@ -20,8 +20,5 @@ function onMagicFinish(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;
|
|
@ -19,9 +19,6 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -19,9 +19,6 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -20,8 +20,5 @@ function onMagicFinish(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;
|
|
@ -20,8 +20,5 @@ function onMagicFinish(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;
|
|
@ -19,9 +19,6 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -17,8 +17,5 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -17,8 +17,5 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -17,8 +17,5 @@ function onMagicFinish(caster, target, spell, action)
|
|||
-- 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;
|
|
@ -1,4 +1,5 @@
|
|||
require ("global")
|
||||
require ("ally")
|
||||
require ("modifiers")
|
||||
|
||||
function onCreate(starterPlayer, contentArea, director)
|
||||
|
@ -33,6 +34,42 @@ function onCreate(starterPlayer, contentArea, director)
|
|||
|
||||
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()
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
require ("modifiers")
|
||||
|
||||
function onSpawn(mob)
|
||||
mob:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
||||
|
||||
function onDamageTaken(mob, attacker, damage)
|
||||
if not attacker:IsPlayer() and mob:GetHP() - damage < 0 then
|
||||
mob:addHP(damage)
|
||||
end
|
||||
end
|
||||
|
||||
function onCombatTick(mob, target, tick, contentGroupCharas)
|
||||
if mob:GetSpeed() == 0 then
|
||||
mob:SetMod(modifiersGlobal.Speed, 8)
|
||||
end
|
||||
end
|
||||
|
||||
function onDisengage(mob)
|
||||
mob:SetMod(modifiersGlobal.Speed, 0)
|
||||
mob:Despawn()
|
||||
end
|
|
@ -1,4 +1,5 @@
|
|||
require ("global")
|
||||
require ("modifiers")
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(ally)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
require ("global")
|
||||
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(ally)
|
||||
ally:SetMaxHP(69420)
|
||||
ally:SetHP(ally:GetMaxHP())
|
||||
ally.isAutoAttackEnabled = false
|
||||
ally.isAutoAttackEnabled = false;
|
||||
ally.neutral = false
|
||||
ally:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
||||
|
||||
function onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
|
@ -23,4 +23,4 @@ function onRoam(ally, contentGroupCharas)
|
|||
ally.neutral = false
|
||||
ally.animationId = 0
|
||||
--allyGlobal.onCombatTick(ally, contentGroupCharas)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue