diff --git a/Data/scripts/commands/Ability.lua b/Data/scripts/commands/Ability.lua index 8a3055c2..929a9300 100644 --- a/Data/scripts/commands/Ability.lua +++ b/Data/scripts/commands/Ability.lua @@ -13,7 +13,7 @@ local attackMagicHandlers = { } -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Ability(command.Id, targetActor); player:endEvent(); end \ No newline at end of file diff --git a/Data/scripts/commands/AbilityCure.lua b/Data/scripts/commands/AbilityCure.lua index 98e2eec7..3d4cfd7c 100644 --- a/Data/scripts/commands/AbilityCure.lua +++ b/Data/scripts/commands/AbilityCure.lua @@ -1,5 +1,5 @@ require("global") -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) end \ No newline at end of file diff --git a/Data/scripts/commands/AttackAbility.lua b/Data/scripts/commands/AttackAbility.lua index 8eb5f7aa..0c0a4204 100644 --- a/Data/scripts/commands/AttackAbility.lua +++ b/Data/scripts/commands/AttackAbility.lua @@ -13,7 +13,7 @@ local attackMagicHandlers = { } -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Ability(command.Id, targetActor); player:endEvent(); diff --git a/Data/scripts/commands/AttackMagic.lua b/Data/scripts/commands/AttackMagic.lua index 5bb5d1ff..5449ae0a 100644 --- a/Data/scripts/commands/AttackMagic.lua +++ b/Data/scripts/commands/AttackMagic.lua @@ -13,7 +13,7 @@ local attackMagicHandlers = { } -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); end; \ No newline at end of file diff --git a/Data/scripts/commands/AttackWeaponSkill.lua b/Data/scripts/commands/AttackWeaponSkill.lua index 1d0bd191..7d3ae108 100644 --- a/Data/scripts/commands/AttackWeaponSkill.lua +++ b/Data/scripts/commands/AttackWeaponSkill.lua @@ -9,7 +9,7 @@ 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) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) --Are they in active mode? if (player:GetState() != 2) then diff --git a/Data/scripts/commands/BazaarCheckCommand.lua b/Data/scripts/commands/BazaarCheckCommand.lua index 14ca7a84..1e5b5d5c 100644 --- a/Data/scripts/commands/BazaarCheckCommand.lua +++ b/Data/scripts/commands/BazaarCheckCommand.lua @@ -8,7 +8,7 @@ Handles what happens when you examine a player's bazaar require ("global") -function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, bazaarActorId) +function onEventStarted(player, actor, eventType, eventName, name, arg1, arg2, arg3, bazaarActorId) local bazaarActor = nil; diff --git a/Data/scripts/commands/BazaarDealCommand.lua b/Data/scripts/commands/BazaarDealCommand.lua index fe67817d..5551fa8b 100644 --- a/Data/scripts/commands/BazaarDealCommand.lua +++ b/Data/scripts/commands/BazaarDealCommand.lua @@ -20,7 +20,7 @@ seekAmount: The amount of seekItem we want. require ("global") -function onEventStarted(player, actor, triggerName, rewardItem, seekItem, bazaarMode, arg1, bazaarActor, rewardAmount, seekAmount, arg2, arg3, type9ItemIds) +function onEventStarted(player, actor, eventType, eventName, rewardItem, seekItem, bazaarMode, arg1, bazaarActor, rewardAmount, seekAmount, arg2, arg3, type9ItemIds) local rewarding = nil; local seeking = nil; diff --git a/Data/scripts/commands/BazaarTradeCommand.lua b/Data/scripts/commands/BazaarTradeCommand.lua index 60c6b719..b2bd7d54 100644 --- a/Data/scripts/commands/BazaarTradeCommand.lua +++ b/Data/scripts/commands/BazaarTradeCommand.lua @@ -10,7 +10,7 @@ All bazaar args have a Reward (The item the person who fufills the request gets) --TODO REFACTOR -function onEventStarted(player, actor, triggerName, rewardItem, seekItemOrCost, seekAmount, arg1, bazaarActorId, rewardAmount, rewardItemId, nameIndex, arg2, type9ItemIds) +function onEventStarted(player, actor, eventType, eventName, rewardItem, seekItemOrCost, seekAmount, arg1, bazaarActorId, rewardAmount, rewardItemId, nameIndex, arg2, type9ItemIds) local originalReward = nil; local originalSeek = nil; diff --git a/Data/scripts/commands/BazaarUndealCommand.lua b/Data/scripts/commands/BazaarUndealCommand.lua index a6b0ae16..0b947c84 100644 --- a/Data/scripts/commands/BazaarUndealCommand.lua +++ b/Data/scripts/commands/BazaarUndealCommand.lua @@ -13,7 +13,7 @@ Handles canceling bazaar items --]] -function onEventStarted(player, actor, triggerName, rewardItem, seekItem, bazaarType, narg, bazaarActor, rewardAmount, seekAmount, narg, narg, type9ItemIds) +function onEventStarted(player, actor, eventType, eventName, rewardItem, seekItem, bazaarType, narg, bazaarActor, rewardAmount, seekAmount, narg, narg, type9ItemIds) GetWorldManager():RemoveFromBazaar(player, player:GetItem(rewardItem)); diff --git a/Data/scripts/commands/BonusPointCommand.lua b/Data/scripts/commands/BonusPointCommand.lua index d5f48b44..db1dcae9 100644 --- a/Data/scripts/commands/BonusPointCommand.lua +++ b/Data/scripts/commands/BonusPointCommand.lua @@ -10,7 +10,7 @@ operateUI(pointsAvailable, pointsLimit, str, vit, dex, int, min, pie) require ("global") -function onEventStarted(player, actor, triggerName) +function onEventStarted(player, actor, eventType, eventName) --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); result = callClientFunction(player, "delegateCommand", actor, "operateUI", 100, 100, 10, 10, 10, 10, 10, 10); diff --git a/Data/scripts/commands/ChangeJobCommand.lua b/Data/scripts/commands/ChangeJobCommand.lua index 4cb38f6a..930d8aa7 100644 --- a/Data/scripts/commands/ChangeJobCommand.lua +++ b/Data/scripts/commands/ChangeJobCommand.lua @@ -1,4 +1,4 @@ -function onEventStarted(player, caller, commandRequest, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) +function onEventStarted(player, caller, eventType, eventName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) player:SetCurrentJob(17); diff --git a/Data/scripts/commands/CheckCommand.lua b/Data/scripts/commands/CheckCommand.lua index 5e78e279..def996ad 100644 --- a/Data/scripts/commands/CheckCommand.lua +++ b/Data/scripts/commands/CheckCommand.lua @@ -6,7 +6,7 @@ Handles player examining someone --]] -function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId) +function onEventStarted(player, commandactor, eventType, eventName, arg1, arg2, arg3, arg4, checkedActorId) actor = player:GetActorInInstance(checkedActorId); diff --git a/Data/scripts/commands/ChocoboRideCommand.lua b/Data/scripts/commands/ChocoboRideCommand.lua index 93bba03d..24f56ffd 100644 --- a/Data/scripts/commands/ChocoboRideCommand.lua +++ b/Data/scripts/commands/ChocoboRideCommand.lua @@ -8,9 +8,7 @@ Handles mounting and dismounting the Chocobo and Goobbue require ("global") -function onEventStarted(player, actor, triggerName, isGoobbue) - -<<<<<<< HEAD +function onEventStarted(player, actor, eventType, eventName, isGoobbue) if (player:GetState() == 0) then worldMaster = GetWorldMaster(); @@ -45,48 +43,6 @@ function onEventStarted(player, actor, triggerName, isGoobbue) player:SetMountState(0); player:ChangeSpeed(0.0, 2.0, 5.0, 5.0) player:ChangeState(0); - end - + end 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 \ No newline at end of file diff --git a/Data/scripts/commands/CmnAttackWeaponSkill.lua b/Data/scripts/commands/CmnAttackWeaponSkill.lua index 2bac2cdb..d1bd4ce6 100644 --- a/Data/scripts/commands/CmnAttackWeaponSkill.lua +++ b/Data/scripts/commands/CmnAttackWeaponSkill.lua @@ -124,7 +124,7 @@ local weaponskillHandlers = { [0xA0F070EA] = nil } -function onEventStarted(player, command, triggerName) +function onEventStarted(player, command, eventType, eventName) --Are they in active mode? if (player:GetState() != 2) then diff --git a/Data/scripts/commands/ConfirmGroupCommand.lua b/Data/scripts/commands/ConfirmGroupCommand.lua index f231ebfb..f5b0d3c6 100644 --- a/Data/scripts/commands/ConfirmGroupCommand.lua +++ b/Data/scripts/commands/ConfirmGroupCommand.lua @@ -6,7 +6,7 @@ Handles what happens when you resolve an invite to a group --]] -function onEventStarted(player, actor, triggerName, groupType, result) +function onEventStarted(player, actor, eventType, eventName, groupType, result) --Accept/Refuse happened, else just close the window if (result == 1 or result == 2) then diff --git a/Data/scripts/commands/ConfirmTradeCommand.lua b/Data/scripts/commands/ConfirmTradeCommand.lua index 109f783c..d0b00edd 100644 --- a/Data/scripts/commands/ConfirmTradeCommand.lua +++ b/Data/scripts/commands/ConfirmTradeCommand.lua @@ -6,7 +6,7 @@ Handles what happens when you accept/refuse a trade --]] -function onEventStarted(player, actor, triggerName, groupType, result) +function onEventStarted(player, actor, eventType, eventName, groupType, result) --Accept if (result == 1) then diff --git a/Data/scripts/commands/CraftCommand.lua b/Data/scripts/commands/CraftCommand.lua index e46d7900..8d13c19d 100644 --- a/Data/scripts/commands/CraftCommand.lua +++ b/Data/scripts/commands/CraftCommand.lua @@ -156,7 +156,7 @@ local skillAnim = { local craftStartWidgetOpen = false; -function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId) +function onEventStarted(player, commandactor, eventType, eventName, arg1, arg2, arg3, arg4, checkedActorId) local MENU_CANCEL, MENU_MAINHAND, MENU_OFFHAND, MENU_REQUEST = 0, 1, 2, 3; local MENU_RECENT, MENU_AWARDED, MENU_RECENT_DETAILED, MENU_AWARDED_DETAILED = 7, 8, 9, 10; diff --git a/Data/scripts/commands/CureMagic.lua b/Data/scripts/commands/CureMagic.lua index 8875bd92..9067c36c 100644 --- a/Data/scripts/commands/CureMagic.lua +++ b/Data/scripts/commands/CureMagic.lua @@ -1,4 +1,4 @@ -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); diff --git a/Data/scripts/commands/CuregaMagic.lua b/Data/scripts/commands/CuregaMagic.lua index 8875bd92..9067c36c 100644 --- a/Data/scripts/commands/CuregaMagic.lua +++ b/Data/scripts/commands/CuregaMagic.lua @@ -1,4 +1,4 @@ -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); diff --git a/Data/scripts/commands/DevideAttackWeaponSkill.lua b/Data/scripts/commands/DevideAttackWeaponSkill.lua index 1d0bd191..7d3ae108 100644 --- a/Data/scripts/commands/DevideAttackWeaponSkill.lua +++ b/Data/scripts/commands/DevideAttackWeaponSkill.lua @@ -9,7 +9,7 @@ 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) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) --Are they in active mode? if (player:GetState() != 2) then diff --git a/Data/scripts/commands/DiceCommand.lua b/Data/scripts/commands/DiceCommand.lua index d16557aa..8fdce25e 100644 --- a/Data/scripts/commands/DiceCommand.lua +++ b/Data/scripts/commands/DiceCommand.lua @@ -4,7 +4,7 @@ DiceCommand Script --]] -function onEventStarted(player, actor, triggerName, maxNumber) +function onEventStarted(player, actor, eventType, eventName, maxNumber) if (maxNumber == nil or maxNumber > 1000 or maxNumber < 1) then maxNumber = 100; diff --git a/Data/scripts/commands/DummyCommand.lua b/Data/scripts/commands/DummyCommand.lua index 6728b587..5cb53216 100644 --- a/Data/scripts/commands/DummyCommand.lua +++ b/Data/scripts/commands/DummyCommand.lua @@ -99,7 +99,7 @@ nodeItems = { require ("global") -function onEventStarted(player, commandActor, triggerName, arg1, arg2, arg3, arg4, checkedActorId) +function onEventStarted(player, commandActor, eventType, eventName, arg1, arg2, arg3, arg4, checkedActorId) debugMsg = false; diff --git a/Data/scripts/commands/EffectMagic.lua b/Data/scripts/commands/EffectMagic.lua index 8875bd92..9067c36c 100644 --- a/Data/scripts/commands/EffectMagic.lua +++ b/Data/scripts/commands/EffectMagic.lua @@ -1,4 +1,4 @@ -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); diff --git a/Data/scripts/commands/EmoteSitCommand.lua b/Data/scripts/commands/EmoteSitCommand.lua index 5f58c4c0..5510112e 100644 --- a/Data/scripts/commands/EmoteSitCommand.lua +++ b/Data/scripts/commands/EmoteSitCommand.lua @@ -4,7 +4,7 @@ EmoteSitCommand Script --]] -function onEventStarted(player, actor, triggerName, emoteId) +function onEventStarted(player, actor, eventType, eventName, emoteId) if (player:GetState() == 0) then if (emoteId == 0x2712) then diff --git a/Data/scripts/commands/EquipAbilityCommand.lua b/Data/scripts/commands/EquipAbilityCommand.lua index 2a92841e..4aab8389 100644 --- a/Data/scripts/commands/EquipAbilityCommand.lua +++ b/Data/scripts/commands/EquipAbilityCommand.lua @@ -6,7 +6,7 @@ require ("global") --commandid: command being equipped -function onEventStarted(player, equipAbilityWidget, triggername, slot, commandid, unkown, arg1, arg2, arg3, arg4, arg5, arg6) +function onEventStarted(player, equipAbilityWidget, eventType, eventName, slot, commandid, unkown, arg1, arg2, arg3, arg4, arg5, arg6) local worldManager = GetWorldManager(); local ability = worldManager:GetBattleCommand(commandid); diff --git a/Data/scripts/commands/EquipCommand.lua b/Data/scripts/commands/EquipCommand.lua index cb4c0552..663b4379 100644 --- a/Data/scripts/commands/EquipCommand.lua +++ b/Data/scripts/commands/EquipCommand.lua @@ -53,7 +53,7 @@ GRAPHICSLOT_L_RINGFINGER = 24; GRAPHICSLOT_R_INDEXFINGER = 25; GRAPHICSLOT_L_INDEXFINGER = 26; -function onEventStarted(player, actor, triggerName, equippedItem, param1, param2, param3, param4, param5, param6, param7, equipSlot, itemDBIds) +function onEventStarted(player, actor, eventType, eventName, equippedItem, param1, param2, param3, param4, param5, param6, param7, equipSlot, itemDBIds) equipSlot = equipSlot-1; --Equip Item diff --git a/Data/scripts/commands/EsunaMagic.lua b/Data/scripts/commands/EsunaMagic.lua index 8875bd92..9067c36c 100644 --- a/Data/scripts/commands/EsunaMagic.lua +++ b/Data/scripts/commands/EsunaMagic.lua @@ -1,4 +1,4 @@ -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); diff --git a/Data/scripts/commands/ItemMovePackageCommand.lua b/Data/scripts/commands/ItemMovePackageCommand.lua index 5f1bd6c4..18909126 100644 --- a/Data/scripts/commands/ItemMovePackageCommand.lua +++ b/Data/scripts/commands/ItemMovePackageCommand.lua @@ -6,7 +6,7 @@ Handles moving items across item packages (IE: Taking loot) --]] -function onEventStarted(player, actor, triggerName, itemReference, targetPackage, sourcePackage, arg1, arg2, unknown, arg3, arg4, arg5, type9ItemIds) +function onEventStarted(player, actor, eventType, eventName, itemReference, targetPackage, sourcePackage, arg1, arg2, unknown, arg3, arg4, arg5, type9ItemIds) player:EndEvent(); diff --git a/Data/scripts/commands/ItemTransferCommand.lua b/Data/scripts/commands/ItemTransferCommand.lua index 392c54f9..5bf9bb27 100644 --- a/Data/scripts/commands/ItemTransferCommand.lua +++ b/Data/scripts/commands/ItemTransferCommand.lua @@ -6,7 +6,7 @@ Handles giving an item to another party member. --]] -function onEventStarted(player, actor, triggerName, itemReference, targetPackage, sourcePackage, arg1, targetPlayer, arg2, arg3, arg4, arg5, type9ItemIds) +function onEventStarted(player, actor, eventType, eventName, itemReference, targetPackage, sourcePackage, arg1, targetPlayer, arg2, arg3, arg4, arg5, type9ItemIds) player:EndEvent(); diff --git a/Data/scripts/commands/ItemWasteCommand.lua b/Data/scripts/commands/ItemWasteCommand.lua index a5ff9cd2..3cf16daa 100644 --- a/Data/scripts/commands/ItemWasteCommand.lua +++ b/Data/scripts/commands/ItemWasteCommand.lua @@ -9,7 +9,7 @@ The param "itemDBIds" has the vars: item1 and item2. --]] -function onEventStarted(player, actor, triggerName, itemReference, targetPackage, sourcePackage, arg1, arg2, unknown, arg3, arg4, arg5, type9ItemIds) +function onEventStarted(player, actor, eventType, eventName, itemReference, targetPackage, sourcePackage, arg1, arg2, unknown, arg3, arg4, arg5, type9ItemIds) player:GetItemPackage(itemReference.itemPackage):RemoveItemAtSlot(itemReference.slot); player:EndEvent(); end diff --git a/Data/scripts/commands/LinkshellAppointCommand.lua b/Data/scripts/commands/LinkshellAppointCommand.lua index 5d497c30..2e1cf4bf 100644 --- a/Data/scripts/commands/LinkshellAppointCommand.lua +++ b/Data/scripts/commands/LinkshellAppointCommand.lua @@ -4,7 +4,7 @@ LinkshellAppointCommand Script --]] -function onEventStarted(player, actor, triggerName, linkshellName, memberName, rank) +function onEventStarted(player, actor, eventType, eventName, linkshellName, memberName, rank) GetWorldManager():RequestWorldLinkshellRankChange(player, linkshellName, memberName, rank); player:EndEvent(); diff --git a/Data/scripts/commands/LinkshellChangeCommand.lua b/Data/scripts/commands/LinkshellChangeCommand.lua index 25022775..80b4638b 100644 --- a/Data/scripts/commands/LinkshellChangeCommand.lua +++ b/Data/scripts/commands/LinkshellChangeCommand.lua @@ -4,7 +4,7 @@ LinkshellChangeCommand Script --]] -function onEventStarted(player, actor, triggerName, linkshellName, arg1, arg2) +function onEventStarted(player, actor, eventType, eventName, linkshellName, arg1, arg2) if (linkshellName == nil) then linkshellName = ""; diff --git a/Data/scripts/commands/LinkshellInviteCancelCommand.lua b/Data/scripts/commands/LinkshellInviteCancelCommand.lua index 8888224b..0538e26f 100644 --- a/Data/scripts/commands/LinkshellInviteCancelCommand.lua +++ b/Data/scripts/commands/LinkshellInviteCancelCommand.lua @@ -6,7 +6,7 @@ Handles what happens when you cancel an invite to a linkshell --]] -function onEventStarted(player, actor, triggerName, arg1, arg2, arg3, arg4, actorId) +function onEventStarted(player, actor, eventType, eventName, arg1, arg2, arg3, arg4, actorId) GetWorldManager():RequestWorldLinkshellCancelInvite(player); player:EndEvent(); diff --git a/Data/scripts/commands/LinkshellInviteCommand.lua b/Data/scripts/commands/LinkshellInviteCommand.lua index de8853bd..cee8f2a9 100644 --- a/Data/scripts/commands/LinkshellInviteCommand.lua +++ b/Data/scripts/commands/LinkshellInviteCommand.lua @@ -6,7 +6,7 @@ Handles what happens when you invite a player to a linkshell --]] -function onEventStarted(player, actor, triggerName, linkshellName, arg1, arg2, arg3, actorId) +function onEventStarted(player, actor, eventType, eventName, linkshellName, arg1, arg2, arg3, actorId) GetWorldManager():RequestWorldLinkshellInviteMember(player, linkshellName, actorId); player:EndEvent(); diff --git a/Data/scripts/commands/LinkshellKickCommand.lua b/Data/scripts/commands/LinkshellKickCommand.lua index 55c7da7e..714f0249 100644 --- a/Data/scripts/commands/LinkshellKickCommand.lua +++ b/Data/scripts/commands/LinkshellKickCommand.lua @@ -4,7 +4,7 @@ LinkshellKickCommand Script --]] -function onEventStarted(player, actor, triggerName, linkshellName, kickedName) +function onEventStarted(player, actor, eventType, eventName, linkshellName, kickedName) GetWorldManager():RequestWorldLinkshellKick(player, linkshellName, kickedName); player:EndEvent(); diff --git a/Data/scripts/commands/LinkshellResignCommand.lua b/Data/scripts/commands/LinkshellResignCommand.lua index 68da82b7..8616de95 100644 --- a/Data/scripts/commands/LinkshellResignCommand.lua +++ b/Data/scripts/commands/LinkshellResignCommand.lua @@ -4,7 +4,7 @@ LinkshellLeaveCommand Script --]] -function onEventStarted(player, actor, triggerName, linkshellName) +function onEventStarted(player, actor, eventType, eventName, linkshellName) GetWorldManager():RequestWorldLinkshellLeave(player, linkshellName); player:EndEvent(); diff --git a/Data/scripts/commands/LoginEventCommand.lua b/Data/scripts/commands/LoginEventCommand.lua index 88d29680..d20c82dc 100644 --- a/Data/scripts/commands/LoginEventCommand.lua +++ b/Data/scripts/commands/LoginEventCommand.lua @@ -8,7 +8,7 @@ Handles post-dream events. require ("global") -function onEventStarted(player, actor, triggerName, dreamCode, innCode, narg1, narg2, bedActor) +function onEventStarted(player, actor, eventType, eventName, dreamCode, innCode, narg1, narg2, bedActor) --In Plain Sight if (dreamCode == 1) then diff --git a/Data/scripts/commands/LogoutCommand.lua b/Data/scripts/commands/LogoutCommand.lua index 7f56d757..df07fef2 100644 --- a/Data/scripts/commands/LogoutCommand.lua +++ b/Data/scripts/commands/LogoutCommand.lua @@ -12,7 +12,7 @@ eventLogoutFade() require ("global") -function onEventStarted(player, command, triggerName) +function onEventStarted(player, command, eventType, eventName) choice = callClientFunction(player, "delegateCommand", command, "eventConfirm"); diff --git a/Data/scripts/commands/NegotiationCommand.lua b/Data/scripts/commands/NegotiationCommand.lua index d3d581af..1748b942 100644 --- a/Data/scripts/commands/NegotiationCommand.lua +++ b/Data/scripts/commands/NegotiationCommand.lua @@ -40,7 +40,7 @@ updateNegotiationWidget(player, gridIndex, key, itemIconId, pointValue, ?, ?) - require ("global") -function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, arg5) +function onEventStarted(player, commandactor, eventType, eventName, arg1, arg2, arg3, arg4, arg5) negotiationJudge = GetStaticActor("NegotiationJudge"); diff --git a/Data/scripts/commands/PartyBreakupCommand.lua b/Data/scripts/commands/PartyBreakupCommand.lua index ab69a388..6396610a 100644 --- a/Data/scripts/commands/PartyBreakupCommand.lua +++ b/Data/scripts/commands/PartyBreakupCommand.lua @@ -6,7 +6,7 @@ Handles disbanding the party. --]] -function onEventStarted(player, actor, triggerName) +function onEventStarted(player, actor, eventType, eventName) worldMaster = GetWorldMaster(); if (player:IsPartyLeader()) then diff --git a/Data/scripts/commands/PartyDisbandCommand.lua b/Data/scripts/commands/PartyDisbandCommand.lua index 15fc2ec0..6a89faae 100644 --- a/Data/scripts/commands/PartyDisbandCommand.lua +++ b/Data/scripts/commands/PartyDisbandCommand.lua @@ -15,7 +15,7 @@ TextIds: --]] -function onEventStarted(player, actor, name) +function onEventStarted(player, actor, eventType, eventName, name) worldMaster = GetWorldMaster(); if (player:IsPartyLeader()) then diff --git a/Data/scripts/commands/PartyInviteCommand.lua b/Data/scripts/commands/PartyInviteCommand.lua index 59a8fc08..f0e8ddb4 100644 --- a/Data/scripts/commands/PartyInviteCommand.lua +++ b/Data/scripts/commands/PartyInviteCommand.lua @@ -6,7 +6,7 @@ Handles what happens when you invite --]] -function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, actorId) +function onEventStarted(player, actor, eventType, eventName, name, arg1, arg2, arg3, actorId) if (name ~= nil) then GetWorldManager():CreateInvitePartyGroup(player, name); diff --git a/Data/scripts/commands/PartyKickCommand.lua b/Data/scripts/commands/PartyKickCommand.lua index b2b80987..fb6a5f8c 100644 --- a/Data/scripts/commands/PartyKickCommand.lua +++ b/Data/scripts/commands/PartyKickCommand.lua @@ -15,7 +15,7 @@ TextIds: --]] -function onEventStarted(player, actor, triggerName, name, arg2, arg3, arg4, actorId) +function onEventStarted(player, actor, eventType, eventName, name, arg2, arg3, arg4, actorId) worldMaster = GetWorldMaster(); if (player:IsPartyLeader()) then diff --git a/Data/scripts/commands/PartyLeaderCommand.lua b/Data/scripts/commands/PartyLeaderCommand.lua index cf965b46..19a5faea 100644 --- a/Data/scripts/commands/PartyLeaderCommand.lua +++ b/Data/scripts/commands/PartyLeaderCommand.lua @@ -6,7 +6,7 @@ Handles requesting to change party leader and various errors. --]] -function onEventStarted(player, actor, triggerName, name, arg2, arg3, arg4, actorId) +function onEventStarted(player, actor, eventType, eventName, name, arg2, arg3, arg4, actorId) worldMaster = GetWorldMaster(); if (player:IsPartyLeader()) then diff --git a/Data/scripts/commands/PartyResignCommand.lua b/Data/scripts/commands/PartyResignCommand.lua index e35a093c..400d58ef 100644 --- a/Data/scripts/commands/PartyResignCommand.lua +++ b/Data/scripts/commands/PartyResignCommand.lua @@ -6,7 +6,7 @@ Handles leaving a party --]] -function onEventStarted(player, actor, triggerName) +function onEventStarted(player, actor, eventType, eventName) player:PartyLeave(name); player:EndEvent(); end \ No newline at end of file diff --git a/Data/scripts/commands/PartyTargetCommand.lua b/Data/scripts/commands/PartyTargetCommand.lua index e5d77fe5..734745dc 100644 --- a/Data/scripts/commands/PartyTargetCommand.lua +++ b/Data/scripts/commands/PartyTargetCommand.lua @@ -27,7 +27,7 @@ markers = { -- [id] = {overheadIcon, textIcon} } -function onEventStarted(player, actor, triggerName, commandValue, category, unk1, unk2, targetActor, unk3, unk4, unk5, unk6) +function onEventStarted(player, actor, eventType, eventName, commandValue, category, unk1, unk2, targetActor, unk3, unk4, unk5, unk6) workName = "charaWork.parameterTemp.targetInformation"; uiFunc = "charaWork/stateForAll"; diff --git a/Data/scripts/commands/PointSearchAbility.lua b/Data/scripts/commands/PointSearchAbility.lua index c0441ca7..1ef20fa6 100644 --- a/Data/scripts/commands/PointSearchAbility.lua +++ b/Data/scripts/commands/PointSearchAbility.lua @@ -1,5 +1,5 @@ -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); diff --git a/Data/scripts/commands/RaiseMagic.lua b/Data/scripts/commands/RaiseMagic.lua index 8875bd92..9067c36c 100644 --- a/Data/scripts/commands/RaiseMagic.lua +++ b/Data/scripts/commands/RaiseMagic.lua @@ -1,4 +1,4 @@ -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); diff --git a/Data/scripts/commands/RequestInformationCommand.lua b/Data/scripts/commands/RequestInformationCommand.lua index 0681da49..6ee2f7a5 100644 --- a/Data/scripts/commands/RequestInformationCommand.lua +++ b/Data/scripts/commands/RequestInformationCommand.lua @@ -3,7 +3,7 @@ --]] -function onEventStarted(player, actor, questId) +function onEventStarted(player, actor, eventType, eventName, questId) player:SendDataPacket("requestedData", "activegl", 7, nil, nil, nil, nil, nil, nil, nil); -- player:SendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526); end diff --git a/Data/scripts/commands/ShotCommand.lua b/Data/scripts/commands/ShotCommand.lua index 98f945e9..a3719f33 100644 --- a/Data/scripts/commands/ShotCommand.lua +++ b/Data/scripts/commands/ShotCommand.lua @@ -9,7 +9,7 @@ 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) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Ability(command.Id, targetActor); player:endEvent(); end; \ No newline at end of file diff --git a/Data/scripts/commands/SongMagic.lua b/Data/scripts/commands/SongMagic.lua index 5bb5d1ff..5449ae0a 100644 --- a/Data/scripts/commands/SongMagic.lua +++ b/Data/scripts/commands/SongMagic.lua @@ -13,7 +13,7 @@ local attackMagicHandlers = { } -function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) +function onEventStarted(player, command, eventType, eventName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) player.Cast(command.Id, targetActor); player:endEvent(); end; \ No newline at end of file diff --git a/Data/scripts/commands/TradeExecuteCommand.lua b/Data/scripts/commands/TradeExecuteCommand.lua index 590a0458..bf879e85 100644 --- a/Data/scripts/commands/TradeExecuteCommand.lua +++ b/Data/scripts/commands/TradeExecuteCommand.lua @@ -24,7 +24,7 @@ reedit: Target has canceled their accept. require ("global") -function onEventStarted(player, actor, triggerName) +function onEventStarted(player, actor, eventType, eventName) callClientFunction(player, "delegateCommand", GetStaticActor("TradeExecuteCommand"), "processTradeCommandOpenTray"); diff --git a/Data/scripts/commands/TradeOfferCancelCommand.lua b/Data/scripts/commands/TradeOfferCancelCommand.lua index 71edd609..0a8546b8 100644 --- a/Data/scripts/commands/TradeOfferCancelCommand.lua +++ b/Data/scripts/commands/TradeOfferCancelCommand.lua @@ -6,7 +6,7 @@ Handles what happens a player cancels a trade --]] -function onEventStarted(player, actor, triggerName, commandId, result) +function onEventStarted(player, actor, eventType, eventName, commandId, result) GetWorldManager():CancelTrade(player); player:EndEvent(); diff --git a/Data/scripts/commands/TradeOfferCommand.lua b/Data/scripts/commands/TradeOfferCommand.lua index 3661de0c..2c2095a1 100644 --- a/Data/scripts/commands/TradeOfferCommand.lua +++ b/Data/scripts/commands/TradeOfferCommand.lua @@ -6,7 +6,7 @@ Handles what happens when you invite to trade --]] -function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, actorId) +function onEventStarted(player, actor, eventType, eventName, name, arg1, arg2, arg3, actorId) local otherActor = nil; diff --git a/Data/scripts/global.lua b/Data/scripts/global.lua index 6f247e03..4f4ceaed 100644 --- a/Data/scripts/global.lua +++ b/Data/scripts/global.lua @@ -40,6 +40,7 @@ MESSAGE_TYPE_URGENT_MESSAGE = 28; MESSAGE_TYPE_GENERAL_INFO = 29; MESSAGE_TYPE_SYSTEM = 32; MESSAGE_TYPE_SYSTEM_ERROR = 33; +MESSAGE_TYPE_NPC_LINKSHELL = 39; -- INVENTORY INVENTORY_NORMAL = 0x0000; --Max 0xC8 diff --git a/Data/scripts/quests/man/man0l1.lua b/Data/scripts/quests/man/man0l1.lua index 4e43fb27..5c9e069a 100644 --- a/Data/scripts/quests/man/man0l1.lua +++ b/Data/scripts/quests/man/man0l1.lua @@ -99,6 +99,7 @@ ECHO_EXIT_TRIGGER2 = 1090001; CNTR_SEQ7_CUL = 1; CNTR_SEQ7_MRD = 2; CNTR_SEQ40_FSH = 3; +CNTR_LS_MSG = 4; function onStart(player, quest) quest:StartSequence(SEQ_000); @@ -163,11 +164,7 @@ function onStateChange(player, quest, sequence) quest:SetENpc(ADVENTURER1); quest:SetENpc(ADVENTURER2); quest:SetENpc(ADVENTURER3); - quest:SetENpc(ECHO_EXIT_TRIGGER, subseqMRD == 3 and QFLAG_MAP or QFLAG_NONE, false, subseqMRD == 3); - - if (subseqCUL == 1 and subseqMRD == 4) then - player:SetNpcLS(1, 1); - end + quest:SetENpc(ECHO_EXIT_TRIGGER, subseqMRD == 3 and QFLAG_MAP or QFLAG_NONE, false, subseqMRD == 3); elseif (sequence == SEQ_035) then quest:SetENpc(NNMULIKA, QFLAG_PLATE); elseif (sequence == SEQ_040) then @@ -406,6 +403,9 @@ function seq007_onTalk(player, quest, npc, classId) if (subseqCUL == 0) then callClientFunction(player, "delegateEvent", player, quest, "processEvent030"); data:IncCounter(CNTR_SEQ7_CUL); + if (data:GetCounter(CNTR_SEQ7_CUL) == 1 and data:GetCounter(CNTR_SEQ7_MSK) = 4) then + seq007_endSequence(player, quest); + end --give 1000g else callClientFunction(player, "delegateEvent", player, quest, "processEvent030_2"); @@ -448,6 +448,11 @@ function seq007_onTalk(player, quest, npc, classId) player:EndEvent(); end +function seq007_endSequence(player, quest) + callClientFunction(player, "delegateEvent", player, quest, "processEvent033"); + player:SetNpcLS(1, 1); +end + function seq080_085_onTalk(player, quest, npc, classId) if (classId == IOFA) then callClientFunction(player, "delegateEvent", player, quest, "processEvent630_2"); @@ -484,6 +489,9 @@ function onPush(player, quest, npc) elseif (classId == ECHO_EXIT_TRIGGER) then callClientFunction(player, "delegateEvent", player, quest, "processEvent060"); data:IncCounter(CNTR_SEQ7_MRD); + if (data:GetCounter(CNTR_SEQ7_CUL) == 1 and data:GetCounter(CNTR_SEQ7_MSK) = 4) then + seq007_endSequence(player, quest); + end player:EndEvent(); quest:UpdateENPCs(); GetWorldManager():WarpToPublicArea(player); @@ -509,7 +517,8 @@ function onPush(player, quest, npc) callClientFunction(player, "delegateEvent", player, quest, "processEvent620"); -- Give 3000 gil player:EndEvent(); - quest:StartSequence(SEQ_075); + data:SetCounter(CNTR_LS_MSG, 0); + quest:StartSequence(SEQ_070); end elseif (sequence == SEQ_085) then if (classId == ECHO_EXIT_TRIGGER2) then @@ -634,6 +643,7 @@ end function onNpcLS(player, quest, npcLSId) local sequence = quest:getSequence(); + callClientFunction(player, "delegateEvent", player, quest, "processEvent625"); if (npcLSId == 1) then player:SetNpcLS(1, 1); @@ -646,9 +656,18 @@ function onNpcLS(player, quest, npcLSId) player:SendGameMessageLocalizedDisplayName(quest, 82, 39, 1000015, nil); quest:StartSequence(SEQ_035); elseif (sequence == SEQ_070) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent625"); + local lsStep = data:IncCounter(CNTR_LS_MSG); + if (lsStep == 1) then + player:SendGameMessageLocalizedDisplayName(quest, 80, 39, 1000015, nil); + elseif (lsStep == 2) then + player:SendGameMessageLocalizedDisplayName(quest, 80, 39, 1000015, nil); + elseif (lsStep == 3) then + player:SendGameMessageLocalizedDisplayName(quest, 80, 39, 1000015, nil); + else + player:SendGameMessageLocalizedDisplayName(quest, 80, 39, 1000015, nil); + quest:StartSequence(SEQ_075); + end player:EndEvent(); - quest:StartSequence(SEQ_075); elseif (sequence == SEQ_090) then callClientFunction(player, "delegateEvent", player, quest, "processEvent637"); player:EndEvent(); diff --git a/Data/scripts/quests/man/man0u1.lua b/Data/scripts/quests/man/man0u1.lua index efa2f7aa..7f0e48d3 100644 --- a/Data/scripts/quests/man/man0u1.lua +++ b/Data/scripts/quests/man/man0u1.lua @@ -168,8 +168,6 @@ function onNotice(player, quest, target) quest:UpdateENPCs(); end - - function seq000_onTalk(player, quest, npc, classId) if (classId == MOMODI) then