mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
New scripts
New scripts for commands and effects that use the new function signatures and work with the new statuseffectcontainer
This commit is contained in:
parent
4f80023156
commit
00017468cc
129 changed files with 884 additions and 396 deletions
|
@ -108,7 +108,7 @@ function onEventStarted(player, actor, triggerName, isTeleport)
|
|||
randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5);
|
||||
rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]);
|
||||
--bandaid fix for returning while dead, missing things like weakness and the heal number
|
||||
if (player:GetHP() == 0) then
|
||||
if (player:IsDead()) then
|
||||
player:SetHP(player.GetMaxHP());
|
||||
player:ChangeState(0);
|
||||
player:PlayAnimation(0x01000066);
|
||||
|
|
|
@ -12,8 +12,12 @@ end;
|
|||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Only the bard gets the Battle Voice effect
|
||||
if caster == target then
|
||||
actionContainer.AddAction(caster.statusEffects.AddStatusForBattleAction(223253, 1, 0, 30));
|
||||
local effect = GetWorldManager():GetStatusEffect(223253);
|
||||
effect.SetDuration(30);
|
||||
caster.statusEffects.AddStatusEffect(effect, caster, actionContainer);
|
||||
end
|
||||
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
local effect = GetWorldManager():GetStatusEffect(223029);
|
||||
effect.SetDuration(60);
|
||||
caster.statusEffects.AddStatusEffect(effect, caster, actionContainer);
|
||||
end;
|
|
@ -14,6 +14,18 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--223207: Berserk
|
||||
--223208: Rampage
|
||||
--Remove Rampage effect. I'm assuming no message is sent like LNC surges
|
||||
caster.statusEffects.RemoveStatusEffect(223208);
|
||||
|
||||
--If caster has berserk already, remove it and send a message.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223207)
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
|
@ -22,22 +22,18 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
--If we have a buff then Blissful Mind removes that buff and restores MP. Otherwise, it adds the Blissful Mind effect
|
||||
if buff ~= nil then
|
||||
local amount = buff.GetExtra();
|
||||
local remAction = caster.statusEffects.RemoveStatusEffectForBattleAction(buff, 30329);
|
||||
|
||||
caster.AddMP(amount);
|
||||
|
||||
actionContainer.AddMPAction(caster.actorId, 33007, amount);
|
||||
actionContainer.AddAction(remAction);
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--Blissful mind takes 25% of CURRENT HP and begins storing MP up to that point, at which point the buff changes to indicate its full
|
||||
local amount = caster.GetHP() * 0.25;
|
||||
|
||||
caster.DelHP(amount);
|
||||
caster.DelHP(amount, actionContainer);
|
||||
skill.statusMagnitude = amount;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
end
|
||||
|
||||
end;
|
17
data/scripts/commands/ability/breath_of_the_dragon.lua
Normal file
17
data/scripts/commands/ability/breath_of_the_dragon.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
17
data/scripts/commands/ability/breath_of_the_ram.lua
Normal file
17
data/scripts/commands/ability/breath_of_the_ram.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -14,5 +14,6 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
target.hateContainer.UpdateHate(caster, -840);
|
||||
--Need a way to get all targets with hate for player
|
||||
--target.hateContainer.UpdateHate(caster, -840);
|
||||
end;
|
|
@ -10,6 +10,12 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223227)
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
|
@ -17,7 +17,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
coverTier = 2;
|
||||
end
|
||||
|
||||
actionContainer.AddAction(caster.statusEffects.AddStatusForBattleAction(223063, coverTier, skill.statusDuration));
|
||||
caster.statusEffects.AddStatusEffect(223063, coverTier, 0, 15, 0);
|
||||
|
||||
--Apply Covered to target
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -1,18 +1,23 @@
|
|||
require("global");
|
||||
require("ability");
|
||||
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Need a better way to do this
|
||||
|
||||
for i = 223212,223217 do
|
||||
local remAction = caster.statusEffects.RemoveStatusEffectForBattleAction(i, 30329)
|
||||
local buff = caster.statusEffects.GetStatusEffectById(i);
|
||||
|
||||
if remAction ~= nil then
|
||||
actionContainer.AddAction(remAction);
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
skill.statusTier = 2;
|
||||
break;
|
||||
end
|
||||
|
|
19
data/scripts/commands/ability/fists_of_wind.lua
Normal file
19
data/scripts/commands/ability/fists_of_wind.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
--27124: Enhanced Fists of Fire
|
||||
if caster.HasTrait(27124) then
|
||||
ability.statusTier = 2;
|
||||
end
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -12,6 +12,6 @@ end;
|
|||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Take off 1/3 of attack delay. Not sure if this is the exact amount HF reduces by
|
||||
action.statusMagnitude = 0.33 * caster.GetMod(modifiersGlobal.AttackDelay);
|
||||
skill.statusMagnitude = 0.33 * caster.GetMod(modifiersGlobal.Delay);
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -20,9 +20,9 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
--223213: Power Surge II
|
||||
--223212: Power Surge III
|
||||
--No message is sent when PS is removed by Life Surge
|
||||
caster.statusEffects.RemoveStatusEffect(223212, true);
|
||||
caster.statusEffects.RemoveStatusEffect(223213, true);
|
||||
caster.statusEffects.RemoveStatusEffect(223214, true);
|
||||
caster.statusEffects.RemoveStatusEffect(223212);
|
||||
caster.statusEffects.RemoveStatusEffect(223213);
|
||||
caster.statusEffects.RemoveStatusEffect(223214);
|
||||
|
||||
|
||||
--Using this ability moves to the next LS buff
|
||||
|
@ -45,7 +45,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
end
|
||||
|
||||
if not (removeId == 0) then
|
||||
--caster.statusEffects.RemoveStatusEffect(removeId, true);
|
||||
caster.statusEffects.ReplaceEffect(caster.statusEffects.GetStatusEffectById(removeId), skill.statusId, skill.statusTier, skill.statusMagnitude, skill.statusDuration);
|
||||
end
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
|
|
|
@ -14,11 +14,17 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Need a better way to do this
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223215));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223216));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223217));
|
||||
caster.statusEffects.RemoveStatusEffect(223215);
|
||||
caster.statusEffects.RemoveStatusEffect(223216);
|
||||
caster.statusEffects.RemoveStatusEffect(223217);
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--If caster has any of the power surge effects
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223212) or caster.statusEffects.GetStatusEffectById(223213) or caster.statusEffects.GetStatusEffectById(223214);
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
|
@ -12,18 +12,21 @@ end;
|
|||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--QS gives 300 TP by default.
|
||||
skill.statusMagnitude = 300;
|
||||
--I'm assuming that with raging strikes, that increases to 500.
|
||||
--and traited that increases again to 750 (or 450 without RS)
|
||||
if caster.statusEffects.HasStatusEffect(223221) then
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223221));
|
||||
skill.statusMagnitude = 500;
|
||||
end
|
||||
|
||||
--27241: Enhanced Quelling Strike: Increases TP gained from QS by 50%
|
||||
if caster.HasTrait(27241) then
|
||||
skill.statusMagnitude = skill.statusMagnitude * 1.5;
|
||||
end
|
||||
|
||||
--When raging strikes is active, Quelling Strikes removes it and immediately restores 100 TP for each tier ofr Raging Strikes.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223221)
|
||||
|
||||
if buff ~= nil then
|
||||
skill.tpCost = -100 * (buff.GetTier() - 1);
|
||||
--QS doesn't send a message
|
||||
caster.statusEffects.RemoveStatusEffect(buff);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -6,14 +6,24 @@ function onAbilityPrepare(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
ability.statusMagnitude = 100;
|
||||
--27243: Enhanced Raging Strike: Increases effect of Raging Strike by 50%
|
||||
if caster.HasTrait(27241) then
|
||||
ability.statusTier = 2;
|
||||
ability.statusMagnitude = ability.statusMagnitude * 1.5;
|
||||
end
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--If caster has raging strike, remove it and send message, otherwise apply it.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223221)
|
||||
|
||||
if buff ~= nil then
|
||||
--30329: Your Raging Strike removes your Raging Strike effect.
|
||||
local remAction = caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
actionContainer.AddAction(remAction);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
|
@ -14,6 +14,18 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--223207: Berserk
|
||||
--223208: Rampage
|
||||
--Remove Berserk effect. I'm assuming no message is sent like LNC surges
|
||||
caster.statusEffects.RemoveStatusEffect(223207);
|
||||
|
||||
--If caster has rampage already, remove it and send a message.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223208)
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
|
@ -12,9 +12,9 @@ end;
|
|||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Is this before or after status is gained?
|
||||
--Will probably need to switch to a flag for this because it might include more than just these 3 effects.
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(228011));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(228013));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(228021));
|
||||
caster.statusEffects.RemoveStatusEffect(228011, actionContainer, 30329);
|
||||
caster.statusEffects.RemoveStatusEffect(228013, actionContainer, 30329);
|
||||
caster.statusEffects.RemoveStatusEffect(228021, actionContainer, 30329);
|
||||
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
17
data/scripts/commands/ability/voice_of_the_dragon.lua
Normal file
17
data/scripts/commands/ability/voice_of_the_dragon.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
17
data/scripts/commands/autoattack/default.lua
Normal file
17
data/scripts/commands/autoattack/default.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate ws damage
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -2,7 +2,7 @@ require("global");
|
|||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sssss",
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Adds experience <qty> to player or <targetname>.
|
||||
|
@ -11,18 +11,19 @@ Adds experience <qty> to player or <targetname>.
|
|||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, commandId, animationId, textId, effectId, amount)
|
||||
function onTrigger(player, argc, animType, modelAnim, effectId)
|
||||
local sender = "[battleaction] ";
|
||||
|
||||
if player then
|
||||
cid = tonumber(commandId) or 0;
|
||||
aid = tonumber(animationId) or 0;
|
||||
tid = tonumber(textId) or 0;
|
||||
print(effectId)
|
||||
eid = tonumber(effectId) or 0;
|
||||
amt = tonumber(amount) or 0;
|
||||
|
||||
player:DoBattleActionAnimation(cid, aid, tid, eid, amt);
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
if player and actor then
|
||||
aid = tonumber(animType) or 0
|
||||
mid = tonumber(modelAnim) or 0
|
||||
eid = tonumber(effectId) or 0
|
||||
local id = bit32.lshift(aid, 24);
|
||||
id = bit32.bor(id, bit32.lshift(mid, 12));
|
||||
id = bit32.bor(id, eid)
|
||||
print((tonumber(id)))
|
||||
player:DoBattleAction(30301, id);
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
|
|
|
@ -20,16 +20,22 @@ function onTrigger(player, argc, slot, wId, eId, vId, cId)
|
|||
vId = tonumber(vId) or 0;
|
||||
cId = tonumber(cId) or 0;
|
||||
|
||||
if player and argc > 0 then
|
||||
if argc > 2 then
|
||||
player:GraphicChange(slot, wId, eId, vId, cId);
|
||||
player:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
if player and actor then
|
||||
if player and argc > 0 then
|
||||
|
||||
-- player.appearanceIds[5] = player.achievementPoints;
|
||||
if argc > 2 then
|
||||
actor:GraphicChange(slot, wId, eId, vId, cId);
|
||||
--player.achievementPoints = player.achievementPoints + 1;
|
||||
actor:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
|
||||
actor:SendMessage(messageID, sender, string.format("points %u", player.appearanceIds[5]));
|
||||
else
|
||||
actor.appearanceIds[slot] = wId;
|
||||
end
|
||||
actor:SendAppearance();
|
||||
else
|
||||
player:GraphicChange(slot, wId);
|
||||
end
|
||||
player:SendAppearance();
|
||||
else
|
||||
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
|
||||
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
135
data/scripts/commands/gm/spawnnpc.lua
Normal file
135
data/scripts/commands/gm/spawnnpc.lua
Normal file
|
@ -0,0 +1,135 @@
|
|||
require("global");
|
||||
require("modifiers");
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
yolo
|
||||
]],
|
||||
}
|
||||
|
||||
local modelIds =
|
||||
{
|
||||
["titan"] = 2107401,
|
||||
["ifrit"] = 2107302,
|
||||
["ifrithotair"] = 2207310,
|
||||
["nail"] = 2207307,
|
||||
["garuda"] = 2209501,
|
||||
["garudahelper"] = 2209516,
|
||||
["plume"] = 2209502,
|
||||
["monolith"] = 2209506,
|
||||
["mog"] = 2210408,
|
||||
["nael"] = 2210902,
|
||||
["meteor"] = 2210903,
|
||||
["cactuar"] = 2200905,
|
||||
["morbol"] = 2201002,
|
||||
["drake"] = 2202209,
|
||||
["ogre"] = 2202502,
|
||||
["treant"] = 2202801,
|
||||
["couerl"] = 2203203,
|
||||
["wyvern"] = 2203801,
|
||||
["clouddragon"] = 2208101,
|
||||
["golem"] = 2208901,
|
||||
["atomos"] = 2111002,
|
||||
["chimera"] = 2308701,
|
||||
["salamander"] = 2201302,
|
||||
["ahriman"] = 2201704,
|
||||
["rat"] = 9111275,
|
||||
["bat"] = 2104113,
|
||||
["chigoe"] = 2105613,
|
||||
["hedgemole"] = 2105709,
|
||||
["gnat"] = 2200604,
|
||||
["bird"] = 2201208,
|
||||
["puk"] = 2200112,
|
||||
["angler"] = 2204507,
|
||||
["snurble"] = 2204403,
|
||||
["lemur"] = 2200505,
|
||||
["doe"] = 2200303,
|
||||
["hippogryph"] = 2200405,
|
||||
["trap"] = 2202710,
|
||||
["goat"] = 2102312,
|
||||
["dodo"] = 9111263,
|
||||
["imp"] = 2202607,
|
||||
["spriggan"] = 2290036,
|
||||
["cyclops"] = 2210701,
|
||||
["raptor"] = 2200205,
|
||||
["wolf"] = 2201429,
|
||||
["fungus"] = 2205907,
|
||||
["basilisk"] = 2200708,
|
||||
["bomb"] = 2201611,
|
||||
["jellyfish"] = 2105415,
|
||||
["slug"] = 2104205,
|
||||
["coblyn"] = 2202103,
|
||||
["ghost"] = 2204317,
|
||||
["crab"] = 2107613,
|
||||
["yarzon"] = 2205520,
|
||||
["elemental"] = 2105104,
|
||||
["boar"] = 2201505,
|
||||
["kobold"] = 2206629,
|
||||
["sylph"] = 2206702,
|
||||
["ixal"] = 2206434,
|
||||
["amaljaa"] = 2206502,
|
||||
["qiqirn"] = 2206304,
|
||||
["apkallu"] = 2202902,
|
||||
["goobbue"] = 2103301,
|
||||
["garlean"] = 2207005,
|
||||
["flan"] = 2103404,
|
||||
["swarm"] = 2105304,
|
||||
["goblin"] = 2210301,
|
||||
["buffalo"] = 2200802,
|
||||
["skeleton"] = 2201902,
|
||||
["zombie"] = 2201807,
|
||||
["toad"] = 2203107,
|
||||
["wisp"] = 2209903,
|
||||
["juggernaut"] = 6000243,
|
||||
["mammet"] = 6000246,
|
||||
["lantern"] = 1200329,
|
||||
["helper"] = 2310605,
|
||||
["diremite"] = 2101108,
|
||||
["gong"] = 1200050,
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, name, width, height, blockCount)
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
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]);
|
||||
local z = tonumber(pos[2]);
|
||||
local rot = tonumber(pos[3]);
|
||||
local zone = pos[4];
|
||||
local w = tonumber(width) or 0;
|
||||
|
||||
local h = tonumber(height) or 0;
|
||||
local blocks = tonumber(blockCount) or 0;
|
||||
for b = 0, blocks do
|
||||
for i = 0, w do
|
||||
for j = 0, h do
|
||||
local actor = player.GetZone().SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
|
||||
actor.ChangeNpcAppearance(modelIds[name]);
|
||||
actor.SetMaxHP(5000);
|
||||
actor.SetHP(5000);
|
||||
actor.SetMod(modifiersGlobal.HasShield, 1);
|
||||
actor.SetMod(modifiersGlobal.AttackRange, 3);
|
||||
actor.SetMod(modifiersGlobal.Speed, 5);
|
||||
actor.SetMobMod(mobModifiersGlobal.Roams, 1);
|
||||
actor.SetMobMod(mobModifiersGlobal.RoamDelay, 3);
|
||||
actor.moveState = 3;
|
||||
end;
|
||||
end;
|
||||
|
||||
x = x + 500
|
||||
end;
|
||||
return;
|
||||
elseif player and (modelIds[name] == nil) then
|
||||
player:SendMessage(messageID, sender, "That name isn't valid");
|
||||
else
|
||||
print("I don't even know how you managed this")
|
||||
end
|
||||
|
||||
return;
|
||||
end;
|
24
data/scripts/commands/gm/vdragon.lua
Normal file
24
data/scripts/commands/gm/vdragon.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("global");
|
||||
require("utils");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sssss",
|
||||
description =
|
||||
[[
|
||||
Angle stuff!
|
||||
!anglestuff
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc)
|
||||
local sender = "[battleaction] ";
|
||||
|
||||
if player and player.currentTarget then
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
actor.Ability(23459, actor.actorId);
|
||||
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
|
@ -12,7 +12,7 @@ end;
|
|||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
action.statusMagnitude = 15;
|
||||
skill.statusMagnitude = 15;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -12,22 +12,16 @@ end;
|
|||
--Increased damage and conversion to single target
|
||||
function onCombo(caster, target, spell)
|
||||
spell.aoeType = 0;
|
||||
spell.potency = spell.potency * 1.5;
|
||||
spell.basePotency = spell.basePotency * 1.5;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Dispels an effect on each target.
|
||||
local effects = target.statusEffects.GetStatusEffectsByFlag2(16); --lose on dispel
|
||||
if effects != nil then
|
||||
target.statusEffects.RemoveStatusEffect(effects[0]);
|
||||
end;
|
||||
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
--Dispels an effect on each target.
|
||||
target.statusEffects.RemoveStatusEffect(GetRandomEffectByFlag(8), actionContainer, 30336);
|
||||
end;
|
|
@ -1,5 +1,6 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
require("modifiers");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
|
@ -14,7 +15,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
--2.5 HP per Healing Magic Potency
|
||||
--0.5 HP per MND
|
||||
--this is WITH WHM AF chest, don't know formula without AF. AF seems to increase healing by 7-10%?
|
||||
action.amount = 2.5 * caster.GetMod(modifiersGlobal.MagicHeal) + 0.5 * (caster.GetMod(modifiersGlobal.Mind));
|
||||
action.amount = 2.5 * caster.GetMod(modifiersGlobal.HealingMagicPotency) + 0.5 * (caster.GetMod(modifiersGlobal.Mind));
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -30,7 +30,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
hpPerMND = 0.25;
|
||||
end
|
||||
|
||||
action.amount = hpPerHMP * caster.GetMod(modifiersGlobal.MagicHeal) + hpPerMND * (caster.GetMod(modifiersGlobal.Mind));
|
||||
action.amount = hpPerHMP * caster.GetMod(modifiersGlobal.HealingMagicPotency) + hpPerMND * (caster.GetMod(modifiersGlobal.Mind));
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -11,7 +11,7 @@ end;
|
|||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
action.amount = 5000;-- skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -12,6 +12,7 @@ end;
|
|||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
skill.statusMagnitude = 20;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -24,6 +24,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
if caster != target then
|
||||
caster.AddHP(action.amount / 2)
|
||||
--33012: You recover [amount] HP.
|
||||
actionContainer.AddHPAction(caster.actorId, 33012, (action.amount / 2));
|
||||
actionContainer.AddHPAbsorbAction(caster.actorId, 33012, (action.amount / 2));
|
||||
end
|
||||
end;
|
|
@ -12,7 +12,7 @@ end;
|
|||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Actual amount of def/mdef will be calculated in OnGain
|
||||
skill.statusMagnitude = caster.GetMod(modifiersGlobal.MagicEnhancePotency);
|
||||
skill.statusMagnitude = caster.GetMod(modifiersGlobal.EnhancementMagicPotency);
|
||||
|
||||
--27365: Enhanced Protect: Increases magic defense gained from Protect.
|
||||
if caster.HasTrait(27365) then
|
||||
|
|
|
@ -25,7 +25,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
intercept = intercept * 1.25;
|
||||
end
|
||||
|
||||
local regenTick = (slope * caster.GetMod(modifiersGlobal.MagicEnhancePotency)) + intercept) + 1;
|
||||
local regenTick = (slope * caster.GetMod(modifiersGlobal.EnhancementMagicPotency)) + intercept + 1;
|
||||
|
||||
spell.statusMagnitude = regenTick;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ end;
|
|||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
action.statusMagnitude = 50;
|
||||
skill.statusMagnitude = 50;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
require("modifiers")
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
|
@ -19,7 +20,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
hpPerPoint = 1.96;
|
||||
end
|
||||
|
||||
spell.statusMagnitude = hpPerPoint * caster.GetMod(modifiersGlobal.MagicEnhancePotency);
|
||||
skill.statusMagnitude = hpPerPoint * caster.GetMod(modifiersGlobal.EnhancementMagicPotency);
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
35
data/scripts/commands/magic/swiftsong.lua
Normal file
35
data/scripts/commands/magic/swiftsong.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--223224: Swiftsong
|
||||
--223254: Ballad Of Magi
|
||||
--223256: Minuet of Rigor
|
||||
--If target has one of these effects that was from this caster, remove it
|
||||
local oldSong;
|
||||
local paeon = target.statusEffects.GetStatusEffectById(223255);
|
||||
local ballad = target.statusEffects.GetStatusEffectById(223254);
|
||||
local minuet = target.statusEffects.GetStatusEffectById(223256);
|
||||
if paeon and paeon.GetSource() == caster then
|
||||
oldSong = paeon;
|
||||
elseif ballad and ballad.GetSource() == caster then
|
||||
oldSong = ballad;
|
||||
elseif minuet and minuet.GetSource() == caster then
|
||||
oldSong = minuet;
|
||||
end
|
||||
|
||||
if oldSong then
|
||||
target.statusEffects.RemoveStatusEffect(oldSong);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
|
@ -12,10 +12,7 @@ end;
|
|||
--Dispel
|
||||
--Does dispel have a text id?
|
||||
function onCombo(caster, target, skill)
|
||||
local effects = target.statusEffects.GetStatusEffectsByFlag(16); --lose on dispel
|
||||
if effects != nil then
|
||||
target.statusEffects.RemoveStatusEffect(effects[0]);
|
||||
end;
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
|
@ -25,6 +22,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
if skill.isCombo then
|
||||
target.statusEffects.RemoveStatusEffect(GetRandomEffectByFlag(8), actionContainer, 30336);
|
||||
end
|
||||
end;
|
|
@ -1,5 +1,6 @@
|
|||
require("global");
|
||||
require("weaponskill");
|
||||
require("utils");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
|
@ -16,7 +17,7 @@ end;
|
|||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate ws damage
|
||||
action.amount = skill.basePotency;
|
||||
action.amount = 5000;--skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -21,6 +21,9 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
--Status only seems to apply on the first hit
|
||||
if(action.ActionLanded() and action.hitNum == 1) then
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
end
|
||||
end;
|
|
@ -1,20 +1,16 @@
|
|||
require("global");
|
||||
require("weaponskill");
|
||||
require("modifiers")
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Increased crit rate
|
||||
function onCombo(caster, target, skill)
|
||||
--Get Berserk statuseffect
|
||||
local berserk = caster.statusEffects.GetStatusEffectById(223160);
|
||||
|
||||
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase potency
|
||||
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase accuracy
|
||||
if berserk != nil then
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
@ -23,14 +19,20 @@ function onCombo(caster, target, skill)
|
|||
apPerHit = 24;
|
||||
end
|
||||
|
||||
attacker.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
attacker.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
caster.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
caster.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
|
||||
berserk.SetExtra(0);
|
||||
|
||||
--This is about 50% crit. Don't know if that's what it gave on retail but seems kind of reasonable
|
||||
skill.critRateBonus = 300;
|
||||
skill.accuracyModifier = 50;
|
||||
end;
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Increased crit rate
|
||||
function onCombo(caster, target, skill)
|
||||
--This is about 25% crit. Don't know if that's what it gave on retail but seems kind of reasonable
|
||||
skill.critRateBonus = 200;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
|
|
|
@ -15,7 +15,7 @@ end;
|
|||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate ws damage
|
||||
skill.Potency = 100;
|
||||
skill.basePotency = 100;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -1,11 +1,27 @@
|
|||
require("global");
|
||||
require("weaponskill");
|
||||
require("modifiers")
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Resets rampage to increase damage
|
||||
function onSkillStart(caster, target, skill)
|
||||
--Get Rampage statuseffect
|
||||
local rampage = caster.statusEffects.GetStatusEffectById(223208);
|
||||
|
||||
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase potency
|
||||
if rampage != nil then
|
||||
local parryPerDT = 20;
|
||||
local delayMsPerDT = 100;
|
||||
|
||||
caster.SubtractMod(modifiersGlobal.Parry, parryPerDT * rampage.GetExtra());
|
||||
caster.AddMod(modifiersGlobal.Delay, delayMsPerDT * rampage.GetExtra());
|
||||
|
||||
rampage.SetExtra(0);
|
||||
skill.basePotency = skill.basePotency * 1.5;
|
||||
end;
|
||||
return 0;
|
||||
end;
|
||||
|
||||
|
@ -15,6 +31,10 @@ function onCombo(caster, target, skill)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
if target.target == caster then
|
||||
skill.statusId = 223015
|
||||
end;
|
||||
|
||||
--calculate ws damage
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
|
@ -23,4 +43,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
|
||||
skill.statusId = 0;
|
||||
end;
|
|
@ -28,7 +28,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
--1.21: Equation used to calculate amount of MP adjusted.
|
||||
--fug
|
||||
--This might mean max MP isn't involved and the difference was between patches. need to recheck videos
|
||||
if action.GetHitType() > HitType.Evade and (action.param == HitDirection.Right or action.param == HitDirection.Left) then
|
||||
if action.ActionLanded() and (action.param == HitDirection.Right or action.param == HitDirection.Left) then
|
||||
local mpToReturn = 0;
|
||||
|
||||
if skill.isCombo then
|
||||
|
@ -39,6 +39,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
|
||||
caster.AddMP(mpToReturn);
|
||||
--30452: You recover x MP.
|
||||
actionContainer.AddMPAction(caster.actorId, 30452, mpToReturn);
|
||||
actionContainer.AddMPAbsorbAction(caster.actorId, 30452, mpToReturn);
|
||||
end
|
||||
end;
|
|
@ -1,5 +1,6 @@
|
|||
require("global");
|
||||
require("weaponskill");
|
||||
require("modifiers")
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
|
@ -23,8 +24,8 @@ function onCombo(caster, target, skill)
|
|||
apPerHit = 24;
|
||||
end
|
||||
|
||||
attacker.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
attacker.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
caster.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
caster.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
|
||||
berserk.SetExtra(0);
|
||||
skill.basePotency = skill.basePotency * 1.5;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue