mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Combat fixes
Add actor update flag for hotbar to send hotbar changes all at once. Add script for equipping all actions for a class/job. Fix multiple script errors. Fix multiple status flag errors Fix battle command db errors Fix error in spawnnpc and yolo.
This commit is contained in:
parent
a92ece58c1
commit
3104478263
20 changed files with 149 additions and 48 deletions
42
data/scripts/commands/gm/equipactions.lua
Normal file
42
data/scripts/commands/gm/equipactions.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
require("global");
|
||||
require("modifiers");
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "s",
|
||||
description =
|
||||
[[
|
||||
equips all your class and job actions
|
||||
]],
|
||||
}
|
||||
|
||||
classToActions = {
|
||||
[2] = { Start = 27100, End = 27119},
|
||||
[3] = { Start = 27140, End = 27159},
|
||||
[4] = { Start = 27180, End = 27199},
|
||||
[7] = { Start = 27220, End = 27239},
|
||||
[8] = { Start = 27260, End = 27279},
|
||||
[22] = { Start = 27300, End = 27319},
|
||||
[23] = { Start = 27340, End = 27359}
|
||||
}
|
||||
|
||||
function onTrigger(player, argc)
|
||||
local messageId = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "equipactions";
|
||||
|
||||
classId = player.GetClass()
|
||||
|
||||
if classToActions[classId] then
|
||||
s = classToActions[classId].Start
|
||||
e = classToActions[classId].End
|
||||
print('h')
|
||||
for i = 0, 30 do
|
||||
player.UnequipAbility(i, false)
|
||||
end
|
||||
|
||||
for commandid = s, e do
|
||||
if GetWorldManager():GetBattleCommand(commandid) then
|
||||
player:EquipAbilityInFirstOpenSlot(player:GetCurrentClassOrJob(), commandid);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -95,7 +95,6 @@ function onTrigger(player, argc, name, width, height, blockCount)
|
|||
local sender = "spawnnpc";
|
||||
|
||||
if player and (modelIds[name] != nil) then
|
||||
print("t")
|
||||
local pos = player:GetPos();
|
||||
local x = tonumber(pos[0]);
|
||||
local y = tonumber(pos[1]);
|
||||
|
@ -113,11 +112,12 @@ function onTrigger(player, argc, name, width, height, blockCount)
|
|||
actor.ChangeNpcAppearance(modelIds[name]);
|
||||
actor.SetMaxHP(5000);
|
||||
actor.SetHP(5000);
|
||||
actor.SetMod(modifiersGlobal.HasShield, 1);
|
||||
actor.SetMod(modifiersGlobal.CanBlock, 1);
|
||||
actor.SetMod(modifiersGlobal.AttackRange, 3);
|
||||
actor.SetMod(modifiersGlobal.Speed, 5);
|
||||
actor.SetMod(modifiersGlobal.MovementSpeed, 5);
|
||||
actor.SetMobMod(mobModifiersGlobal.Roams, 1);
|
||||
actor.SetMobMod(mobModifiersGlobal.RoamDelay, 3);
|
||||
actor.SetMobMod(mobModifiersGlobal.RoamDelay, 10);
|
||||
actor.charaWork.parameterSave.state_mainSkillLevel = 52;
|
||||
actor.moveState = 3;
|
||||
end;
|
||||
end;
|
||||
|
|
|
@ -163,11 +163,12 @@ function onTrigger(player, argc, width, height, blockCount)
|
|||
actor.ChangeNpcAppearance(2200905);
|
||||
actor.SetMaxHP(5000);
|
||||
actor.SetHP(5000);
|
||||
actor.SetMod(modifiersGlobal.HasShield, 1);
|
||||
actor.SetMod(modifiersGlobal.CanBlock, 1);
|
||||
actor.SetMod(modifiersGlobal.AttackRange, 3);
|
||||
actor.SetMod(modifiersGlobal.Speed, 5);
|
||||
actor.SetMod(modifiersGlobal.MovementSpeed, 5);
|
||||
actor.SetMobMod(mobModifiersGlobal.Roams, 1);
|
||||
actor.SetMobMod(mobModifiersGlobal.RoamDelay, 3);
|
||||
actor.SetMobMod(mobModifiersGlobal.RoamDelay, 10);
|
||||
actor.charaWork.parameterSave.state_mainSkillLevel = 52;
|
||||
actor.moveState = 3;
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue