mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
abilities now use correct animation id (<3 azia)
- did stuff with magicstate/attackstate - fixed status effect tick - added regen status (todo: actually populate the table and use that name instead of enum's) - added baseStats to char (todo: add bonuses and stuff on top of those, set charaWork values to the calculated ones + bonus)
This commit is contained in:
parent
88abd59ec3
commit
11bbb023d9
25 changed files with 426 additions and 235 deletions
|
@ -11,9 +11,10 @@ Switches between active and passive mode states
|
|||
function onEventStarted(player, command, triggerName)
|
||||
|
||||
if (player:GetState() == 0) then
|
||||
player.ChangeState(2);
|
||||
player.Engage();
|
||||
elseif (player:GetState() == 2) then
|
||||
player:ChangeState(0);
|
||||
player:ChangeState(0);
|
||||
player.Disengage();
|
||||
end
|
||||
player:endEvent();
|
||||
|
|
36
data/scripts/commands/AttackMagic.lua
Normal file
36
data/scripts/commands/AttackMagic.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
require ("global")
|
||||
require ("utils")
|
||||
|
||||
--[[
|
||||
|
||||
AttackWeaponSkill Script
|
||||
|
||||
Finds the correct weaponskill subscript to fire when a weaponskill actor is activated.
|
||||
|
||||
--]]
|
||||
|
||||
local attackMagicHandlers = {
|
||||
|
||||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
print(command.actorId)
|
||||
--Are they in active mode?
|
||||
if (player:GetState() != 2) then
|
||||
player:SendGameMessage(GetWorldMaster(), 32503, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
--Does the target exist
|
||||
target = player:getZone():FindActorInArea(targetActor);
|
||||
if (target == nil) then
|
||||
player:SendGameMessage(GetWorldMaster(), 30203, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
player.Cast(command.actorId);
|
||||
player:endEvent();
|
||||
|
||||
end
|
|
@ -9,80 +9,6 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
|
|||
|
||||
--]]
|
||||
|
||||
local function handlePummel(player, target)
|
||||
player:SendMessage(0x20, "", "DOING PUMMEL!!!!");
|
||||
|
||||
params = {};
|
||||
params.range = 10.0;
|
||||
params.recast = 10;
|
||||
|
||||
params.hpCost = 0;
|
||||
params.mpCost = 0;
|
||||
params.tpCost = 1000;
|
||||
|
||||
params.targetType = 2;
|
||||
params.canCrit = true;
|
||||
params.animationId = 0x12312312;
|
||||
|
||||
|
||||
end
|
||||
|
||||
local function handleSkullSunder(player)
|
||||
player:SendMessage(0x20, "", "DOING SKULL SUNDER!!!!");
|
||||
end
|
||||
|
||||
local weaponskillHandlers = {
|
||||
[0xA0F069E6] = handlePummel,
|
||||
[0xA0F069E7] = nil,
|
||||
[0xA0F069E8] = nil,
|
||||
[0xA0F069E9] = nil,
|
||||
[0xA0F069EA] = nil,
|
||||
[0xA0F069EB] = nil,
|
||||
[0xA0F069EC] = nil,
|
||||
[0xA0F069ED] = nil,
|
||||
[0xA0F069EE] = nil,
|
||||
[0xA0F069EF] = nil,
|
||||
[0xA0F06A0E] = nil,
|
||||
[0xA0F06A0F] = nil,
|
||||
[0xA0F06A10] = nil,
|
||||
[0xA0F06A11] = nil,
|
||||
[0xA0F06A12] = nil,
|
||||
[0xA0F06A13] = nil,
|
||||
[0xA0F06A14] = nil,
|
||||
[0xA0F06A15] = nil,
|
||||
[0xA0F06A16] = nil,
|
||||
[0xA0F06A17] = nil,
|
||||
[0xA0F06A36] = nil,
|
||||
[0xA0F06A37] = handleSkullSunder,
|
||||
[0xA0F06A38] = nil,
|
||||
[0xA0F06A39] = nil,
|
||||
[0xA0F06A3A] = nil,
|
||||
[0xA0F06A3B] = nil,
|
||||
[0xA0F06A3C] = nil,
|
||||
[0xA0F06A3D] = nil,
|
||||
[0xA0F06A3E] = nil,
|
||||
[0xA0F06A3F] = nil,
|
||||
[0xA0F06A5C] = nil,
|
||||
[0xA0F06A5D] = nil,
|
||||
[0xA0F06A5E] = nil,
|
||||
[0xA0F06A60] = nil,
|
||||
[0xA0F06A61] = nil,
|
||||
[0xA0F06A62] = nil,
|
||||
[0xA0F06A63] = nil,
|
||||
[0xA0F06A64] = nil,
|
||||
[0xA0F06A85] = nil,
|
||||
[0xA0F06A86] = nil,
|
||||
[0xA0F06A87] = nil,
|
||||
[0xA0F06A88] = nil,
|
||||
[0xA0F06A89] = nil,
|
||||
[0xA0F06A8A] = nil,
|
||||
[0xA0F06A8B] = nil,
|
||||
[0xA0F06A8C] = nil,
|
||||
[0xA0F06A8D] = nil,
|
||||
[0xA0F06A8E] = nil,
|
||||
[0xA0F06A8F] = nil
|
||||
}
|
||||
|
||||
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
|
||||
|
||||
--Are they in active mode?
|
||||
|
@ -100,19 +26,7 @@ function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, ta
|
|||
return;
|
||||
end
|
||||
|
||||
--Are you too far away?
|
||||
if (getDistanceBetweenActors(player, target) > 7) then
|
||||
player:SendGameMessage(GetWorldMaster(), 32539, 0x20);
|
||||
player:endEvent();
|
||||
return;
|
||||
end
|
||||
|
||||
if (weaponskillHandlers[command.actorId] ~= nil) then
|
||||
weaponskillHandlers[command.actorId](player);
|
||||
else
|
||||
player:SendMessage(0x20, "", "That weaponskill is not implemented yet.");
|
||||
end
|
||||
|
||||
player.WeaponSkill(command.actorId);
|
||||
player:endEvent();
|
||||
|
||||
end
|
31
data/scripts/commands/gm/effect.lua
Normal file
31
data/scripts/commands/gm/effect.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
require("global");
|
||||
require("bit32");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "iiii",
|
||||
description =
|
||||
[[
|
||||
effect
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, effectId, magnitude, tick, duration)
|
||||
local messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "effect";
|
||||
|
||||
if player then
|
||||
player.AddHP(100000);
|
||||
player.DelHP(500);
|
||||
|
||||
effectId = tonumber(effectId) or 223180;
|
||||
magnitude = tonumber(magnitude) or 300;
|
||||
tick = tonumber(tick) or 3;
|
||||
duration = tonumber(duration) or 60;
|
||||
|
||||
while player.statusEffects.HasStatusEffect(effectId) do
|
||||
player.statusEffects.RemoveStatusEffect(effectId);
|
||||
end;
|
||||
player.statusEffects.AddStatusEffect(effectId, magnitude, tick, duration);
|
||||
end;
|
||||
end;
|
30
data/scripts/effects/regen.lua
Normal file
30
data/scripts/effects/regen.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
require("global")
|
||||
messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
sender = "regen";
|
||||
|
||||
function onGain(target, effect)
|
||||
messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
sender = "regen";
|
||||
|
||||
target.SendMessage(messageId, sender, "dicks");
|
||||
end;
|
||||
|
||||
function onTick(target, effect)
|
||||
messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
sender = "regen";
|
||||
|
||||
local ability = GetWorldManager().GetAbility(27346);
|
||||
local anim = bit32.bxor(bit32.lshift(ability.animationType, 24), bit32.lshift(tonumber(1), 12) , 101);
|
||||
local addHp = effect.GetMagnitude();
|
||||
|
||||
target.AddHP(addHp);
|
||||
target.SendBattleActionX01Packet(anim, 101, 0, 0, addHp);
|
||||
target.SendMessage(messageId, sender, string.format("ate %u dicks", addHp));
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
sender = "regen";
|
||||
|
||||
target.SendMessage(messageId, sender, "dicks gon");
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue