From bad51717c23aee34ded87dc8c855c71ca54bb286 Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Fri, 28 Jan 2022 02:29:45 -0500 Subject: [PATCH 1/6] Minor script fixes ============= ChocoboRideCommand - Fixed the mount speed to be retail accurate. TeleportCommand - Added anima costs, mount check, and placeholder for Favoured destinations nudge/spawn/warpid - Plus 1 to GetPos() arrays --- Data/scripts/commands/ChocoboRideCommand.lua | 76 ++--- Data/scripts/commands/TeleportCommand.lua | 280 ++++++++++++------- Data/scripts/commands/gm/nudge.lua | 10 +- Data/scripts/commands/gm/spawn.lua | 48 ++-- Data/scripts/commands/gm/warpid.lua | 13 +- 5 files changed, 253 insertions(+), 174 deletions(-) diff --git a/Data/scripts/commands/ChocoboRideCommand.lua b/Data/scripts/commands/ChocoboRideCommand.lua index 59bb989d..f28bd8f1 100644 --- a/Data/scripts/commands/ChocoboRideCommand.lua +++ b/Data/scripts/commands/ChocoboRideCommand.lua @@ -8,42 +8,42 @@ Handles mounting and dismounting the Chocobo and Goobbue function onEventStarted(player, actor, triggerName, isGoobbue) - 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:GetZone().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(); - + 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, 3.6, 9.0, 9.0); + player:ChangeState(15); + else + player:ChangeMusic(player:GetZone().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(); + end \ No newline at end of file diff --git a/Data/scripts/commands/TeleportCommand.lua b/Data/scripts/commands/TeleportCommand.lua index 69971f59..e7c7a3bb 100644 --- a/Data/scripts/commands/TeleportCommand.lua +++ b/Data/scripts/commands/TeleportCommand.lua @@ -6,7 +6,7 @@ Functions: eventRegion(numAnima) eventAetheryte(region, animaCost1, animaCost2, animaCost3, animaCost4, animaCost5, animaCost6) -eventConfirm(isReturn, isInBattle, cityReturnNum, 138821, forceAskReturnOnly) +eventConfirm(isReturn, isInBattle, HomePointInn, HomePoint, forceAskReturnOnly) --]] @@ -15,112 +15,190 @@ require ("aetheryte") require ("utils") teleportMenuToAetheryte = { - [1] = { - [1] = 1280001, - [2] = 1280002, - [3] = 1280003, - [4] = 1280004, - [5] = 1280005, - [6] = 1280006 - }, - [2] = { - [1] = 1280092, - [2] = 1280093, - [3] = 1280094, - [4] = 1280095, - [5] = 1280096 - }, - [3] = { - [1] = 1280061, - [2] = 1280062, - [3] = 1280063, - [4] = 1280064, - [5] = 1280065, - [6] = 1280066 - }, - [4] = { - [1] = 1280031, - [2] = 1280032, - [3] = 1280033, - [4] = 1280034, - [5] = 1280035, - [6] = 1280036 - }, - [5] = { - [1] = 1280121, - [2] = 1280122 - } + [1] = { + [1] = 1280001, + [2] = 1280002, + [3] = 1280003, + [4] = 1280004, + [5] = 1280005, + [6] = 1280006 + }, + [2] = { + [1] = 1280092, + [2] = 1280093, + [3] = 1280094, + [4] = 1280095, + [5] = 1280096 + }, + [3] = { + [1] = 1280061, + [2] = 1280062, + [3] = 1280063, + [4] = 1280064, + [5] = 1280065, + [6] = 1280066 + }, + [4] = { + [1] = 1280031, + [2] = 1280032, + [3] = 1280033, + [4] = 1280034, + [5] = 1280035, + [6] = 1280036 + }, + [5] = { + [1] = 1280121, + [2] = 1280122 + }, + } +zoneIdToRegionChoice = +{ + [128] = 1, [129] = 1, [130] = 1, [131] = 1, [132] = 1, [133] = 1, [134] = 1, [135] = 1, [230] = 1, + [143] = 2, [144] = 2, [145] = 2, [147] = 2, [148] = 2, + [150] = 3, [151] = 3, [152] = 3, [153] = 3, [154] = 3, [155] = 3, [157] = 3, [158] = 3, [159] = 3, [160] = 3, [206] = 3, + [170] = 4, [171] = 4, [172] = 4, [173] = 4, [174] = 4, [175] = 4, [176] = 4, [178] = 4, [180] = 4, [181] = 4, [209] = 4, + [190] = 5 +} + + function onEventStarted(player, actor, eventType, eventName, isTeleport) - local worldMaster = GetWorldMaster(); + local worldMaster = GetWorldMaster(); + local playerState = player:GetState(); + local currentAnima = 100; + local baseAnimaCost = 6; + local animaCost = 0; + local favoredLocation = {1280003, 1280005, 1280062}; + local currentRegion = zoneIdToRegionChoice[player:GetPos()[5]] or 0; + local isCity = {[1280001] = true, [1280061] = true, [1280031] = true}; + local isRegion = true; + local destination = 0; - if (isTeleport == 0) then - while (true) do - regionChoice = callClientFunction(player, "delegateCommand", actor, "eventRegion", 100); - - if (regionChoice == nil) then break end - - while (true) do - aetheryteChoice = callClientFunction(player, "delegateCommand", actor, "eventAetheryte", regionChoice, 2, 2, 2, 4, 4, 4); - - if (aetheryteChoice == nil) then break end - - player:PlayAnimation(0x4000FFA); - player:SendGameMessage(worldMaster, 34101, 0x20, 2, teleportMenuToAetheryte[regionChoice][aetheryteChoice], 100, 100); - confirmChoice = callClientFunction(player, "delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false); - if (confirmChoice == 1) then - player:PlayAnimation(0x4000FFB); - player:SendGameMessage(worldMaster, 34105, 0x20); - --Do teleport - destination = aetheryteTeleportPositions[teleportMenuToAetheryte[regionChoice][aetheryteChoice]]; - if (destination ~= nil) then - randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5); - rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]); - GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation); - end - end - player:endEvent(); - return; - end - - end - else - player:PlayAnimation(0x4000FFA); - local choice, isInn = callClientFunction(player, "delegateCommand", actor, "eventConfirm", true, false, player:GetHomePointInn(), player:GetHomePoint(), false); - if (choice == 1) then - player:PlayAnimation(0x4000FFB); - player:SendGameMessage(worldMaster, 34104, 0x20); - --bandaid fix for returning while dead, missing things like weakness and the heal number - if (player:GetHP() == 0) then - player:SetHP(player.GetMaxHP()); - player:ChangeState(0); - player:PlayAnimation(0x01000066); - end + if (isTeleport == 0) then -- Teleport hit + while (true) do + regionChoice = callClientFunction(player, "delegateCommand", actor, "eventRegion", currentAnima); + + if (regionChoice == nil) then break end + + while (true) do + if (regionChoice > 0 and regionChoice < 6) then -- If Region selected - if (isInn) then - --Return to Inn - if (player:GetHomePointInn() == 1) then - GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, -160.048, 0, -165.737, 0); - elseif (player:GetHomePointInn() == 2) then - GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0); - elseif (player:GetHomePointInn() == 3) then - GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0); - end - elseif (choice == 1 and isInn == nil) then - --Return to Homepoint - destination = aetheryteTeleportPositions[player:GetHomePoint()]; - if (destination ~= nil) then - randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5); - rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]); - GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation); + if (regionChoice == currentRegion) then -- Check if selected region matches player's region, reduce cost if so. + baseAnimaCost = baseAnimaCost - 2; + else + baseAnimaCost = 6; + end + + -- Assign anima cost to the six possible slots after factoring in same region or not. + animaCost = {baseAnimaCost, baseAnimaCost, baseAnimaCost, baseAnimaCost, baseAnimaCost, baseAnimaCost}; + + if (isCity[teleportMenuToAetheryte[regionChoice][1]] == true) then + -- Halve the cost of applicable city aetheryte + animaCost[1] = animaCost[1] / 2; + end - end - end - end - end + elseif (regionChoice == 6) then -- Favored Destinations selected. + -- Dummy info. Favored would be half price after factoring in same region cost or not. + animaCost = {2, 3, 3, favoredLocation[1], favoredLocation[2], favoredLocation[3]}; + isRegion = false; + end + + + aetheryteChoice = callClientFunction( + player, + "delegateCommand", + actor, + "eventAetheryte", + regionChoice, + animaCost[1], + animaCost[2], + animaCost[3], + animaCost[4], + animaCost[5], + animaCost[6] + ); + + + if (aetheryteChoice == nil) then break end + + player:PlayAnimation(0x4000FFA); + + if (isRegion == true) then + destination = aetheryteTeleportPositions[teleportMenuToAetheryte[regionChoice][aetheryteChoice]]; + player:SendGameMessage(worldMaster, 34101, 0x20, 2, teleportMenuToAetheryte[regionChoice][aetheryteChoice], animaCost[aetheryteChoice], currentAnima); + else + destination = aetheryteTeleportPositions[favoredLocation[aetheryteChoice]]; + player:SendGameMessage(worldMaster, 34101, 0x20, 2, favoredLocation[aetheryteChoice], animaCost[aetheryteChoice], currentAnima); + end + + confirmChoice = callClientFunction(player, "delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false); + + if (confirmChoice == 1) then + player:PlayAnimation(0x4000FFB); + player:SendGameMessage(worldMaster, 34105, 0x20); + + if (destination ~= 0) then + randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5); + rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]); + if (playerState == ACTORSTATE_MOUNTED) then + player:SetMountState(0); + player:ChangeSpeed(0.0, 2.0, 5.0, 5.0) + player:ChangeState(ACTORSTATE_PASSIVE); + end + + GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation); + end + end + + player:endEvent(); + return; + end + end + + else -- Return hit + player:PlayAnimation(0x4000FFA); + local choice, isInn = callClientFunction(player, "delegateCommand", actor, "eventConfirm", true, false, player:GetHomePointInn(), player:GetHomePoint(), false); + if (choice == 1) then + player:PlayAnimation(0x4000FFB); + player:SendGameMessage(worldMaster, 34104, 0x20); + + --bandaid fix for returning while dead, missing things like weakness and the heal number + if (player:GetHP() == 0) then + player:SetHP(player.GetMaxHP()); + player:ChangeState(0); + player:PlayAnimation(0x01000066); + end + + if (isInn) then + --Return to Inn + if (player:GetHomePointInn() == 1) then + GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, -160.048, 0, -165.737, 0); + elseif (player:GetHomePointInn() == 2) then + GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0); + elseif (player:GetHomePointInn() == 3) then + GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0); + end + elseif (choice == 1 and isInn == nil) then + --Return to Homepoint + destination = aetheryteTeleportPositions[player:GetHomePoint()]; + if (destination ~= nil) then + randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5); + rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]); + if (playerState == ACTORSTATE_MOUNTED) then + player:SetMountState(0); + player:ChangeSpeed(0.0, 2.0, 5.0, 5.0) + player:ChangeState(ACTORSTATE_PASSIVE); + end + + GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation); + end + end + end + end + + player:endEvent(); +end - player:endEvent(); -end \ No newline at end of file diff --git a/Data/scripts/commands/gm/nudge.lua b/Data/scripts/commands/gm/nudge.lua index 65b79140..bb3ceb50 100644 --- a/Data/scripts/commands/gm/nudge.lua +++ b/Data/scripts/commands/gm/nudge.lua @@ -26,11 +26,11 @@ vertical = { function onTrigger(player, argc, arg1, arg2) local pos = player:GetPos(); - local x = pos[0]; - local y = pos[1]; - local z = pos[2]; - local rot = pos[3]; - local zone = pos[4]; + local x = pos[1]; + local y = pos[2]; + local z = pos[3]; + local rot = pos[4]; + local zone = pos[5]; local angle = rot + (math.pi/2); local worldManager = GetWorldManager(); diff --git a/Data/scripts/commands/gm/spawn.lua b/Data/scripts/commands/gm/spawn.lua index 1f3f1852..196dc08c 100644 --- a/Data/scripts/commands/gm/spawn.lua +++ b/Data/scripts/commands/gm/spawn.lua @@ -8,36 +8,36 @@ properties = { function onTrigger(player, argc, actorClassId, width, height) - if (actorClassId == nil) then - player:SendMessage(0x20, "", "No actor class id provided."); - return; - end + if (actorClassId == nil) then + player:SendMessage(0x20, "", "No actor class id provided."); + return; + end local pos = player:GetPos(); - local x = pos[0]; - local y = pos[1]; - local z = pos[2]; - local rot = pos[3]; - local zone = pos[4]; + local x = pos[1]; + local y = pos[2]; + local z = pos[3]; + local rot = pos[4]; + local zone = pos[5]; - actorClassId = tonumber(actorClassId); - - if (actorClassId ~= nil) then - zone = player:GetZone(); - local w = tonumber(width) or 0; + actorClassId = tonumber(actorClassId); + + if (actorClassId ~= nil) then + zone = player:GetZone(); + local w = tonumber(width) or 0; 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 - actor = zone: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 - + actor = zone:SpawnActor(actorClassId, "test", x + (i - (w / 2) * 3), y, z + (j - (h / 2) * 3), rot); + actor.SetAppearance(1001149) + end + end + end + + if (actor == nil) then + player:SendMessage(0x20, "", "This actor class id cannot be spawned."); + end + end; \ No newline at end of file diff --git a/Data/scripts/commands/gm/warpid.lua b/Data/scripts/commands/gm/warpid.lua index 66301140..d8099ef4 100644 --- a/Data/scripts/commands/gm/warpid.lua +++ b/Data/scripts/commands/gm/warpid.lua @@ -18,22 +18,23 @@ function onTrigger(player, argc, uID) end; actor = GetWorldManager():GetActorInWorldByUniqueId(uID); - + actorId = actor:GetActorClassId(); if (actor ~= nil) then local actorPos = actor:GetPos(); local playerPos = player:GetPos(); - if actorPos[4] == playerPos[4] then - worldManager:DoPlayerMoveInZone(player, actorPos[0], actorPos[1], actorPos[2], actorPos[3], 0x00); + if actorPos[5] == playerPos[5] then + worldManager:DoPlayerMoveInZone(player, actorPos[1], actorPos[2], actorPos[3], actorPos[4], 0x00); else - worldManager:DoZoneChange(player, actorPos[4], nil, 0, 0x02, actorPos[0], actorPos[1], actorPos[2], actorPos[3]); + worldManager:DoZoneChange(player, actorPos[5], nil, 0, 0x02, actorPos[1], actorPos[2], actorPos[3], actorPos[4]); end - message = string.format("Moving to %s 's coordinates @ zone %s, %.3f %.3f %.3f ", uID, actorPos[4], actorPos[0], actorPos[1], actorPos[2]); + message = string.format("Moving to %s 's coordinates @ zone %s, %.3f %.3f %.3f ", uID, actorPos[5], actorPos[1], actorPos[2], actorPos[3]); end ; player:SendMessage(messageID, sender, message); - + player:SendMessage(0x20, "", "Actor Class Id: "..actorId); + end \ No newline at end of file From 4fc5762d411cfe5c8b36a4cb59161573fdc629c2 Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Sat, 5 Feb 2022 13:56:58 -0500 Subject: [PATCH 2/6] Teleport command touch-ups. PopulaceCompanyWarp made to look more retail authentic. Can't figure out how to make it not play the 'npc untargeted' sound though like retail. Music command has second argument for transition type. Added an overloaded function in Player.cs to support this. Setappearance adjusted to work again on player targets. DftWil updated to cover near everything. Re-added shop-related luas that were removed for some reason. --- .../npc/populace/PopulaceCompanyShop.lua | 510 ++++++++++++++ .../npc/populace/PopulaceCompanyWarp.lua | 52 +- .../npc/populace/shop/PopulaceGuildShop.lua | 107 +++ .../populace/shop/PopulaceShopSalesman.lua | 655 ++++++++++++++++++ Data/scripts/commands/ChocoboRideCommand.lua | 8 +- Data/scripts/commands/TeleportCommand.lua | 15 +- Data/scripts/commands/gm/music.lua | 9 +- Data/scripts/commands/gm/setappearance.lua | 8 +- Data/scripts/global.lua | 8 + Data/scripts/quests/dft/DftWil.lua | 186 +++-- Data/scripts/shop.lua | 55 ++ Map Server/Actors/Chara/Player/Player.cs | 8 + 12 files changed, 1543 insertions(+), 78 deletions(-) create mode 100644 Data/scripts/base/chara/npc/populace/PopulaceCompanyShop.lua create mode 100644 Data/scripts/base/chara/npc/populace/shop/PopulaceGuildShop.lua create mode 100644 Data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua create mode 100644 Data/scripts/shop.lua diff --git a/Data/scripts/base/chara/npc/populace/PopulaceCompanyShop.lua b/Data/scripts/base/chara/npc/populace/PopulaceCompanyShop.lua new file mode 100644 index 00000000..7f6dd5a2 --- /dev/null +++ b/Data/scripts/base/chara/npc/populace/PopulaceCompanyShop.lua @@ -0,0 +1,510 @@ +--[[ + +PopulaceCompanyShop Script + + +Functions: + +eventTalkStepCantUse() -- When player tries to buy from another GC's shop +eventTalkPreJoin() -- Dialog for the shop +eventTalkPreJoinQuest() -- Tutorial dialog for the shop? +eventTalkJoined(???) -- Dialog for the shop, they salute. Orphaned parameter? + +eventTalkFestival() -- Festival Day Event Dialog +eventTalkFestival2() -- Festival Day Event Follow-up Dialog + +eventTalkMainMenu(???, ???) -- Shop menu for picking GC items +eventShopMenuOpen() -- Sets up shop menu. Calls getSpecialEventWork, value 8 shows GC firework & 11 a Patriot's Choker +eventShopMenuAsk() -- Opens up the shop menu. +eventShopMenuClose() + +eventGuideChocoboWhistle(???) -- Tutorial dialog after purchasing Chocobo issuance slip. Orphaned parameter? +eventGuideTownTransport(index) -- Tutorial dialog after purchasing an aetherpass. Index is item ID. +eventAskChocoboCustomize(index, price) -- Chocobo Barding purchase dialog. Index is item ID. +eventChocoboCustomize() -- Follow-up dialog if you purchase Chocobo Barding. + +getGrandCompanyNumber() -- Returns GC value of the NPC +getShopItemStartIndex(index) -- Gets starting index value based on GC shop +getShopItemEndIndex(index) -- Gets ending index value based on GC shop +getShopSellingItemMax(???) -- +getShopSellingItemDetail(player, ???, ???) + +eventTalkStepBreak() -- Returns NPC to their starting direction +--]] + +require ("global") +require ("shop") + +function init(npc) + return false, false, 0, 0; +end + +gcOfficer = { +[1500202] = 1, -- Limsa Shop +[1500203] = 2, -- Grid Shop +[1500201] = 3, -- Flame Shop +} + +shopInfo = { -- [index] = { itemID, itemQuality, itemQuantity, itemCost, gcRank, city, special, itemCategory } +[100001] = {3010403, 1, 10, 20, 0, 1, 0, 1}, +[100002] = {3010402, 1, 10, 30, 0, 1, 0, 1}, +[100003] = {3020202, 1, 1, 50, 0, 1, 0, 1}, +[100004] = {3020406, 1, 20, 10, 0, 1, 0, 1}, +[100005] = {3020403, 1, 10, 15, 0, 1, 0, 1}, +[100006] = {3020402, 1, 5, 60, 0, 1, 0, 1}, +[100007] = {3020404, 1, 5, 100, 0, 1, 0, 1}, +[100008] = {3020528, 1, 5, 50, 0, 1, 0, 1}, +[100009] = {3020516, 1, 5, 50, 0, 1, 0, 1}, +[100010] = {3020411, 1, 1, 15, 0, 1, 0, 1}, +[100011] = {3020412, 1, 1, 200, 0, 1, 0, 1}, +[100012] = {3020509, 1, 1, 200, 0, 1, 0, 1}, +[100013] = {3020510, 1, 1, 200, 0, 1, 0, 1}, +[100014] = {10013001, 1, 20, 5, 0, 1, 0, 1}, +[100015] = {10013002, 1, 20, 25, 0, 1, 0, 1}, +[100016] = {10013003, 1, 20, 45, 0, 1, 0, 1}, +[100017] = {10013004, 1, 20, 100, 0, 1, 0, 1}, +[100018] = {10013005, 1, 20, 150, 0, 1, 0, 1}, +[100019] = {3910402, 1, 99, 85, 0, 1, 0, 1}, +[100020] = {3910103, 1, 99, 120, 0, 1, 0, 1}, +[100021] = {3910203, 1, 99, 120, 0, 1, 0, 1}, +[100022] = {3910305, 1, 99, 85, 0, 1, 0, 1}, +[100023] = {3920004, 1, 999, 50, 0, 1, 0, 1}, +[100024] = {3920006, 1, 999, 70, 0, 1, 0, 1}, +[100025] = {3920003, 1, 999, 115, 0, 1, 0, 1}, +[100026] = {3910005, 1, 99, 75, 0, 1, 0, 1}, +[100027] = {3910006, 1, 99, 90, 0, 1, 0, 1}, +[100028] = {3940011, 1, 20, 20, 0, 1, 0, 1}, +[100029] = {3940010, 1, 20, 30, 0, 1, 0, 1}, +[100030] = {3020504, 1, 1, 400, 15, 1, 0, 1}, +[100031] = {3020505, 1, 1, 400, 15, 1, 0, 1}, +[100032] = {3020506, 1, 1, 300, 31, 1, 0, 1}, +[101001] = {4040010, 1, 1, 500, 0, 1, 0, 2}, +[101002] = {4040110, 1, 1, 1000, 0, 1, 0, 2}, +[101003] = {4040205, 1, 1, 1400, 0, 1, 0, 2}, +[101004] = {4040305, 1, 1, 3000, 0, 1, 0, 2}, +[101005] = {4040204, 1, 1, 4000, 0, 1, 0, 2}, +[101006] = {4080304, 1, 1, 950, 0, 1, 0, 2}, +[101007] = {4080211, 1, 1, 1000, 0, 1, 0, 2}, +[101008] = {4080106, 1, 1, 2000, 0, 1, 0, 2}, +[101009] = {4080303, 1, 1, 4000, 0, 1, 0, 2}, +[101010] = {5020010, 1, 1, 900, 0, 1, 0, 2}, +[101011] = {5020209, 1, 1, 1000, 0, 1, 0, 2}, +[101012] = {5020213, 1, 1, 1600, 0, 1, 0, 2}, +[101013] = {5020305, 1, 1, 4000, 0, 1, 0, 2}, +[101014] = {8030350, 1, 1, 750, 0, 1, 0, 2}, +[101015] = {8030447, 1, 1, 750, 0, 1, 0, 2}, +[101016] = {8031223, 1, 1, 750, 0, 1, 0, 2}, +[101017] = {8032008, 1, 1, 750, 0, 1, 0, 2}, +[101018] = {9050029, 1, 1, 900, 0, 1, 0, 2}, +[101019] = {9050044, 1, 1, 1900, 0, 1, 0, 2}, +[101020] = {9040032, 1, 1, 950, 0, 1, 0, 2}, +[101021] = {9040025, 1, 1, 1500, 0, 1, 0, 2}, +[101022] = {8013201, 1, 1, 1000, 11, 1, 0, 2}, +[101023] = {8032601, 1, 1, 1000, 11, 1, 0, 2}, +[101024] = {8071301, 1, 1, 1000, 11, 1, 0, 2}, +[101025] = {8081701, 1, 1, 1000, 11, 1, 0, 2}, +[101026] = {8050620, 1, 1, 1200, 11, 1, 0, 2}, +[101027] = {8050243, 1, 1, 1200, 11, 1, 0, 2}, +[101028] = {8050344, 1, 1, 1200, 11, 1, 0, 2}, +[101029] = {8050028, 1, 1, 1200, 11, 1, 0, 2}, +[101030] = {8090706, 1, 1, 1200, 11, 1, 0, 2}, +[101031] = {4030205, 1, 1, 2500, 13, 1, 0, 2}, +[101032] = {4020306, 1, 1, 2500, 13, 1, 0, 2}, +[101033] = {4040014, 1, 1, 2500, 13, 1, 0, 2}, +[101034] = {4080408, 1, 1, 2500, 13, 1, 0, 2}, +[101035] = {4070310, 1, 1, 2500, 13, 1, 0, 2}, +[101036] = {5030307, 1, 1, 2500, 13, 1, 0, 2}, +[101037] = {5020112, 1, 1, 2500, 13, 1, 0, 2}, +[101038] = {4100205, 1, 1, 2000, 13, 1, 0, 2}, +[101039] = {8011609, 1, 1, 3000, 15, 1, 0, 2}, +[101040] = {8032311, 1, 1, 3000, 15, 1, 0, 2}, +[101041] = {8071017, 1, 1, 3000, 15, 1, 0, 2}, +[101042] = {8050132, 1, 1, 3000, 15, 1, 0, 2}, +[101043] = {8081123, 1, 1, 3000, 15, 1, 0, 2}, +[101044] = {4030117, 1, 1, 4500, 17, 1, 0, 2}, +[101045] = {4020210, 1, 1, 4500, 17, 1, 0, 2}, +[101046] = {4040406, 1, 1, 4500, 17, 1, 0, 2}, +[101047] = {4080107, 1, 1, 4500, 17, 1, 0, 2}, +[101048] = {4070108, 1, 1, 4500, 17, 1, 0, 2}, +[101049] = {5030111, 1, 1, 4500, 17, 1, 0, 2}, +[101050] = {5020013, 1, 1, 4500, 17, 1, 0, 2}, +[101051] = {4100405, 1, 1, 4000, 17, 1, 0, 2}, +[101052] = {8011610, 1, 1, 5000, 21, 1, 0, 2}, +[101053] = {8032312, 1, 1, 5000, 21, 1, 0, 2}, +[101054] = {8071018, 1, 1, 5000, 21, 1, 0, 2}, +[101055] = {8050133, 1, 1, 5000, 21, 1, 0, 2}, +[101056] = {8050769, 1, 1, 5000, 21, 1, 0, 2}, +[101057] = {8081124, 1, 1, 5000, 21, 1, 0, 2}, +[101058] = {8080565, 1, 1, 5000, 21, 1, 0, 2}, +[101059] = {8090609, 1, 1, 5000, 21, 1, 0, 2}, +[101060] = {9050021, 1, 1, 1000, 21, 1, 0, 2}, +[101061] = {9050022, 1, 1, 1000, 21, 1, 0, 2}, +[101062] = {9010025, 1, 1, 1000, 21, 1, 0, 2}, +[101063] = {4100804, 1, 1, 5500, 23, 1, 0, 2}, +[101064] = {8013614, 1, 1, 5500, 23, 1, 0, 2}, +[101065] = {8032820, 1, 1, 5500, 23, 1, 0, 2}, +[101066] = {8051516, 1, 1, 5500, 23, 1, 0, 2}, +[101067] = {8071520, 1, 1, 5500, 23, 1, 0, 2}, +[101068] = {9030060, 1, 1, 5500, 23, 1, 0, 2}, +[101069] = {9050067, 1, 1, 5500, 23, 1, 0, 2}, +[101070] = {8013615, 1, 1, 6000, 25, 1, 0, 2}, +[101071] = {8013616, 1, 1, 6000, 25, 1, 0, 2}, +[101072] = {8032821, 1, 1, 6000, 25, 1, 0, 2}, +[101073] = {8071521, 1, 1, 6000, 25, 1, 0, 2}, +[101074] = {8081914, 1, 1, 6000, 25, 1, 0, 2}, +[101075] = {9040065, 1, 1, 6000, 25, 1, 0, 2}, +[101076] = {9010061, 1, 1, 6000, 25, 1, 0, 2}, +[101077] = {4100805, 1, 1, 6500, 27, 1, 0, 2}, +[101078] = {4020408, 1, 1, 6500, 27, 1, 0, 2}, +[101079] = {4040508, 1, 1, 6500, 27, 1, 0, 2}, +[101080] = {4080508, 1, 1, 6500, 27, 1, 0, 2}, +[101081] = {4070408, 1, 1, 6500, 27, 1, 0, 2}, +[101082] = {5030408, 1, 1, 6500, 27, 1, 0, 2}, +[101083] = {5020408, 1, 1, 6500, 27, 1, 0, 2}, +[101084] = {4030604, 1, 1, 25000, 31, 1, 0, 2}, +[101085] = {4020404, 1, 1, 25000, 31, 1, 0, 2}, +[101086] = {4040504, 1, 1, 25000, 31, 1, 0, 2}, +[101087] = {4080504, 1, 1, 25000, 31, 1, 0, 2}, +[101088] = {4070404, 1, 1, 25000, 31, 1, 0, 2}, +[101089] = {5030404, 1, 1, 25000, 31, 1, 0, 2}, +[101090] = {5020404, 1, 1, 25000, 31, 1, 0, 2}, +[101091] = {8013204, 1, 1, 6000, 31, 1, 0, 2}, +[101092] = {8032604, 1, 1, 6000, 31, 1, 0, 2}, +[101093] = {8071304, 1, 1, 6000, 31, 1, 0, 2}, +[101094] = {8081704, 1, 1, 6000, 31, 1, 0, 2}, +[102001] = {3020601, 1, 20, 5, 0, 1, 8, 3}, +[102002] = {9040018, 1, 1, 1000, 11, 1, 11, 3}, +[103001] = {2001004, 1, 1, 3000, 11, 1, 0, 4}, +[103002] = {2001014, 1, 1, 3000, 15, 1, 0, 4}, +[103003] = {2001017, 1, 1, 2000, 21, 1, 0, 4}, +[103004] = {2001018, 1, 1, 3000, 21, 1, 0, 4}, +[103005] = {2001019, 1, 1, 4000, 21, 1, 0, 4}, +[103006] = {2001026, 1, 1, 25000, 27, 1, 0, 4}, +[200001] = {3010403, 1, 10, 20, 0, 2, 0, 1}, +[200002] = {3010402, 1, 10, 30, 0, 2, 0, 1}, +[200003] = {3020203, 1, 1, 50, 0, 2, 0, 1}, +[200004] = {3020406, 1, 20, 10, 0, 2, 0, 1}, +[200005] = {3020403, 1, 10, 15, 0, 2, 0, 1}, +[200006] = {3020402, 1, 5, 60, 0, 2, 0, 1}, +[200007] = {3020404, 1, 5, 100, 0, 2, 0, 1}, +[200008] = {3020528, 1, 5, 50, 0, 2, 0, 1}, +[200009] = {3020516, 1, 5, 50, 0, 2, 0, 1}, +[200010] = {3020411, 1, 1, 15, 0, 2, 0, 1}, +[200011] = {3020412, 1, 1, 200, 0, 2, 0, 1}, +[200012] = {3020509, 1, 1, 200, 0, 2, 0, 1}, +[200013] = {3020510, 1, 1, 200, 0, 2, 0, 1}, +[200014] = {10013001, 1, 20, 5, 0, 2, 0, 1}, +[200015] = {10013002, 1, 20, 25, 0, 2, 0, 1}, +[200016] = {10013003, 1, 20, 45, 0, 2, 0, 1}, +[200017] = {10013004, 1, 20, 100, 0, 2, 0, 1}, +[200018] = {10013005, 1, 20, 150, 0, 2, 0, 1}, +[200019] = {3910402, 1, 99, 85, 0, 2, 0, 1}, +[200020] = {3910103, 1, 99, 120, 0, 2, 0, 1}, +[200021] = {3910203, 1, 99, 120, 0, 2, 0, 1}, +[200022] = {3910305, 1, 99, 85, 0, 2, 0, 1}, +[200023] = {3920004, 1, 999, 50, 0, 2, 0, 1}, +[200024] = {3920006, 1, 999, 70, 0, 2, 0, 1}, +[200025] = {3920003, 1, 999, 115, 0, 2, 0, 1}, +[200026] = {3910005, 1, 99, 75, 0, 2, 0, 1}, +[200027] = {3910006, 1, 99, 90, 0, 2, 0, 1}, +[200028] = {3940011, 1, 20, 20, 0, 2, 0, 1}, +[200029] = {3940010, 1, 20, 30, 0, 2, 0, 1}, +[200030] = {3020504, 1, 1, 400, 15, 2, 0, 1}, +[200031] = {3020505, 1, 1, 400, 15, 2, 0, 1}, +[200032] = {3020506, 1, 1, 300, 31, 2, 0, 1}, +[201001] = {5030107, 1, 1, 350, 0, 2, 0, 2}, +[201002] = {5030207, 1, 1, 750, 0, 2, 0, 2}, +[201003] = {5030206, 1, 1, 1000, 0, 2, 0, 2}, +[201004] = {5030029, 1, 1, 1500, 0, 2, 0, 2}, +[201005] = {5030031, 1, 1, 2400, 0, 2, 0, 2}, +[201006] = {5030209, 1, 1, 3000, 0, 2, 0, 2}, +[201007] = {5030028, 1, 1, 4000, 0, 2, 0, 2}, +[201008] = {4020109, 1, 1, 800, 0, 2, 0, 2}, +[201009] = {4020106, 1, 1, 1000, 0, 2, 0, 2}, +[201010] = {4020008, 1, 1, 2200, 0, 2, 0, 2}, +[201011] = {4020305, 1, 1, 4000, 0, 2, 0, 2}, +[201012] = {4100005, 1, 1, 1000, 0, 2, 0, 2}, +[201013] = {4100109, 1, 1, 4000, 0, 2, 0, 2}, +[201014] = {8030035, 1, 1, 750, 0, 2, 0, 2}, +[201015] = {8030919, 1, 1, 750, 0, 2, 0, 2}, +[201016] = {8031821, 1, 1, 750, 0, 2, 0, 2}, +[201017] = {8032220, 1, 1, 750, 0, 2, 0, 2}, +[201018] = {9050029, 1, 1, 900, 0, 2, 0, 2}, +[201019] = {9050044, 1, 1, 1900, 0, 2, 0, 2}, +[201020] = {9040035, 1, 1, 950, 0, 2, 0, 2}, +[201021] = {9040025, 1, 1, 1500, 0, 2, 0, 2}, +[201022] = {8013202, 1, 1, 1000, 11, 2, 0, 2}, +[201023] = {8032602, 1, 1, 1000, 11, 2, 0, 2}, +[201024] = {8071302, 1, 1, 1000, 11, 2, 0, 2}, +[201025] = {8081702, 1, 1, 1000, 11, 2, 0, 2}, +[201026] = {8050148, 1, 1, 1200, 11, 2, 0, 2}, +[201027] = {8050244, 1, 1, 1200, 11, 2, 0, 2}, +[201028] = {8051222, 1, 1, 1200, 11, 2, 0, 2}, +[201029] = {8050029, 1, 1, 1200, 11, 2, 0, 2}, +[201030] = {8090707, 1, 1, 1200, 11, 2, 0, 2}, +[201031] = {4030710, 1, 1, 2500, 13, 2, 0, 2}, +[201032] = {4020211, 1, 1, 2500, 13, 2, 0, 2}, +[201033] = {4040407, 1, 1, 2500, 13, 2, 0, 2}, +[201034] = {4080213, 1, 1, 2500, 13, 2, 0, 2}, +[201035] = {4070215, 1, 1, 2500, 13, 2, 0, 2}, +[201036] = {5030113, 1, 1, 2500, 13, 2, 0, 2}, +[201037] = {5020014, 1, 1, 2500, 13, 2, 0, 2}, +[201038] = {4100608, 1, 1, 2000, 13, 2, 0, 2}, +[201039] = {8010566, 1, 1, 3000, 15, 2, 0, 2}, +[201040] = {8030625, 1, 1, 3000, 15, 2, 0, 2}, +[201041] = {8070724, 1, 1, 3000, 15, 2, 0, 2}, +[201042] = {8050618, 1, 1, 3000, 15, 2, 0, 2}, +[201043] = {8080715, 1, 1, 3000, 15, 2, 0, 2}, +[201044] = {4030016, 1, 1, 4500, 17, 2, 0, 2}, +[201045] = {4020012, 1, 1, 4500, 17, 2, 0, 2}, +[201046] = {4040111, 1, 1, 4500, 17, 2, 0, 2}, +[201047] = {4080010, 1, 1, 4500, 17, 2, 0, 2}, +[201048] = {4070013, 1, 1, 4500, 17, 2, 0, 2}, +[201049] = {5030308, 1, 1, 4500, 17, 2, 0, 2}, +[201050] = {5020113, 1, 1, 4500, 17, 2, 0, 2}, +[201051] = {4100507, 1, 1, 4000, 17, 2, 0, 2}, +[201052] = {8010567, 1, 1, 5000, 21, 2, 0, 2}, +[201053] = {8030626, 1, 1, 5000, 21, 2, 0, 2}, +[201054] = {8070725, 1, 1, 5000, 21, 2, 0, 2}, +[201055] = {8050619, 1, 1, 5000, 21, 2, 0, 2}, +[201056] = {8050768, 1, 1, 5000, 21, 2, 0, 2}, +[201057] = {8080716, 1, 1, 5000, 21, 2, 0, 2}, +[201058] = {8080564, 1, 1, 5000, 21, 2, 0, 2}, +[201059] = {8090506, 1, 1, 5000, 21, 2, 0, 2}, +[201060] = {9050025, 1, 1, 1000, 21, 2, 0, 2}, +[201061] = {9050026, 1, 1, 1000, 21, 2, 0, 2}, +[201062] = {9010025, 1, 1, 1000, 21, 2, 0, 2}, +[201063] = {4100806, 1, 1, 5500, 23, 2, 0, 2}, +[201064] = {8013617, 1, 1, 5500, 23, 2, 0, 2}, +[201065] = {8032822, 1, 1, 5500, 23, 2, 0, 2}, +[201066] = {8051517, 1, 1, 5500, 23, 2, 0, 2}, +[201067] = {8071522, 1, 1, 5500, 23, 2, 0, 2}, +[201068] = {9030061, 1, 1, 5500, 23, 2, 0, 2}, +[201069] = {9050068, 1, 1, 5500, 23, 2, 0, 2}, +[201070] = {8013618, 1, 1, 6000, 25, 2, 0, 2}, +[201071] = {8013619, 1, 1, 6000, 25, 2, 0, 2}, +[201072] = {8032823, 1, 1, 6000, 25, 2, 0, 2}, +[201073] = {8071523, 1, 1, 6000, 25, 2, 0, 2}, +[201074] = {8081915, 1, 1, 6000, 25, 2, 0, 2}, +[201075] = {9040066, 1, 1, 6000, 25, 2, 0, 2}, +[201076] = {9010062, 1, 1, 6000, 25, 2, 0, 2}, +[201077] = {4100807, 1, 1, 6500, 27, 2, 0, 2}, +[201078] = {4020409, 1, 1, 6500, 27, 2, 0, 2}, +[201079] = {4040509, 1, 1, 6500, 27, 2, 0, 2}, +[201080] = {4080509, 1, 1, 6500, 27, 2, 0, 2}, +[201081] = {4070409, 1, 1, 6500, 27, 2, 0, 2}, +[201082] = {5030409, 1, 1, 6500, 27, 2, 0, 2}, +[201083] = {5020409, 1, 1, 6500, 27, 2, 0, 2}, +[201084] = {4030605, 1, 1, 25000, 31, 2, 0, 2}, +[201085] = {4020405, 1, 1, 25000, 31, 2, 0, 2}, +[201086] = {4040505, 1, 1, 25000, 31, 2, 0, 2}, +[201087] = {4080505, 1, 1, 25000, 31, 2, 0, 2}, +[201088] = {4070405, 1, 1, 25000, 31, 2, 0, 2}, +[201089] = {5030405, 1, 1, 25000, 31, 2, 0, 2}, +[201090] = {5020405, 1, 1, 25000, 31, 2, 0, 2}, +[201091] = {8013205, 1, 1, 6000, 31, 2, 0, 2}, +[201092] = {8032605, 1, 1, 6000, 31, 2, 0, 2}, +[201093] = {8071305, 1, 1, 6000, 31, 2, 0, 2}, +[201094] = {8081705, 1, 1, 6000, 31, 2, 0, 2}, +[202001] = {3020603, 1, 20, 5, 0, 2, 8, 3}, +[202002] = {9040018, 1, 1, 1000, 11, 2, 11, 3}, +[203001] = {2001005, 1, 1, 3000, 11, 2, 0, 4}, +[203002] = {2001015, 1, 1, 3000, 15, 2, 0, 4}, +[203003] = {2001020, 1, 1, 2000, 21, 2, 0, 4}, +[203004] = {2001021, 1, 1, 3000, 21, 2, 0, 4}, +[203005] = {2001022, 1, 1, 4000, 21, 2, 0, 4}, +[203006] = {2001026, 1, 1, 25000, 27, 2, 0, 4}, +[300001] = {3010403, 1, 10, 20, 0, 3, 0, 1}, +[300002] = {3010402, 1, 10, 30, 0, 3, 0, 1}, +[300003] = {3020204, 1, 1, 50, 0, 3, 0, 1}, +[300004] = {3020406, 1, 20, 10, 0, 3, 0, 1}, +[300005] = {3020403, 1, 10, 15, 0, 3, 0, 1}, +[300006] = {3020402, 1, 5, 60, 0, 3, 0, 1}, +[300007] = {3020404, 1, 5, 100, 0, 3, 0, 1}, +[300008] = {3020528, 1, 5, 50, 0, 3, 0, 1}, +[300009] = {3020516, 1, 5, 50, 0, 3, 0, 1}, +[300010] = {3020411, 1, 1, 15, 0, 3, 0, 1}, +[300011] = {3020412, 1, 1, 200, 0, 3, 0, 1}, +[300012] = {3020509, 1, 1, 200, 0, 3, 0, 1}, +[300013] = {3020510, 1, 1, 200, 0, 3, 0, 1}, +[300014] = {10013001, 1, 20, 5, 0, 3, 0, 1}, +[300015] = {10013002, 1, 20, 25, 0, 3, 0, 1}, +[300016] = {10013003, 1, 20, 45, 0, 3, 0, 1}, +[300017] = {10013004, 1, 20, 100, 0, 3, 0, 1}, +[300018] = {10013005, 1, 20, 150, 0, 3, 0, 1}, +[300019] = {3910402, 1, 99, 85, 0, 3, 0, 1}, +[300020] = {3910103, 1, 99, 120, 0, 3, 0, 1}, +[300021] = {3910203, 1, 99, 120, 0, 3, 0, 1}, +[300022] = {3910305, 1, 99, 85, 0, 3, 0, 1}, +[300023] = {3920004, 1, 999, 50, 0, 3, 0, 1}, +[300024] = {3920006, 1, 999, 70, 0, 3, 0, 1}, +[300025] = {3920003, 1, 999, 115, 0, 3, 0, 1}, +[300026] = {3910005, 1, 99, 75, 0, 3, 0, 1}, +[300027] = {3910006, 1, 99, 90, 0, 3, 0, 1}, +[300028] = {3940011, 1, 20, 20, 0, 3, 0, 1}, +[300029] = {3940010, 1, 20, 30, 0, 3, 0, 1}, +[300030] = {3020504, 1, 1, 400, 15, 3, 0, 1}, +[300031] = {3020505, 1, 1, 400, 15, 3, 0, 1}, +[300032] = {3020506, 1, 1, 300, 31, 3, 0, 1}, +[301001] = {4030006, 1, 1, 400, 0, 3, 0, 2}, +[301002] = {4030015, 1, 1, 1000, 0, 3, 0, 2}, +[301003] = {4030405, 1, 1, 1600, 0, 3, 0, 2}, +[301004] = {4030506, 1, 1, 3200, 0, 3, 0, 2}, +[301005] = {4030505, 1, 1, 4000, 0, 3, 0, 2}, +[301006] = {4070011, 1, 1, 550, 0, 3, 0, 2}, +[301007] = {4070105, 1, 1, 1000, 0, 3, 0, 2}, +[301008] = {4070212, 1, 1, 1500, 0, 3, 0, 2}, +[301009] = {4070211, 1, 1, 4000, 0, 3, 0, 2}, +[301010] = {4100710, 1, 1, 450, 0, 3, 0, 2}, +[301011] = {4100403, 1, 1, 1000, 0, 3, 0, 2}, +[301012] = {4100404, 1, 1, 1900, 0, 3, 0, 2}, +[301013] = {4100306, 1, 1, 4000, 0, 3, 0, 2}, +[301014] = {8030248, 1, 1, 750, 0, 3, 0, 2}, +[301015] = {8030548, 1, 1, 750, 0, 3, 0, 2}, +[301016] = {8031021, 1, 1, 750, 0, 3, 0, 2}, +[301017] = {8031513, 1, 1, 750, 0, 3, 0, 2}, +[301018] = {9050029, 1, 1, 900, 0, 3, 0, 2}, +[301019] = {9050044, 1, 1, 1900, 0, 3, 0, 2}, +[301020] = {9040036, 1, 1, 950, 0, 3, 0, 2}, +[301021] = {9040025, 1, 1, 1500, 0, 3, 0, 2}, +[301022] = {8013203, 1, 1, 1000, 11, 3, 0, 2}, +[301023] = {8032603, 1, 1, 1000, 11, 3, 0, 2}, +[301024] = {8071303, 1, 1, 1000, 11, 3, 0, 2}, +[301025] = {8081703, 1, 1, 1000, 11, 3, 0, 2}, +[301026] = {8050520, 1, 1, 1200, 11, 3, 0, 2}, +[301027] = {8051024, 1, 1, 1200, 11, 3, 0, 2}, +[301028] = {8050345, 1, 1, 1200, 11, 3, 0, 2}, +[301029] = {8050449, 1, 1, 1200, 11, 3, 0, 2}, +[301030] = {8090708, 1, 1, 1200, 11, 3, 0, 2}, +[301031] = {4030305, 1, 1, 2500, 13, 3, 0, 2}, +[301032] = {4020011, 1, 1, 2500, 13, 3, 0, 2}, +[301033] = {4040208, 1, 1, 2500, 13, 3, 0, 2}, +[301034] = {4080306, 1, 1, 2500, 13, 3, 0, 2}, +[301035] = {4070012, 1, 1, 2500, 13, 3, 0, 2}, +[301036] = {5030037, 1, 1, 2500, 13, 3, 0, 2}, +[301037] = {5020217, 1, 1, 2500, 13, 3, 0, 2}, +[301038] = {4100112, 1, 1, 2000, 13, 3, 0, 2}, +[301039] = {8011522, 1, 1, 3000, 15, 3, 0, 2}, +[301040] = {8030744, 1, 1, 3000, 15, 3, 0, 2}, +[301041] = {8070361, 1, 1, 3000, 15, 3, 0, 2}, +[301042] = {8050766, 1, 1, 3000, 15, 3, 0, 2}, +[301043] = {8080562, 1, 1, 3000, 15, 3, 0, 2}, +[301044] = {4030408, 1, 1, 4500, 17, 3, 0, 2}, +[301045] = {4020113, 1, 1, 4500, 17, 3, 0, 2}, +[301046] = {4040306, 1, 1, 4500, 17, 3, 0, 2}, +[301047] = {4080409, 1, 1, 4500, 17, 3, 0, 2}, +[301048] = {4070311, 1, 1, 4500, 17, 3, 0, 2}, +[301049] = {5030210, 1, 1, 4500, 17, 3, 0, 2}, +[301050] = {5020307, 1, 1, 4500, 17, 3, 0, 2}, +[301051] = {4100712, 1, 1, 4000, 17, 3, 0, 2}, +[301052] = {8011523, 1, 1, 5000, 21, 3, 0, 2}, +[301053] = {8030745, 1, 1, 5000, 21, 3, 0, 2}, +[301054] = {8070362, 1, 1, 5000, 21, 3, 0, 2}, +[301055] = {8050811, 1, 1, 5000, 21, 3, 0, 2}, +[301056] = {8050767, 1, 1, 5000, 21, 3, 0, 2}, +[301057] = {8080015, 1, 1, 5000, 21, 3, 0, 2}, +[301058] = {8080563, 1, 1, 5000, 21, 3, 0, 2}, +[301059] = {8090709, 1, 1, 5000, 21, 3, 0, 2}, +[301060] = {9050023, 1, 1, 1000, 21, 3, 0, 2}, +[301061] = {9050024, 1, 1, 1000, 21, 3, 0, 2}, +[301062] = {9010025, 1, 1, 1000, 21, 3, 0, 2}, +[301063] = {4100808, 1, 1, 5500, 23, 3, 0, 2}, +[301064] = {8013620, 1, 1, 5500, 23, 3, 0, 2}, +[301065] = {8032824, 1, 1, 5500, 23, 3, 0, 2}, +[301066] = {8051518, 1, 1, 5500, 23, 3, 0, 2}, +[301067] = {8071524, 1, 1, 5500, 23, 3, 0, 2}, +[301068] = {9030062, 1, 1, 5500, 23, 3, 0, 2}, +[301069] = {9050069, 1, 1, 5500, 23, 3, 0, 2}, +[301070] = {8013621, 1, 1, 6000, 25, 3, 0, 2}, +[301071] = {8013622, 1, 1, 6000, 25, 3, 0, 2}, +[301072] = {8032825, 1, 1, 6000, 25, 3, 0, 2}, +[301073] = {8071525, 1, 1, 6000, 25, 3, 0, 2}, +[301074] = {8081916, 1, 1, 6000, 25, 3, 0, 2}, +[301075] = {9040067, 1, 1, 6000, 25, 3, 0, 2}, +[301076] = {9010063, 1, 1, 6000, 25, 3, 0, 2}, +[301077] = {4100809, 1, 1, 6500, 27, 3, 0, 2}, +[301078] = {4020410, 1, 1, 6500, 27, 3, 0, 2}, +[301079] = {4040510, 1, 1, 6500, 27, 3, 0, 2}, +[301080] = {4080510, 1, 1, 6500, 27, 3, 0, 2}, +[301081] = {4070410, 1, 1, 6500, 27, 3, 0, 2}, +[301082] = {5030410, 1, 1, 6500, 27, 3, 0, 2}, +[301083] = {5020410, 1, 1, 6500, 27, 3, 0, 2}, +[301084] = {4030606, 1, 1, 25000, 31, 3, 0, 2}, +[301085] = {4020406, 1, 1, 25000, 31, 3, 0, 2}, +[301086] = {4040506, 1, 1, 25000, 31, 3, 0, 2}, +[301087] = {4080506, 1, 1, 25000, 31, 3, 0, 2}, +[301088] = {4070406, 1, 1, 25000, 31, 3, 0, 2}, +[301089] = {5030406, 1, 1, 25000, 31, 3, 0, 2}, +[301090] = {5020406, 1, 1, 25000, 31, 3, 0, 2}, +[301091] = {8013206, 1, 1, 6000, 31, 3, 0, 2}, +[301092] = {8032606, 1, 1, 6000, 31, 3, 0, 2}, +[301093] = {8071306, 1, 1, 6000, 31, 3, 0, 2}, +[301094] = {8081706, 1, 1, 6000, 31, 3, 0, 2}, +[302001] = {3020602, 1, 20, 5, 0, 3, 8, 3}, +[302002] = {9040018, 1, 1, 1000, 11, 3, 11, 3}, +[303001] = {2001006, 1, 1, 3000, 11, 3, 0, 4}, +[303002] = {2001016, 1, 1, 3000, 15, 3, 0, 4}, +[303003] = {2001023, 1, 1, 2000, 21, 3, 0, 4}, +[303004] = {2001024, 1, 1, 3000, 21, 3, 0, 4}, +[303005] = {2001025, 1, 1, 4000, 21, 3, 0, 4}, +[303006] = {2001026, 1, 1, 25000, 27, 3, 0, 4}, +} + +function onEventStarted(player, npc, triggerName) + skipGCcheck = 0; -- 0 No, 1 Yes + playerGC = player.gcCurrent; + playerGCSeal = 1000200 + playerGC; + playerCurrentRank = 13; + npcId = npc:GetActorClassId(); + + if (playerGC == gcOfficer[npcId] or skipGCcheck == 1) then + callClientFunction(player, "eventTalkPreJoin"); + --player:SendMessage(0x20, "", "[Info]: Client takes awhile to load GC shops"); + while (true) do + + eventTalkChoice = callClientFunction(player, "eventTalkMainMenu", 8, 11); + --player:SendMessage(0x20, "", "eventTalkMainMenu: " .. tostring(eventTalkChoice)); + + if (eventTalkChoice == 1) then + t1, t2, t3 = callClientFunction(player, "eventShopMenuOpen"); + + --player:SendMessage(0x20, "", "eventShopMenuOpen: " .. tostring(t1) .. ", ".. tostring(t2) .. ", ".. tostring(t3)); + + while (true) do + -- TODO: ADD RANK CHECK, CITY CHECK, AND ITEM-RANGE CHECK + + buyResult, buyIndex = callClientFunction(player, "eventShopMenuAsk"); + + if (buyIndex == -1) then + callClientFunction(player, "eventShopMenuClose"); + break; + else + -- [index] = { itemID, itemQuality, itemQuantity, itemCost gcRank, city, special, itemCategory } + if (shopInfo[buyIndex][8] == 4) then + location = INVENTORY_KEYITEMS; + else + location = INVENTORY_NORMAL; + end + end + + purchaseItem(player, location, shopInfo[buyIndex][1], shopInfo[buyIndex][3], shopInfo[buyIndex][2], shopInfo[buyIndex][4], playerGCSeal); + end + + --player:SendMessage(0x20, "", "Player picked an item at gcSealShopIndex " .. tostring(buyResult) .. ", ".. tostring(buyIndex)); + + elseif (eventTalkChoice == -1) then + break; + end + end + else + callClientFunction(player, "eventTalkStepCantUse"); + end + callClientFunction(player, "eventTalkStepBreak"); + player:endEvent(); +end + + + + + + diff --git a/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua b/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua index 3fd8e34a..eb03c6f8 100644 --- a/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua +++ b/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua @@ -4,10 +4,10 @@ PopulaceCompanyWarp Script Functions: -eventTalkWelcome(player) - Start Text +eventTalkWelcome(player) - Start Text eventAskMainMenu(player, index) - Shows teleport menu, hides the teleport location at index value to prevent warping to the spot you're at eventAfterWarpOtherZone(player) - Fades out for warp -eventTalkStepBreak() - Ends talk +eventTalkStepBreak() - Holds the client up for whatever reason? --]] require ("global") @@ -82,39 +82,49 @@ function onEventStarted(player, npc, triggerName) npcId = npc:GetActorClassId(); city = warpNpc[npcId][2]; - - if city == 1 then + if (city == 1) then if player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(passLimsa) then passCheck = 1; else - if passCheck == 0 then callClientFunction(player, "eventTalkWelcome", player); end + if (passCheck == 0) then callClientFunction(player, "eventTalkWelcome", player); end end; - elseif city == 2 then - if player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(passGrid) then + elseif (city == 2) then + -- if player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(passGrid) then + passCheck = 1; + -- else + -- if passCheck == 0 then callClientFunction(player, "eventTalkWelcome", player); end + --end; + elseif (city == 3) then + if (player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(passUldah)) then passCheck = 1; else - if passCheck == 0 then callClientFunction(player, "eventTalkWelcome", player); end - end; - elseif city == 3 then - if player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(passUldah) then - passCheck = 1; - else - if passCheck == 0 then callClientFunction(player, "eventTalkWelcome", player); end + if (passCheck == 0) then callClientFunction(player, "eventTalkWelcome", player); end end end - if passCheck == 1 then + + if (passCheck == 1) then choice = callClientFunction(player, "eventAskMainMenu", player, warpNpc[npcId][1]); - if choice == 0 then - --callClientFunction(player, "playereventTalkStepBreak"); + + if (choice ~= 0) then + player:EndEvent(); + + callClientFunction(player, "eventAfterWarpOtherZone", player); + + local player_zone = player:GetPos()[5]; + spawnType = 0x0A; + if (player_zone == aethernet[city][choice].zone) then + + GetWorldManager():DoPlayerMoveInZone(player, aethernet[city][choice].x, aethernet[city][choice].y, aethernet[city][choice].z, aethernet[city][choice].r, spawnType); + else + GetWorldManager():DoZoneChange(player, aethernet[city][choice].zone, nil, 0, spawnType, aethernet[city][choice].x, aethernet[city][choice].y, aethernet[city][choice].z, aethernet[city][choice].r); + end; else - -- callClientFunction(player, "eventAfterWarpOtherZone", player); -- Commented out for now to prevent double fade-to-black for warp - player:EndEvent(); - GetWorldManager():DoZoneChange(player, aethernet[city][choice].zone, nil, 0, 15, aethernet[city][choice].x, aethernet[city][choice].y, aethernet[city][choice].z, aethernet[city][choice].r); + player:EndEvent(); end end - player:EndEvent(); + end diff --git a/Data/scripts/base/chara/npc/populace/shop/PopulaceGuildShop.lua b/Data/scripts/base/chara/npc/populace/shop/PopulaceGuildShop.lua new file mode 100644 index 00000000..6c03a449 --- /dev/null +++ b/Data/scripts/base/chara/npc/populace/shop/PopulaceGuildShop.lua @@ -0,0 +1,107 @@ +--[[ + +PopulaceGuildShop Script + +In 1.20, the devs removed Guild Marks as acquirable. In 1.21, this class was set up to allow exchanging them for +a variety of materia/crystals/gil, as well as refunding traits purchased with marks. Traits used to be purchased +to slot in, where-as with late-XIV they are just automatically unlocked once the appropriate level is met. + +Functions: + +cashbackTalkCommand(arg1 through arg10) -- Dialog for refunding purchased skills prior to Job update. Args are xtx_command values for command names. +cashbackTalk(nil, refundAmount, arg3 through arg10) -- Dialog for refunding treaties to guild marks. Arg3 through 10 use xtx_itemName values. +selectMode(nil, npcId, isShowExchange, guildCurrency, unk) -- Menus for exchanging leftover marks, undoing class points, and learning about guild. Unk seems related to point resetting + +maskShopListIndex(shopPack?, isSomething) -- Presumably hides an item in the shop list. Needs to be called after openShopBuy or errors client. +guildExplain(npcId, player) -- Guild Mark tutorial dialog. selectMode calls this on its own + +--]] + +require ("global") +require ("shop") + +function init(npc) + return false, false, 0, 0; +end + +guildShopInfo = { -- [actor id] = { saySheetId, guildmarkCurrency } +[1000157] = {9, 1000103}, -- Marauder, S'raemha +[1000158] = {24, 1000120}, -- Culinarian, Noline +[1000162] = {18, 1000114}, -- Blacksmith, Qhas Chalahko +[1000164] = {16, 1000123}, -- Fishermen, Faucillien +[1000459] = {21, 1000117}, -- Leatherworker, Gallia +[1000460] = {13, 1000111}, -- Conjurer, Hetzkin +[1000461] = {15, 1000122}, -- Botanist, Kipopo +[1000462] = {11, 1000107}, -- Lancer, Clarembald +[1000464] = {10, 1000106}, -- Archer, Cassandra +[1000466] = {17, 1000113}, -- Carpenter, Frances +[1000631] = {8, 1000102}, -- Gladiator, Coynach +[1000632] = {7, 1000101}, -- Pugilist, Moruith +[1000633] = {12, 1000110}, -- Thaumaturge, Nyunoeya +[1000634] = {23, 1000119}, -- Alchemist, Kylene +[1000635] = {20, 1000116}, -- Goldsmith, Hnaufrid +[1000636] = {22, 1000118}, -- Weaver, Lafla Morfla +[1000637] = {14, 1000121}, -- Miner, Shilgen +[1001461] = {19, 1000115}, -- Armorer, Notrelchamps +} + + + +function onEventStarted(player, npc) + + local npcId = npc:GetActorClassId(); + local saySheetId = guildShopInfo[npcId][1]; + local shopCurrency = guildShopInfo[npcId][2]; + local gilCurrency = 1000001; + local keepersHymn = 3020410; + local shopPack = 0; + + callClientFunction(player, "welcomeTalk", nil, saySheetId, player); + + while (true) do + local choice = callClientFunction(player, "selectMode", nil, npcId, true, shopCurrency, 100); + + if (choice == 3) then -- Undo Point Allotment + -- TODO: Add point reset handling + elseif (choice == 4) then -- Leave menu selected + player:EndEvent(); + break; + elseif (choice == nil) then -- Escape key hit to leave menu + player:EndEvent(); + break + elseif (choice >= 102 and choice <= 120) then -- Exchange marks for Materia + shopPack = choice + 18; -- Index offset + if (choice == 119) then + shopPack = shopPack + 1; + elseif (choice == 120) then -- Exchange marks for Crystals + shopPack = 144; + end; + processGuildShop(player, shopPack, shopCurrency); + elseif (choice == 121) then -- Exchange marks for Gil. 1 mark = 4 gil + local markAmount = player:GetItemPackage(INVENTORY_CURRENCY):GetItemQuantity(shopCurrency); + purchaseItem(player, INVENTORY_CURRENCY, gilCurrency, markAmount*4, 1, markAmount, shopCurrency); + + end + end + + player:EndEvent() +end + + + +function processGuildShop(player, choice, currency) + + callClientFunction(player, "openShopBuy", player, choice, currency); + --callClientFunction(player, "maskShopListIndex", 137, true); + + while (true) do + buyResult, quantity = callClientFunction(player, "selectShopBuy", player); + + if (buyResult == 0) then + callClientFunction(player, "closeShopBuy", player); + break; + else + player:SendMessage(0x20, "", string.format("Player purchased %s item(s) at index %s in shopPack %s.", quantity, buyResult, choice)); + end + end +end diff --git a/Data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua b/Data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua new file mode 100644 index 00000000..11d40f56 --- /dev/null +++ b/Data/scripts/base/chara/npc/populace/shop/PopulaceShopSalesman.lua @@ -0,0 +1,655 @@ +--[[ + +PopulaceShopSalesman Script + +Functions: + +welcomeTalk(sheetId, player) - Start Message +selectMode(askMode) - Shows buy/sell modes. If askmode > 0 show guild tutorial. If askmode == -7/-8/-9 show nothing. Else show affinity/condition tutorials. +selectModeOfClassVendor() - Opens categories for class weapons and gear +selectModeOfMultiWeaponVendor(consumptionmenuId) - Opens categories for weapons/tools (war/magic/land/hand). Arg consumptionmenuId appends location of item repair person. -1: Ul'dah, -2: Gridania, -3: Limsa +selectModeOfMultiArmorVendor(consumptionmenuId) - Opens categories for armor in different slots. Arg consumptionmenuId appends location of item repair person. -1: Ul'dah, -2: Gridania, -3: Limsa + +openShopBuy(player, shopPack, CurrencyItemId) - ShopPack: Items to appear in window. CurrencyItemId: What is being used to buy these items. +selectShopBuy(player) - Call after openShopBuy() to open widget +closeShopBuy(player) - Closes the buy window + +openShopSell(player) - Call this to open sell window +selectShopSell(player) - Call after openShopSell() +closeShopSell(player) - Closes the sell window + +confirmSellingItem(itemId, quality, quantity, gil) - Simple Sell confirmation window + +selectFacility(?, sheetId, 3) - Opens the facility chooser. +confirmUseFacility(player, cost) - Facility cost confirm + +informSellPrice(1, chosenItem, price) - Shows sell confirm window. ChosenItem must be correct. + +startTutorial(nil, menuId) - Opens up a tutorial menu for each guild type based on menuId + +finishTalkTurn() - Done at the end. + +--]] + +require ("global") +require ("shop") + +shopInfo = { +--[[ + [actorclass id] = + { + welcomeText - Dialog for the NPC to speak when interacting + menuId, - Displays certain menu/dialog. 29-36 = DoH Facilities menus. -1 Ul'dah, -2 Gridania, -3 Limsa. -7/-8/-9/nil show nothing + shopMode, - Type of shop. 0 = Single shop pack, 1 = Class vendor, 2 = Weapon vendor, 3 = Armor vendor, 4 = Hamlet vendor + shopPack{s}, - The item table index to send the client containing the list of items to display, shopmode 2/3 have a static list + } +--]] +[1000159] = {34, 36, 0, 1016}, +[1000163] = {49, 31, 0, 1017}, +[1000165] = {74, -8, 0, 1019}, +[1001458] = {44, 30, 0, 1018}, +[1500142] = {266, -1, 0, 5001}, +[1500143] = {267, -1, 0, 5002}, +[1500144] = {268, -1, 0, 5003}, +[1500145] = {269, -1, 0, 5004}, +[1500146] = {269, -1, 0, 5005}, +[1500147] = {270, -1, 0, 5006}, +[1500150] = {266, -8, 0, 5001}, +[1500151] = {267, -8, 0, 5002}, +[1500152] = {268, -8, 0, 5003}, +[1500153] = {269, -8, 0, 5004}, +[1500154] = {269, -8, 0, 5005}, +[1500155] = {270, -8, 0, 5006}, +[1500158] = {266, -8, 0, 5001}, +[1500159] = {267, -8, 0, 5002}, +[1500160] = {268, -8, 0, 5003}, +[1500161] = {269, -8, 0, 5004}, +[1500162] = {269, -8, 0, 5005}, +[1500163] = {270, -8, 0, 5006}, +[1500401] = {317, -8, 0, 1013}, +[1500405] = {320, -8, 0, 1013}, +[1500407] = {321, -8, 0, 1012}, +[1500411] = {322, -8, 0, 2017}, +[1500414] = {324, -8, 0, 1012}, +[1500419] = {327, -8, 0, 1012}, +[1500422] = {332, -8, 0, 1013}, +[1500423] = {331, -8, 0, 2017}, +[1500429] = {328, -8, 0, 2017}, +[1500430] = {281, -8, 4, 5122}, +[1500431] = {281, -8, 4, 5118}, +[1500432] = {281, -8, 4, 5120}, +[1600001] = {6, -8, 0, 1006}, +[1600002] = {7, -8, 0, 1007}, +[1600003] = {8, -8, 0, 1008}, +[1600004] = {9, -8, 0, 1009}, +[1600005] = {10, -8, 0, 1010}, +[1600006] = {11, -8, 0, 1011}, +[1600007] = {12, -8, 0, 1012}, +[1600008] = {13, -8, 0, 1013}, +[1600009] = {14, -8, 0, 1014}, +[1600010] = {15, -8, 0, 1015}, +[1600011] = {1, -8, 0, 1001}, +[1600012] = {2, -8, 0, 1002}, +[1600013] = {3, -8, 0, 1003}, +[1600014] = {4, -8, 0, 1004}, +[1600016] = {5, -8, 0, 1005}, +[1600017] = {39, 29, 0, 2020}, +[1600018] = {59, 33, 0, 2021}, +[1600019] = {75, -8, 0, 2022}, +[1600020] = {77, -8, 0, 2010}, +[1600021] = {78, -8, 0, 2011}, +[1600022] = {79, -8, 0, 2012}, +[1600023] = {80, -8, 0, 2013}, +[1600024] = {81, -8, 0, 2014}, +[1600025] = {82, -8, 0, 2015}, +[1600026] = {83, -8, 0, 2016}, +[1600027] = {84, -8, 0, 2017}, +[1600028] = {85, -8, 0, 2018}, +[1600029] = {86, -8, 0, 2019}, +[1600030] = {87, -8, 0, 2001}, +[1600031] = {88, -8, 0, 2003}, +[1600032] = {89, -8, 0, 2002}, +[1600033] = {90, -8, 0, 2004}, +[1600034] = {91, -8, 0, 2005}, +[1600035] = {92, -8, 0, 2006}, +[1600036] = {93, -8, 0, 2007}, +[1600037] = {94, -8, 0, 2008}, +[1600039] = {69, 35, 0, 3020}, +[1600040] = {54, 32, 0, 3019}, +[1600041] = {64, 34, 0, 3021}, +[1600042] = {76, -8, 0, 3022}, +[1600043] = {96, -8, 0, 3009}, +[1600044] = {97, -8, 0, 3010}, +[1600045] = {98, -8, 0, 3011}, +[1600046] = {99, -8, 0, 3012}, +[1600047] = {100, -8, 0, 3013}, +[1600048] = {101, -8, 0, 3014}, +[1600049] = {102, -8, 0, 3016}, +[1600050] = {103, -8, 0, 3015}, +[1600051] = {104, -8, 0, 3017}, +[1600052] = {105, -8, 0, 3004}, +[1600053] = {106, -8, 0, 3007}, +[1600054] = {107, -8, 0, 3018}, +[1600055] = {108, -8, 0, 3006}, +[1600056] = {109, -8, 0, 3005}, +[1600057] = {110, -8, 0, 3002}, +[1600058] = {111, -8, 0, 3003}, +[1600059] = {112, -8, 0, 3001}, +[1600061] = {95, -8, 0, 2009}, +[1600062] = {113, -8, 0, 3008}, +[1600063] = {114, -8, 0, 4001}, +[1600064] = {235, -8, 0, 2023}, +[1600065] = {236, -8, 0, 1020}, +[1600066] = {237, -8, 0, 3023}, +[1600067] = {238, -8, 0, 5007}, +[1600068] = {239, -8, 0, 5007}, +[1600069] = {240, -1, 0, 5007}, +[1600070] = {241, -8, 0, 5008}, +[1600071] = {242, -8, 0, 5008}, +[1600072] = {243, -8, 0, 5008}, +[1600073] = {244, -8, 1, 5009}, +[1600074] = {245, -8, 1, 5015}, +[1600075] = {246, -8, 1, 5021}, +[1600076] = {247, -8, 1, 5027}, +[1600077] = {248, -8, 1, 5033}, +[1600078] = {249, -8, 1, 5039}, +[1600079] = {250, -8, 1, 5045}, +[1600080] = {251, -8, 1, 5051}, +[1600081] = {252, -8, 1, 5057}, +[1600082] = {253, -8, 1, 5063}, +[1600083] = {254, -8, 1, 5069}, +[1600084] = {255, -8, 1, 5075}, +[1600085] = {256, -8, 1, 5081}, +[1600086] = {257, -8, 1, 5087}, +[1600087] = {258, -8, 1, 5093}, +[1600088] = {259, -8, 1, 5099}, +[1600089] = {260, -8, 1, 5105}, +[1600090] = {261, -8, 1, 5111}, +[1600092] = {263, -8, 0, 2024}, +[1600093] = {264, -8, 0, 1021}, +[1600094] = {265, -8, 0, 3024}, +[1600095] = {281, -8, 0, 1005}, +[1600096] = {281, -8, 0, 2009}, +[1600097] = {281, -8, 0, 4001}, +[1600098] = {281, -8, 0, 4002}, +[1600099] = {281, -8, 0, 2009}, +[1600100] = {281, -2, 2, 0}, +[1600101] = {281, -8, 0, 2009}, +[1600103] = {281, -8, 0, 3008}, +[1600104] = {281, -8, 0, 3008}, +[1600107] = {281, -8, 3, 0}, +[1600108] = {281, -8, 0, 3008}, +[1600109] = {281, -3, 2, 0}, +[1600110] = {281, -8, 0, 4001}, +[1600111] = {281, -8, 0, 2009}, +[1600112] = {281, -8, 0, 4002}, +[1600113] = {281, -8, 0, 4001}, +[1600117] = {281, -8, 0, 2009}, +[1600119] = {281, -2, 3, 0}, +[1600120] = {281, -8, 0, 3008}, +[1600121] = {281, -8, 0, 2009}, +[1600122] = {281, -8, 0, 3008}, +[1600125] = {281, -8, 0, 1005}, +[1600126] = {281, -8, 0, 3008}, +[1600129] = {281, -1, 3, 0}, +[1600130] = {281, -8, 0, 4001}, +[1600133] = {281, -1, 2, 0}, +[1600137] = {281, -8, 0, 1005}, +[1600142] = {281, -8, 0, 1005}, + +} + + +shopRange = { --shopRangeStart, shopRangeEnd +[101] = {101001, 101010}; +[102] = {102001, 102010}; +[103] = {103001, 103010}; +[104] = {104001, 104010}; +[105] = {105001, 105010}; +[106] = {106001, 106010}; +[107] = {107001, 107010}; +[108] = {108001, 108017}; +[109] = {109001, 109015}; +[110] = {110001, 110018}; +[111] = {111001, 111018}; +[112] = {112001, 112018}; +[113] = {113001, 113019}; +[114] = {114001, 114015}; +[115] = {115001, 115015}; +[116] = {116001, 116010}; +[117] = {117001, 117010}; +[118] = {118001, 118010}; +[120] = {120001, 120012}; +[121] = {121001, 121012}; +[122] = {122001, 122012}; +[123] = {123001, 123012}; +[124] = {124001, 124012}; +[125] = {125001, 125012}; +[126] = {126001, 126012}; +[127] = {127001, 127012}; +[128] = {128001, 128012}; +[129] = {129001, 129016}; +[130] = {130001, 130012}; +[131] = {131001, 131012}; +[132] = {132001, 132012}; +[133] = {133001, 133012}; +[134] = {134001, 134016}; +[135] = {135001, 135012}; +[136] = {136001, 136012}; +[137] = {137001, 137012}; +[138] = {138001, 138012}; +[139] = {139001, 139012}; +[140] = {140001, 140012}; +[141] = {141001, 141012}; +[142] = {142001, 142012}; +[143] = {143001, 143016}; +[144] = {144001, 144018}; +[145] = {1071001, 1071002}; +[146] = {1072001, 1072006}; +[1001] = {1001001, 1001008}; +[1002] = {1002001, 1002008}; +[1003] = {1003001, 1003007}; +[1004] = {1004001, 1004002}; +[1005] = {1005001, 1005017}; +[1006] = {1006001, 1006006}; +[1007] = {1007001, 1007010}; +[1008] = {1008001, 1008009}; +[1009] = {1009001, 1009012}; +[1010] = {1010001, 1010014}; +[1011] = {1011001, 1011010}; +[1012] = {1012001, 1012007}; +[1013] = {1013001, 1013011}; +[1014] = {1014001, 1014006}; +[1015] = {1015001, 1015007}; +[1016] = {1016001, 1016016}; +[1017] = {1018001, 1018010}; +[1018] = {1017001, 1017013}; +[1019] = {1019001, 1019005}; +[1020] = {1066001, 1066004}; +[1021] = {1069001, 1069005}; +[2001] = {1020001, 1020008}; +[2002] = {1021001, 1021006}; +[2003] = {1022001, 1022007}; +[2004] = {1023001, 1023008}; +[2005] = {1024001, 1024003}; +[2006] = {1025001, 1025008}; +[2007] = {1026001, 1026006}; +[2008] = {1027001, 1027004}; +[2009] = {1028001, 1028016}; +[2010] = {1029001, 1029009}; +[2011] = {1030001, 1030008}; +[2012] = {1031001, 1031010}; +[2013] = {1032001, 1032010}; +[2014] = {1033001, 1033012}; +[2015] = {1034001, 1034015}; +[2016] = {1035001, 1035013}; +[2017] = {1036001, 1036006}; +[2018] = {1037001, 1037006}; +[2019] = {1038001, 1038008}; +[2020] = {1039001, 1039009}; +[2021] = {1040001, 1040010}; +[2022] = {1041001, 1041005}; +[2023] = {1065001, 1065006}; +[2024] = {1068001, 1068006}; +[3001] = {1042001, 1042008}; +[3002] = {1043001, 1043008}; +[3003] = {1044001, 1044008}; +[3004] = {1045001, 1045008}; +[3005] = {1046001, 1046010}; +[3006] = {1047001, 1047008}; +[3007] = {1048001, 1048006}; +[3008] = {1049001, 1049016}; +[3009] = {1050001, 1050013}; +[3010] = {1051001, 1051008}; +[3011] = {1052001, 1052009}; +[3012] = {1053001, 1053010}; +[3013] = {1054001, 1054006}; +[3014] = {1055001, 1055013}; +[3015] = {1056001, 1056005}; +[3016] = {1057001, 1057008}; +[3017] = {1058001, 1058011}; +[3018] = {1059001, 1059007}; +[3019] = {1060001, 1060011}; +[3020] = {1061001, 1061014}; +[3021] = {1062001, 1062016}; +[3022] = {1063001, 1063004}; +[3023] = {1067001, 1067008}; +[3024] = {1070001, 1070004}; +[4001] = {1064001, 1064011}; +[4002] = {1064001, 1064011}; +[5001] = {2001001, 2001018}; +[5002] = {2002001, 2002006}; +[5003] = {2003001, 2003010}; +[5004] = {2004001, 2004009}; +[5005] = {2005001, 2005010}; +[5006] = {2006001, 2006012}; +[5007] = {2007001, 2007010}; +[5008] = {2008001, 2008016}; +[5009] = {2009001, 2009007}; +[5010] = {2009101, 2009104}; +[5011] = {2009201, 2009204}; +[5012] = {2009301, 2009304}; +[5013] = {2009401, 2009404}; +[5014] = {2009501, 2009504}; +[5015] = {2010001, 2010004}; +[5016] = {2010101, 2010104}; +[5017] = {2010201, 2010204}; +[5018] = {2010301, 2010304}; +[5019] = {2010401, 2010404}; +[5020] = {2010501, 2010504}; +[5021] = {2011001, 2011004}; +[5022] = {2011101, 2011104}; +[5023] = {2011201, 2011204}; +[5024] = {2011301, 2011304}; +[5025] = {2011401, 2011404}; +[5026] = {2011501, 2011504}; +[5027] = {2012001, 2012007}; +[5028] = {2012101, 2012104}; +[5029] = {2012201, 2012204}; +[5030] = {2012301, 2012304}; +[5031] = {2012401, 2012404}; +[5032] = {2012501, 2012504}; +[5033] = {2013001, 2013004}; +[5034] = {2013101, 2013104}; +[5035] = {2013201, 2013204}; +[5036] = {2013301, 2013304}; +[5037] = {2013401, 2013404}; +[5038] = {2013501, 2013504}; +[5039] = {2014001, 2014007}; +[5040] = {2014101, 2014104}; +[5041] = {2014201, 2014204}; +[5042] = {2014301, 2014304}; +[5043] = {2014401, 2014404}; +[5044] = {2014501, 2014504}; +[5045] = {2015001, 2015007}; +[5046] = {2015101, 2015104}; +[5047] = {2015201, 2015204}; +[5048] = {2015301, 2015304}; +[5049] = {2015401, 2015404}; +[5050] = {2015501, 2015504}; +[5051] = {2016001, 2016006}; +[5052] = {2016101, 2016104}; +[5053] = {2016201, 2016204}; +[5054] = {2016301, 2016304}; +[5055] = {2016401, 2016404}; +[5056] = {2016501, 2016504}; +[5057] = {2017001, 2017006}; +[5058] = {2017101, 2017104}; +[5059] = {2017201, 2017204}; +[5060] = {2017301, 2017304}; +[5061] = {2017401, 2017404}; +[5062] = {2017501, 2017504}; +[5063] = {2018001, 2018006}; +[5064] = {2018101, 2018104}; +[5065] = {2018201, 2018204}; +[5066] = {2018301, 2018304}; +[5067] = {2018401, 2018404}; +[5068] = {2018501, 2018504}; +[5069] = {2019001, 2019006}; +[5070] = {2019101, 2019104}; +[5071] = {2019201, 2019204}; +[5072] = {2019301, 2019304}; +[5073] = {2019401, 2019404}; +[5074] = {2019501, 2019504}; +[5075] = {2020001, 2020006}; +[5076] = {2020101, 2020104}; +[5077] = {2020201, 2020204}; +[5078] = {2020301, 2020304}; +[5079] = {2020401, 2020404}; +[5080] = {2020501, 2020504}; +[5081] = {2021001, 2021006}; +[5082] = {2021101, 2021104}; +[5083] = {2021201, 2021204}; +[5084] = {2021301, 2021304}; +[5085] = {2021401, 2021404}; +[5086] = {2021501, 2021504}; +[5087] = {2022001, 2022006}; +[5088] = {2022101, 2022104}; +[5089] = {2022201, 2022204}; +[5090] = {2022301, 2022304}; +[5091] = {2022401, 2022404}; +[5092] = {2022501, 2022504}; +[5093] = {2023001, 2023006}; +[5094] = {2023101, 2023104}; +[5095] = {2023201, 2023204}; +[5096] = {2023301, 2023304}; +[5097] = {2023401, 2023404}; +[5098] = {2023501, 2023504}; +[5099] = {2024001, 2024006}; +[5100] = {2024101, 2024104}; +[5101] = {2024201, 2024204}; +[5102] = {2024301, 2024304}; +[5103] = {2024401, 2024404}; +[5104] = {2024501, 2024504}; +[5105] = {2025001, 2025006}; +[5106] = {2025101, 2025104}; +[5107] = {2025201, 2025204}; +[5108] = {2025301, 2025304}; +[5109] = {2025401, 2025404}; +[5110] = {2025501, 2025504}; +[5111] = {2026001, 2026006}; +[5112] = {2026101, 2026104}; +[5113] = {2026201, 2026204}; +[5114] = {2026301, 2026304}; +[5115] = {2026401, 2026404}; +[5116] = {2026501, 2026504}; +[5117] = {2026601, 2026606}; +[5118] = {2026701, 2026708}; +[5119] = {2026801, 2026808}; +[5120] = {2026901, 2026908}; +[5121] = {2027001, 2027008}; +[5122] = {2027101, 2027110}; +[5123] = {2027201, 2027211}; +} + + +function init(npc) + return false, false, 0, 0; +end + +function onEventStarted(player, npc, triggerName) + + npcId = npc:GetActorClassId(); + + if shopInfo[npcId] == nil then + errorMsg = string.format("This PopulaceShopSalesman actor has no shop set. Actor Class Id: %s", npcId); + player:SendMessage(MESSAGE_TYPE_SYSTEM_ERROR, "", errorMsg ); + player:EndEvent(); + return; + end; + + local shopCurrency = 1000001; + local welcomeText = 1; + local menuId = shopInfo[npcId][2]; + local shopCategory = shopInfo[npcId][3]; + + local itemShop = 0; + local classShop = 1; + local weaponShop = 2; + local armorShop = 3; + local hamletShop = 4; + + local weaponShopPack = {5001,5002,5007,5008}; + local armorShopPack = {5004,5005,5006,5003}; + + local menuBuy = 1; + local menuBuyCount = 1; -- For Shops with multiple buying categories + local menuSell = 2; + local menuFacility = 3; + local menuTutorial = 4; + local menuClose = -3; + local menuHasFacility = false; + local menuHasTutorial = false; + + local shopPack = shopInfo[npcId][4]; -- Starting value for the shopPack of the current NPC Actor + local chosenShopPackage = 0; -- Var to send to openShopMenu() once desired shopPack is determined + local choice; + + callClientFunction(player, "welcomeTalk", shopInfo[npcId][welcomeText], player); + + while (true) do + + if (shopCategory == itemShop) then + choice = callClientFunction(player, "selectMode", menuId); + menuHasFacility = true; + menuHasTutorial = true; + elseif (shopCategory == classShop) then + choice = callClientFunction(player, "selectModeOfClassVendor"); + menuBuyCount = 6; + menuSell = 0; + elseif (shopCategory == weaponShop) then + choice = callClientFunction(player, "selectModeOfMultiWeaponVendor", menuId); + menuBuyCount = 4; + menuSell = 0; + elseif (shopCategory == armorShop) then + choice = callClientFunction(player, "selectModeOfMultiArmorVendor", menuId); + menuBuyCount = 4; + menuSell = 0; + elseif (shopCategory == hamletShop) then + choice = callClientFunction(player, "selectMode", menuId); + + local hamletRegion = shopPack; + local hamletPackAleport = {5117, 5122, 5123}; + local hamletPackHyrstmill = {5117, 5118, 5119}; + local hamletPackGoldenBazaar = {5117, 5120, 5121}; + local hamletLevel = 3; -- Defaulting to highest value for now + + if hamletRegion == 5122 then -- Aleport + -- hamletLevel = GetHamletStatus(idAleport); + shopPack = hamletPackAleport[hamletLevel] or 5117; + elseif hamletRegion == 5118 then -- Hyrstmill + -- hamletLevel = GetHamletStatus(idHyrstmill); + shopPack = hamletPackHyrstmill[hamletLevel] or 5117; + elseif hamletRegion == 5120 then -- The Golden Bazaar + -- hamletLevel = GetHamletStatus(idGoldenBazaar); + shopPack = hamletPackGoldenBazaar[hamletLevel] or 5117; + end + end + + + if choice and (choice >= menuBuy and choice <= menuBuyCount) then + --player:SendMessage(0x20,"", "Menu option: "..choice); + + if (shopCategory == weaponShop) then + chosenShopPackage = weaponShopPack[choice]; + elseif (shopCategory == armorShop) then + chosenShopPackage = armorShopPack[choice]; + else + chosenShopPackage = ((shopPack-1) + choice); + end + + openShopMenu( + player, + menuId, + chosenShopPackage, + shopRange[chosenShopPackage][1], + shopRange[chosenShopPackage][2], + shopCurrency + ); + + elseif (choice == menuSell) then + openSellMenu(player); + + elseif (choice == menuFacility) and (menuHasFacility == true) then + if menuId > 0 then + local classFacility = (shopInfo[npcId][1] + 1) or 35; + facilityChoice = callClientFunction(player, "selectFacility", nil, classFacility, 3); + + if facilityChoice == 1 then + callClientFunction(player, "confirmUseFacility", player, 200); + elseif facilityChoice == 2 then + callClientFunction(player, "confirmUseFacility", player, 400); + elseif facilityChoice == 3 then + callClientFunction(player, "confirmUseFacility", player, 1000); + end + end + elseif (choice == menuTutorial) and (menuHasTutorial == true) then + callClientFunction(player, "startTutorial", nil, menuId); + end + + if (choice == menuClose or choice == nil) then + break; + end + end + + callClientFunction(player, "finishTalkTurn", player); + player:EndEvent(); + +end + + + +function openShopMenu(player, menuId, shopPack, itemRangeStart, itemRangeEnd, shopCurrency) + + callClientFunction(player, "openShopBuy", player, shopPack, shopCurrency); + + player:SendMessage(0x20, "", "shopPack: "..shopPack.." Range: "..itemRangeStart.."-"..itemRangeEnd); + + while (true) do + buyResult, quantity = callClientFunction(player, "selectShopBuy", player); + + if (buyResult == 0) then + callClientFunction(player, "closeShopBuy", player); + break; + else + if itemRangeStart and itemRangeEnd then + itemChosen = (itemRangeStart - 1) + buyResult; + + if (((itemRangeStart-1) + itemChosen) < itemRangeStart) or (itemChosen > itemRangeEnd) then + player:SendMessage(0x20, "", "[ERROR] Client selected item exceeds the valid range."); + callClientFunction(player, "finishTalkTurn", player); + player:EndEvent(); + return; + else + player:SendMessage(0x20, "", "Item chosen: " .. itemChosen .. " Quantity: ".. quantity); + + --[[ + TO-DO: Request item information from server table and throw result to purchaseItem() + + requestItem = GetItemShopInfoThing(itemChosen); + purchaseItem(player, INVENTORY_NORMAL, requestItem.id, quantity, requestItem.quality, requestItem.price, shopCurrency); + --]] + end + end + + end + end + +end + + + +function openSellMenu(player) + callClientFunction(player, "openShopSell", player); + + while (true) do + sellResult, sellQuantity, sellState, unknown, sellItemSlot = callClientFunction(player, "selectShopSell", player); + + if (sellResult == nil) then + callClientFunction(player, "closeShopSell", player); + break; + else + if sellState == 1 then + itemToSell = player:GetItemPackage(INVENTORY_NORMAL):GetItemAtSlot(sellItemSlot-1); + gItemSellId = itemToSell.itemId; + gItemQuality = itemToSell.quality; + gItemPrice = GetItemGamedata(gItemSellId); + gItemPrice = gItemPrice.sellPrice; + + + if gItemQuality == 2 then -- +1 + gItemPrice = (math.floor(gItemPrice * 1.10)); + elseif gItemQuality == 3 then -- +2 + gItemPrice = (math.floor(gItemPrice * 1.25)); + elseif gItemQuality == 4 then -- +3 + gItemPrice = (math.floor(gItemPrice * 1.50)); + end + + callClientFunction(player, "informSellPrice", 1, sellItemSlot, gItemPrice); + + elseif sellState == nil then + sellItem(player, gItemSellId, sellQuantity, gItemQuality, gItemPrice, sellItemSlot-1, shopCurrency); + end + end + end +end \ No newline at end of file diff --git a/Data/scripts/commands/ChocoboRideCommand.lua b/Data/scripts/commands/ChocoboRideCommand.lua index f28bd8f1..7d89da2c 100644 --- a/Data/scripts/commands/ChocoboRideCommand.lua +++ b/Data/scripts/commands/ChocoboRideCommand.lua @@ -6,6 +6,8 @@ Handles mounting and dismounting the Chocobo and Goobbue --]] +require ("global") + function onEventStarted(player, actor, triggerName, isGoobbue) if (player:GetState() == 0) then @@ -13,11 +15,11 @@ function onEventStarted(player, actor, triggerName, isGoobbue) worldMaster = GetWorldMaster(); if (isGoobbue ~= true) then - player:ChangeMusic(83); + player:ChangeMusic(83, MUSIC_FADEIN); player:SendGameMessage(player, worldMaster, 26001, 0x20); player:SetMountState(1); else - player:ChangeMusic(98); + player:ChangeMusic(98, MUSIC_FADEIN); player:SendGameMessage(player, worldMaster, 26019, 0x20); player:SetMountState(2); end @@ -25,7 +27,7 @@ function onEventStarted(player, actor, triggerName, isGoobbue) player:ChangeSpeed(0.0, 3.6, 9.0, 9.0); player:ChangeState(15); else - player:ChangeMusic(player:GetZone().bgmDay); + player:ChangeMusic(player:GetZone().bgmDay, MUSIC_FADEIN); worldMaster = GetWorldMaster(); diff --git a/Data/scripts/commands/TeleportCommand.lua b/Data/scripts/commands/TeleportCommand.lua index e7c7a3bb..cbc254ef 100644 --- a/Data/scripts/commands/TeleportCommand.lua +++ b/Data/scripts/commands/TeleportCommand.lua @@ -49,8 +49,7 @@ teleportMenuToAetheryte = { [5] = { [1] = 1280121, [2] = 1280122 - }, - + } } zoneIdToRegionChoice = @@ -73,7 +72,7 @@ function onEventStarted(player, actor, eventType, eventName, isTeleport) local favoredLocation = {1280003, 1280005, 1280062}; local currentRegion = zoneIdToRegionChoice[player:GetPos()[5]] or 0; local isCity = {[1280001] = true, [1280061] = true, [1280031] = true}; - local isRegion = true; + local isFavoredDesination = false; local destination = 0; @@ -103,7 +102,7 @@ function onEventStarted(player, actor, eventType, eventName, isTeleport) elseif (regionChoice == 6) then -- Favored Destinations selected. -- Dummy info. Favored would be half price after factoring in same region cost or not. animaCost = {2, 3, 3, favoredLocation[1], favoredLocation[2], favoredLocation[3]}; - isRegion = false; + isFavoredDesination = true; end @@ -126,12 +125,12 @@ function onEventStarted(player, actor, eventType, eventName, isTeleport) player:PlayAnimation(0x4000FFA); - if (isRegion == true) then + if (isFavoredDesination == true) then + destination = aetheryteTeleportPositions[favoredLocation[aetheryteChoice]]; + player:SendGameMessage(worldMaster, 34101, 0x20, 2, favoredLocation[aetheryteChoice], animaCost[aetheryteChoice], currentAnima); + else destination = aetheryteTeleportPositions[teleportMenuToAetheryte[regionChoice][aetheryteChoice]]; player:SendGameMessage(worldMaster, 34101, 0x20, 2, teleportMenuToAetheryte[regionChoice][aetheryteChoice], animaCost[aetheryteChoice], currentAnima); - else - destination = aetheryteTeleportPositions[favoredLocation[aetheryteChoice]]; - player:SendGameMessage(worldMaster, 34101, 0x20, 2, favoredLocation[aetheryteChoice], animaCost[aetheryteChoice], currentAnima); end confirmChoice = callClientFunction(player, "delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false); diff --git a/Data/scripts/commands/gm/music.lua b/Data/scripts/commands/gm/music.lua index 3e04c912..0a761b14 100644 --- a/Data/scripts/commands/gm/music.lua +++ b/Data/scripts/commands/gm/music.lua @@ -1,14 +1,17 @@ properties = { permissions = 0, - parameters = "s", + parameters = "ss", description = [[ Plays music to player. !music +!music ]], } -function onTrigger(player, argc, music) +function onTrigger(player, argc, music, transition) music = tonumber(music) or 0; - player:ChangeMusic(music); + transition = tonumber(transition) or nil; + player:SendMessage(0x20, "", tostring(argc).." "..tostring(music).." "..tostring(transition)); + player:ChangeMusic(music, transition); end; \ No newline at end of file diff --git a/Data/scripts/commands/gm/setappearance.lua b/Data/scripts/commands/gm/setappearance.lua index 88ee7869..526307a8 100644 --- a/Data/scripts/commands/gm/setappearance.lua +++ b/Data/scripts/commands/gm/setappearance.lua @@ -15,10 +15,12 @@ function onTrigger(player, argc, appearanceId) local sender = "[setappearance] "; app = tonumber(appearanceId) or 0; - player:SendMessage(messageID, sender, string.format("appearance %u", app)); + --player:SendMessage(messageID, sender, string.format("appearance %u", app)); - if player and player.target then - player.target.ChangeNpcAppearance(app); + targetActor = GetWorldManager():GetActorInWorld(player.currentTarget) + + if targetActor then + targetActor.ChangeNpcAppearance(app); player:SendMessage(messageID, sender, string.format("appearance %u", app)); end; diff --git a/Data/scripts/global.lua b/Data/scripts/global.lua index 3e096e24..4b18889c 100644 --- a/Data/scripts/global.lua +++ b/Data/scripts/global.lua @@ -164,6 +164,14 @@ QFLAG_NONE = 0; QFLAG_MAP = 1; QFLAG_PLATE = 2; +-- MUSIC +MUSIC_IMMEDIATE = 1; +MUSIC_CROSSFADE = 2; +MUSIC_LAYER = 3; +MUSIC_FADEIN = 4; +MUSIC_NORMAL_CHANNEL = 5; +MUSIC_BATTLE_CHANNEL = 6; + -- Common Helper Functions function attentionMessage(player, textId, ...) player:SendGameMessage(GetWorldMaster(), textId, 0x20, ...); diff --git a/Data/scripts/quests/dft/DftWil.lua b/Data/scripts/quests/dft/DftWil.lua index 84616a6a..3375c7d1 100644 --- a/Data/scripts/quests/dft/DftWil.lua +++ b/Data/scripts/quests/dft/DftWil.lua @@ -4,9 +4,9 @@ require ("global") Quest Script -Name: Small Talk -Code: DftWil -Id: 110543 +Name: Small Talk +Code: DftWil +Id: 110543 Contains all default lines for talkable npcs in the Wilderness Region (aka Thanalan). * NOTE: This quest is active for all players at all times. @@ -14,12 +14,14 @@ Contains all default lines for talkable npcs in the Wilderness Region (aka Thana -- [ActorClassId] = "client_function_name" local defaultTalkWil = { + [1000046] = "defaultTalkWithGogofu_001", -- Gogofu [1000047] = "defaultTalkWithHahayo_001", -- Hahayo [1000070] = "defaultTalkWithKukumuko_001", -- Kukumuko - [1000293] = "defaultTalkWithDeaustie_001", -- Deaustie - defaultTalkWithDeaustie_002 (flavor for being on WVR?) + [1000293] = "defaultTalkWithDeaustie_001", -- Deaustie - defaultTalkWithDeaustie_002 (her dialog after unlocking WVR?) [1000374] = "defaultTalkWithRorojaru_001", -- Rorojaru [1000597] = "defaultTalkWithNogeloix_001", -- Nogeloix + [1000635] = "defaultTalkWithHnaufrid_001", -- Hnaufrid - Will not fire since he isn't PplStd [1000638] = "defaultTalkWithHawazizowazi_001", -- Hawazi Zowazi [1000639] = "defaultTalkWithIsabella_001", -- Isabella [1000640] = "defaultTalkWithCiceroix_001", -- Ciceroix @@ -31,6 +33,8 @@ local defaultTalkWil = { [1000646] = "defaultTalkWithRinhmaimhov_001", -- Rinh Maimhov [1000647] = "defaultTalkWithLyngwaek_001", -- Lyngwaek [1000648] = "defaultTalkWithWawaton_001", -- Wawaton + [1000649] = "defaultTalkWithDyalwann_001", -- <<>> - D'yalwann - Empty function. No wiki info, likely unused. Has book prop. + [1000650] = "defaultTalkWithSedemode_001", -- <<>> - Sedemode - Empty function. No wiki info, likely unused. [1000651] = "defaultTalkWithPopori_001", -- Popori [1000652] = "defaultTalkWithMamaza_001", -- Mamaza [1000653] = "defaultTalkWithNhagiamariyo_001", -- Nhagi Amariyo @@ -42,24 +46,29 @@ local defaultTalkWil = { [1000665] = "defaultTalkWithRosalind_001", -- Rosalind [1000666] = "defaultTalkWithOcoco_001", -- Ococo [1000668] = "defaultTalkWithUbokhn_001", -- U'bokhn - [1000780] = "defaultTalkWithKiora_001", -- Kiora - [1000781] = "defaultTalkWithOpondhao_001", -- O'pondhao - [1000782] = "defaultTalkWithBertram_001", -- Bertram - [1000783] = "defaultTalkWithMinerva_001", -- Minvera - [1000784] = "defaultTalkWithZoengterbin_001", -- Zoengterbin - defaultTalkWithZoengterbin_002 / defaultTalkWithZoengterbin_003 (informs about LNC guild) - [1000785] = "defaultTalkWithStyrmoeya_001", -- Styrmoeya - [1000786] = "defaultTalkWithYhahamariyo_001", -- Yhah Amariyo - [1000787] = "defaultTalkWithHildie_001", -- Hildie - [1000788] = "defaultTalkWithLettice_001", -- Lettice - [1000789] = "defaultTalkWithTyon_001", -- Tyon - defaultTalkWithTyon_002 / defaultTalkWithTyon_003 (informs about BTN guild) + [1000672] = "defaultTalkWithBlandhem_001", -- <<>> - Blandhem (Camp Black Brush: X:56.089 Y:199.983 Z:-462.182 rough estimate) + [1000673] = "defaultTalkWithChechedoba_001", -- <<>> - Chechedoba (Camp Black Brush: X:8.436 Y:199.973 Z:-484.073 rough estimate) + [1000674] = "defaultTalkWithZllayan_001", -- <<>> - Z'llayan (Camp Drybone) + [1000780] = "defaultTalkWithKiora_001", -- Kiora - defaultTalkWithKiora_002 / 003 (informs about MRD guild) + [1000781] = "defaultTalkWithOpondhao_001", -- O'pondhao - defaultTalkWithOpondhao_002 / 003 (informs about FSH guild) + [1000782] = "defaultTalkWithBertram_001", -- Bertram - defaultTalkWithBertram_002 / 003 (informs about CUL guild) + [1000783] = "defaultTalkWithMinerva_001", -- Minvera - defaultTalkWithMinerva_002 / 003 / 004 (informs about BSM guild. Extra dialog also if you're on a DoW/M?) + [1000784] = "defaultTalkWithZoengterbin_001", -- Zoengterbin - defaultTalkWithZoengterbin_002 / 003 (informs about LNC guild) + [1000785] = "defaultTalkWithStyrmoeya_001", -- Styrmoeya - defaultTalkWithStyrmoeya_002 / 003 (informs about ARC guild) + [1000786] = "defaultTalkWithYhahamariyo_001", -- Yhah Amariyo - defaultTalkWithYhahamariyo_002 / 003 (informs about CNJ guild) + [1000787] = "defaultTalkWithHildie_001", -- Hildie - defaultTalkWithHildie_002 / 003 (informs about CRP guild) + [1000788] = "defaultTalkWithLettice_001", -- Lettice - defaultTalkWithLettice_002 / 003 (informs about LTW guild) + [1000789] = "defaultTalkWithTyon_001", -- Tyon - defaultTalkWithTyon_002 / 003 (informs about BTN guild) [1000840] = "defaultTalkWithRururaji_001", -- Rururaji - Presumably dialog pre-Chocobo update. Will not fire due to actor class change since then. [1000841] = "defaultTalkWithMomodi_001", -- Momodi - [1000846] = "defaultTalkWithYayake_001", -- Yayake + [1000846] = "defaultTalkWithYayake_001", -- Yayake - defaultTalkWithYayake_002 (her dialog after unlocking THM?) [1000847] = "defaultTalkWithIllofii_001", -- I'llofii [1000861] = "defaultTalkWithLinette_001", -- Linette [1000862] = "defaultTalkWithGagaruna_001", -- Gagaruna [1000863] = "defaultTalkWithLulutsu_001", -- Lulutsu - [1000864] = "defaultTalkWithInn_Desk", -- Otopa Pottopa + [1000864] = "defaultTalkWithInn_Desk", -- Otopa Pottopa - defaultTalkWithOtopapottopa_001 (pre-Inn unlock?) + [1000865] = "defaultTalkWithThaisie_001", -- Thaisie - Mentions retainers, but will not fire since she's not PplStd. + [1000887] = "defaultTalkWithZssapa_001", -- <<>> - Z'ssapa (Central Thanalan: Black Brush: 92.779999 183.837 -1030.310059) alt actor ID: 1001217 (used in a quest presumably, different outfit from wiki image) [1000915] = "defaultTalkWithCahernaut_001", -- Cahernaut [1000916] = "defaultTalkWithAspipi_001", -- Aspipi [1000917] = "defaultTalkWithGloiucen_001", -- Gloiucen @@ -89,6 +98,10 @@ local defaultTalkWil = { [1001143] = "defaultTalkWithTotono_001", -- Totono [1001144] = "defaultTalkWithFyrilsunn_001", -- Fyrilsunn [1001145] = "defaultTalkWithSinette_001", -- Sinette + [1001146] = "defaultTalkWithZirnbyrt_001", -- <<>> - Zirnbyrt - Entry Denier Guard (East Thanalan: X:1831.565 Y:248.576 Z:448.872 Educated guess from wiki picture. Guards unused dun01) + [1001147] = "defaultTalkWithVhasotayuun_001", -- <<>> - Vhaso Tayuun - (Entry Denier? No wiki info) + [1001148] = "defaultTalkWithPulbeiyalbei_001", -- <<>> - Pulbei Yalbei - (Entry Denier? No wiki info) + [1001149] = "defaultTalkWithGembert_001", -- <<>> - Gembert - Entry Denier Guard (South Thanalan: X:1707.143 Y:238.150 Z:1617.570 Rough estimate. Guards unused dun06) [1001165] = "defaultTalkWithMumukiya_001", -- Mumukiya [1001166] = "defaultTalkWithYuyubesu_001", -- Yuyubesu [1001167] = "defaultTalkWithChachai_001", -- Chachai @@ -106,6 +119,34 @@ local defaultTalkWil = { [1001256] = "defaultTalkWithMaginfred_001", -- Gunnulf [1001257] = "defaultTalkWithOrisic_001", -- Heibert [1001260] = "defaultTalkWithKlamahni_001", -- I'paghlo + [1001295] = "defaultTalkWithChamberlain_001", -- <<>> - Chamberlain (Entry Denier? No wiki info) + [1001296] = "defaultTalkWithWyntkelt_001", -- <<>> - Wyntkelt (Entry Denier? No wiki info) + [1001297] = "defaultTalkWithAudrye_001", -- <<>> - Audrye (Entry Denier? No wiki info) + [1001314] = "defaultTalkWithFromelaut_001", -- <<>> - Fromelaut (Eastern Thanalan: The Golden Bazaar) + [1001315] = "defaultTalkWithZilili_001", -- <<>> - Zilili (Eastern Thanalan: The Golden Bazaar) - Dialog doesn't match wiki, but wiki dialog isn't addressed by any function. Changed in an update perhaps. + [1001316] = "defaultTalkWithPapala_001", -- <<>> - Papala (Eastern Thanalan: The Golden Bazaar: 1099.540039, 312.674, -1145.719971) + [1001317] = "defaultTalkWithSasapano_001", -- <<>> - Sasapano (Eastern Thanalan: The Golden Bazaar: 1134.599976, 312.193, -1128.23999) + [1001318] = "defaultTalkWithBibiroku_001", -- <<>> - Bibiroku (Eastern Thanalan: The Golden Bazaar) + [1001319] = "defaultTalkWithBernier_001", -- <<>> - Bernier (Eastern Thanalan: The Golden Bazaar) + [1001320] = "defaultTalkWithJajaba_001", -- <<>> - Jajaba (Eastern Thanalan: The Golden Bazaar) + [1001321] = "defaultTalkWithJujuya_001", -- <<>> - Jujuya (Eastern Thanalan: The Golden Bazaar) + [1001322] = "defaultTalkWithKikinori_001", -- <<>> - Kikinori (Western Thanalan: The Silver Bazaar) + [1001323] = "defaultTalkWithCelie_001", -- <<>> - Celie (Western Thanalan: The Silver Bazaar) + [1001324] = "defaultTalkWithAgzurungzu_001", -- <<>> - Agzu Rungzu (Western Thanalan: The Silver Bazaar) + [1001325] = "defaultTalkWithDarimbeh_001", -- <<>> - D'arimbeh (Western Thanalan: The Silver Bazaar) + [1001326] = "defaultTalkWithIudprost_001", -- <<>> - Iudprost (Western Thanalan: The Silver Bazaar) + [1001327] = "defaultTalkWithTatafu_001", -- <<>> - Tatafu (Western Thanalan: The Silver Bazaar) + [1001328] = "defaultTalkWithAthalwolf_001", -- <<>> - Athalwolf (Western Thanalan: The Silver Bazaar) + [1001329] = "defaultTalkWithPadakusondaku_001", -- <<>> - Padaku Sondaku (Western Thanalan: The Silver Bazaar) + [1001330] = "defaultTalkWithBellinda_001", -- <<>> - Bellinda (Eastern Thanalan, Little Ala Mhigo) + [1001331] = "defaultTalkWithRonthfohc_001", -- <<>> - Ronthfohc (Eastern Thanalan, Little Ala Mhigo) + [1001332] = "defaultTalkWithBerahthraben_001", -- <<>> - Berahthraben (Eastern Thanalan, Little Ala Mhigo) + [1001333] = "defaultTalkWithOtho_001", -- <<>> - Otho (Eastern Thanalan, Little Ala Mhigo) + [1001334] = "defaultTalkWithRadulf_001", -- <<>> - Radulf (Eastern Thanalan, Little Ala Mhigo: 1131.75, 251.29, 206.339996) + [1001335] = "defaultTalkWithHonmeme_001", -- <<>> - Honmeme (Eastern Thanalan, Little Ala Mhigo) + [1001336] = "defaultTalkWithCatriona_001", -- <<>> - Catriona (Eastern Thanalan, Little Ala Mhigo) + [1001337] = "defaultTalkWithGrifiud_001", -- <<>> - Grifiud (Eastern Thanalan, Little Ala Mhigo) + [1001392] = "defaultTalkWithNomomo_001", -- <<>> - Nomomo (Camp Black Brush: X:24.274 Y:200.003 Z:-473.548 rough estimate) - If arg1=true, says different dialog. [1001415] = "defaultTalkWithAnthoinette_001", -- Anthoinette [1001416] = "defaultTalkWithWisemoon_001", -- Wise Moon [1001417] = "defaultTalkWithApachonaccho_001", -- Apacho Naccho @@ -116,6 +157,7 @@ local defaultTalkWil = { [1001422] = "defaultTalkWithMilgogo_001", -- Milgogo [1001423] = "defaultTalkWithMumutano_001", -- Mumutano [1001424] = "defaultTalkWithGegeissa_001", -- Gegeissa + [1001425] = "defaultTalkWithGdatnan_001", -- G'datnan [1001426] = "defaultTalkWithHehena_001", -- Hehena [1001427] = "defaultTalkWithGuillaunaux_001", -- Guillaunaux [1001428] = "defaultTalkWithYuyuhase_001", -- Yuyuhase @@ -128,6 +170,11 @@ local defaultTalkWil = { [1001443] = "defaultTalkWithJudithe_001", -- Judithe [1001444] = "defaultTalkWithRobyn_001", -- Robyn [1001445] = "defaultTalkWithSingleton_001", -- Singleton + [1001446] = "defaultTalkWithFiachre_001", -- <<>> - Fiachre (Western Thanalan Ferry Docks) + [1001447] = "defaultTalkWithTaylor_001", -- <<>> - Taylor (Western Thanalan Ferry Docks: -2195.070068, 14.495, -417.200012) + [1001448] = "defaultTalkWithWalhbert_001", -- <<>> - Walhbert (Western Thanalan Ferry Docks) + [1001449] = "defaultTalkWithSpiralingpath_001", -- <<>> - Spiraling Path (Western Thanalan Ferry Docks) + [1001450] = "defaultTalkWithSasapiku_001", -- <<>> - Sasapiku (Western Thanalan Ferry Docks) [1001451] = "defaultTalkWithDoll001_001", -- Mammet (Eshtaime's Lapidaries [GSM]) [1001452] = "defaultTalkWithDoll002_001", -- Mammet (Eshtaime's Lapidaries [GSM] #2) [1001453] = "defaultTalkWithDoll003_001", -- Mammet (Sunsilk Tapestries [WVR]) @@ -144,29 +191,81 @@ local defaultTalkWil = { [1001476] = "defaultTalkWithCrhabye_001", -- C'rhabye [1001471] = "downTownTalk", -- Kokobi [1001472] = "defaultTalkWithMimishu_001", -- Mimishu + [1001503] = "defaultTalkWithGerland_001", -- <<>> - Gerland (Western Thanalan Ferry Docks) [1001565] = "defaultTalkWithEleanor_001", -- Eleanor + [1001596] = "defaultTalkWithAbelard_001", -- <<>> - Abelard (Western Thanalan: The Coffer & Coffin: -1726, 56.625, -317 + [1001597] = "defaultTalkWithHaipoeipo_001", -- <<>> - Haipo Eipo (Western Thanalan: The Coffer & Coffin) + [1001598] = "defaultTalkWithBartholomew_001", -- <<>> - Bartholomew (Western Thanalan: The Coffer & Coffin) + [1001599] = "defaultTalkWithKokofubu_001", -- <<>> - Kokofubu (Eastern Thanalan: Mythril Pit T-8) + [1001600] = "defaultTalkWithBertouaint_001", -- <<>> - Bertouaint (Eastern Thanalan: Mythril Pit T-8) + [1001601] = "defaultTalkWithAldebrand_001", -- <<>> - Aldebrand (Eastern Thanalan: Mythril Pit T-8) + [1001602] = "defaultTalkWithPyhajawantal_001", -- <<>> - Pyha Jawantal (Eastern Thanalan: Mythril Pit T-8) + [1001624] = "talkIdayCap", -- <<>> - Flame Lieutenant Somber Meadow (Foundation Day 2011 Dialog) - OLD EVENT NPC: Replaced by 2012 version + [1001625] = "talkIday1", -- <<>> - Flame Sergeant Mimio Mio (Foundation Day 2011 Dialog) - OLD EVENT NPC: Replaced by 2012 version + [1001626] = "talkIday2", -- <<>> - Flame Private Sisimuza Tetemuza (Foundation Day 2011 Dialog) - OLD EVENT NPC: Replaced by 2012 version + [1001630] = "defaultTalkWithChocobo_001", -- <<>> - Chocobo (Western Thanalan: The Coffer & Coffin) - Stands beside Haipo Eipo + [1001685] = "defaultTalkWithAdalbert_001", -- <<>> - Flame Sergeant Cotter (Ul'dah: Merchant Strip: -0.92 196.100 126.32) - Double check caps. + [1001699] = "defaultTalkWithJandonaut_001", -- <<>> - Flame Sergeant Fouillel (Southern Thanalan: Camp Broken Water: 1704 296.001 999) [1001712] = "defaultTalkWithGuillestet_001", -- Guillestet [1001713] = "defaultTalkWithHCidjaa_001", -- H'cidjaa + [1001714] = "defaultTalkWithAutgar_001", -- <<>> - Autgar (Ul'dah: Airship Landing) + [1001715] = "defaultTalkWithAhldbyrt_001", -- <<>> - Ahldbyrt (Ul'dah: Airship Landing) + [1001716] = "defaultTalkWithNeymiFunomi_001", -- <<>> - Neymi Funomi (Ul'dah: Airship Landing) [1001717] = "defaultTalkWithGoodife_001", -- Goodife [1001726] = "defaultTalkWithAistan_001", -- Aistan + [1001727] = "defaultTalkWithMateria_001", -- <<>> - Mutamix Bubblypots (Central Thanalan: 243.858002, 247.8, -1030.136963) - Check feet clipping @ pos + [1001728] = "defaultTalkWithSWYNBROES_001", -- <<>> - Swynbroes (Central Thanalan: 242.641006, 247.6, -1024.494019) + [1001729] = "defaultTalkWithKokosamu_001", -- <<>> - Kokosamu (Central Thanalan: 255.651001, 248.5, -1030.152954) - Check feet clipping @ pos + [1001730] = "defaultTalkWithF_HOBHAS_001", -- <<>> - F'hobhas (Central Thanalan: 258.665009, 248, -1021.666992) + [1001753] = "defaultTalkWithPelhiEpocan_001", -- <<>> - Pelhi Epocan (Ul'dah: Airship Landing) + [1001754] = "defaultTalkWithViolenne_001", -- <<>> - Violenne (Ul'dah: Airship Landing) [1001770] = "defaultTalkWithEara_001", -- Eara [1001771] = "defaultTalkWithLiaime_001", -- Liaime + [1001834] = "defaultTalkWithLUDOLD_001", -- <<>> - Flame Commander Ashdale - (Eastern Thanalan: 1410, 256, 187) + [1001840] = "defaultTalkWithPAHJAZHWAN_001", -- <<>> - Pahja Zhwan - (Ul'dah: Miner's Guild: -113.190002 194.2 324.25) - Double check caps. + [1001894] = "defaultTalkWithDonner_001", -- <<>> - Flame Private Greave - (North Thanalan: Bluefog) + [1001911] = "defaultTalkWithLolomaya_001", -- <<>> - Lolomaya - (North Thanalan: Camp Bluefog) Has unused argument. Dialog doesn't match wiki, but dftwil doesn't call it anywhere. Update change perhaps. + [1001925] = "defaultTalkWithHortwann_001", -- <<>> - Flame Private Hanskalsyn - (North Thanalan: Camp Bluefog) [1001932] = "defaultTalkWithSIBOLD_001", -- Sibold [1001953] = "defaultTalkWithBerndan_001", -- Berndan - [1002047] = "defaultTalkWithInn_Desk_2", -- Kopuru Fupuru - Inn NPC. + [1002047] = "defaultTalkWithInn_Desk_2", -- Kopuru Fupuru - Inn NPC. - defaultTalkWithKopuruFupuru_001 (pre-Inn unlock?) [1002101] = "defaultTalkWithDuraltharal_001", -- Dural Tharal + [1002116] = "defaultTalkWithHAVAK_ALVAK_001", -- <<>> - Havak Alvak (Ul'dah: Milvaneth Sacrarium) + [1060028] = "defaultTalkWithCURIOUS_001", -- <<>> - Curious Gorge (Western Thanalan: -1116.040039, 53.2, 285.48999)? - defaultTalkWithCURIOUS_002 + [1060029] = "defaultTalkWithSarra_001", -- <<>> - Sarra (Location unknown) defaultTalkWithSarra_002 / 003 + [1060032] = "defaultTalkWithWidargeli_001", -- <<>> - Widargelt (Eastern Thanalan: Little Ala Mhigo: 1213.670044, 251.439, 107.290001) - defaultTalkWithWidargeli_002 + [1060033] = "defaultTalkWithErik_001", -- <<>> - Erik (Ul'dah: -32.75 192.1 45.810001) - defaultTalkWithErik_002 + [1060035] = "defaultTalkWithLalai_001", -- <<>> - Lalai (Ul'dah: Milvaneth Sacrarium: 18.16, 206, 283.670013) defaultTalkWithLalai_002 / 003 / 004 / 005 / 006 / 007 / 101 + [1060036] = "defaultTalkWithKazagg_001", -- <<>> - Kazagg Chah (Western Thalanan: -1506.540039, 10.241, -233.970001) defaultTalkWithKazagg_002 / 003 / 004 / 005 / 006 / 007 + [1060037] = "defaultTalkWithHateli_001", -- <<>> - Dozol Meloc (Western Thanalan: -1513.660034, 10.617, -235.220001) defaultTalkWithHateli_002 / 003 / 004 / 005 / 006 / 007 + [1060038] = "defaultTalkWithDaza_001", -- <<>> - 269th Order Mendicant Da Za (Western Thanalan: Somewhere in the cave around -1567, 25, -170) - defaultTalkWithDaza_002 / 003 / 004 / 005 / 006 / 007 [1060042] = "defaultTalkWithJenlyns_001", -- Jenlyns - defaultTalkWithJenlyns_002 (PLD-unlocked specific dialog?) + [1200120] = "bookTalk", -- Dusty Tomes - - Will not fire since it isn't PplStd. Identical dialog regardless. + [1500059] = "defaultTalkWithLdhakya_001", -- <<>> - L'dhakya (Western Thanalan Ferry Docks) + [1500109] = "defaultTalkWithSylviel_001", -- <<>> - Sylviel (Western Thanalan Ferry Docks) + [1500110] = "defaultTalkWithSamigamduhla_001", -- <<>> - Sami Gamduhla (Western Thanalan Ferry Docks) [1500126] = "tribeTalk", -- Vavaki [1500129] = "defaultTalkWithYayatoki_001", -- Yayatoki - [1700039] = "defaultTalkWithBATERICH_100" -- Baterich - ---[[ Fix Later - [1002110] = "processEventSOMBER", arg1, -- Flame Lieutenant Somber Meadow - uses Spl000 staticactor not dftWil - [1002111] = "processEventMIMIO", -- Flame Sergeant Mimio Mio - uses Spl000 staticactor not dftWil - [1002112] = "processEventSISIMUZA", -- Flame Private Sisimuza Tetemuza - uses Spl000 staticactor not dftWil ---]] + [1700039] = "defaultTalkWithBATERICH_100", -- Baterich + + [1000001] = "defaultTalkWithHamletGuardUld_001" -- TEST TEST TEST -} + --[1090549] = "defaultTalkWithInn_ExitDoor" -- Ul'dah Inn Exit Door pushEvent - "Leave your room?" + --[1200336] = "defaultTalkWithInn_ExitDoor" -- Ul'dah Inn Exit Door talkEvent - "Leave your room?" + +--[[ Need sourcing + [???] = "defaultTalkCaravanChocoboUld_001" -- Presumably used on the Caravan Chocobo escorts? Does a little animation. + [???] = "defaultTalkWithExit01" -- "Leave this place?" - For quest locations like that four-bedroom room perhaps? + [???] = "defaultTalkWithMarketNpc" -- NPC in the middle of the market wards that lets you port around I'm guessing? + [???] = "defaultTalkWithHamletGuardUld_001" -- +--]] + + -- [1002110] = "processEventSOMBER", arg1, -- Flame Lieutenant Somber Meadow (Foundation Day 2012 Dialog) Spl000 staticactor + -- [1002111] = "processEventMIMIO" -- Flame Sergeant Mimio Mio (Foundation Day 2012 Dialog) Spl000 staticactor + -- [1002112] = "processEventSISIMUZA" -- Flame Private Sisimuza Tetemuza (Foundation Day 2012 Dialog) Spl000 staticactor + + + } @@ -174,28 +273,35 @@ local defaultTalkWil = { function onTalk(player, quest, npc, eventName) local npcId = npc:GetActorClassId(); - local clientFunc = defaultTalkWil[npcId]; + local clientFunc = defaultTalkWil[npcId]; if (npcId == 1002047) then -- Kopuru Fupuru - Inn NPC - local choice = callClientFunction(player, "delegateEvent", player, quest, clientFunc); - - if (choice == 1) then - GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0); - elseif (choice == 2) then - if (player:GetHomePointInn() ~= 3) then - player:SetHomePointInn(3); - player:SendGameMessage(GetWorldMaster(), 60019, 0x20, 3071); --Secondary homepoint set to the Hourglass - else - player:SendGameMessage(GetWorldMaster(), 51140, 0x20); --This inn is already your Secondary Homepoint - end - end + defaultTalkWithInn(player, quest, clientFunc); else callClientFunction(player, "delegateEvent", player, quest, clientFunc); end - player:EndEvent(); + player:EndEvent(); end function IsQuestENPC(player, quest, npc) - return defaultTalkWil[npc:GetActorClassId()] ~= nil; + return defaultTalkWil[npc:GetActorClassId()] ~= nil; +end + + + + +function defaultTalkWithInn(player, quest, clientFunc) + local choice = callClientFunction(player, "delegateEvent", player, quest, clientFunc); + + if (choice == 1) then + GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0); + elseif (choice == 2) then + if (player:GetHomePointInn() ~= 3) then + player:SetHomePointInn(3); + player:SendGameMessage(GetWorldMaster(), 60019, 0x20, 3071); --Secondary homepoint set to the Hourglass + else + player:SendGameMessage(GetWorldMaster(), 51140, 0x20); --This inn is already your Secondary Homepoint + end + end end \ No newline at end of file diff --git a/Data/scripts/shop.lua b/Data/scripts/shop.lua new file mode 100644 index 00000000..d0df39b8 --- /dev/null +++ b/Data/scripts/shop.lua @@ -0,0 +1,55 @@ +--[[ + +Shop Buy/Sell Functions + +--]] + +function purchaseItem(player, location, itemId, quantity, quality, price, currency) + + local worldMaster = GetWorldMaster(); + local invCheck = -1; + + if (player:GetItemPackage(INVENTORY_CURRENCY):HasItem(currency, price)) then + invCheck = player:GetItemPackage(location):AddItem(itemId, quantity, quality); + + if (invCheck == INV_ERROR_FULL) then + -- Your inventory is full. + player:SendGameMessage(player, worldMaster, 60022, MESSAGE_TYPE_SYSTEM); + elseif (invCheck == INV_ERROR_ALREADY_HAS_UNIQUE) then + -- You cannot have more than one in your possession at any given time. + player:SendGameMessage(player, worldMaster, 40279, MESSAGE_TYPE_SYSTEM, itemId, quality); + elseif (invCheck == INV_ERROR_SYSTEM_ERROR) then + player:SendMessage(0x20, "", "[DEBUG] Server Error on adding item."); + elseif (invCheck == INV_ERROR_SUCCESS) then + player:GetItemPackage(INVENTORY_CURRENCY):removeItem(currency, price); + + if (currency == 1000001) then -- If Gil + -- You purchase for gil. + player:SendGameMessage(player, worldMaster, 25061, MESSAGE_TYPE_SYSTEM, itemId, quality, quantity, price); + + elseif (currency == 1000201 or currency == 1000202 or currency == 1000203) then -- If Grand Company seal + -- You exchange for . + player:SendGameMessage(player, worldMaster, 25275, MESSAGE_TYPE_SYSTEM, itemId, quality, quantity, price, player.gcCurrent); + + elseif (currency >= 1000101 and currency <= 1000123) then -- If Guild mark + -- You trade for . + player:SendGameMessage(player, GetWorldMaster(), 25071, MESSAGE_TYPE_SYSTEM, currency, 1, itemId, 1, price, quantity); + end + end + else + -- You do not have enough gil. (Should never see this) + player:SendGameMessage(player, worldMaster, 25065, MESSAGE_TYPE_SYSTEM); + end + return +end + + +function sellItem(player, itemId, quantity, quality, itemPrice, slot, currency) + local worldMaster = GetWorldMaster(); + local cost = quantity * itemPrice; + + player:GetItemPackage(INVENTORY_CURRENCY):AddItem(currency, cost); + player:GetItemPackage(INVENTORY_NORMAL):RemoveItemAtSlot(slot, quantity); + -- You sell for gil. + player:SendGameMessage(player, worldMaster, 25075, MESSAGE_TYPE_SYSTEM, itemId, quality, quantity, cost); +end \ No newline at end of file diff --git a/Map Server/Actors/Chara/Player/Player.cs b/Map Server/Actors/Chara/Player/Player.cs index 53867d3e..caf49ba0 100644 --- a/Map Server/Actors/Chara/Player/Player.cs +++ b/Map Server/Actors/Chara/Player/Player.cs @@ -920,6 +920,14 @@ namespace Meteor.Map.Actors QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1)); } + public void ChangeMusic(ushort musicId, ushort musicTrackMode) + { + QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, musicTrackMode)); + } + + + + public void SendMountAppearance() { if (mountState == 1) From 68a2685cf1034737f2b6033239a00a42c487fe0f Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Sun, 6 Feb 2022 12:36:15 -0500 Subject: [PATCH 3/6] Man0u0 wip progress. --- .../chara/npc/object/OpeningStoperW0B1.lua | 18 ++ Data/scripts/quests/man/man0u0.lua | 273 +++++++++++++++++- Map Server/Actors/Chara/Player/Player.cs | 2 +- 3 files changed, 285 insertions(+), 8 deletions(-) create mode 100644 Data/scripts/base/chara/npc/object/OpeningStoperW0B1.lua diff --git a/Data/scripts/base/chara/npc/object/OpeningStoperW0B1.lua b/Data/scripts/base/chara/npc/object/OpeningStoperW0B1.lua new file mode 100644 index 00000000..d654d212 --- /dev/null +++ b/Data/scripts/base/chara/npc/object/OpeningStoperW0B1.lua @@ -0,0 +1,18 @@ +require("global"); + +function init(npc) + return false, false, 0, 0; +end + +function onEventStarted(player, npc, eventType, eventName) + + if (eventType == ETYPE_PUSH) then + if (eventName == "caution") then + worldMaster = GetWorldMaster(); + player:SendGameMessage(player, worldMaster, 34109, 0x20); + elseif (eventName == "exit") then + GetWorldManager():DoPlayerMoveInZone(player, 5.36433, 196, 133.656, -2.84938); + end + end + player:EndEvent(); +end \ No newline at end of file diff --git a/Data/scripts/quests/man/man0u0.lua b/Data/scripts/quests/man/man0u0.lua index db6829d3..624e7191 100644 --- a/Data/scripts/quests/man/man0u0.lua +++ b/Data/scripts/quests/man/man0u0.lua @@ -1,8 +1,267 @@ ---Quest Flags -MAN0U0_FLAG_TUTORIAL1_DONE = 0; -MAN0U0_FLAG_TUTORIAL2_DONE = 1; -MAN0U0_FLAG_TUTORIAL3_DONE = 2; +require("global"); -MAN0U0_FLAG_MINITUT_DONE1 = 4; -MAN0U0_FLAG_MINITUT_DONE2 = 8; -MAN0U0_FLAG_MINITUT_DONE3 = 16; +--[[ + +Quest Script + +Name: Flowers for All +Code: Man0u0 +Id: 110009 +Prereq: None (Given on chara creation) + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- On the Merchant Strip in Ul'dah; contains the basic tutorial. +SEQ_005 = 5; -- Combat on the Sapphire Avenue Exchange +SEQ_010 = 10; -- Back on the Merchant Strip in Ul'dah + +-- Actor Class Ids +ASCILIA = 1000042; +WARBURTON = 1000186; +RURURAJI = 1000840; +BIG_BELLIED_BARKER = 1001490; +FRETFUL_FARMHAND = 1001491; +DEBAUCHED_DEMONESS = 1001492; +DAPPER_DAN = 1001493; +LOUTISH_LAD = 1001494; +GIL_DIGGING_MISTRESS = 1001495; +TWITTERING_TOMBOY = 1001496; +STOCKY_STRANGER = 1001644; +EXIT_TRIGGER = 1090372; +OPENING_STOPER_ULDAH = 1090373; + +--1001114-1001140: Untargetable standby actors: Add the correct ones at some point for bookkeeping + + + +-- Quest Markers +MKRK_YAYATOKI = 11000901; +MKRK_ASCILIA = 11000902; +MKRK_FRETFUL_FARMHAND = 11000903; +MKRK_GIL_DIGGING_MISTRESS = 11000904; +MKRK_UNKNOWN1 = 11000905; +MKRK_UNKNOWN2 = 11000906; + + +-- Quest Flags +FLAG_SEQ000_MINITUT0 = 0; +FLAG_SEQ000_MINITUT1 = 1; +FLAG_SEQ000_MINITUT2 = 2; +FLAG_SEQ000_MINITUT3 = 3; + + +--[[ FUNCTION LIST +processEvent000(A0_1, A1_2, A2_3) +processEvent000_2(A0_4, A1_5, A2_6) +processEvent000_3(A0_7, A1_8, A2_9) +processEvent000_4(A0_10, A1_11, A2_12) +processEvent000_5(A0_13, A1_14, A2_15) +processEvent000_6(A0_16, A1_17, A2_18) +processEvent000_6_2(A0_19, A1_20, A2_21) +processEvent000_7(A0_22, A1_23, A2_24) +processEvent000_8(A0_25, A1_26, A2_27) +processEvent000_9(A0_28, A1_29, A2_30) +processEvent000_10(A0_31, A1_32, A2_33) +processEvent000_11(A0_34, A1_35, A2_36) +processEvent000_12(A0_37, A1_38, A2_39) +processEvent000_13(A0_40, A1_41, A2_42) +processEvent000_14(A0_43, A1_44, A2_45) +processEvent010(A0_46, A1_47, A2_48) +processEvent020(A0_49, A1_50, A2_51) +processEvent020_2(A0_58, A1_59, A2_60) +processEvent020_3(A0_61, A1_62, A2_63) +processEvent020_4(A0_64, A1_65, A2_66) +processEvent020_5(A0_67, A1_68, A2_69) +processEvent020_6(A0_70, A1_71, A2_72) +processEvent020_7(A0_73, A1_74, A2_75) +processEvent020_8(A0_76, A1_77, A2_78) +processTtrNomal001withHQ(A0_79, A1_80, A2_81) +processTtrNomal001(A0_91, A1_92, A2_93) + processTtrNomal002(A0_103, A1_104, A2_105, A3_106) + processTtrNomal003(A0_113, A1_114, A2_115, A3_116) +processTtrAfterBtl001(A0_123, A1_124, A2_125) +processTtrMini001(A0_135, A1_136, A2_137) +processTtrMini002(A0_138, A1_139, A2_140) +processTtrMini002_first(A0_141, A1_142, A2_143) +processTtrMini003(A0_144, A1_145, A2_146) +processTtrMini003_first(A0_147, A1_148, A2_149) +processTtrBlkNml001(A0_150, A1_151, A2_152) + processTtrBtl001(A0_153, A1_154, A2_155, A3_156) + processTtrBtlMagic001(A0_163, A1_164, A2_165, A3_166) + processTtrBtl002(A0_179, A1_180, A2_181, A3_182) +processTtrBtl003(A0_202, A1_203, A2_204) +processTtrBtl004(A0_214, A1_215, A2_216) +processTtrBlkNml002(A0_217, A1_218, A2_219) +processTtrBlkNml003(A0_226, A1_227, A2_228) +processEtc001(A0_235, A1_236, A2_237) +processEtc002(A0_238, A1_239, A2_240) +processEtc003(A0_241, A1_242, A2_243) +processInformDialogAsQuest(A0_244, A1_245, A2_246) + +--]] + + + +function onStart(player, quest) + quest:StartSequence(SEQ_000); +end + +function onFinish(player, quest) +end + +function onSequence(player, quest, sequence) + quest:ClearENpcs(); + quest:ClearData(); + + if (sequence == SEQ_000) then + -- Setup states incase we loaded in. + local asciliaCanPush = not quest:GetFlag(FLAG_SEQ000_MINITUT0); + local asciliaFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE; + local fretfulfarmhandFlag = quest:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE; + local gildiggingmistressFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE; + + local exitCanPush = quest:GetFlags() == 0xF; + local exitFlag = quest:GetFlags() == 0xF and QFLAG_PLATE or QFLAG_NONE; + + --AddENpc(classId, byte flagType=0,isTalkEnabled, isEmoteEnabled , isPushEnabled , isSpawned) + quest:AddENpc(ASCILIA, asciliaFlag, true, false, asciliaCanPush); + quest:AddENpc(WARBURTON); + quest:AddENpc(RURURAJI); + quest:AddENpc(BIG_BELLIED_BARKER); + quest:AddENpc(FRETFUL_FARMHAND, fretfulfarmhandFlag); + quest:AddENpc(DEBAUCHED_DEMONESS); + quest:AddENpc(DAPPER_DAN); + quest:AddENpc(LOUTISH_LAD); + quest:AddENpc(GIL_DIGGING_MISTRESS, gildiggingmistressFlag); + quest:AddENpc(TWITTERING_TOMBOY); + quest:AddENpc(STOCKY_STRANGER); + quest:AddENpc(EXIT_TRIGGER, exitFlag, false, false, exitCanPush); + quest:AddENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true); + + elseif (sequence == SEQ_005) then + elseif (sequence == SEQ_010) then + + end +end + +function onTalk(player, quest, npc) + local sequence = quest:getSequence(); + local classId = npc:GetActorClassId(); + + if (sequence == SEQ_000) then + seq000_onTalk(player, quest, npc, classId); + elseif (sequence == SEQ_010) then + seq010_onTalk(player, quest, npc, classId); + end +end + +function onPush(player, quest, npc) + local sequence = quest:getSequence(); + local classId = npc:GetActorClassId(); + + if (sequence == SEQ_000) then + if (classId == ASCILIA) then + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002"); + player:EndEvent(); + elseif (classId == OPENING_STOPER_ULDAH) then + + end + + + elseif (sequence == SEQ_010) then + end +end + +function onNotice(player, quest, target) + + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ"); + + + player:EndEvent(); +end + +function seq000_onTalk(player, quest, npc, classId) + + if (classId == ASCILIA) then + -- Handle the talk tutorial after the push one. + if (not quest:GetFlag(FLAG_SEQ000_MINITUT0)) then + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003"); + quest:SetFlag(FLAG_SEQ000_MINITUT0); + + quest:UpdateENpc(ASCILIA, ENPC_PROP_CAN_PUSH, false); + quest:UpdateENpc(ASCILIA, ENPC_PROP_QFLAG, QFLAG_PLATE); + quest:UpdateENpc(FRETFUL_FARMHAND, ENPC_PROP_QFLAG, QFLAG_PLATE); + quest:UpdateENpc(GIL_DIGGING_MISTRESS, ENPC_PROP_QFLAG, QFLAG_PLATE); + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001"); + if (not quest:GetFlag(FLAG_SEQ000_MINITUT1)) then + quest:UpdateENpc(ASCILIA, ENPC_PROP_QFLAG, QFLAG_NONE); + quest:SetFlag(FLAG_SEQ000_MINITUT1); + end + end + + + elseif (classId == WARBURTON) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3"); + + elseif (classId == RURURAJI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_13"); + + elseif (classId == BIG_BELLIED_BARKER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6"); + + elseif (classId == FRETFUL_FARMHAND) then + if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002_first"); + quest:UpdateENpc(FRETFUL_FARMHAND, ENPC_PROP_QFLAG, QFLAG_NONE); + quest:SetFlag(FLAG_SEQ000_MINITUT2); + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002"); + end + + elseif (classId == DEBAUCHED_DEMONESS) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8"); + + elseif (classId == DAPPER_DAN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_9"); + elseif (classId == LOUTISH_LAD) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_10"); + + elseif (classId == GIL_DIGGING_MISTRESS) then + if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003_first"); + quest:UpdateENpc(GIL_DIGGING_MISTRESS, ENPC_PROP_QFLAG, QFLAG_NONE); + quest:SetFlag(FLAG_SEQ000_MINITUT3); + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003"); + end + + elseif (classId == TWITTERING_TOMBOY) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_12"); + elseif (classId == STOCKY_STRANGER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6_2"); -- TODO: Likely 6, 6_2 looks like a Stoper dialog + end + + if (quest:GetFlags() == 0xF) then + quest:UpdateENpc(EXIT_TRIGGER, ENPC_PROP_CAN_PUSH, true); + quest:UpdateENpc(EXIT_TRIGGER, ENPC_PROP_QFLAG, QFLAG_MAP); + end + + player:EndEvent(); +end + +function seq010_onTalk(player, quest, npc, classId) + + player:EndEvent(); +end + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return MKRK_ASCILIA, MKRK_FRETFUL_FARMHAND; + elseif (sequence == SEQ_010) then + --return + end +end \ No newline at end of file diff --git a/Map Server/Actors/Chara/Player/Player.cs b/Map Server/Actors/Chara/Player/Player.cs index 14298e1e..7f7b45cc 100644 --- a/Map Server/Actors/Chara/Player/Player.cs +++ b/Map Server/Actors/Chara/Player/Player.cs @@ -917,7 +917,7 @@ namespace Meteor.Map.Actors public void ChangeMusic(ushort musicId, ushort musicTrackMode) { - QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, musicTrackMode)); + QueuePacket(SetMusicPacket.BuildPacket(Id, musicId, musicTrackMode)); } From 96cb8070be7f3be9bd0e2d9653ba7c716cb92e84 Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Tue, 8 Feb 2022 17:35:29 -0500 Subject: [PATCH 4/6] Man0u0 & Man0u1 work progress. Man0u0 nearly finished. Needs some misc. background actors Id'd and placed, and some additional bug-testing. Man0u1 still very early. Initial area's actors mostly scripted. --- .../chara/npc/mapobj/MapObjOnlyShowHide.lua | 3 + .../npc/populace/PopulaceChocoboLender.lua | 107 ++++--- .../npc/populace/PopulaceCompanyWarp.lua | 5 +- .../chara/npc/populace/PopulaceStandard.lua | 4 +- Data/scripts/commands/gm/spawn.lua | 31 +- .../directors/Quest/QuestDirectorMan0u001.lua | 33 +- Data/scripts/player.lua | 15 +- Data/scripts/quests/man/man0u0.lua | 294 ++++++++++-------- Data/scripts/quests/man/man0u1.lua | 233 ++++++++++++++ .../MapObjOnlyShowHide/Man0u0_trtl_gate.lua | 3 + Map Server/Actors/Chara/Player/Player.cs | 1 + 11 files changed, 512 insertions(+), 217 deletions(-) create mode 100644 Data/scripts/base/chara/npc/mapobj/MapObjOnlyShowHide.lua create mode 100644 Data/scripts/quests/man/man0u1.lua create mode 100644 Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua diff --git a/Data/scripts/base/chara/npc/mapobj/MapObjOnlyShowHide.lua b/Data/scripts/base/chara/npc/mapobj/MapObjOnlyShowHide.lua new file mode 100644 index 00000000..fc7add02 --- /dev/null +++ b/Data/scripts/base/chara/npc/mapobj/MapObjOnlyShowHide.lua @@ -0,0 +1,3 @@ +function init(npc) + return false, false, 0, 0, 0, 0; +end \ No newline at end of file diff --git a/Data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/Data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 0c32d5fa..7ffc7e8a 100644 --- a/Data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/Data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -48,8 +48,9 @@ function init(npc) end function onEventStarted(player, npc, triggerName) + local classId = npc:GetActorClassId(); local curLevel = 20; -- TODO: pull from character - local hasIssuance = player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(gcIssuances[npc:GetActorClassId()]); + local hasIssuance = player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(gcIssuances[classId]); local hasChocobo = player.hasChocobo; if (hasChocobo == false) then -- Let GMs auto have the issuance for debugging @@ -57,50 +58,64 @@ function onEventStarted(player, npc, triggerName) end local hasFunds = (player:GetCurrentGil() >= rentalPrice); - - callClientFunction(player, "eventTalkWelcome", player); - - local menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, hasChocobo, hasChocobo, 0); - - if (menuChoice == 1) then -- Issuance option - - callClientFunction(player, "eventTalkMyChocobo", player); - local nameResponse = callClientFunction(player, "eventSetChocoboName", true); - - if (nameResponse == "") then -- Cancel Chocobo naming - callClientFunction(player, "eventCancelChocoboName", player); - callClientFunction(player, "eventTalkStepBreak", player); - player:EndEvent(); - return; - else - local appearance = startAppearances[npc:GetActorClassId()]; - player:IssueChocobo(appearance, nameResponse); - - callClientFunction(player, "eventAfterChocoboName", player); - - --Add Chocobo License and remove issuance - if (player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(2001007) == false) then - player:GetItemPackage(INVENTORY_KEYITEMS):AddItem(2001007); - end - player:GetItemPackage(INVENTORY_KEYITEMS):RemoveItem(gcIssuances[npc:GetActorClassId()], 1); - - --Warp with the special chocobo warp mode. - mountChocobo(player); - GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()][1], nil, 0, SPAWN_CHOCOBO_GET, cityExits[npc:GetActorClassId()][2], cityExits[npc:GetActorClassId()][3], cityExits[npc:GetActorClassId()][4], cityExits[npc:GetActorClassId()][5]); - end - - elseif(menuChoice == 2) then -- Summon Bird - mountChocobo(player); - GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()][1], nil, 0, SPAWN_NO_ANIM, cityExits[npc:GetActorClassId()][2], cityExits[npc:GetActorClassId()][3], cityExits[npc:GetActorClassId()][4], cityExits[npc:GetActorClassId()][5]); - elseif(menuChoice == 3) then -- Change Barding - callClientFunction(player, "eventTalkStepBreak", player); - elseif(menuChoice == 5) then -- Rent Bird - mountChocobo(player, true, 1); - GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()][1], nil, 0, SPAWN_CHOCOBO_RENTAL, cityExits[npc:GetActorClassId()][2], cityExits[npc:GetActorClassId()][3], cityExits[npc:GetActorClassId()][4], cityExits[npc:GetActorClassId()][5]); - else - callClientFunction(player, "eventTalkStepBreak", player); - end - + + + + if ((classId == 1000840) and (player:HasQuest(110009))) then -- Cross-script Man0u0 dialog + local sequence = player:GetQuest(110009):getSequence(); + + if (sequence == 0) then + callClientFunction(player, "delegateEvent", player, GetStaticActor("Man0u0"), "processEvent000_13"); + elseif (sequence == 10) then + callClientFunction(player, "delegateEvent", player, GetStaticActor("Man0u0"), "processEvent020_7"); + else + player:EndEvent(); + end + else + callClientFunction(player, "eventTalkWelcome", player); + + local menuChoice = callClientFunction(player, "eventAskMainMenu", player, curLevel, hasFunds, hasIssuance, hasChocobo, hasChocobo, 0); + + if (menuChoice == 1) then -- Issuance option + + callClientFunction(player, "eventTalkMyChocobo", player); + local nameResponse = callClientFunction(player, "eventSetChocoboName", true); + + if (nameResponse == "") then -- Cancel Chocobo naming + callClientFunction(player, "eventCancelChocoboName", player); + callClientFunction(player, "eventTalkStepBreak", player); + player:EndEvent(); + return; + else + local appearance = startAppearances[classId]; + player:IssueChocobo(appearance, nameResponse); + + callClientFunction(player, "eventAfterChocoboName", player); + + --Add Chocobo License and remove issuance + if (player:GetItemPackage(INVENTORY_KEYITEMS):HasItem(2001007) == false) then + player:GetItemPackage(INVENTORY_KEYITEMS):AddItem(2001007); + end + player:GetItemPackage(INVENTORY_KEYITEMS):RemoveItem(gcIssuances[classId], 1); + + --Warp with the special chocobo warp mode. + mountChocobo(player); + GetWorldManager():DoZoneChange(player, cityExits[classId][1], nil, 0, SPAWN_CHOCOBO_GET, cityExits[classId][2], cityExits[classId][3], cityExits[classId][4], cityExits[classId][5]); + end + + elseif(menuChoice == 2) then -- Summon Bird + mountChocobo(player); + GetWorldManager():DoZoneChange(player, cityExits[classId][1], nil, 0, SPAWN_NO_ANIM, cityExits[classId][2], cityExits[classId][3], cityExits[classId][4], cityExits[classId][5]); + elseif(menuChoice == 3) then -- Change Barding + callClientFunction(player, "eventTalkStepBreak", player); + elseif(menuChoice == 5) then -- Rent Bird + mountChocobo(player, true, 1); + GetWorldManager():DoZoneChange(player, cityExits[classId][1], nil, 0, SPAWN_CHOCOBO_RENTAL, cityExits[classId][2], cityExits[classId][3], cityExits[classId][4], cityExits[classId][5]); + else + callClientFunction(player, "eventTalkStepBreak", player); + end + end + player:EndEvent(); end @@ -114,6 +129,6 @@ function mountChocobo(player, isRental, rentalMinutes) player:SendMountAppearance(); player:SetMountState(1); - player:ChangeSpeed(0.0, 5.0, 10.0, 10.0); + player:ChangeSpeed(0.0, 3.6, 9.0, 9.0); player:ChangeState(15); end \ No newline at end of file diff --git a/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua b/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua index eb03c6f8..8b5dd6ac 100644 --- a/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua +++ b/Data/scripts/base/chara/npc/populace/PopulaceCompanyWarp.lua @@ -109,10 +109,11 @@ function onEventStarted(player, npc, triggerName) if (choice ~= 0) then - player:EndEvent(); + callClientFunction(player, "eventAfterWarpOtherZone", player); - + wait(1); + player:EndEvent(); local player_zone = player:GetPos()[5]; spawnType = 0x0A; if (player_zone == aethernet[city][choice].zone) then diff --git a/Data/scripts/base/chara/npc/populace/PopulaceStandard.lua b/Data/scripts/base/chara/npc/populace/PopulaceStandard.lua index 830bb5c1..f69ad19b 100644 --- a/Data/scripts/base/chara/npc/populace/PopulaceStandard.lua +++ b/Data/scripts/base/chara/npc/populace/PopulaceStandard.lua @@ -28,10 +28,10 @@ function onEventStarted(player, npc, eventType, eventName) local possibleQuests = {}; -- Create the switch table for this npc - if (defaultTalk ~= nil and eventType == EVENT_TALK) then + if (defaultTalk ~= nil and eventType == ETYPE_TALK) then table.insert(possibleQuests, defaultTalk); end - if (tutorialTalk ~= nil and eventType == EVENT_TALK) then + if (tutorialTalk ~= nil and eventType == ETYPE_TALK) then table.insert(possibleQuests, tutorialTalk); end if (activeQuests ~= nil) then diff --git a/Data/scripts/commands/gm/spawn.lua b/Data/scripts/commands/gm/spawn.lua index 6bf4a566..00d85b80 100644 --- a/Data/scripts/commands/gm/spawn.lua +++ b/Data/scripts/commands/gm/spawn.lua @@ -8,10 +8,10 @@ properties = { function onTrigger(player, argc, actorClassId, width, height) - if (actorClassId == nil) then - player:SendMessage(0x20, "", "No actor class id provided."); - return; - end + if (actorClassId == nil) then + player:SendMessage(0x20, "", "No actor class id provided."); + return; + end local pos = player:GetPos(); local x = pos[1]; @@ -20,36 +20,16 @@ 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 - end - end - - if (actor == nil) then - 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 = player.CurrentArea:SpawnActor(actorClassId, "test", x + (i - (w / 2) * 3), y, z + (j - (h / 2) * 3), rot); actor.SetAppearance(1001149) end end @@ -59,5 +39,4 @@ function onTrigger(player, argc, actorClassId, width, height) player:SendMessage(0x20, "", "This actor class id cannot be spawned."); end ->>>>>>> ioncannon/quest_system end; \ No newline at end of file diff --git a/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua b/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua index c5c71b7c..efd0bc0d 100644 --- a/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua +++ b/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua @@ -11,7 +11,28 @@ function init() return "/Director/Quest/QuestDirectorMan0u001"; end -function onEventStarted(player, actor, triggerName) + +function onCreateContentArea(players, director, contentArea, contentGroup) + + niellefresne = contentArea:SpawnActor(2290003, "niellefresne", -11.86, 192, 35.06, -0.8); + thancred = contentArea:SpawnActor(2290004, "thancred", -26.41, 192, 39.52, 1.2); + thancred:ChangeState(2); + + mob1 = contentArea:SpawnActor(2203301, "mob1", -6.193, 192, 47.658, -2.224); + + openingStoper = contentArea:SpawnActor(1090385, "openingstoper", -24.34, 192, 34.22, 0); + + for _, player in pairs(players) do + contentGroup:AddMember(player); + end; + + contentGroup:AddMember(director); + contentGroup:AddMember(niellefresne); + contentGroup:AddMember(thancred); + contentGroup:AddMember(mob1); +end + +function onEventStarted(player, director, triggerName) man0u0Quest = player:GetQuest("Man0u0"); startTutorialMode(player); @@ -19,7 +40,8 @@ function onEventStarted(player, actor, triggerName) player:EndEvent(); waitForSignal("playerActive"); wait(1); --If this isn't here, the scripts bugs out. TODO: Find a better alternative. - kickEventContinue(player, actor, "noticeEvent", "noticeEvent"); + kickEventContinue(player, director, "noticeEvent", "noticeEvent"); + callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrBtl002", nil, nil, nil); player:EndEvent(); wait(4); @@ -40,7 +62,7 @@ function onEventStarted(player, actor, triggerName) wait(7); player:ChangeMusic(7); player:ChangeState(0); - kickEventContinue(player, actor, "noticeEvent", "noticeEvent"); + kickEventContinue(player, director, "noticeEvent", "noticeEvent"); callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020", nil, nil, nil); --[[ @@ -56,9 +78,8 @@ function onEventStarted(player, actor, triggerName) OpenWidget (DEFEAT ENEMY) ]] - man0u0Quest:NextPhase(10); - player:EndEvent(); - + man0u0Quest:StartSequence(10); player.CurrentArea:ContentFinished(); GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 3, 15, -22.81, 196, 87.82, 2.98); + player:EndEvent(); end diff --git a/Data/scripts/player.lua b/Data/scripts/player.lua index 901dea34..bec9f61b 100644 --- a/Data/scripts/player.lua +++ b/Data/scripts/player.lua @@ -46,18 +46,17 @@ function onBeginLogin(player) player:GetQuest(110005):ClearQuestData(); player:GetQuest(110005):ClearQuestFlags(); elseif (player:HasQuest(110009) == true and player.CurrentArea.ZoneId == 184) then - --director = player.CurrentArea:CreateDirector("OpeningDirector", false); - --player:AddDirector(director); - --director:StartDirector(false); - --player:SetLoginDirector(director); - --player:KickEvent(director, "noticeEvent", true); - -- + director = player.CurrentArea:CreateDirector("OpeningDirector", false); + player:AddDirector(director); + director:StartDirector(true); + player:SetLoginDirector(director); + player:KickEvent(director, "noticeEvent", true); + player.positionX = 5.364327; player.positionY = 196.0; player.positionZ = 133.6561; player.rotation = -2.849384; - player:GetQuest(110009):ClearQuestData(); - player:GetQuest(110009):ClearQuestFlags(); + player:GetQuest(110009):ClearClearData(); end end diff --git a/Data/scripts/quests/man/man0u0.lua b/Data/scripts/quests/man/man0u0.lua index 624e7191..15bb4720 100644 --- a/Data/scripts/quests/man/man0u0.lua +++ b/Data/scripts/quests/man/man0u0.lua @@ -8,7 +8,9 @@ Name: Flowers for All Code: Man0u0 Id: 110009 Prereq: None (Given on chara creation) - +Notes: RURURAJI scripting handled via PopulaceChocoboLender.lua +TO-DO: Sequence 000 - Crowd NPCs. + Sequence 010 - Adv. Guild NPCs ]] -- Sequence Numbers @@ -31,76 +33,41 @@ STOCKY_STRANGER = 1001644; EXIT_TRIGGER = 1090372; OPENING_STOPER_ULDAH = 1090373; ---1001114-1001140: Untargetable standby actors: Add the correct ones at some point for bookkeeping + + +KEEN_EYED_MERCHANT = 1000401; +-- MUMPISH_MIQOTE = 1000992; -- Unused on this client version +HIGH_SPIRITED_FELLOW = 1001042; +DISREPUTABLE_MIDLANDER = 1001044; +LONG_LEGGED_LADY = 1001112; +LARGE_LUNGED_LABORER = 1001645; +TOOTH_GRINDING_TRAVELER = 1001646; +FULL_LIPPED_FILLE = 1001647; +YAYATOKI = 1500129; + +BLOCKER1 = 1090372; +BLOCKER2 = 1090372; +ULDAH_OPENING_EXIT = 1099046; +--1001114-1001140: Untargetable standby actors for sequence 000: Add the correct ones at some point -- Quest Markers -MKRK_YAYATOKI = 11000901; -MKRK_ASCILIA = 11000902; -MKRK_FRETFUL_FARMHAND = 11000903; -MKRK_GIL_DIGGING_MISTRESS = 11000904; -MKRK_UNKNOWN1 = 11000905; -MKRK_UNKNOWN2 = 11000906; +MRKR_YAYATOKI = 11000901; +MRKR_ASCILIA = 11000902; +MRKR_FRETFUL_FARMHAND = 11000903; +MRKR_GIL_DIGGING_MISTRESS = 11000904; +MRKR_COMBAT_TUTORIAL = 11000905; +MRKR_ADV_GUILD = 11000906; -- Quest Flags -FLAG_SEQ000_MINITUT0 = 0; -FLAG_SEQ000_MINITUT1 = 1; -FLAG_SEQ000_MINITUT2 = 2; -FLAG_SEQ000_MINITUT3 = 3; - - ---[[ FUNCTION LIST -processEvent000(A0_1, A1_2, A2_3) -processEvent000_2(A0_4, A1_5, A2_6) -processEvent000_3(A0_7, A1_8, A2_9) -processEvent000_4(A0_10, A1_11, A2_12) -processEvent000_5(A0_13, A1_14, A2_15) -processEvent000_6(A0_16, A1_17, A2_18) -processEvent000_6_2(A0_19, A1_20, A2_21) -processEvent000_7(A0_22, A1_23, A2_24) -processEvent000_8(A0_25, A1_26, A2_27) -processEvent000_9(A0_28, A1_29, A2_30) -processEvent000_10(A0_31, A1_32, A2_33) -processEvent000_11(A0_34, A1_35, A2_36) -processEvent000_12(A0_37, A1_38, A2_39) -processEvent000_13(A0_40, A1_41, A2_42) -processEvent000_14(A0_43, A1_44, A2_45) -processEvent010(A0_46, A1_47, A2_48) -processEvent020(A0_49, A1_50, A2_51) -processEvent020_2(A0_58, A1_59, A2_60) -processEvent020_3(A0_61, A1_62, A2_63) -processEvent020_4(A0_64, A1_65, A2_66) -processEvent020_5(A0_67, A1_68, A2_69) -processEvent020_6(A0_70, A1_71, A2_72) -processEvent020_7(A0_73, A1_74, A2_75) -processEvent020_8(A0_76, A1_77, A2_78) -processTtrNomal001withHQ(A0_79, A1_80, A2_81) -processTtrNomal001(A0_91, A1_92, A2_93) - processTtrNomal002(A0_103, A1_104, A2_105, A3_106) - processTtrNomal003(A0_113, A1_114, A2_115, A3_116) -processTtrAfterBtl001(A0_123, A1_124, A2_125) -processTtrMini001(A0_135, A1_136, A2_137) -processTtrMini002(A0_138, A1_139, A2_140) -processTtrMini002_first(A0_141, A1_142, A2_143) -processTtrMini003(A0_144, A1_145, A2_146) -processTtrMini003_first(A0_147, A1_148, A2_149) -processTtrBlkNml001(A0_150, A1_151, A2_152) - processTtrBtl001(A0_153, A1_154, A2_155, A3_156) - processTtrBtlMagic001(A0_163, A1_164, A2_165, A3_166) - processTtrBtl002(A0_179, A1_180, A2_181, A3_182) -processTtrBtl003(A0_202, A1_203, A2_204) -processTtrBtl004(A0_214, A1_215, A2_216) -processTtrBlkNml002(A0_217, A1_218, A2_219) -processTtrBlkNml003(A0_226, A1_227, A2_228) -processEtc001(A0_235, A1_236, A2_237) -processEtc002(A0_238, A1_239, A2_240) -processEtc003(A0_241, A1_242, A2_243) -processInformDialogAsQuest(A0_244, A1_245, A2_246) - ---]] +FLAG_SEQ000_MINITUT0 = 0; -- PushEvent ASCILIA +FLAG_SEQ000_MINITUT1 = 1; -- TalkEvent ASCILIA +FLAG_SEQ000_MINITUT2 = 2; -- TalkEvent FRETFUL_FARMHAND +FLAG_SEQ000_MINITUT3 = 3; -- TalkEvent GIL_DIGGING_MISTRESS +FLAG_SEQ010_TALK0 = 0; -- TalkEvent YAYATOKI function onStart(player, quest) @@ -111,21 +78,23 @@ function onFinish(player, quest) end function onSequence(player, quest, sequence) - quest:ClearENpcs(); - quest:ClearData(); - + if (sequence == SEQ_000) then -- Setup states incase we loaded in. local asciliaCanPush = not quest:GetFlag(FLAG_SEQ000_MINITUT0); local asciliaFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE; local fretfulfarmhandFlag = quest:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE; local gildiggingmistressFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE; - - local exitCanPush = quest:GetFlags() == 0xF; - local exitFlag = quest:GetFlags() == 0xF and QFLAG_PLATE or QFLAG_NONE; + + local exitFlag = quest:GetFlags() == 0xF and QFLAG_MAP or QFLAG_NONE; - --AddENpc(classId, byte flagType=0,isTalkEnabled, isEmoteEnabled , isPushEnabled , isSpawned) - quest:AddENpc(ASCILIA, asciliaFlag, true, false, asciliaCanPush); + if (asciliaCanPush) then + fretfulfarmhandFlag = QFLAG_NONE; + gildiggingmistressFlag = QFLAG_NONE; + end + + --AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned) + quest:AddENpc(ASCILIA, asciliaFlag, true, asciliaCanPush); quest:AddENpc(WARBURTON); quest:AddENpc(RURURAJI); quest:AddENpc(BIG_BELLIED_BARKER); @@ -136,12 +105,23 @@ function onSequence(player, quest, sequence) quest:AddENpc(GIL_DIGGING_MISTRESS, gildiggingmistressFlag); quest:AddENpc(TWITTERING_TOMBOY); quest:AddENpc(STOCKY_STRANGER); - quest:AddENpc(EXIT_TRIGGER, exitFlag, false, false, exitCanPush); + quest:AddENpc(EXIT_TRIGGER, exitFlag, false, true); quest:AddENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true); - elseif (sequence == SEQ_005) then elseif (sequence == SEQ_010) then - + local yayatokiFlag = quest:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE; + local uldahopeningexitFlag = not quest:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_MAP; + quest:AddENpc(KEEN_EYED_MERCHANT); + quest:AddENpc(HIGH_SPIRITED_FELLOW); + quest:AddENpc(DISREPUTABLE_MIDLANDER); + quest:AddENpc(LONG_LEGGED_LADY); + quest:AddENpc(LARGE_LUNGED_LABORER); + quest:AddENpc(TOOTH_GRINDING_TRAVELER); + quest:AddENpc(FULL_LIPPED_FILLE); + quest:AddENpc(YAYATOKI, yayatokiFlag); + quest:AddENpc(BLOCKER1, QFLAG_NONE, false, true); + -- quest:AddENpc(BLOCKER2, QFLAG_NONE, false, true); + quest:AddENpc(ULDAH_OPENING_EXIT, uldahopeningexitFlag, false, true); end end @@ -154,98 +134,98 @@ function onTalk(player, quest, npc) elseif (sequence == SEQ_010) then seq010_onTalk(player, quest, npc, classId); end + quest:UpdateENPCs(); end function onPush(player, quest, npc) + local sequence = quest:getSequence(); local classId = npc:GetActorClassId(); - + if (sequence == SEQ_000) then if (classId == ASCILIA) then callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002"); player:EndEvent(); - elseif (classId == OPENING_STOPER_ULDAH) then - + elseif (classId == EXIT_TRIGGER) then + if (quest:GetFlags() == 0xF) then + doExitTrigger(player, quest, npc); + return; + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001"); + GetWorldManager():DoPlayerMoveInZone(player, -22, 196, 87, 2.4, 0x11) + player:EndEvent(); + end end - - elseif (sequence == SEQ_010) then + if (classId == BLOCKER1) then + + posz = player:GetPos()[3]; + + if (posz >= 71 and posz <= 95) then + callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml002"); + GetWorldManager():DoPlayerMoveInZone(player, -22.81, 196, 87.82, 2.98, 0x11); + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml003"); + GetWorldManager():DoPlayerMoveInZone(player, -0.3, 196, 116, -2.7, 0x11); + end + elseif (classId == ULDAH_OPENING_EXIT) then + player:ReplaceQuest(quest, "Man0u1") + return; + end end + quest:UpdateENPCs(); end function onNotice(player, quest, target) - - callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ"); - - + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ"); player:EndEvent(); + quest:UpdateENPCs(); end function seq000_onTalk(player, quest, npc, classId) if (classId == ASCILIA) then - -- Handle the talk tutorial after the push one. - if (not quest:GetFlag(FLAG_SEQ000_MINITUT0)) then + + if (not quest:GetFlag(FLAG_SEQ000_MINITUT0)) then -- If Talk tutorial callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003"); - quest:SetFlag(FLAG_SEQ000_MINITUT0); - - quest:UpdateENpc(ASCILIA, ENPC_PROP_CAN_PUSH, false); - quest:UpdateENpc(ASCILIA, ENPC_PROP_QFLAG, QFLAG_PLATE); - quest:UpdateENpc(FRETFUL_FARMHAND, ENPC_PROP_QFLAG, QFLAG_PLATE); - quest:UpdateENpc(GIL_DIGGING_MISTRESS, ENPC_PROP_QFLAG, QFLAG_PLATE); + quest:SetFlag(FLAG_SEQ000_MINITUT0); -- Used to disable her PushEvent / Allow for her next TalkEvent else callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001"); - if (not quest:GetFlag(FLAG_SEQ000_MINITUT1)) then - quest:UpdateENpc(ASCILIA, ENPC_PROP_QFLAG, QFLAG_NONE); - quest:SetFlag(FLAG_SEQ000_MINITUT1); - end + quest:SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to. end - - - elseif (classId == WARBURTON) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3"); - - elseif (classId == RURURAJI) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_13"); - - elseif (classId == BIG_BELLIED_BARKER) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6"); - + elseif (classId == FRETFUL_FARMHAND) then if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002_first"); - quest:UpdateENpc(FRETFUL_FARMHAND, ENPC_PROP_QFLAG, QFLAG_NONE); quest:SetFlag(FLAG_SEQ000_MINITUT2); else callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002"); - end + end - elseif (classId == DEBAUCHED_DEMONESS) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8"); - - elseif (classId == DAPPER_DAN) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_9"); - elseif (classId == LOUTISH_LAD) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_10"); - elseif (classId == GIL_DIGGING_MISTRESS) then if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003_first"); - quest:UpdateENpc(GIL_DIGGING_MISTRESS, ENPC_PROP_QFLAG, QFLAG_NONE); quest:SetFlag(FLAG_SEQ000_MINITUT3); else callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003"); - end + end + elseif (classId == WARBURTON) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3"); + elseif (classId == RURURAJI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_13"); + elseif (classId == BIG_BELLIED_BARKER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6"); + elseif (classId == DEBAUCHED_DEMONESS) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8"); + elseif (classId == DAPPER_DAN) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_9"); + elseif (classId == LOUTISH_LAD) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_10"); elseif (classId == TWITTERING_TOMBOY) then callClientFunction(player, "delegateEvent", player, quest, "processEvent000_12"); elseif (classId == STOCKY_STRANGER) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6_2"); -- TODO: Likely 6, 6_2 looks like a Stoper dialog - end - - if (quest:GetFlags() == 0xF) then - quest:UpdateENpc(EXIT_TRIGGER, ENPC_PROP_CAN_PUSH, true); - quest:UpdateENpc(EXIT_TRIGGER, ENPC_PROP_QFLAG, QFLAG_MAP); + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6_2"); end player:EndEvent(); @@ -253,15 +233,75 @@ end function seq010_onTalk(player, quest, npc, classId) + if (classId == KEEN_EYED_MERCHANT) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2"); + elseif (classId == HIGH_SPIRITED_FELLOW) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent020_3"); + elseif (classId == DISREPUTABLE_MIDLANDER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent020_4"); + elseif (classId == LONG_LEGGED_LADY) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_14"); + elseif (classId == LARGE_LUNGED_LABORER) then + callClientFunction(player, "delegateEvent", player, quest, "processEtc003"); + elseif (classId == TOOTH_GRINDING_TRAVELER) then + callClientFunction(player, "delegateEvent", player, quest, "processEtc001"); + elseif (classId == FULL_LIPPED_FILLE) then + callClientFunction(player, "delegateEvent", player, quest, "processEtc002"); + elseif (classId == YAYATOKI) then + if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8"); + quest:SetFlag(FLAG_SEQ010_TALK0); + else + callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8"); + end + end + player:EndEvent(); end function getJournalMapMarkerList(player, quest) local sequence = quest:getSequence(); + local possibleMarkers = {}; if (sequence == SEQ_000) then - return MKRK_ASCILIA, MKRK_FRETFUL_FARMHAND; + if (quest:GetFlag(FLAG_SEQ000_MINITUT0)) then + if (not quest:GetFlag(FLAG_SEQ000_MINITUT1)) then table.insert(possibleMarkers, MRKR_ASCILIA); end + if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then table.insert(possibleMarkers, MRKR_FRETFUL_FARMHAND); end + if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then table.insert(possibleMarkers, MRKR_GIL_DIGGING_MISTRESS); end + end + elseif (sequence == SEQ_010) then - --return + if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then + table.insert(possibleMarkers, MRKR_YAYATOKI) + else + table.insert(possibleMarkers, MRKR_ADV_GUILD); + end end -end \ No newline at end of file + + return unpack(possibleMarkers) +end + + + + +function doExitTrigger(player, quest, npc) + quest:ClearData(); + quest:StartSequence(SEQ_005); + contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001"); + + if (contentArea == nil) then + return; + end + + director = contentArea:GetContentDirector(); + player:AddDirector(director); + director:StartDirector(false); + + player:KickEvent(director, "noticeEvent", true); + player:SetLoginDirector(director); + + GetWorldManager():DoZoneChangeContent(player, contentArea, -24.34, 192, 34.22, 0.78, 16); + return; +end + + diff --git a/Data/scripts/quests/man/man0u1.lua b/Data/scripts/quests/man/man0u1.lua new file mode 100644 index 00000000..156fa866 --- /dev/null +++ b/Data/scripts/quests/man/man0u1.lua @@ -0,0 +1,233 @@ +require("global"); + +--[[ + +Quest Script + +Name: Court in the Sands +Code: Man0u1 +Id: 110010 +Prereq: Flowers for All (Man0u0 - 110009) +Notes: + + +Vid refs - +https://www.youtube.com/watch?v=WNRLrwZ3BJY&t=284s +https://www.youtube.com/watch?v=eZgcq-FMpfw&t=504s + +]] + + +--[[ + +Phase: + +45 (Miner's Guild) + Linette processEvent050 (initial CS) + Change phase to 50 after interaction + +50 (Miner's Guild Instance #1) + Name DisplayName ActorClass Event + Linette 1100016 1000861 processEvent050_2 + Corguevais 1200025 1000043/1001054 processEvent050_11 + Nittma Guttma 1400127 1001286 processEvent050_10 + Nortmoen 1600127 1600042 + F'lhaminn 1900054 1000038/1000842/1001514/2290008 processEvent051_1 + Tyago Moui 1900130 1001203 processEvent050_12 + Shilgen 2200216 1000637 + Muscular Miner 4000202 1000690/1700013 processEvent050_7 + Close-fisted Woman 4000366 1000981 processEvent050_8 + Astonished Adventurer 4000377 1000895 processEvent050_9 + Manic Miner 4000444 1001283 processEvent050_13 + Maddened Miner 4000445 1001284 processEvent050_14 + Maudlin Miner 4000446 1001287 processEvent050_3 + Mocking Miner 4000447 1001288 processEvent050_4 + Monitoring Miner 4000448 1001289 processEvent050_5 + Displeased Dancer 4000449 1001290 processEvent050_6 + + Emotes 103, 108, 121, 125, 140, 135 in that order @ F'lhaminn, then change phase to 51 +51 + Emotes 108 @ Maddened Miner + Emotes 135, 103, 121 @ Manic Miner + Check both for clear state after each interaction and change phase to 55 + +55 (Miner's Guild Instance #2) + +--]] + + + +-- Sequence Numbers +SEQ_000 = 0; -- Ul'dah Adventurer's Guild +SEQ_005 = 5; -- Run to Camp Black Brush & Attune +SEQ_010 = 10; -- Return to the Guild +SEQ_012 = 12; -- Speak to Momodi +SEQ_015 = 15; -- Visiting guilds (GSM, GLD) +SEQ_045 = 45; +SEQ_050 = 50; +SEQ_057 = 57; +SEQ_058 = 58; +SEQ_060 = 60; +SEQ_065 = 65; +SEQ_070 = 70; +SEQ_075 = 75; +SEQ_080 = 80; +SEQ_085 = 85; +SEQ_090 = 90; +SEQ_095 = 95; +SEQ_100 = 100; +SEQ_105 = 105; +SEQ_110 = 110; + + +-- Actor Class Ids +OVERCOMPETITIVE_ADVENTURER = 1000807; +MOMODI = 1000841; +OTOPA_POTTOPA = 1000864; +UNDAUNTED_ADVENTURER = 1000936; +GREEDY_MERCHANT = 1000937; +LIONHEARTED_ADVENTURER = 1000938; +SPRY_SALESMAN = 1000939; + + + +UPBEAT_ADVENTURER = 1000940; +SEEMINGLY_CALM_ADVENTURER = 1000941; +UNKNOWN1 = 0; +UNKNOWN2 = 0 + +THANCRED = 1000948; -- 1000010 + + +-- Quest Markers +MRKR_MOMODI = 11001001; +MRKR_CAMP_BLACK_BRUSH = 11001002; + +-- Quest Items +VELODYNA_COSMOS = 0; -- Seq_000 : 2nd journal arg. >=5 doesn't have. +COLISEUM_PASS = 0; -- Seq_015 : 3rd journal arg. >=5 doesn't have + +-- Quest Flags +FLAG_SEQ000 = 0; + +function onStart(player, quest) + quest:StartSequence(SEQ_000); + + -- Immediately move to the Adventurer's Guild private area + + callClientFunction(player, "delegateEvent", player, quest, "processEventMomodiStart"); + + GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 4, 15, -75.242, 195.009, 74.572, -0.046); + + --callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1"); -- Describes what an Instance is + player:SendGameMessage(quest, 329, 0x20); + player:SendGameMessage(quest, 330, 0x20); +end + +function onFinish(player, quest) +end + +function onSequence(player, quest, sequence) + + if (sequence == SEQ_000) then + -- Setup states incase we loaded in. + + --AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned) + quest:AddENpc(MOMODI, QFLAG_PLATE); + quest:AddENpc(OTOPA_POTTOPA); + + elseif (sequence == SEQ_005) then + quest:AddENpc(MOMODI); + end +end + +function onTalk(player, quest, npc) + local sequence = quest:getSequence(); + local classId = npc:GetActorClassId(); + + if (sequence == SEQ_000) then + seq000_onTalk(player, quest, npc, classId); + elseif (sequence == SEQ_005) then + seq005_onTalk(player, quest, npc, classId); + end + quest:UpdateENPCs(); +end + +function onPush(player, quest, npc) + + local sequence = quest:getSequence(); + local classId = npc:GetActorClassId(); + player:SendMessage(0x20, "", "Sequence: "..sequence.." Class Id: "..classId); + if (sequence == SEQ_000) then + + elseif (sequence == SEQ_010) then + + end + quest:UpdateENPCs(); +end + + + +function seq000_onTalk(player, quest, npc, classId) + + if (classId == MOMODI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + player:EndEvent(); + quest:StartSequence(SEQ_005); + GetWorldManager():DoZoneChange(player, 175, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation); + return; + elseif (classId == UNDAUNTED_ADVENTURER) then + callClientFunction (player, "delegateEvent", player, quest, "processEvent000_2"); + elseif (classId == GREEDY_MERCHANT) then + callClientFunction (player, "delegateEvent", player, quest, "processEvent000_3"); + elseif (classId == SPRY_SALESMAN) then + callClientFunction (player, "delegateEvent", player, quest, "processEvent000_4"); + elseif (classId == LIONHEARTED_ADVENTURER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_5"); + elseif (classId == UPBEAT_ADVENTURER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_6"); + elseif (classId == SEEMINGLY_CALM_ADVENTURER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_7"); + elseif (classId == OVERCOMPETITIVE_ADVENTURER) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8"); + elseif (classId == OTOPA_POTTOPA) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_9"); + elseif (classId == THANCRED) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_10"); + end + + player:EndEvent(); +end + +function seq005_onTalk(player, quest, npc, classId) + if (classId == MOMODI) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent010_2"); + end + + player:EndEvent(); +end + + +function getJournalInformation(player, quest) + return 0, VELODYNA_COSMOS, COLISEUM_PASS; +end + + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + local possibleMarkers = {}; + + if (sequence == SEQ_000) then + table.insert(possibleMarkers, MRKR_MOMODI); + elseif (sequence == SEQ_010) then + if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then + table.insert(possibleMarkers, MRKR_YAYATOKI) + else + table.insert(possibleMarkers, MRKR_ADV_GUILD); + end + end + + return unpack(possibleMarkers) +end + + diff --git a/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua b/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua new file mode 100644 index 00000000..56e69c09 --- /dev/null +++ b/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua @@ -0,0 +1,3 @@ +function init(npc) + return false, false, 0, 0, 0x1A5, 4287; +end \ No newline at end of file diff --git a/Map Server/Actors/Chara/Player/Player.cs b/Map Server/Actors/Chara/Player/Player.cs index fb90c85d..8736beac 100644 --- a/Map Server/Actors/Chara/Player/Player.cs +++ b/Map Server/Actors/Chara/Player/Player.cs @@ -1686,6 +1686,7 @@ namespace Meteor.Map.Actors defaultTalk = (Quest) Server.GetStaticActors("DftFst"); break; case 104: + case 107: defaultTalk = (Quest) Server.GetStaticActors("DftWil"); break; case 105: From acf953e909e0044929643e576a93b69a22f0f39e Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Thu, 10 Feb 2022 19:35:04 -0500 Subject: [PATCH 5/6] DftFst: Added a param handling to Kinnison on DftFst since it'd crash the client otherwise. Etc3g0: Polished up the script, made it as authentic to retail as I could get it barring reward hand-out and starting the quest Etc5g0: Ported the quest over from the old scripting setup. Man0u1: Still very early wip. --- Data/scripts/quests/dft/DftFst.lua | 17 ++++- Data/scripts/quests/etc/etc3g0.lua | 89 +++++++++++++--------- Data/scripts/quests/etc/etc5g0.lua | 114 +++++++++++++++++++++++++---- Data/scripts/quests/man/man0u1.lua | 24 +++--- 4 files changed, 181 insertions(+), 63 deletions(-) diff --git a/Data/scripts/quests/dft/DftFst.lua b/Data/scripts/quests/dft/DftFst.lua index c83bf30d..99d0d965 100644 --- a/Data/scripts/quests/dft/DftFst.lua +++ b/Data/scripts/quests/dft/DftFst.lua @@ -18,13 +18,22 @@ local defaultTalkFst = { [1001081] = "defaultTalkWithKhumamoshroca_001", -- Khuma Moshroca [1001103] = "defaultTalkWithMestonnaux_001", -- Mestonnaux [1001396] = "defaultTalkWithLefwyne_001", -- Lefwyne - [1001430] = "defaultTalkWithKinnison_001", -- Kinnison - [1001437] = "defaultTalkWithSybell_001", -- Sybell + [1001430] = "defaultTalkWithKinnison_001", -- Kinnison - Two args (nil errors client). If either >= 0, dialog mentions you've met Kan-E-Senna. + [1001437] = "defaultTalkWithSybell_001" -- Sybell + -- [1000458] = "defaultTalkWithInn_Desk" } function onTalk(player, quest, npc, eventName) - local clientFunc = defaultTalkFst[npc:GetActorClassId()]; - callClientFunction(player, "delegateEvent", player, quest, clientFunc); + + local npcId = npc:GetActorClassId(); + local clientFunc = defaultTalkFst[npcId]; + + if (npcId == 1001430) then -- Kinnison + callClientFunction(player, "delegateEvent", player, quest, clientFunc, -1,-1); + else + callClientFunction(player, "delegateEvent", player, quest, clientFunc); + end + player:EndEvent(); end diff --git a/Data/scripts/quests/etc/etc3g0.lua b/Data/scripts/quests/etc/etc3g0.lua index b1c19305..a8f95077 100644 --- a/Data/scripts/quests/etc/etc3g0.lua +++ b/Data/scripts/quests/etc/etc3g0.lua @@ -38,6 +38,9 @@ FLAG_TALKED_NELLAURE = 2; FLAG_TALKED_KHUMA_MOSHROCA = 3; FLAG_TALKED_LEFWYNE = 4; +-- Quest Counters +COUNTER_TALKED = 0; + --offerQuestResult = callClientFunction(player, "delegateEvent", player, quest, "processEventOffersStart"); function onStart(player, quest) @@ -48,33 +51,32 @@ function onFinish(player, quest) end function onSequence(player, quest, sequence) - quest:ClearENpcs(); - if (sequence == SEQ_000) then - quest:AddENpc(SYBELL, qflag(quest, FLAG_TALKED_SYBELL)); - quest:AddENpc(KHUMA_MOSHROCA, qflag(quest, FLAG_TALKED_KHUMA_MOSHROCA)); - quest:AddENpc(NELLAURE, qflag(quest, FLAG_TALKED_NELLAURE)); - quest:AddENpc(MESTONNAUX, qflag(quest, FLAG_TALKED_MESTONNAUX)); - quest:AddENpc(LEFWYNE, qflag(quest, FLAG_TALKED_LEFWYNE)); + quest:AddENpc(KINNISON); + quest:AddENpc(SYBELL, (not quest:GetFlag(FLAG_TALKED_SYBELL) and QFLAG_PLATE or QFLAG_NONE)); + quest:AddENpc(KHUMA_MOSHROCA, (not quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA) and QFLAG_PLATE or QFLAG_NONE)); + quest:AddENpc(NELLAURE, (not quest:GetFlag(FLAG_TALKED_NELLAURE) and QFLAG_PLATE or QFLAG_NONE)); + quest:AddENpc(MESTONNAUX, (not quest:GetFlag(FLAG_TALKED_MESTONNAUX) and QFLAG_PLATE or QFLAG_NONE)); + quest:AddENpc(LEFWYNE, (not quest:GetFlag(FLAG_TALKED_LEFWYNE) and QFLAG_PLATE or QFLAG_NONE)); elseif (sequence == SEQ_001) then - quest:AddENpc(KINNISON); + quest:AddENpc(KINNISON, QFLAG_PLATE); end end -function qflag(quest, flag) - return quest:GetFlag(flag) and QFLAG_ALL or QFLAG_NONE; -end function onTalk(player, quest, npc, eventName) local npcClassId = npc.GetActorClassId(); local seq = quest:GetSequence(); - + local incCounter = false; + if (seq == SEQ_000) then - if (npcClassId == SYBELL) then + if (npcClassId == KINNISON) then + callClientFunction(player, "delegateEvent", player, quest, "processEventOffersAfter"); + elseif (npcClassId == SYBELL) then if (not quest:GetFlag(FLAG_TALKED_SYBELL)) then callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeak"); quest:SetFlag(FLAG_TALKED_SYBELL); - --quest:UpdateENpc(SYBELL, QFLAG_NONE); + incCounter = true; else callClientFunction(player, "delegateEvent", player, quest, "processEventSybellSpeakAfter"); end @@ -82,15 +84,15 @@ function onTalk(player, quest, npc, eventName) if (not quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA)) then callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeak"); quest:SetFlag(FLAG_TALKED_KHUMA_MOSHROCA); - --quest:UpdateENpc(KHUMA_MOSHROCA, QFLAG_NONE); + incCounter = true; else callClientFunction(player, "delegateEvent", player, quest, "processEventKhumaSpeakAfter"); end elseif (npcClassId == NELLAURE) then if (not quest:GetFlag(FLAG_TALKED_NELLAURE)) then callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeak"); - quest:SetFlag(FLAG_TALKED_NELLAURE); - --quest:UpdateENpc(NELLAURE, QFLAG_NONE); + quest:SetFlag(FLAG_TALKED_NELLAURE); + incCounter = true; else callClientFunction(player, "delegateEvent", player, quest, "processEventNellaureSpeakAfter"); end @@ -98,35 +100,48 @@ function onTalk(player, quest, npc, eventName) if (not quest:GetFlag(FLAG_TALKED_MESTONNAUX)) then callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeak"); quest:SetFlag(FLAG_TALKED_MESTONNAUX); - --quest:UpdateENpc(MESTONNAUX, QFLAG_NONE); + incCounter = true; else callClientFunction(player, "delegateEvent", player, quest, "processEventMestonnauxSpeakAfter"); end elseif (npcClassId == LEFWYNE) then if (not quest:GetFlag(FLAG_TALKED_LEFWYNE)) then callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeak"); - quest:SetFlag(FLAG_TALKED_LEFWYNE); - --quest:UpdateENpc(LEFWYNE, QFLAG_NONE); + quest:SetFlag(FLAG_TALKED_LEFWYNE); + incCounter = true; else callClientFunction(player, "delegateEvent", player, quest, "processEventLefwyneSpeakAfter"); end end - -- Check condition to go to the next sequence - if (seq000_checkCondition(quest)) then - quest:StartSequence(SEQ_001); - end + + -- Increase objective counter & play relevant messages + if (incCounter == true) then + quest:IncCounter(COUNTER_TALKED); + local counterAmount = quest:GetCounter(COUNTER_TALKED); + + attentionMessage(player, 51061, 0, counterAmount, 5); -- You have heard word of the Seedseers. (... of 5) + + if (seq000_checkCondition(quest)) then -- All Seers spoken to + attentionMessage(player, 25225, 110674); -- "Seeing the Seers" objectives complete! + quest:UpdateENPCs(); -- Band-aid for a QFLAG_PLATE issue + quest:StartSequence(SEQ_001); + end + end + elseif (seq == SEQ_001) then --Quest Complete if (npcClassId == KINNISON) then callClientFunction(player, "delegateEvent", player, quest, "processEventClear"); callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1, 1, 9); + player:CompleteQuest(quest:GetQuestId()); end end - + quest:UpdateENPCs(); player:EndEvent(); end + -- Check if all seers are talked to function seq000_checkCondition(quest) return (quest:GetFlag(FLAG_TALKED_SYBELL) and @@ -136,14 +151,20 @@ function seq000_checkCondition(quest) quest:GetFlag(FLAG_TALKED_LEFWYNE)); end --- This is called by the RequestQuestJournalCommand when map markers are request. --- Check quest_marker for valid values. This should return a table of map markers. + function getJournalMapMarkerList(player, quest) - local seq = quest:GetSequence(); - - if (seq == SEQ_000) then - return MRKR_SYBELL, MRKR_KHUMA_MOSHROCA, MRKR_NELLAURE, MRKR_MESTONNAUX, MRKR_LEFWYNE; - elseif (seq == SEQ_001) then - return MRKR_KINNISON; - end + local sequence = quest:getSequence(); + local possibleMarkers = {}; + + if (sequence == SEQ_000) then + if (not quest:GetFlag(FLAG_TALKED_SYBELL)) then table.insert(possibleMarkers, MRKR_SYBELL); end + if (not quest:GetFlag(FLAG_TALKED_KHUMA_MOSHROCA)) then table.insert(possibleMarkers, MRKR_KHUMA_MOSHROCA); end + if (not quest:GetFlag(FLAG_TALKED_NELLAURE)) then table.insert(possibleMarkers, MRKR_NELLAURE); end + if (not quest:GetFlag(FLAG_TALKED_MESTONNAUX)) then table.insert(possibleMarkers, MRKR_MESTONNAUX); end + if (not quest:GetFlag(FLAG_TALKED_LEFWYNE)) then table.insert(possibleMarkers, MRKR_LEFWYNE); end + elseif (sequence == SEQ_001) then + table.insert(possibleMarkers, MRKR_KINNISON); + end + + return unpack(possibleMarkers) end \ No newline at end of file diff --git a/Data/scripts/quests/etc/etc5g0.lua b/Data/scripts/quests/etc/etc5g0.lua index 4e948be7..4c82338f 100644 --- a/Data/scripts/quests/etc/etc5g0.lua +++ b/Data/scripts/quests/etc/etc5g0.lua @@ -1,21 +1,103 @@ ---Quest Flags -TALKED_PFARAHR = 0; +require("global"); -function canAcceptQuest(player) - return (player:HasQuest("etc5g0") == false and player:IsQuestCompleted("Etc5g0") == false and player:GetHighestLevel() >= 1); +--[[ + +Quest Script + +Name: Waste Not Want Not +Code: Etc5g0 +Id: 110828 +Prereq: Level 1 on any class. Second MSQ completed. (110002 Man0l1 / 110006 Man0g1 / 110010 Man0u1) +Notes: Rewards 200 gil + +]] + +-- Sequence Numbers +SEQ_000 = 0; -- Talk to Pfarahr +SEQ_001 = 1; -- Return to V'korolon + +-- Actor Class Ids +VKOROLON = 1000458; +PFARAHR = 1001707; + +-- Quest Item +ITEM_WELL_WORN_BAG = 11000224; + +-- Quest Markers +MRKR_PFARAHR = 11082001; +MRKR_VKOROLON = 11082002; + + + +function onStart(player, quest) + -- processEventVKOROLONStart -- No means of properly accepting quests yet + quest:StartSequence(SEQ_000); + player:SendGameMessage(GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, ITEM_WELL_WORN_BAG, 1); end -function isObjectivesComplete(player, quest) - return (quest:GetPhase() == 2); +function onFinish(player, quest) end -function onAbandonQuest(player, quest) - vkorolon = GetWorldManager():GetActorInWorldByUniqueId("vkorolon"); - pfarahr = GetWorldManager():GetActorInWorldByUniqueId("pfarahr"); - if (vkorolon ~= nil and canAcceptQuest(player)) then - vkorolon:SetQuestGraphic(player, 0x2); - end - if (pfarahr ~= nil) then - pfarahr:SetQuestGraphic(player, 0x0); - end -end \ No newline at end of file + + +function onSequence(player, quest, sequence) + if (sequence == SEQ_000) then + quest:AddENpc(VKOROLON); + quest:AddENpc(PFARAHR, QFLAG_PLATE); + elseif (sequence == SEQ_001) then + quest:AddENpc(VKOROLON, QFLAG_PLATE); + quest:AddENpc(PFARAHR); + end +end + +function onTalk(player, quest, npc) + local sequence = quest:getSequence(); + local classId = npc:GetActorClassId(); + + if (sequence == SEQ_000) then + if (classId == VKOROLON) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_000_1"); + elseif (classId == PFARAHR) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010"); + quest:StartSequence(SEQ_001); + quest:DoComplete(); -- Need ref since it feels out of place. Just placing it here since original script had it. + end + + elseif (sequence == SEQ_001) then + if (classId == VKOROLON) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_020"); + --callClientFunction(player, "delegateEvent", player, quest, "sqrwa", 200, 1); -- Reward window, shouldn't be handled by quest script + player:CompleteQuest(quest:GetQuestId()); + elseif (classId == PFARAHR) then + callClientFunction(player, "delegateEvent", player, quest, "processEvent_010_1"); + end + end + player:EndEvent() + quest:UpdateENPCs(); +end + + +function getJournalInformation(player, quest) + local sequence = quest:getSequence(); + + if (sequence == SEQ_000) then + return ITEM_WELL_WORN_BAG; + end +end + + +function getJournalMapMarkerList(player, quest) + local sequence = quest:getSequence(); + local possibleMarkers = {}; + + if (sequence == SEQ_000) then + table.insert(possibleMarkers, MRKR_PFARAHR); + elseif (sequence == SEQ_001) then + table.insert(possibleMarkers, MRKR_VKOROLON); + end + + return unpack(possibleMarkers) +end + + + diff --git a/Data/scripts/quests/man/man0u1.lua b/Data/scripts/quests/man/man0u1.lua index 156fa866..d582aa7a 100644 --- a/Data/scripts/quests/man/man0u1.lua +++ b/Data/scripts/quests/man/man0u1.lua @@ -15,6 +15,10 @@ Vid refs - https://www.youtube.com/watch?v=WNRLrwZ3BJY&t=284s https://www.youtube.com/watch?v=eZgcq-FMpfw&t=504s +Coliseum fight - https://www.youtube.com/watch?v=Jcv9I2Bk46w + +A LOT - https://www.youtube.com/watch?v=gySHO1Be9OM + ]] @@ -104,8 +108,8 @@ MRKR_MOMODI = 11001001; MRKR_CAMP_BLACK_BRUSH = 11001002; -- Quest Items -VELODYNA_COSMOS = 0; -- Seq_000 : 2nd journal arg. >=5 doesn't have. -COLISEUM_PASS = 0; -- Seq_015 : 3rd journal arg. >=5 doesn't have +ITEM_VELODYNA_COSMOS = 0; -- Seq_000 : 2nd journal arg. >=5 doesn't have. +ITEM_COLISEUM_PASS = 0; -- Seq_015 : 3rd journal arg. >=5 doesn't have -- Quest Flags FLAG_SEQ000 = 0; @@ -114,12 +118,7 @@ function onStart(player, quest) quest:StartSequence(SEQ_000); -- Immediately move to the Adventurer's Guild private area - callClientFunction(player, "delegateEvent", player, quest, "processEventMomodiStart"); - - GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 4, 15, -75.242, 195.009, 74.572, -0.046); - - --callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1"); -- Describes what an Instance is player:SendGameMessage(quest, 329, 0x20); player:SendGameMessage(quest, 330, 0x20); end @@ -167,11 +166,18 @@ function onPush(player, quest, npc) end +function onNotice(player, quest, target) + callClientFunction(player, "delegateEvent", player, quest, "processEvent000_1"); -- Describes what an Instance is + player:EndEvent(); + quest:UpdateENPCs(); +end + + function seq000_onTalk(player, quest, npc, classId) if (classId == MOMODI) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent010"); player:EndEvent(); quest:StartSequence(SEQ_005); GetWorldManager():DoZoneChange(player, 175, nil, 0, 15, player.positionX, player.positionY, player.positionZ, player.rotation); @@ -209,7 +215,7 @@ end function getJournalInformation(player, quest) - return 0, VELODYNA_COSMOS, COLISEUM_PASS; + return 0, ITEM_VELODYNA_COSMOS, ITEM_COLISEUM_PASS; end From b6c9825b2d871e0bef632f027509f9762a24f1aa Mon Sep 17 00:00:00 2001 From: CuriousJorge Date: Sun, 13 Feb 2022 13:18:20 -0500 Subject: [PATCH 6/6] - Man0u0 about as polished as one can get the Talking sections for now, minus some very specific retail quirks that need replicating at some point (all revolving around the starting 15 seconds of the forced tutorial) - Man0u1 barely started. Just enough there to get the player out of the PrivateArea and into the public zone. - All of the old Populace uniqueId scripts for both quests nuked into high orbit. - DftSea: Master list of function names and argument counts added to the list. Will be whittling away at this over the coming week. - GM Warp: For whatever reason using "" to compare against a nil wasn't working anymore. Set it to nil instead. --- Data/scripts/commands/gm/warp.lua | 3 +- Data/scripts/quests/dft/DftSea.lua | 264 ++++++++++++++++++ Data/scripts/quests/man/man0u0.lua | 154 +++++----- Data/scripts/quests/man/man0u1.lua | 3 +- .../MapObjOnlyShowHide/Man0u0_trtl_gate.lua | 3 - .../MapObjOnlyShowHide/man0u0_tutrl_gate.lua | 3 + .../PopulaceChocoboLender/rururaji.lua | 8 - .../wil0Battle01/PopulaceStandard/ascilia.lua | 52 ---- .../PopulaceStandard/big-bellied_barker.lua | 8 - .../PopulaceStandard/dapper_dan.lua | 8 - .../PopulaceStandard/debauched_demoness.lua | 8 - .../PopulaceStandard/exit_trigger.lua | 46 --- .../PopulaceStandard/fretful_farmhand.lua | 31 -- .../PopulaceStandard/gil-digging_mistress.lua | 31 -- .../PopulaceStandard/loutish_lad.lua | 8 - .../PopulaceStandard/rururaji.lua | 8 - .../PopulaceStandard/stocky_stranger.lua | 8 - .../PopulaceStandard/twittering_tomboy.lua | 8 - .../PopulaceStandard/warburton.lua | 8 - .../PopulaceStandard/blocker1.lua | 13 - .../PopulaceStandard/blocker2.lua | 14 - .../disreputable_midlander.lua | 8 - .../PopulaceStandard/full-lipped_fille.lua | 8 - .../PopulaceStandard/high-spirited_fellow.lua | 8 - .../PopulaceStandard/keen-eyed_merchant.lua | 8 - .../PopulaceStandard/large-lunged_laborer.lua | 8 - .../PopulaceStandard/long-legged_lady.lua | 8 - .../PopulaceStandard/mumpish_miqote.lua | 8 - .../PopulaceStandard/rururaji.lua | 8 - .../tooth-grinding_traveler.lua | 8 - .../PopulaceStandard/uldah_opening_exit.lua | 16 -- .../PopulaceStandard/yayatoki.lua | 13 - .../PopulaceStandard/momodi.lua | 26 -- 33 files changed, 360 insertions(+), 456 deletions(-) delete mode 100644 Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua create mode 100644 Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/man0u0_tutrl_gate.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceChocoboLender/rururaji.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/ascilia.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/big-bellied_barker.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/dapper_dan.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/debauched_demoness.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/exit_trigger.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/fretful_farmhand.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/gil-digging_mistress.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/loutish_lad.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/rururaji.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/stocky_stranger.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/twittering_tomboy.lua delete mode 100644 Data/scripts/unique/wil0Battle01/PopulaceStandard/warburton.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker1.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker2.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/disreputable_midlander.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/full-lipped_fille.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/high-spirited_fellow.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/keen-eyed_merchant.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/large-lunged_laborer.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/long-legged_lady.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/mumpish_miqote.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/rururaji.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/tooth-grinding_traveler.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/uldah_opening_exit.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/yayatoki.lua delete mode 100644 Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_4/PopulaceStandard/momodi.lua diff --git a/Data/scripts/commands/gm/warp.lua b/Data/scripts/commands/gm/warp.lua index c6e85e88..b919af83 100644 --- a/Data/scripts/commands/gm/warp.lua +++ b/Data/scripts/commands/gm/warp.lua @@ -55,7 +55,8 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, privateAreaType, n local x = tonumber(applyPositionOffset(p2, player_x)) or player_x; local y = tonumber(applyPositionOffset(p3, player_y)) or player_y; local z = tonumber(applyPositionOffset(p4, player_z)) or player_z; - if privateArea == "" then privateArea = nil end; + if privateArea == nil then privateArea = nil end; + if privateAreaType == nila then privateAreaType = 0 end; player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d to new zone (%d) private area:%s", x, y, z, zone, privateArea or "unspecified")); worldManager:DoZoneChange(player, zone, privateArea, tonumber(privateAreaType), 0x02, x, y, z, 0.00); end diff --git a/Data/scripts/quests/dft/DftSea.lua b/Data/scripts/quests/dft/DftSea.lua index 26d435c6..8fc40105 100644 --- a/Data/scripts/quests/dft/DftSea.lua +++ b/Data/scripts/quests/dft/DftSea.lua @@ -13,6 +13,270 @@ Contains all default lines for talkable npcs in the Sea Region (aka La Noscea). -- [ActorClassId] = "client_function_name" local defaultTalkSea = { [1234] = "defaultTalkWithLefchild_001" -- Lefchild + +--[[ + +defaultTalkStartMan(A0_1, A1_2, A2_3) +defaultTalkOiSAM(A0_4, A1_5, A2_6) +defaultTalkMLinhbo(A0_7, A1_8, A2_9) +defaultTalkWithMytesyn_001(A0_10, A1_11, A2_12) +defaultTalkWithUrsulie_001(A0_13, A1_14, A2_15) +defaultTalkWithAshakkal_001(A0_16, A1_17, A2_18) +defaultTalkWithPiralnaut_001(A0_19, A1_20, A2_21) +defaultTalkWithBaderon_001(A0_22, A1_23, A2_24) +defaultTalkWithCharlys_001(A0_25, A1_26, A2_27) +defaultTalkWithNoline_001(A0_28, A1_29, A2_30) +defaultTalkWithJossy_001(A0_31, A1_32, A2_33) +defaultTalkWithPrudentia_001(A0_34, A1_35, A2_36) +defaultTalkWithPulmia_001(A0_37, A1_38, A2_39) +defaultTalkWithAentfoet_001(A0_40, A1_41, A2_42) +defaultTalkWithKikichua_001(A0_43, A1_44, A2_45) +defaultTalkWithGerulf_001(A0_46, A1_47, A2_48) +defaultTalkWithHobriaut_001(A0_49, A1_50, A2_51) +defaultTalkWithRsushmo_001(A0_52, A1_53, A2_54) +defaultTalkWithFrailoise_001(A0_55, A1_56, A2_57) +defaultTalkWithIsaudorel_001(A0_58, A1_59, A2_60) +defaultTalkWithTotoruto_001(A0_61, A1_62, A2_63) +defaultTalkWithChaunollet_001(A0_64, A1_65, A2_66) +defaultTalkWithRaragun_001(A0_67, A1_68, A2_69) +defaultTalkWithMynadaeg_001(A0_70, A1_71, A2_72) +defaultTalkWithTefhmoshroca_001(A0_73, A1_74, A2_75) +defaultTalkWithGinnade_001(A0_76, A1_77, A2_78) +defaultTalkWithArthurioux_001(A0_79, A1_80, A2_81) +defaultTalkWithBodenolf_001(A0_82, A1_83, A2_84) +defaultTalkWithBodenolf_002(A0_85, A1_86, A2_87) +defaultTalkWithQhaschalahko_001(A0_88, A1_89, A2_90) +defaultTalkWithJoellaut_001(A0_91, A1_92, A2_93) +defaultTalkWithIofa_001(A0_94, A1_95, A2_96) +defaultTalkWithSyngsmyd_001(A0_97, A1_98, A2_99) +defaultTalkWithMartiallais_001(A0_100, A1_101, A2_102) +defaultTalkWithFaucillien_001(A0_103, A1_104, A2_105) +defaultTalkWithNnmulika_001(A0_106, A1_107, A2_108) +defaultTalkWithLouviaune_001(A0_109, A1_110, A2_111) +defaultTalkWithClifton_001(A0_112, A1_113, A2_114) +defaultTalkWithUndsatz_001(A0_115, A1_116, A2_117) +defaultTalkWithRerenasu_001(A0_118, A1_119, A2_120) +defaultTalkWithDacajinjahl_001(A0_121, A1_122, A2_123) +defaultTalkWithBloemerl_001(A0_124, A1_125, A2_126) +defaultTalkWithXavalien_001(A0_127, A1_128, A2_129) +defaultTalkWithAstrid_001(A0_130, A1_131, A2_132) +defaultTalkWithWaekbyrt_001(A0_133, A1_134, A2_135) +defaultTalkWithWaekbyrt_002(A0_136, A1_137, A2_138) +defaultTalkWithNunuba_001(A0_139, A1_140, A2_141) +defaultTalkWithSraemha_001(A0_142, A1_143, A2_144) +defaultTalkWithOsitha_001(A0_145, A1_146, A2_147) +defaultTalkWithNeale_001(A0_148, A1_149, A2_150) +defaultTalkWithBayard_001(A0_151, A1_152, A2_153) +defaultTalkWithTriaine_001(A0_154, A1_155, A2_156) +defaultTalkWithWyrakhamazom_001(A0_157, A1_158, A2_159) +defaultTalkWithDhemsunn_001(A0_160, A1_161, A2_162) +defaultTalkWithNanapiri_001(A0_163, A1_164, A2_165) +defaultTalkWithMharelak_001(A0_166, A1_167, A2_168) +defaultTalkWithHasthwab_001(A0_169, A1_170, A2_171) +defaultTalkWithIghiimoui_001(A0_172, A1_173, A2_174) +defaultTalkWithMimiroon_001(A0_175, A1_176, A2_177) +defaultTalkWithJojoroon_001(A0_178, A1_179, A2_180) +defaultTalkWithChichiroon_001(A0_181, A1_182, A2_183) +defaultTalkWithBuburoon_001(A0_184, A1_185, A2_186) +defaultTalkWithHaldberk_001(A0_187, A1_188, A2_189) +defaultTalkWithP_tahjha_001(A0_190, A1_191, A2_192) +defaultTalkWithElilwaen_001(A0_193, A1_194, A2_195) +defaultTalkWithDodoroba_001(A0_196, A1_197, A2_198) +defaultTalkWithIvan_001(A0_199, A1_200, A2_201) +defaultTalkWithLilina_001(A0_202, A1_203, A2_204) +defaultTalkWithThosinbaen_001(A0_205, A1_206, A2_207) +defaultTalkWithRubh_epocan_001(A0_208, A1_209, A2_210) +defaultTalkWithRubh_hob_001(A0_211, A1_212, A2_213) +defaultTalkWithMaunie_001(A0_214, A1_215, A2_216) +defaultTalkWithMaunie_002(A0_217, A1_218, A2_219) +defaultTalkWithMaunie_003(A0_220, A1_221, A2_222) +defaultTalkWithGigirya_001(A0_223, A1_224, A2_225) +defaultTalkWithGigirya_002(A0_226, A1_227, A2_228) +defaultTalkWithGigirya_003(A0_229, A1_230, A2_231) +defaultTalkWithKokoto_001(A0_232, A1_233, A2_234) +defaultTalkWithKokoto_002(A0_235, A1_236, A2_237) +defaultTalkWithKokoto_003(A0_238, A1_239, A2_240) +defaultTalkWithTirauland_001(A0_241, A1_242, A2_243) +defaultTalkWithTirauland_010(A0_244, A1_245, A2_246) +defaultTalkWithTirauland_002(A0_247, A1_248, A2_249) +defaultTalkWithTirauland_003(A0_250, A1_251, A2_252) +defaultTalkWithEstrilda_001(A0_253, A1_254, A2_255) +defaultTalkWithEstrilda_002(A0_256, A1_257, A2_258) +defaultTalkWithEstrilda_003(A0_259, A1_260, A2_261) +defaultTalkWithGregory_001(A0_262, A1_263, A2_264) +defaultTalkWithGregory_002(A0_265, A1_266, A2_267) +defaultTalkWithGregory_003(A0_268, A1_269, A2_270) +defaultTalkWithChantine_001(A0_271, A1_272, A2_273) +defaultTalkWithChantine_002(A0_274, A1_275, A2_276) +defaultTalkWithChantine_003(A0_277, A1_278, A2_279) +defaultTalkWithNanaka_001(A0_280, A1_281, A2_282) +defaultTalkWithNanaka_002(A0_283, A1_284, A2_285) +defaultTalkWithNanaka_003(A0_286, A1_287, A2_288) +defaultTalkWithKakamehi_001(A0_289, A1_290, A2_291) +defaultTalkWithKakamehi_002(A0_292, A1_293, A2_294) +defaultTalkWithKakamehi_003(A0_295, A1_296, A2_297) +defaultTalkWithStephannot_001(A0_298, A1_299, A2_300) +defaultTalkWithStephannot_002(A0_301, A1_302, A2_303) +defaultTalkWithStephannot_003(A0_304, A1_305, A2_306) +defaultTalkWithJosias_001(A0_307, A1_308, A2_309) +defaultTalkWithJosias_002(A0_310, A1_311, A2_312) +defaultTalkWithJosias_003(A0_313, A1_314, A2_315) +defaultTalkWithFrithuric_001(A0_316, A1_317, A2_318) +defaultTalkWithFrithuric_002(A0_319, A1_320, A2_321) +defaultTalkWithFrithuric_003(A0_322, A1_323, A2_324) +defaultTalkWithLauda_001(A0_325, A1_326, A2_327) +defaultTalkWithLauda_002(A0_328, A1_329, A2_330) +defaultTalkWithLauda_003(A0_331, A1_332, A2_333) +defaultTalkWithH_lahono_001(A0_334, A1_335, A2_336) +defaultTalkWithWyrstmann_001(A0_337, A1_338, A2_339) +defaultTalkWithTraveler030_001(A0_340, A1_341, A2_342) +defaultTalkWithTraveler031_001(A0_343, A1_344, A2_345) +defaultTalkWithTraveler032_001(A0_346, A1_347, A2_348) +defaultTalkWithYouty001_001(A0_349, A1_350, A2_351) +defaultTalkWithMerchant002_001(A0_352, A1_353, A2_354) +defaultTalkWithPirate030_001(A0_355, A1_356, A2_357) +defaultTalkWithLady002_001(A0_358, A1_359, A2_360) +defaultTalkWithSlaiboli_001(A0_361, A1_362, A2_363) +defaultTalkWithSyhrdaeg_001(A0_364, A1_365, A2_366) +defaultTalkWithPfynhaemr_001(A0_367, A1_368, A2_369) +defaultTalkWithMzimzizi_001(A0_370, A1_371, A2_372) +defaultTalkWithCarrilaut_001(A0_373, A1_374, A2_375) +defaultTalkWithGautzelin_001(A0_376, A1_377, A2_378) +defaultTalkWithZonggo_001(A0_379, A1_380, A2_381) +defaultTalkWithAdventurer032_001(A0_382, A1_383, A2_384) +defaultTalkWithKob031_001(A0_385, A1_386, A2_387) +defaultTalkWithJainelette_001(A0_388, A1_389, A2_390) +defaultTalkWithBrictt_001(A0_391, A1_392, A2_393) +defaultTalkWithLiautroix_001(A0_394, A1_395, A2_396) +defaultTalkWithLaniaitte_001(A0_397, A1_398, A2_399) +defaultTalkWithNyaalamo_001(A0_400, A1_401, A2_402) +defaultTalkWithFaezbroes_001(A0_403, A1_404, A2_405) +defaultTalkWithIsleen_001(A0_406, A1_407, A2_408) +defaultTalkWithSundhimal_001(A0_409, A1_410, A2_411) +defaultTalkWithEugennoix_001(A0_412, A1_413, A2_414) +defaultTalkWithRyssfloh_001(A0_415, A1_416, A2_417, A3_418) +defaultTalkWithKihtgamduhla_001(A0_419, A1_420, A2_421, A3_422) +defaultTalkWithFabodji_001(A0_423, A1_424, A2_425) +defaultTalkWithRobairlain_001(A0_426, A1_427, A2_428) +defaultTalkWithNorman_001(A0_429, A1_430, A2_431) +defaultTalkWithBaenskylt_001(A0_432, A1_433, A2_434) +defaultTalkWithAimiliens_001(A0_435, A1_436, A2_437) +defaultTalkWithFongho_001(A0_438, A1_439, A2_440, A3_441) +defaultTalkWithBaenryss_001(A0_442, A1_443, A2_444) +defaultTalkWithChachapi_001(A0_445, A1_446, A2_447) +defaultTalkWithForchetaix_001(A0_448, A1_449, A2_450) +defaultTalkWithSosoze_001(A0_451, A1_452, A2_453) +defaultTalkWithColson_001(A0_454, A1_455, A2_456) +defaultTalkWithHihine_001(A0_457, A1_458, A2_459) +defaultTalkWithTrinne_001(A0_460, A1_461, A2_462) +defaultTalkWithSailor031_001(A0_463, A1_464, A2_465) +defaultTalkWithPorter001_001(A0_466, A1_467, A2_468) +defaultTalkWithAdventurer030_001(A0_469, A1_470, A2_471) +defaultTalkWithPirate031_001(A0_472, A1_473, A2_474) +defaultTalkWithLady001_001(A0_475, A1_476, A2_477) +defaultTalkWithAdventurer031_001(A0_478, A1_479, A2_480) +defaultTalkWithSolelle_001(A0_481, A1_482, A2_483) +defaultTalkWithZanthael_001(A0_484, A1_485, A2_486) +defaultTalkWithJghonako_001(A0_487, A1_488, A2_489) +defaultTalkWithAhldskyff_001(A0_490, A1_491, A2_492) +defaultTalkWithSkarnwaen_001(A0_493, A1_494, A2_495) +defaultTalkWithGnibnpha_001(A0_496, A1_497, A2_498) +defaultTalkWithAudaine_001(A0_499, A1_500, A2_501) +defaultTalkWithCeadda_001(A0_502, A1_503, A2_504) +defaultTalkWithZehrymm_001(A0_505, A1_506, A2_507) +defaultTalkWithTatasako_001(A0_508, A1_509, A2_510) +defaultTalkWithDympna_001(A0_511, A1_512, A2_513) +defaultTalkWithBmallpa_001(A0_514, A1_515, A2_516) +defaultTalkWithFerdillaix_001(A0_517, A1_518, A2_519) +defaultTalkWithFufuna_001(A0_520, A1_521, A2_522) +defaultTalkWithDavyd_001(A0_523, A1_524, A2_525) +defaultTalkWithOrtolf_001(A0_526, A1_527, A2_528) +defaultTalkWithMaetistym_001(A0_529, A1_530, A2_531) +defaultTalkWithFzhumii_001(A0_532, A1_533, A2_534) +defaultTalkWithShoshoma_001(A0_535, A1_536, A2_537) +defaultTalkWithArnegis_001(A0_538, A1_539, A2_540) +defaultTalkWithRbaharra_001(A0_541, A1_542, A2_543) +defaultTalkWithAergwynt_001(A0_544, A1_545, A2_546) +defaultTalkWithKakalan_001(A0_547, A1_548, A2_549) +defaultTalkWithSathzant_001(A0_550, A1_551, A2_552) +defaultTalkWithNnagali_001(A0_553, A1_554, A2_555) +defaultTalkWithVhynho_001(A0_556, A1_557, A2_558) +defaultTalkWithZuzule_001(A0_559, A1_560, A2_561) +defaultTalkWithFuzakanzak_001(A0_562, A1_563, A2_564) +defaultTalkWithBnhapla_001(A0_565, A1_566, A2_567) +defaultTalkWithMerlzirn_001(A0_568, A1_569, A2_570) +defaultTalkWithMerlzirn_002(A0_571, A1_572, A2_573) +defaultTalkWithNinianne_001(A0_574, A1_575, A2_576) +defaultTalkWithNheujawantal_001(A0_577, A1_578, A2_579) +defaultTalkWithMaisie_001(A0_580, A1_581, A2_582) +defaultTalkWithWhahtoa_001(A0_583, A1_584, A2_585) +defaultTalkWithGnanghal_001(A0_586, A1_587, A2_588) +defaultTalkWithKehdamujuuk_001(A0_589, A1_590, A2_591) +defaultTalkWithGert_001(A0_592, A1_593, A2_594) +defaultTalkWithLorhzant_001(A0_595, A1_596, A2_597) +defaultTalkWithNahctahr_001(A0_598, A1_599, A2_600) +defaultTalkWithKokomui_001(A0_601, A1_602, A2_603) +defaultTalkWithEptolmi_001(A0_604, A1_605, A2_606) +defaultTalkWithZabinie_001(A0_607, A1_608, A2_609) +defaultTalkWithDeladomadalado_001(A0_610, A1_611, A2_612) +defaultTalkWithSkoefmynd_001(A0_613, A1_614, A2_615) +defaultTalkWithBubusha_001(A0_616, A1_617, A2_618) +defaultTalkWithFupepe_001(A0_619, A1_620, A2_621) +defaultTalkWithOadebh_001(A0_622, A1_623, A2_624) +defaultTalkWithMyndeidin_001(A0_625, A1_626, A2_627) +defaultTalkWithModestmouse_001(A0_628, A1_629, A2_630) +defaultTalkWithDuchesnelt_001(A0_631, A1_632, A2_633) +defaultTalkWithSkribskoef_001(A0_634, A1_635, A2_636) +defaultTalkWithYalabali_001(A0_637, A1_638, A2_639) +defaultTalkWithSyzfrusk_001(A0_640, A1_641, A2_642) +defaultTalkWithInairoh_001(A0_643, A1_644, A2_645) +defaultTalkWithMagaswyn_001(A0_646, A1_647, A2_648) +defaultTalkWithSenahchalahko_001(A0_649, A1_650, A2_651) +defaultTalkWithWaldibert_001(A0_652, A1_653, A2_654) +defaultTalkWithEbandala_001(A0_655, A1_656, A2_657) +defaultTalkWithGuidingstar_001(A0_658, A1_659, A2_660) +defaultTalkWithHundredeyes_001(A0_661, A1_662, A2_663) +defaultTalkWithSizhaepocan_001(A0_664, A1_665, A2_666) +defaultTalkWithMareillie_001(A0_667, A1_668, A2_669) +defaultTalkWithAngryriver_001(A0_670, A1_671, A2_672) +defaultTalkWithSyntberk_001(A0_673, A1_674, A2_675) +defaultTalkWithBibiraka_001(A0_676, A1_677, A2_678) +defaultTalkWithThatakhamazom_001(A0_679, A1_680, A2_681) +defaultTalkWithRoostingcrow_001(A0_682, A1_683, A2_684) +defaultTalkWithZentsa_001(A0_685, A1_686, A2_687) +defaultTalkWithAldyet_001(A0_688, A1_689, A2_690) +defaultTalkWithAjinZukajin_001(A0_691, A1_692, A2_693) +defaultTalkWithRaplulu_001(A0_694, A1_695, A2_696) +defaultTalkWithMurlskylt_001(A0_697, A1_698, A2_699) +defaultTalkWith_Aenore001(A0_700, A1_701, A2_702) +defaultTalkWithANSGOR_100(A0_703, A1_704, A2_705) +defaultTalkWithImania_001(A0_706, A1_707, A2_708) +defaultTalkWithSweetnix_001(A0_709, A1_710, A2_711) +defaultTalkWithLolojo_001(A0_712, A1_713, A2_714) +defaultTalkWithQmolosi_001(A0_715, A1_716, A2_717) +defaultTalkWithBran_001(A0_718, A1_719, A2_720) +defaultTalkWithTutumoko_001(A0_721, A1_722, A2_723) +defaultTalkWithBrianna_001(A0_724, A1_725, A2_726) +defaultTalkWithFaine_001(A0_727, A1_728, A2_729) +defaultTalkWithAerghaemr_001(A0_730, A1_731, A2_732) +defaultTalkWithWalcher_001(A0_733, A1_734, A2_735) +defaultTalkWithKurtz_001(A0_736, A1_737, A2_738) +defaultTalkWithAlain_001(A0_739, A1_740, A2_741) +defaultTalkCaravanChocoboLim_001(A0_742, A1_743, A2_744) +downTownTalk(A0_745, A1_746, A2_747, A3_748, A4_749, A5_750) +tribeTalk(A0_752, A1_753, A2_754) +talkIdayCap(A0_755, A1_756, A2_757) +talkIday1(A0_758, A1_759, A2_760) +talkIday2(A0_761, A1_762, A2_763) +defaultTalkWithInn_Desk(A0_764, A1_765, A2_766) +defaultTalkWithInn_ExitDoor(A0_767, A1_768, A2_769) +defaultTalkWithExit01(A0_770, A1_771, A2_772) +defaultTalkWithMarketNpc(A0_773, A1_774, A2_775) +defaultTalkWithHamletGuardLim_001(A0_776, A1_777, A2_778) +--]] + + + } function onTalk(player, quest, npc, eventName) diff --git a/Data/scripts/quests/man/man0u0.lua b/Data/scripts/quests/man/man0u0.lua index 15bb4720..a8f8e70c 100644 --- a/Data/scripts/quests/man/man0u0.lua +++ b/Data/scripts/quests/man/man0u0.lua @@ -4,13 +4,17 @@ require("global"); Quest Script -Name: Flowers for All +Name: Flowers for All Code: Man0u0 Id: 110009 Prereq: None (Given on chara creation) Notes: RURURAJI scripting handled via PopulaceChocoboLender.lua -TO-DO: Sequence 000 - Crowd NPCs. +TO-DO: Sequence 000 - Crowd NPCs. Sequence 010 - Adv. Guild NPCs + + +https://www.youtube.com/watch?v=XXGrSFrfYo4 + ]] -- Sequence Numbers @@ -36,7 +40,7 @@ OPENING_STOPER_ULDAH = 1090373; KEEN_EYED_MERCHANT = 1000401; --- MUMPISH_MIQOTE = 1000992; -- Unused on this client version +--MUMPISH_MIQOTE = 1000992; -- Unused on this client version. Calls processEvent020_6 HIGH_SPIRITED_FELLOW = 1001042; DISREPUTABLE_MIDLANDER = 1001044; LONG_LEGGED_LADY = 1001112; @@ -45,11 +49,33 @@ TOOTH_GRINDING_TRAVELER = 1001646; FULL_LIPPED_FILLE = 1001647; YAYATOKI = 1500129; -BLOCKER1 = 1090372; -BLOCKER2 = 1090372; +BLOCKER = 1090372; ULDAH_OPENING_EXIT = 1099046; ---1001114-1001140: Untargetable standby actors for sequence 000: Add the correct ones at some point +-- Non-interactive NPCs +CROWD_HYUR_M = 1001114; +CROWD_HYUR_F = 1001115; +CROWD_ELEZEN_M = 1001116; +CROWD_ELEZEN_F = 1001117; +CROWD_LALAFELL_M = 1001118; +CROWD_LALAFELL_F = 1001119; +CROWD_MIQOTE = 1001120; +CROWD_ROEGADYN = 1001121; +GUILD_KIORA = 1000780; +GUILD_OPONDHAO = 1000781; +GUILD_BERTRAM = 1000782; +GUILD_MINERVA = 1000783; +GUILD_ZOENGTERBIN = 1000784; +GUILD_STYRMOEYA = 1000785; +GUILD_YHAH_AMARIYO = 1000786; +GUILD_HILDIE = 1000787; +GUILD_LETTICE = 1000788; +GUILD_TYON = 1000789; +GUILD_OTOPA_POTTOPA = 1000864; +GUILD_THAISIE = 1000865; +GUILD_SESEBARU = 1001182; +GUILD_TOTONAWA = 1001371; +GUILD_EUSTACE = 1001372; -- Quest Markers @@ -70,7 +96,7 @@ FLAG_SEQ000_MINITUT3 = 3; -- TalkEvent GIL_DIGGING_MISTRESS FLAG_SEQ010_TALK0 = 0; -- TalkEvent YAYATOKI -function onStart(player, quest) +function onStart(player, quest) quest:StartSequence(SEQ_000); end @@ -82,17 +108,17 @@ function onSequence(player, quest, sequence) if (sequence == SEQ_000) then -- Setup states incase we loaded in. local asciliaCanPush = not quest:GetFlag(FLAG_SEQ000_MINITUT0); - local asciliaFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE; + local asciliaFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE; local fretfulfarmhandFlag = quest:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE; - local gildiggingmistressFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE; - - local exitFlag = quest:GetFlags() == 0xF and QFLAG_MAP or QFLAG_NONE; + local gildiggingmistressFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE; + + local exitFlag = quest:GetFlags() == 0xF and QFLAG_MAP or QFLAG_NONE; if (asciliaCanPush) then fretfulfarmhandFlag = QFLAG_NONE; gildiggingmistressFlag = QFLAG_NONE; - end - + end + --AddENpc(classId, byte flagType=0,isTalkEnabled, isPushEnabled, isEmoteEnabled, isSpawned) quest:AddENpc(ASCILIA, asciliaFlag, true, asciliaCanPush); quest:AddENpc(WARBURTON); @@ -108,9 +134,9 @@ function onSequence(player, quest, sequence) quest:AddENpc(EXIT_TRIGGER, exitFlag, false, true); quest:AddENpc(OPENING_STOPER_ULDAH, QFLAG_NONE, false, false, true); - elseif (sequence == SEQ_010) then + elseif (sequence == SEQ_010) then local yayatokiFlag = quest:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_PLATE; - local uldahopeningexitFlag = not quest:GetFlag(FLAG_SEQ010_TALK0) and QFLAG_NONE or QFLAG_MAP; + local uldahopeningexitFlag = QFLAG_MAP; quest:AddENpc(KEEN_EYED_MERCHANT); quest:AddENpc(HIGH_SPIRITED_FELLOW); quest:AddENpc(DISREPUTABLE_MIDLANDER); @@ -119,8 +145,7 @@ function onSequence(player, quest, sequence) quest:AddENpc(TOOTH_GRINDING_TRAVELER); quest:AddENpc(FULL_LIPPED_FILLE); quest:AddENpc(YAYATOKI, yayatokiFlag); - quest:AddENpc(BLOCKER1, QFLAG_NONE, false, true); - -- quest:AddENpc(BLOCKER2, QFLAG_NONE, false, true); + quest:AddENpc(BLOCKER, QFLAG_NONE, false, true); quest:AddENpc(ULDAH_OPENING_EXIT, uldahopeningexitFlag, false, true); end end @@ -128,39 +153,39 @@ end function onTalk(player, quest, npc) local sequence = quest:getSequence(); local classId = npc:GetActorClassId(); - + if (sequence == SEQ_000) then seq000_onTalk(player, quest, npc, classId); elseif (sequence == SEQ_010) then - seq010_onTalk(player, quest, npc, classId); + seq010_onTalk(player, quest, npc, classId); end - quest:UpdateENPCs(); + quest:UpdateENPCs(); end function onPush(player, quest, npc) local sequence = quest:getSequence(); - local classId = npc:GetActorClassId(); + local classId = npc:GetActorClassId(); if (sequence == SEQ_000) then if (classId == ASCILIA) then - callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002"); + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002"); player:EndEvent(); elseif (classId == EXIT_TRIGGER) then if (quest:GetFlags() == 0xF) then doExitTrigger(player, quest, npc); return; else - callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001"); + callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml001"); GetWorldManager():DoPlayerMoveInZone(player, -22, 196, 87, 2.4, 0x11) player:EndEvent(); end end elseif (sequence == SEQ_010) then - if (classId == BLOCKER1) then - + if (classId == BLOCKER) then + posz = player:GetPos()[3]; - + if (posz >= 71 and posz <= 95) then callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml002"); GetWorldManager():DoPlayerMoveInZone(player, -22.81, 196, 87.82, 2.98, 0x11); @@ -168,48 +193,48 @@ function onPush(player, quest, npc) callClientFunction(player, "delegateEvent", player, quest, "processTtrBlkNml003"); GetWorldManager():DoPlayerMoveInZone(player, -0.3, 196, 116, -2.7, 0x11); end - elseif (classId == ULDAH_OPENING_EXIT) then + elseif (classId == ULDAH_OPENING_EXIT) then player:ReplaceQuest(quest, "Man0u1") return; end end - quest:UpdateENPCs(); + quest:UpdateENPCs(); end function onNotice(player, quest, target) - callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ"); + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ"); player:EndEvent(); - quest:UpdateENPCs(); + quest:UpdateENPCs(); end function seq000_onTalk(player, quest, npc, classId) - + if (classId == ASCILIA) then - - if (not quest:GetFlag(FLAG_SEQ000_MINITUT0)) then -- If Talk tutorial - callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003"); - quest:SetFlag(FLAG_SEQ000_MINITUT0); -- Used to disable her PushEvent / Allow for her next TalkEvent - else - callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001"); + + if (not quest:GetFlag(FLAG_SEQ000_MINITUT0)) then -- If Talk tutorial + callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal003"); + quest:SetFlag(FLAG_SEQ000_MINITUT0); -- Used to disable her PushEvent / Allow for her next TalkEvent + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini001"); quest:SetFlag(FLAG_SEQ000_MINITUT1); -- Ascilia has now been talked to. end elseif (classId == FRETFUL_FARMHAND) then if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then - callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002_first"); - quest:SetFlag(FLAG_SEQ000_MINITUT2); - else - callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002"); - end + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002_first"); + quest:SetFlag(FLAG_SEQ000_MINITUT2); + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002"); + end elseif (classId == GIL_DIGGING_MISTRESS) then if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then - callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003_first"); - quest:SetFlag(FLAG_SEQ000_MINITUT3); - else - callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003"); - end - + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003_first"); + quest:SetFlag(FLAG_SEQ000_MINITUT3); + else + callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003"); + end + elseif (classId == WARBURTON) then callClientFunction(player, "delegateEvent", player, quest, "processEvent000_3"); elseif (classId == RURURAJI) then @@ -231,10 +256,10 @@ function seq000_onTalk(player, quest, npc, classId) player:EndEvent(); end -function seq010_onTalk(player, quest, npc, classId) +function seq010_onTalk(player, quest, npc, classId) if (classId == KEEN_EYED_MERCHANT) then - callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2"); + callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2"); elseif (classId == HIGH_SPIRITED_FELLOW) then callClientFunction(player, "delegateEvent", player, quest, "processEvent020_3"); elseif (classId == DISREPUTABLE_MIDLANDER) then @@ -262,22 +287,21 @@ end function getJournalMapMarkerList(player, quest) local sequence = quest:getSequence(); local possibleMarkers = {}; - + if (sequence == SEQ_000) then - if (quest:GetFlag(FLAG_SEQ000_MINITUT0)) then + if (quest:GetFlag(FLAG_SEQ000_MINITUT0)) then if (not quest:GetFlag(FLAG_SEQ000_MINITUT1)) then table.insert(possibleMarkers, MRKR_ASCILIA); end if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then table.insert(possibleMarkers, MRKR_FRETFUL_FARMHAND); end if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then table.insert(possibleMarkers, MRKR_GIL_DIGGING_MISTRESS); end end - + elseif (sequence == SEQ_010) then - if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then + if (not quest:GetFlag(FLAG_SEQ010_TALK0)) then table.insert(possibleMarkers, MRKR_YAYATOKI) - else - table.insert(possibleMarkers, MRKR_ADV_GUILD); end + table.insert(possibleMarkers, MRKR_ADV_GUILD); end - + return unpack(possibleMarkers) end @@ -288,19 +312,19 @@ function doExitTrigger(player, quest, npc) quest:ClearData(); quest:StartSequence(SEQ_005); contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001"); - + if (contentArea == nil) then return; end - - director = contentArea:GetContentDirector(); - player:AddDirector(director); + + director = contentArea:GetContentDirector(); + player:AddDirector(director); director:StartDirector(false); - + player:KickEvent(director, "noticeEvent", true); - player:SetLoginDirector(director); - - GetWorldManager():DoZoneChangeContent(player, contentArea, -24.34, 192, 34.22, 0.78, 16); + player:SetLoginDirector(director); + + GetWorldManager():DoZoneChangeContent(player, contentArea, -24.34, 192, 34.22, 0.78, 16); return; end diff --git a/Data/scripts/quests/man/man0u1.lua b/Data/scripts/quests/man/man0u1.lua index d582aa7a..1de8bf9d 100644 --- a/Data/scripts/quests/man/man0u1.lua +++ b/Data/scripts/quests/man/man0u1.lua @@ -98,7 +98,7 @@ SPRY_SALESMAN = 1000939; UPBEAT_ADVENTURER = 1000940; SEEMINGLY_CALM_ADVENTURER = 1000941; UNKNOWN1 = 0; -UNKNOWN2 = 0 +UNKNOWN2 = 0; THANCRED = 1000948; -- 1000010 @@ -119,6 +119,7 @@ function onStart(player, quest) -- Immediately move to the Adventurer's Guild private area callClientFunction(player, "delegateEvent", player, quest, "processEventMomodiStart"); + GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 4, 15, -75.242, 195.009, 74.572, -0.046); player:SendGameMessage(quest, 329, 0x20); player:SendGameMessage(quest, 330, 0x20); end diff --git a/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua b/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua deleted file mode 100644 index 56e69c09..00000000 --- a/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/Man0u0_trtl_gate.lua +++ /dev/null @@ -1,3 +0,0 @@ -function init(npc) - return false, false, 0, 0, 0x1A5, 4287; -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/man0u0_tutrl_gate.lua b/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/man0u0_tutrl_gate.lua new file mode 100644 index 00000000..97f1ad42 --- /dev/null +++ b/Data/scripts/unique/wil0Battle01/MapObjOnlyShowHide/man0u0_tutrl_gate.lua @@ -0,0 +1,3 @@ +function init(npc) + return false, false, 0, 0, 0x1A5, 4289; +end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceChocoboLender/rururaji.lua b/Data/scripts/unique/wil0Battle01/PopulaceChocoboLender/rururaji.lua deleted file mode 100644 index 903ca699..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceChocoboLender/rururaji.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/ascilia.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/ascilia.lua deleted file mode 100644 index 4491c814..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/ascilia.lua +++ /dev/null @@ -1,52 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onSpawn(player, npc) - npc:SetQuestGraphic(player, 0x2); -end - -function onEventStarted(player, npc, triggerName) - man0u0Quest = player:GetQuest("Man0u0"); - - if (man0u0Quest ~= nil) then - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then - npc:SetQuestGraphic(player, 0x2); - end - - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL3_DONE) == true) then - player:SetEventStatus(npc, "pushDefault", false, 0x2); - end - end - - if (man0u0Quest ~= nil) then - if (triggerName == "pushDefault") then - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrNomal002", nil, nil, nil); - elseif (triggerName == "talkDefault") then - --Is doing talk tutorial? - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_TUTORIAL3_DONE) == false) then - player:SetEventStatus(npc, "pushDefault", false, 0x2); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrNomal003", nil, nil, nil); - man0u0Quest:SetQuestFlag(MAN0U0_FLAG_TUTORIAL3_DONE, true); - npc:SetQuestGraphic(player, 0x2); - man0u0Quest:SaveData(); - - player:GetDirector("OpeningDirector"):onTalkEvent(player, npc); - --Was he talked to for the mini tutorial? - else - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini001", nil, nil, nil); - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then - npc:SetQuestGraphic(player, 0x0); - man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1, true); - man0u0Quest:SaveData(); - end - - end - - player:GetDirector("OpeningDirector"):onTalkEvent(player, npc); - else - player:EndEvent(); - end - end - - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/big-bellied_barker.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/big-bellied_barker.lua deleted file mode 100644 index a179ee3e..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/big-bellied_barker.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_6", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/dapper_dan.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/dapper_dan.lua deleted file mode 100644 index 8d61d910..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/dapper_dan.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_9", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/debauched_demoness.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/debauched_demoness.lua deleted file mode 100644 index 0f6c595a..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/debauched_demoness.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_8", nil, nil, nil); - player:EndEvent(); -end diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/exit_trigger.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/exit_trigger.lua deleted file mode 100644 index 1118f89d..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/exit_trigger.lua +++ /dev/null @@ -1,46 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onSpawn(player, npc) - - man0u0Quest = player:GetQuest("Man0u0"); - - if (man0u0Quest ~= nil) then - player:SetEventStatus(npc, "pushDefault", true, 0x2); - if (man0u0Quest ~= nil and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == true and man0U0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == true) then - npc:SetQuestGraphic(player, 0x3); - else - npc:SetQuestGraphic(player, 0x0); - end - end - -end - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) ~= true) then - print "AAAA" - end - - if (man0u0Quest ~= nil and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == true and man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == true) then - player:EndEvent(); - - contentArea = player:GetZone():CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0u01", "SimpleContent30079", "Quest/QuestDirectorMan0u001"); - - if (contentArea == nil) then - player:EndEvent(); - return; - end - - director = contentArea:GetContentDirector(); - player:AddDirector(director); - director:StartDirector(false); - - player:KickEvent(director, "noticeEvent", true); - player:SetLoginDirector(director); - - GetWorldManager():DoZoneChangeContent(player, contentArea, -24.34, 192, 34.22, 0.78, 16); - end - -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/fretful_farmhand.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/fretful_farmhand.lua deleted file mode 100644 index 30ce2c1b..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/fretful_farmhand.lua +++ /dev/null @@ -1,31 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onSpawn(player, npc) - man0u0Quest = player:GetQuest("Man0u0"); - - if (man0u0Quest ~= nil) then - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE1) == false) then - npc:SetQuestGraphic(player, 0x2); - end - end -end - -function onEventStarted(player, npc, triggerName) - man0u0Quest = player:GetQuest("Man0u0"); - - if (man0u0Quest ~= nil) then - if (triggerName == "talkDefault") then - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2) == false) then - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini002_first", nil, nil, nil); - npc:SetQuestGraphic(player, 0x0); - man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE2, true); - man0u0Quest:SaveData(); - player:GetDirector("OpeningDirector"):onTalkEvent(player, npc); - else - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini002", nil, nil, nil); - end - end - end - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/gil-digging_mistress.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/gil-digging_mistress.lua deleted file mode 100644 index 1f0afb17..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/gil-digging_mistress.lua +++ /dev/null @@ -1,31 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onSpawn(player, npc) - man0u0Quest = player:GetQuest("Man0u0"); - - if (man0u0Quest ~= nil) then - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then - npc:SetQuestGraphic(player, 0x2); - end - end -end - -function onEventStarted(player, npc, triggerName) - man0u0Quest = player:GetQuest("Man0u0"); - - if (man0u0Quest ~= nil) then - if (triggerName == "talkDefault") then - if (man0u0Quest:GetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3) == false) then - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini003_first", nil, nil, nil); - npc:SetQuestGraphic(player, 0x0); - man0u0Quest:SetQuestFlag(MAN0U0_FLAG_MINITUT_DONE3, true); - man0u0Quest:SaveData(); - player:GetDirector("OpeningDirector"):onTalkEvent(player, npc); - else - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrMini003", nil, nil, nil); - end - end - end - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/loutish_lad.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/loutish_lad.lua deleted file mode 100644 index bf687f2b..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/loutish_lad.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_10", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/rururaji.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/rururaji.lua deleted file mode 100644 index 903ca699..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/rururaji.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_13", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/stocky_stranger.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/stocky_stranger.lua deleted file mode 100644 index f8182940..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/stocky_stranger.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_6_2", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/twittering_tomboy.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/twittering_tomboy.lua deleted file mode 100644 index b768cebe..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/twittering_tomboy.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_12", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Battle01/PopulaceStandard/warburton.lua b/Data/scripts/unique/wil0Battle01/PopulaceStandard/warburton.lua deleted file mode 100644 index 4dfcc5a4..00000000 --- a/Data/scripts/unique/wil0Battle01/PopulaceStandard/warburton.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_3", nil, nil, nil); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker1.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker1.lua deleted file mode 100644 index 729f1ce1..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker1.lua +++ /dev/null @@ -1,13 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - - if (man0u0Quest ~= nil) then - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrBlkNml002", nil, nil, nil); - GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 3, 15, -22.81, 196, 87.82, 2.98); - end - - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker2.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker2.lua deleted file mode 100644 index 40598fb4..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/blocker2.lua +++ /dev/null @@ -1,14 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - - if (man0u0Quest ~= nil) then - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processTtrBlkNml003", nil, nil, nil); - GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 3, 15, -22.81, 196, 87.82, 2.98); - end - - player:EndEvent(); - -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/disreputable_midlander.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/disreputable_midlander.lua deleted file mode 100644 index 3c895bb5..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/disreputable_midlander.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020_4"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/full-lipped_fille.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/full-lipped_fille.lua deleted file mode 100644 index 7858c31a..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/full-lipped_fille.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEtc002"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/high-spirited_fellow.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/high-spirited_fellow.lua deleted file mode 100644 index a6182b5f..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/high-spirited_fellow.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020_3"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/keen-eyed_merchant.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/keen-eyed_merchant.lua deleted file mode 100644 index c0fd4106..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/keen-eyed_merchant.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020_2"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/large-lunged_laborer.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/large-lunged_laborer.lua deleted file mode 100644 index 8a6c0029..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/large-lunged_laborer.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEtc003"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/long-legged_lady.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/long-legged_lady.lua deleted file mode 100644 index 9335baad..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/long-legged_lady.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent000_14"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/mumpish_miqote.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/mumpish_miqote.lua deleted file mode 100644 index b4512aaa..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/mumpish_miqote.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020_6"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/rururaji.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/rururaji.lua deleted file mode 100644 index 397e1461..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/rururaji.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020_7"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/tooth-grinding_traveler.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/tooth-grinding_traveler.lua deleted file mode 100644 index 18a3d88f..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/tooth-grinding_traveler.lua +++ /dev/null @@ -1,8 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEtc001"); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/uldah_opening_exit.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/uldah_opening_exit.lua deleted file mode 100644 index 2aef1669..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/uldah_opening_exit.lua +++ /dev/null @@ -1,16 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onSpawn(player, npc) - npc:SetQuestGraphic(player, 0x3); -end - -function onEventStarted(player, npc) - man0u1Quest = GetStaticActor("Man0u1"); - callClientFunction(player, "delegateEvent", player, man0u1Quest, "processEventMomodiStart"); - player:ReplaceQuest(110009, 110010); - player:SendGameMessage(GetStaticActor("Man0u1"), 329, 0x20); - player:SendGameMessage(GetStaticActor("Man0u1"), 330, 0x20); - GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 4, 15, -75.242, 195.009, 74.572, -0.046); - player:endEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/yayatoki.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/yayatoki.lua deleted file mode 100644 index 1f2fc5a1..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_3/PopulaceStandard/yayatoki.lua +++ /dev/null @@ -1,13 +0,0 @@ -require ("global") -require ("quests/man/man0u0") - -function onSpawn(player, npc) - npc:SetQuestGraphic(player, 0x2); -end - -function onEventStarted(player, npc, triggerName) - man0u0Quest = GetStaticActor("Man0u0"); - callClientFunction(player, "delegateEvent", player, man0u0Quest, "processEvent020_8"); - npc:SetQuestGraphic(player, 0x0); - player:EndEvent(); -end \ No newline at end of file diff --git a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_4/PopulaceStandard/momodi.lua b/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_4/PopulaceStandard/momodi.lua deleted file mode 100644 index 03cdfed4..00000000 --- a/Data/scripts/unique/wil0Town01/PrivateArea/PrivateAreaMasterPast_4/PopulaceStandard/momodi.lua +++ /dev/null @@ -1,26 +0,0 @@ -require ("global") - -function onSpawn(player, npc) - npc:SetQuestGraphic(player, 0x2); -end - -function onEventStarted(player, npc, triggerName) - local man0u1Quest = player:GetQuest("Man0u1"); - local pos = player:GetPos(); - - if (man0u1Quest ~= nil) then - callClientFunction(player, "delegateEvent", player, man0u1Quest, "processEvent010"); - player:EndEvent(); - - --[[director = player:GetZone():CreateDirector("AfterQuestWarpDirector"); - player:KickEvent(director, "noticeEvent", true); - player:AddDirector(director); - player:SetLoginDirector(director); - --]] - GetWorldManager():DoZoneChange(player, 175, nil, 0, 15, pos[0], pos[1], pos[2], pos[3]); - return; - end - - player:EndEvent(); - -end \ No newline at end of file