Added trigger name to all the scripts that had params. Implemented the Gridania opening stoper.

This commit is contained in:
Filip Maj 2016-03-20 21:19:40 -04:00
parent 2048d8d188
commit 3162bedb17
23 changed files with 44 additions and 21 deletions

View File

@ -6,7 +6,7 @@ Switches between active and passive mode states
--]]
function onEventStarted(player, actor)
function onEventStarted(player, actor, triggerName)
if (player:getState() == 0) then
player:changeState(2);

View File

@ -8,7 +8,7 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
function onEventStarted(player, actor)
function onEventStarted(player, actor, triggerName)
worldMaster = getWorldMaster();

View File

@ -8,7 +8,7 @@ operateUI(pointsAvailable, pointsLimit, str, vit, dex, int, min, pie)
--]]
function onEventStarted(player, actor)
function onEventStarted(player, actor, triggerName)
--local points = player:getAttributePoints();
--player:runEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT);
player:runEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10);

View File

@ -6,7 +6,7 @@ Handles player examining someone
--]]
function onEventStarted(player, commandactor, arg1, arg2, arg3, arg4, checkedActorId)
function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId)
actor = player:getActorInInstance(checkedActorId);

View File

@ -6,7 +6,7 @@ Handles mounting and dismounting the Chocobo and Goobbue
--]]
function onEventStarted(player, actor, isGoobbue)
function onEventStarted(player, actor, triggerName, isGoobbue)
if (player:getState() == 0) then

View File

@ -4,7 +4,7 @@ DiceCommand Script
--]]
function onEventStarted(player, actor, maxNumber)
function onEventStarted(player, actor, triggerName, maxNumber)
if (maxNumber == nil) then
maxNumber = 999;

View File

@ -4,7 +4,7 @@ EmoteSitCommand Script
--]]
function onEventStarted(player, actor, emoteId)
function onEventStarted(player, actor, triggerName, emoteId)
if (player:getState() == 0) then
if (emoteId == 0x2712) then

View File

@ -9,7 +9,7 @@ emoteTable = {
};
function onEventStarted(player, actor, emoteId)
function onEventStarted(player, actor, triggerName, emoteId)
if (player:getState() == 0) then
player:doEmote(emoteId);

View File

@ -53,7 +53,7 @@ GRAPHICSLOT_L_RINGFINGER = 24;
GRAPHICSLOT_R_INDEXFINGER = 25;
GRAPHICSLOT_L_INDEXFINGER = 26;
function onEventStarted(player, actor, invActionInfo, param1, param2, param3, param4, param5, param6, param7, equipSlot, itemDBIds)
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, equipSlot, itemDBIds)
equipSlot = equipSlot-1;
--Equip Item

View File

@ -9,7 +9,7 @@ The param "itemDBIds" has the vars: item1 and item2.
--]]
function onEventStarted(player, actor, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
player:getInventory(0x00):removeItem(invActionInfo.slot);
player:endEvent();
end

View File

@ -20,7 +20,7 @@ function onEventStarted(player, command)
player:runEventFunction("delegateCommand", command, "eventConfirm");
end
function onEventUpdate(player, command, step, arg1, arg2)
function onEventUpdate(player, command, triggerName, step, arg1, arg2)
currentMenuId = player:getCurrentMenuId();

View File

@ -8,6 +8,6 @@ function onEventStarted(player, actor, questId)
-- player:sendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526);
end
function onEventUpdate(player, actor, step, arg1)
function onEventUpdate(player, actor, triggerName, step, arg1)
end

View File

@ -7,6 +7,6 @@ function onEventStarted(player, actor, questId)
player:sendRequestedInfo("requestedData", "qtdata", 0x1D4F2);
end
function onEventUpdate(player, actor, step, arg1)
function onEventUpdate(player, actor, triggerName, step, arg1)
end

View File

@ -16,7 +16,7 @@ Confirm Menu: 2
--]]
function onEventStarted(player, actor, isTeleport)
function onEventStarted(player, actor, triggerName, isTeleport)
if (isTeleport == 0) then
player:setCurrentMenuId(0);
player:runEventFunction("delegateCommand", actor, "eventRegion", 100);

View File

@ -24,7 +24,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Object/Aetheryte/AetheryteParent", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
player:runEventFunction("eventAetheryteParentSelect", 0x0, false, 0x61, 0x0,0,0,0,0);
end

View File

@ -0,0 +1,13 @@
function onInstantiate(npc)
return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, 0x10A350, false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc, triggerName)
if (triggerName == "caution") then
worldMaster = getWorldMaster();
player:sendGameMessage(player, worldMaster, 34109, 0x20);
elseif (triggerName == "exit") then
getWorldManager():DoPlayerMoveInZone(player, 5);
end
player:endEvent();
end

View File

@ -0,0 +1,10 @@
function onZoneInit(zone)
end
function onZoneIn(zone, player)
end
function onZoneOut(zone, player)
end

View File

@ -2,7 +2,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
man0l0Quest = getStaticActor("Man0l0");
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal003", nil, nil, nil);
--player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_002", nil, nil, nil); --LTW

View File

@ -2,7 +2,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Object/ObjectBed", false, false, false, false, false, 0x1250FB, false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
player:runEventFunction("askLogout", player);
end

View File

@ -2,7 +2,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Object/ObjectInnDoor", false, false, false, false, false, 0x1250F8, false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)

View File

@ -2,7 +2,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Object/ObjectItemStorage", false, false, false, false, false, 0x1250F8, false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)

View File

@ -2,7 +2,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Populace/PopulaceCutScenePlayer", false, false, false, false, false, 0x107B38, false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)

View File

@ -2,7 +2,7 @@ function onInstantiate(npc)
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
end
function onEventStarted(player, npc)
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)