Merge branch 'ioncannon/quest_system' into Jorge/quest_system

This commit is contained in:
CuriousJorge 2022-02-05 18:26:03 -05:00
commit 2cbb48621b
97 changed files with 673 additions and 532 deletions

View file

@ -107,7 +107,7 @@ function doLevequestInit(player, aetheryte)
player:SendGameMessage(worldMaster, 50036, 0x20, glId, player);
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, true));
director = player:GetZone():CreateGuildleveDirector(glId, difficulty, player);
director = player.CurrentArea:CreateGuildleveDirector(glId, difficulty, player);
player:AddDirector(director);
director:StartDirector(true, glId)

View file

@ -142,7 +142,7 @@ function doLevequestInit(player, aetheryte)
player:SendGameMessage(worldMaster, 50036, 0x20, glId, player);
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, true));
director = player:GetZone():CreateGuildleveDirector(glId, difficulty, player);
director = player.CurrentArea:CreateGuildleveDirector(glId, difficulty, player);
player:AddDirector(director);
director:StartDirector(true, glId);

View file

@ -0,0 +1,83 @@
--[[
PopulaceSpecialEventCryer Script
Actor Class script to handle the 6 NPCs (technically 3, the actors were duped) involved in the Foundation Day 2011 & 2012 events.
In 2011 they appear to be used for recruitment information for their respective Grand Company.
In 2012, they were used for exchanging Over-aspected Crystals/Clusters for GC seals as part of the ongoing Atomos event.
Functions:
For 2011.
eventTalkStep0(joined) - NPC dialog about joining their cause to fight back Imperials. joined = 0 or 1. Function has hardcoded actor IDs, won't work with 2012 versions
eventTalkNotGCmenber(npcGC) - NPC dialog when you're not part of their grand company.
For 2012.
eventTalkCrystalExchange(player, npcGC, hasCrystal) - NPC dialog explaining they want over-aspected crystals. Brings up crystal exchange prompt if hasCrystal = 1.
eventTalkCsOverflow(player, npcGC) - Error message that you can't hold the seals being offered.
eventTalkCrystalExchange2(player, npcGC) - NPC dialog for accepting exchange of crystals for seals
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
local gcRep = {
[1001619] = 1, -- Maelstrom Representative 2011
[1002105] = 1, -- Maelstrom Representative 2012
[1001623] = 2, -- Adder Representative 2011
[1002109] = 2, -- Adder Representative 2012
[1001627] = 3, -- Flame Representative 2011
[1002113] = 3, -- Flame Representative 2012
}
function onEventStarted(player, npc, triggerName)
local playerGC = player.gcCurrent;
local npcId = npc:GetActorClassId();
local npcGC = gcRep[npcId];
local npcGCSeal = 1000200 + npcGC;
local hasCrystal = 1;
local crystal = 3020537;
local cluster = 3020413;
local eventMode = 2012;
if eventMode == 2011 then
if playerGC == 0 then
callClientFunction(player, "eventTalkStep0", 0);
elseif playerGC == npcGC then
callClientFunction(player, "eventTalkStep0", 1);
else
callClientFunction(player, "eventTalkNotGCmenber", npcGC);
end
elseif eventMode == 2012 then
choice = callClientFunction(player, "eventTalkCrystalExchange", player, npcGC, hasCrystal);
if choice == 1 then
--callClientFunction(player, "eventTalkCsOverflow", player, npcGC);
player:SendMessage(0x20, "", "You pretend to hand over four over-aspected crystals.");
callClientFunction(player, "eventTalkCrystalExchange2", player, npcGC);
local invCheck = player:GetItemPackage(INVENTORY_CURRENCY):AddItem(npcGCSeal, 1000, 1);
if invCheck == INV_ERROR_SUCCESS then
player:SendGameMessage(player, GetWorldMaster(), 25071, MESSAGE_TYPE_SYSTEM, crystal, 1, npcGCSeal, 1, 4, 1000);
end
elseif choice == 2 then
player:SendMessage(0x20, "", "You pretend to hand over an over-aspected cluster.");
--callClientFunction(player, "eventTalkCsOverflow", player, npcGC);
callClientFunction(player, "eventTalkCrystalExchange2", player, npcGC);
local invCheck = player:GetItemPackage(INVENTORY_CURRENCY):AddItem(npcGCSeal, 3000, 1);
if invCheck == INV_ERROR_SUCCESS then
player:SendGameMessage(player, GetWorldMaster(), 25071, MESSAGE_TYPE_SYSTEM, cluster, 1, npcGCSeal, 1, 1, 3000);
end
end
end
player:EndEvent();
end

View file

@ -19,7 +19,7 @@ function onBeginLogin(player)
end
--For Opening. Set Director and reset position incase d/c
if (player:HasQuest(110001) == true and player:GetZoneID() == 193) then
if (player:HasQuest(110001) == true and player.CurrentArea.ZoneId == 193) then
director = player:GetZone():CreateDirector("OpeningDirector", false);
player:AddDirector(director);
director:StartDirector(true);
@ -32,7 +32,7 @@ function onBeginLogin(player)
player.rotation = 0.025;
player:GetQuest(110001):ClearQuestData();
player:GetQuest(110001):ClearQuestFlags();
elseif (player:HasQuest(110005) == true and player:GetZoneID() == 166) then
elseif (player:HasQuest(110005) == true and player.CurrentArea.ZoneId == 166) then
director = player:GetZone():CreateDirector("OpeningDirector", false);
player:AddDirector(director);
director:StartDirector(false);
@ -45,7 +45,7 @@ function onBeginLogin(player)
player.rotation = -1.26721;
player:GetQuest(110005):ClearQuestData();
player:GetQuest(110005):ClearQuestFlags();
elseif (player:HasQuest(110009) == true and player:GetZoneID() == 184) then
elseif (player:HasQuest(110009) == true and player.CurrentArea.ZoneId == 184) then
--director = player:GetZone():CreateDirector("OpeningDirector", false);
--player:AddDirector(director);
--director:StartDirector(false);

View file

@ -14,6 +14,6 @@ local attackMagicHandlers = {
}
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Ability(command.actorId, targetActor);
player.Ability(command.Id, targetActor);
player:endEvent();
end

View file

@ -14,7 +14,7 @@ local attackMagicHandlers = {
}
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Ability(command.actorId, targetActor);
player.Ability(command.Id, targetActor);
player:endEvent();
end

View file

@ -14,6 +14,6 @@ local attackMagicHandlers = {
}
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end;

View file

@ -21,6 +21,6 @@ function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, ta
if not player.aiContainer.IsEngaged() then
player.Engage(targetActor);
end;
player.WeaponSkill(command.actorId, targetActor);
player.WeaponSkill(command.Id, targetActor);
player:endEvent();
end;

View file

@ -13,9 +13,9 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, baza
local bazaarActor = nil;
if (name ~= nil) then
bazaarActor = player:GetZone():FindPCInZone(name);
bazaarActor = player.CurrentArea:FindPCInZone(name);
elseif (bazaarActorId ~= nil) then
bazaarActor = player:GetZone():FindActorInArea(bazaarActorId);
bazaarActor = player.CurrentArea:FindActorInArea(bazaarActorId);
end
if (bazaarActor ~= nil) then

View file

@ -18,7 +18,7 @@ function onEventStarted(player, actor, triggerName, rewardItem, seekItemOrCost,
--Get the bazaar actor
if (bazaarActorId ~= nil) then
bazaarActor = player:GetZone():FindActorInArea(bazaarActorId);
bazaarActor = player.CurrentArea:FindActorInArea(bazaarActorId);
end
--Abort if no actor

View file

@ -10,6 +10,7 @@ require ("global")
function onEventStarted(player, actor, triggerName, isGoobbue)
<<<<<<< HEAD
if (player:GetState() == 0) then
worldMaster = GetWorldMaster();
@ -48,4 +49,44 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
player:EndEvent();
=======
if (player:GetState() == 0) then
worldMaster = GetWorldMaster();
if (isGoobbue ~= true) then
player:ChangeMusic(83);
player:SendGameMessage(player, worldMaster, 26001, 0x20);
player:SetMountState(1);
else
player:ChangeMusic(98);
player:SendGameMessage(player, worldMaster, 26019, 0x20);
player:SetMountState(2);
end
player:ChangeSpeed(0.0, 5.0, 10.0, 10.0);
player:ChangeState(15);
else
player:ChangeMusic(player.CurrentArea.bgmDay);
worldMaster = GetWorldMaster();
if (player.rentalExpireTime != 0) then
player:SendGameMessage(player, worldMaster, 26004, 0x20); --You dismount.
else
if (player:GetMountState() == 1) then
player:SendGameMessage(player, worldMaster, 26003, 0x20); --You dismount X.
else
player:SendGameMessage(player, worldMaster, 26021, 0x20); --You dismount your Gobbue.
end
end
player:SetMountState(0);
player:ChangeSpeed(0.0, 2.0, 5.0, 5.0)
player:ChangeState(0);
end
player:EndEvent();
>>>>>>> ioncannon/quest_system
end

View file

@ -133,8 +133,8 @@ function onEventStarted(player, command, triggerName)
return;
end
if (weaponskillHandlers[command.actorId] ~= nil) then
weaponskillHandlers[command.actorId](player);
if (weaponskillHandlers[command.Id] ~= nil) then
weaponskillHandlers[command.Id](player);
else
player:SendMessage(0x20, "", "That weaponskill is not implemented yet.");
end

View file

@ -1,5 +1,5 @@
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end

View file

@ -1,5 +1,5 @@
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end

View file

@ -21,6 +21,6 @@ function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, ta
if not player.aiContainer.IsEngaged() then
player.Engage(targetActor);
end;
player.WeaponSkill(command.actorId, targetActor);
player.WeaponSkill(command.Id, targetActor);
player:endEvent();
end;

View file

@ -1,5 +1,5 @@
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end

View file

@ -1,5 +1,5 @@
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end

View file

@ -2,6 +2,6 @@
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end

View file

@ -1,5 +1,5 @@
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end

View file

@ -10,6 +10,6 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
--]]
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Ability(command.actorId, targetActor);
player.Ability(command.Id, targetActor);
player:endEvent();
end;

View file

@ -14,6 +14,6 @@ local attackMagicHandlers = {
}
function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8)
player.Cast(command.actorId, targetActor);
player.Cast(command.Id, targetActor);
player:endEvent();
end;

View file

@ -12,10 +12,10 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, acto
--ActorID Search
if (actorId ~= nil) then
otherActor = player:GetZone():FindActorInArea(actorId);
otherActor = player.CurrentArea):FindActorInArea(actorId);
--Name Search
elseif (name ~= nil) then
otherActor = player:GetZone():FindPCInZone(name);
otherActor = player.CurrentArea:FindPCInZone(name);
end
if (otherActor ~= nil) then

View file

@ -24,7 +24,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
local amount = buff.GetExtra();
caster.AddMP(amount);
actionContainer.AddMPAction(caster.actorId, 33007, amount);
actionContainer.AddMPAction(caster.Id, 33007, amount);
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

View file

@ -15,7 +15,7 @@ function onTrigger(player, argc)
if player then
if player.target then
print("hi")
local id = player.target.actorId
local id = player.target.Id
print("hi")
player.currentParty:AddMember(id);
player.target.currentParty = player.currentParty;

View file

@ -8,9 +8,8 @@ properties = {
function onTrigger(player, argc, actorName)
if (actorName ~= nil) then
zone = player:GetZone();
actor = zone:DespawnActor(actorName);
if (actorName ~= nil) then
actor = player.CurrentArea:DespawnActor(actorName);
end
end;

View file

@ -23,7 +23,7 @@ function onTrigger(player)
player:SendMessage(messageID, sender, string.format("Position (XYZ-O): %.3f, %.3f, %.3f - %.3f", targetActor.positionX, targetActor.positionY, targetActor.positionZ, targetActor.rotation));
player:SendMessage(messageID, sender, string.format("Actor ID: 0x%X", targetActor.actorId));
player:SendMessage(messageID, sender, string.format("Actor ID: 0x%X", targetActor.Id));
player:SendMessage(messageID, sender, string.format("Class ID: %d", targetActor:GetActorClassId()));
player:SendMessage(messageID, sender, string.format("Class Name: %s", targetActor.className));
end

View file

@ -46,13 +46,13 @@ function onTrigger(player, argc, command, var1, var2, var3)
q2 = GetStaticActor(var1);
if q2 ~= nil then
q3 = q2.actorId;
q3 = q2.Id;
message = ("removing quest "..var1);
printf(q3);
q4 = bit32.band(q3, 0xA0F00000);
printf(q4);
--player:RemoveQuest(quest.actorName);
--player:RemoveQuest(quest.Name);
end
else
message = ("remove error: either incorrect ID or quest "..var1.." isn't active on character");

View file

@ -18,11 +18,11 @@ function onTrigger(player, argc, zone)
if player then
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
zone = zone or player:GetZoneID();
zone = zone or player.CurrentArea.ZoneId;
player:SendMessage(messageID, "[reloadzones] ", string.format("Reloading zone: %u", zone));
--[[ todo: get this working legit
player:GetZone():Clear();
player:GetZone():AddActorToZone(player);
player.CurrentArea:Clear();
player.CurrentArea:AddActorToZone(player);
player:SendInstanceUpdate();
]]
end;

View file

@ -20,16 +20,24 @@ function onTrigger(player, argc, actorClassId, width, height)
local rot = pos[4];
local zone = pos[5];
<<<<<<< HEAD
actorClassId = tonumber(actorClassId);
if (actorClassId ~= nil) then
zone = player:GetZone();
local w = tonumber(width) or 0;
=======
actorClassId = tonumber(actorClassId);
if (actorClassId ~= nil) then
local w = tonumber(width) or 0;
>>>>>>> ioncannon/quest_system
local h = tonumber(height) or 0;
printf("%f %f %f", x, y, z);
--local x, y, z = player.GetPos();
for i = 0, w do
for j = 0, h do
<<<<<<< HEAD
actor = zone:SpawnActor(actorClassId, "test", x + (i - (w / 2) * 3), y, z + (j - (h / 2) * 3), rot);
actor.SetAppearance(1001149)
end
@ -40,4 +48,16 @@ function onTrigger(player, argc, actorClassId, width, height)
player:SendMessage(0x20, "", "This actor class id cannot be spawned.");
end
=======
actor = player.CurrentArea:SpawnActor(actorClassId, "test", pos[0] + (i - (w / 2) * 3), pos[1], pos[2] + (j - (h / 2) * 3), pos[3]);
actor.SetAppearance(1001149)
end
end
end
if (actor == nil) then
player:SendMessage(0x20, "", "This actor class id cannot be spawned.");
end
>>>>>>> ioncannon/quest_system
end;

View file

@ -108,7 +108,7 @@ function onTrigger(player, argc, name, width, height, blockCount)
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);
local actor = player.CurrentArea:SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
actor.ChangeNpcAppearance(modelIds[name]);
actor.SetMaxHP(5000);
actor.SetHP(5000);

View file

@ -18,7 +18,7 @@ function onTrigger(player, argc)
player:SendGameMessage(player, worldMaster, 34108, 0x20);
player:SendGameMessage(player, worldMaster, 50011, 0x20);
director = player:GetZone():CreateDirector("Quest/QuestDirectorMan0l001");
director = player.CurrentArea:CreateDirector("Quest/QuestDirectorMan0l001");
player:AddDirector(director);
player:SetLoginDirector(director);

View file

@ -31,7 +31,7 @@ function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId)
actorClassId = tonumber(actorClassId);
if (actorClassId ~= nil) then
zone = player:GetZone();
zone = player.CurrentArea;
actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(regionId), tonumber(layoutId));
print("test");

View file

@ -16,7 +16,7 @@ function onTrigger(player, argc)
if player and player.currentTarget then
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
actor.Ability(23459, actor.actorId);
actor.Ability(23459, actor.Id);
else
print(sender.."unable to add experience, ensure player name is valid.");

View file

@ -24,13 +24,13 @@ function onTrigger(player, argc, weather, updateTime, zonewide)
message = string.format("changed weather to %u ", weather);
if zonewide ~= 0 then
message = string.format(message.."for zone %u", player:GetZoneID());
message = string.format(message.."for zone %u", player.CurrentArea.ZoneId);
else
message = message..player:GetName();
end;
-- weatherid, updateTime
player:GetZone():ChangeWeather(weather, updateTime, player, zonewide ~= 0);
player.CurrentArea:ChangeWeather(weather, updateTime, player, zonewide ~= 0);
player:SendMessage(messageID, sender, message);
end;
print(sender..message);

View file

@ -159,7 +159,7 @@ function onTrigger(player, argc, width, height, blockCount)
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);
local actor = player.CurrentArea.SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
--actor.ChangeNpcAppearance(2200905);
actor.SetMaxHP(500);
actor.SetHP(500);

View file

@ -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.AddHPAbsorbAction(caster.actorId, 33012, (action.amount / 2));
actionContainer.AddHPAbsorbAction(caster.Id, 33012, (action.amount / 2));
end
end;

View file

@ -39,6 +39,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
caster.AddMP(mpToReturn);
--30452: You recover x MP.
actionContainer.AddMPAbsorbAction(caster.actorId, 30452, mpToReturn);
actionContainer.AddMPAbsorbAction(caster.Id, 30452, mpToReturn);
end
end;

View file

@ -14,8 +14,8 @@ function onCreate(starterPlayer, contentArea, director)
mob1 = GetWorldManager().SpawnBattleNpcById(3, contentArea);
mob2 = GetWorldManager().SpawnBattleNpcById(4, contentArea);
mob3 = GetWorldManager().SpawnBattleNpcById(5, contentArea);
starterPlayer.currentParty:AddMember(papalymo.actorId);
starterPlayer.currentParty:AddMember(yda.actorId);
starterPlayer.currentParty:AddMember(papalymo.Id);
starterPlayer.currentParty:AddMember(yda.Id);
starterPlayer:SetMod(modifiersGlobal.MinimumHpLock, 1);

View file

@ -88,7 +88,7 @@ function onEventStarted(player, actor, triggerName)
wait(5);
player:SendMessage(0x20, "", "ContentFinished");
player:GetZone():ContentFinished();
player.CurrentArea:ContentFinished();
wait(5);
player:SendMessage(0x20, "", "Remove from party");
player:RemoveFromCurrentPartyAndCleanup();
@ -136,5 +136,5 @@ function onCommand(player, command)
end
function main(director, contentGroup)
onCreateContentArea(director:GetPlayerMembers(), director, director:GetZone(), contentGroup);
onCreateContentArea(director:GetPlayerMembers(), director, director.CurrentArea, contentGroup);
end;

View file

@ -73,7 +73,7 @@ function onEventStarted(player, director, triggerName)
]]
man0l0Quest:StartSequence(10);
player:GetZone():ContentFinished();
player.CurrentArea:ContentFinished();
GetWorldManager():DoZoneChange(player, 230, "PrivateAreaMasterPast", 1, 15, -826.868469, 6, 193.745865, -0.008368492);
player:EndEvent();
end

View file

@ -59,6 +59,6 @@ function onEventStarted(player, actor, triggerName)
man0u0Quest:NextPhase(10);
player:EndEvent();
player:GetZone():ContentFinished();
player.CurrentArea:ContentFinished();
GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 3, 15, -22.81, 196, 87.82, 2.98);
end

View file

@ -14,6 +14,6 @@ function onBlock(effect, attacker, defender, skill, action, actionContainer)
--33008: You recover x HP from Aegis Boon
defender.AddHP(absorbAmount);
actionContainer.AddHPAction(defender.actorId, 33008, absorbAmount);
actionContainer.AddHPAction(defender.Id, 33008, absorbAmount);
defender.statusEffects.RemoveStatusEffect(effect, actionContainer);
end;

View file

@ -18,7 +18,7 @@ function onHit(effect, attacker, defender, skill, action, actionContainer)
attacker.AddHP(absorbAmount);
--30332: You absorb hp from target
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, absorbAmount)
actionContainer.AddHPAbsorbAction(defender.Id, 30332, absorbAmount)
--Bloodbath is lost after absorbing hp
defender.statusEffects.RemoveStatusEffect(effect,actionContainer, 30331, false);
end

View file

@ -22,7 +22,7 @@ function onDamageTaken(effect, attacker, defender, skill, action, actionContaine
defender.AddHP(absorbAmount);
--30451: You recover [absorbAmount] HP.
actionContainer.AddHPAction(defender.actorId, 30451, absorbAmount)
actionContainer.AddHPAction(defender.Id, 30451, absorbAmount)
--Dread Spike is lost after absorbing hp
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
end

View file

@ -20,7 +20,7 @@ function onEvade(effect, attacker, defender, skill, action, actionContainer)
local mpToReturn = percent * action.amountMitigated;
defender.AddMP(math.ceil(mpToReturn));
--33010: You recover x MP from Featherfoot
actionContainer.AddMPAction(defender.actorId, 33010, mpToReturn);
actionContainer.AddMPAction(defender.Id, 33010, mpToReturn);
--Featherfoot is lost after evading
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
end;

View file

@ -14,6 +14,6 @@ function onHit(effect, attacker, defender, skill, action, actionContainer)
local amount = math.floor((healPercent * action.amount) + 1);
attacker.AddHP(amount);
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
actionContainer.AddHPAbsorbAction(defender.Id, 30332, amount);
end
end;

View file

@ -10,6 +10,6 @@ function onHit(effect, attacker, defender, skill, action, actionContainer)
local amount = math.floor((healPercent * action.amount) + 1);
attacker.AddHP(amount);
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
actionContainer.AddHPAbsorbAction(defender.Id, 30332, amount);
end
end;

View file

@ -14,6 +14,6 @@ function onHit(effect, attacker, defender, skill, action, actionContainer)
local amount = math.floor((healPercent * action.amount) + 1);
attacker.AddHP(amount);
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
actionContainer.AddHPAbsorbAction(defender.Id, 30332, amount);
end
end;

View file

@ -6,7 +6,7 @@ function onHit(effect, attacker, defender, skill, action, actionContainer)
--Necrogenesis returns 75% of damage done rounded up(?) as MP.
local hpToReturn = math.ceil(0.75 * action.amount);
attacker.AddHP(hpToReturn);
actionContainer.AddHPAbsorbAction(defender.actorId, 33012, hpToReturn);
actionContainer.AddHPAbsorbAction(defender.Id, 33012, hpToReturn);
attacker.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
end
end

View file

@ -19,6 +19,6 @@ function onBlock(effect, attacker, defender, skill, action, actionContainer)
local mpToReturn = math.ceil(0.10 * action.amount);
defender.AddMP(math.ceil(mpToReturn));
--33009: You recover x MP from Outmaneuver
actionContainer.AddMPAction(defender.actorId, 33009, mpToReturn);
actionContainer.AddMPAction(defender.Id, 33009, mpToReturn);
end
end;

View file

@ -27,7 +27,7 @@ function onCrit(effect, attacker, defender, skill, action, actionContainer)
healAmount = math.Clamp(healAmount, 0, attacker.GetMaxHP() - attacker.GetHP());
attacker.AddHP(healAmount);
--33012: You recover [healAmount] HP.
actionContainer.AddHPAbsorbAction(defender.actorId, 33008, healAmount);
actionContainer.AddHPAbsorbAction(defender.Id, 33008, healAmount);
end;
--"Effect fades over time"

View file

@ -4,5 +4,5 @@ require("modifiers")
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
local mpToRestore = action.amount * 0.30;
defender.AddMP(mpToRestore);
actionContainer.AddMPAction(defender.actorId, 33011, mpToRestore);
actionContainer.AddMPAction(defender.Id, 33011, mpToRestore);
end

View file

@ -18,5 +18,5 @@ end;
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
local mpToRestore = action.amount * 0.30;
defender.AddMP(mpToRestore);
actionContainer.AddMPAction(defender.actorId, 33011, mpToRestore);
actionContainer.AddMPAction(defender.Id, 33011, mpToRestore);
end

View file

@ -10,6 +10,6 @@ function onDamageTaken(effect, attacker, defender, skill, action, actionContaine
--30350: Counter! You hit target for x points of damage
--There are counter messages for blocks, can Vengeance be blocked/parried?
attacker.DelHP(amount, actionContainer);
actionContainer.AddHitAction(attacker.actorId, 30350, amount);
actionContainer.AddHitAction(attacker.Id, 30350, amount);
end;
end;

View file

@ -263,7 +263,7 @@ function doExitDoor(player, quest, npc)
quest:StartSequence(SEQ_005);
contentArea = player:GetZone():CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0l01", "SimpleContent30002", "Quest/QuestDirectorMan0l001");
contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0l01", "SimpleContent30002", "Quest/QuestDirectorMan0l001");
if (contentArea == nil) then
return;