Actor script fixes, documented populace classes and misc things

Base
        - gcseals.lua
            Helper functions for GC seals.  Tables the seal caps per rank and checks against it when adding seals.

    Commands
        - PartyTargetCommand.lua :
            Handles markers above head.  Basic documentation, only works on self. "Heart" doesn't work, client bug?
            Eventually will need an object in the party class to handle tracking marked players/targets for the group.

    Class Scripts
        - PopulaceCaravanAdviser.lua
            Documented.  Can purchase gysahl greens from them, unsure what else their use is.
        - PopulaceCaravanGuide.lua
            Documented the Caravan Guide NPC, who escorts the chocobos with you.
        - PopulaceCaravanManager.lua
            NPC who handles signing up for Caravan escort, among other functions.
        - PopulaceSpecialEventCryer.lua
            Covers three NPCs for the Foundation Event.  They handle trading specific items in exchange for GC seals.

    Unique ID Script fixes
        - flame_private_sisimuza_tetemuza.lua
            Foundation Event NPC functions laid out.
        - flame_sergeant_mimio_mio.lua
            Foundation Event NPC functions laid out.
        - serpent_lieutenant_marette.lua
            Foundation Event NPC functions laid out.
        - serpent_private_tristelle.lua
            Foundation Event NPC functions laid out.
        - serpent_sergeant_frilaix.lua
            Foundation Event NPC functions laid out.
        - serpent_sergeant_nelhah.lua
            Removed unique script. PopulaceSpecialEventCryer handles it.
        - ansgor.lua
            Had incorrect defaultTalk value
        - ne_of_eshtaimes.lua
            Door @ !warp 209 -139 206.113 195   Had incorrect mapObj value.
This commit is contained in:
CuriousJorge 2017-12-13 15:09:10 -05:00
parent 88233cf6d2
commit 359ea8a40e
14 changed files with 389 additions and 20 deletions

View file

@ -0,0 +1,41 @@
--[[
PopulaceCaravanAdviser Script
Functions:
adviserDeffault() - Not a typo. NPC dialog talking about a chocobo. Resets their sight on you, perhaps used on closing dialog?
adviserAsk() - Brings up a menu for caravan info, or purchasing gysahl greens
adviserAdvise() - NPC dialog discussing feeding chocobos
adviserSales(price) - Gysahl purchase dialog and prompt
adviserBuy() - Dialog to play after purchasing gysahl greens
adviserBuyNG() - NPC plays /shrug animation.
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
local gysahlPrice = 20;
local choice = callClientFunction(player, "adviserAsk");
if choice == 1 then
callClientFunction(player, "adviserAdvise");
elseif choice == 2 then
local purchaseChoice = callClientFunction(player, "adviserSales", gysahlPrice);
if purchaseChoice == 1 then
callClientFunction(player, "adviserBuy");
elseif purchaseChoice == 2 then
callClientFunction(player, "adviserBuyNG");
end
elseif choice == 3 then
callClientFunction(player, "adviserDeffault")
end
player:EndEvent();
end

View file

@ -0,0 +1,68 @@
--[[
PopulaceCaravanGuide Script
This script handles the caravan guide class, which is for the actor who escorts the chocobos behind them during Caravan Security events.
Functions:
caravanGuardCancel() - Menu prompt to abandon the caravan
caravanGuardReward(cargo, nil, areaName, playerGC, killCount, areaName2)
- Reward dialog for completing the caravan
- cargo = 0 (none) through 9 (all) for varying degrees of success dialog
- If playerGC doesn't match the GC of the areaName region, NPC mentions you don't need their seals.
- killCount shows an extra dialog if 40-49 enemies were slain, and a different one at 50+
caravanGuardNotReward() - Dialog stating you didn't contribute to the event at all
caravanGuardFailReward(areaName, areaName2) - Failure dialog, NPC offers free gysahl green, then offers free teleport back to aetheryte
caravanGuardThanks(name1, name2, name3) - Dialog for joining the caravan. NPC names the three chocobos. Name IDs from xtx_displayName
caravanGuardOffer(areaName, areaName2, playerGC) - Dialog for who to talk to for joining the caravan.
caravanGuardAmple(areaName, areaName2) - Dialog for NPC taking a break?
caravanGuardSuccess() - Dialog when you reached destination?
caravanGuardFailure(areaName, areaName2) - Failure dialog for mentioned area.
caravanGuardIgnore() - Resets NPC state for player? Or used for players not flagged for the event.
caravanGuardBonusReward(nil, isBonus?) - NPC says variation on a piece of dialog from the boolean passed
caravanGuardNotBonusReward() - Inventory full flavour dialog
Notes:
Functions employing areaName/areaName2 add their value together in the client's script to get the area name. Said area values are...
1 = Wineport, 2 = Quarrymill, 3 = Silver Bazaar, 4 = Aleport, 5 = Hyrstmill, 6 = Golden Bazaar
areaName will always be 1-3 for caravanGuardReward to function as expected for GC-related dialog
areaName2 will always be either 0 or 3. 0 for the lower level caravan area name, 3 for the higher level.
populaceCaravanGuide sheet:
ID Dialog Comment
6 It is time. Come, let us ride. - Caravan begins.
12 We've arrived at last! Come and speak to me when you're ready to claim your reward. - Caravan completed.
23 We're under attack! The chocobos! Protect the chocobos! - Caravan aggros monsters
27 Gods, have we already come this far? At this pace, we stand to make good time. - Says between 50% & 90% of the way to desgination? Can be said more than once per run
28 Well fought, friend. I thank the gods you're with us. Come, onward! - Cleared monsters that caravan aggro'd
TO-DO:
Document actors involved. Should be six of them.
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
local areaName = 1;
local areaName2 = 3;
local playerGC = 1;
local cargo = 9;
local killCount = 50;
callClientFunction(player, "caravanGuardOffer", areaName, areaName2, playerGC);
--callClientFunction(player, "caravanGuardReward", cargo, nil, areaName, playerGC, killCount, areaName2);
--player:SendGameMessageDisplayIDSender(npc, 6, MESSAGE_TYPE_SAY, npc.displayNameId);
player:EndEvent();
end

View file

@ -0,0 +1,49 @@
--[[
PopulaceCaravanManager Script
Functions:
caravanGuardEntry(areaGC, hasRoomForGCSeals, areaName, difficulty, playerGC, playerCountRequired, levelRequired)
- Dialog for signing up for caravan. areaGC(1-3) & areaName(0 or 3) added together to get location name.
- If difficulty => 40 on areaGC 1-3 & areaName 0, NPC mentions it's be a tougher trip
caravanGuardQuestion(areaName1, areaName2, escortMax, isSameGC?, playerGC?) - Ask about the caravan escort
caravanGuardJoinOK(areaName1, areaName2, playerGC) - Dialog for successfully joining the caravan
caravanGuardJoinNG(nil, maxEscorts, playerGC) - Dialog dictating how many escorts total filled the run.
caravanGuardAmple(nil, playerGC, playerGC) - Dialog for caravan escort being full.
caravanGuardOther(npcGC) - Dialog where NPC mentions you're not part of the given Grand Company parameter
caravanGuardSigh() - NPC does a shrug animation
caravanGuardHuh() - NPC does /huh
caravanGuardCancel(nil, playerGC) - Dialog for canceling caravan escort.
Notes:
Some NPC dialog address you differently if your GC rank is Chief Sergeant (id 27) or higher, but only in non-English languages.
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
local GC = 3;
local playerGC = 1;
local areaName = 0;
local level = 25;
local playerCount = 8;
local difficulty = 41;
local hasRoomForGCSeals = false;
local isSameGC = true;
local escortMax = 8;
areaName1 = 1;
areaName2 = 3;
-- callClientFunction(player, "caravanGuardCancel", nil, 3);
callClientFunction(player, "caravanGuardEntry", GC, hasRoomForGCSeals, areaName, difficulty, playerGC, playerCount, level);
player:EndEvent();
end

View file

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