Removed all the unique talk defaults for Wil region (thx Jorge). Got most of man0l0 working with the new system. Fixed nullterm str parsing.

This commit is contained in:
Filip Maj 2022-01-27 17:38:15 -05:00
parent 6e869af4fb
commit 26fd79bea5
133 changed files with 481 additions and 2247 deletions

View File

@ -267,7 +267,20 @@ namespace Meteor.Common
public static string ReadNullTermString(BinaryReader reader, int maxSize = 0x20)
{
return Encoding.ASCII.GetString(reader.ReadBytes(maxSize)).Trim(new[] { '\0' });
long pos = reader.BaseStream.Position;
int size = 0;
for (int i = 0; i < maxSize; i++)
{
if (reader.ReadByte() == 0)
{
size = i;
break;
}
}
reader.BaseStream.Seek(pos, SeekOrigin.Begin);
string result = Encoding.ASCII.GetString(reader.ReadBytes(size));
reader.BaseStream.Seek(pos + maxSize, SeekOrigin.Begin);
return result;
}
public static void WriteNullTermString(BinaryWriter writer, string value, int maxSize = 0x20)

View File

@ -1,510 +0,0 @@
--[[
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

View File

@ -1,107 +0,0 @@
--[[
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

View File

@ -1,655 +0,0 @@
--[[
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

View File

@ -8,7 +8,7 @@ Switches between active and passive mode states
--]]
function onEventStarted(player, command, triggerName)
function onEventStarted(player, command, eventType, eventName)
if (player.currentMainState == 0x0000) then
player.Engage(0, 0x0002);

View File

@ -32,11 +32,11 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName)
-- we're getting a list/array from c# so 0 index
local pos = player:GetPos();
local player_x = pos[0];
local player_y = pos[1];
local player_z = pos[2];
local player_rot = pos[3];
local player_zone = pos[4];
local player_x = pos[1];
local player_y = pos[2];
local player_z = pos[3];
local player_rot = pos[4];
local player_zone = pos[5];
local worldManager = GetWorldManager();

View File

@ -1,27 +1,22 @@
require ("global")
require ("quests/man/man0l0")
require ("quests/man/man0g0")
require ("quests/man/man0u0")
require("global")
function init()
return "/Director/OpeningDirector";
end
function onEventStarted(player, actor, triggerName)
function onEventStarted(player, actor, eventTrigger, eventName)
if (player:HasQuest(110001) == true) then
quest = player:GetQuest("Man0l0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ", nil, nil, nil);
quest:OnNotice(player);
elseif (player:HasQuest(110005) == true) then
quest = player:GetQuest("Man0g0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ", nil, nil, nil);
quest:OnNotice(player);
elseif (player:HasQuest(110009) == true) then
quest = player:GetQuest("Man0u0");
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ", nil, nil, nil);
quest:OnNotice(player);
end
player:EndEvent();
end
function main()
@ -56,15 +51,3 @@ function onTalkEvent(player, npc)
end
end
function onPushEvent(player, npc)
end
function onCommandEvent(player, command)
end
function onEventUpdate(player, npc)
end
function onCommand(player, command)
end

View File

@ -72,10 +72,8 @@ function onEventStarted(player, director, triggerName)
OpenWidget (DEFEAT ENEMY)
]]
man0l0Quest:NextPhase(10);
player:EndEvent();
man0l0Quest:StartSequence(10);
player:GetZone():ContentFinished();
GetWorldManager():DoZoneChange(player, 230, "PrivateAreaMasterPast", 1, 15, -826.868469, 6, 193.745865, -0.008368492);
player:EndEvent();
end

View File

@ -14,13 +14,185 @@ Contains all default lines for talkable npcs in the Wilderness Region (aka Thana
-- [ActorClassId] = "client_function_name"
local defaultTalkWil = {
[1000841] = "defaultTalkWithMomodi_001", -- Momodi
[1000994] = "defaultTalkWithLefchild_001" -- Lefchild
}
[1000046] = "defaultTalkWithGogofu_001", -- Gogofu
[1000047] = "defaultTalkWithHahayo_001", -- Hahayo
[1000070] = "defaultTalkWithKukumuko_001", -- Kukumuko
[1000293] = "defaultTalkWithDeaustie_001", -- Deaustie - defaultTalkWithDeaustie_002 (flavor for being on WVR?)
[1000374] = "defaultTalkWithRorojaru_001", -- Rorojaru
[1000597] = "defaultTalkWithNogeloix_001", -- Nogeloix
[1000638] = "defaultTalkWithHawazizowazi_001", -- Hawazi Zowazi
[1000639] = "defaultTalkWithIsabella_001", -- Isabella
[1000640] = "defaultTalkWithCiceroix_001", -- Ciceroix
[1000641] = "defaultTalkWithXaunbolo_001", -- Xau Nbolo
[1000642] = "defaultTalkWithOefyrblaet_001", -- Oefyrblaet
[1000643] = "defaultTalkWithBabaki_001", -- Babaki
[1000644] = "defaultTalkWithLohwaeb_001", -- Lohwaeb
[1000645] = "defaultTalkWithMargarete_001", -- Margarete
[1000646] = "defaultTalkWithRinhmaimhov_001", -- Rinh Maimhov
[1000647] = "defaultTalkWithLyngwaek_001", -- Lyngwaek
[1000648] = "defaultTalkWithWawaton_001", -- Wawaton
[1000651] = "defaultTalkWithPopori_001", -- Popori
[1000652] = "defaultTalkWithMamaza_001", -- Mamaza
[1000653] = "defaultTalkWithNhagiamariyo_001", -- Nhagi Amariyo
[1000654] = "defaultTalkWithJajanzo_001", -- Jajanzo
[1000655] = "defaultTalkWithJeger_001", -- Jeger
[1000656] = "defaultTalkWithMartine_001", -- Martine
[1000658] = "defaultTalkWithGairbert_001", -- Gairbert
[1000659] = "defaultTalkWithDrew_001", -- Drew
[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)
[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
[1000847] = "defaultTalkWithIllofii_001", -- I'llofii
[1000861] = "defaultTalkWithLinette_001", -- Linette
[1000862] = "defaultTalkWithGagaruna_001", -- Gagaruna
[1000863] = "defaultTalkWithLulutsu_001", -- Lulutsu
[1000864] = "defaultTalkWithInn_Desk", -- Otopa Pottopa
[1000915] = "defaultTalkWithCahernaut_001", -- Cahernaut
[1000916] = "defaultTalkWithAspipi_001", -- Aspipi
[1000917] = "defaultTalkWithGloiucen_001", -- Gloiucen
[1000934] = "defaultTalkWithTitinin_001", -- Titinin
[1000950] = "defaultTalkWithElecotte_001", -- Elecotte
[1000955] = "defaultTalkWithNaidazamaida_001", -- Naida Zamaida
[1000962] = "defaultTalkWithPapawa_001", -- Papawa
[1000963] = "defaultTalkWithGaleren_001", -- Galeren
[1000964] = "defaultTalkWithFhruybolg_001", -- Fruhybolg
[1000965] = "defaultTalkWithAbylgohamylgo_001", -- Abylgo Hamylgo
[1000966] = "defaultTalkWithFinecoromanecco_001", -- Fineco Romanecco
[1000967] = "defaultTalkWithSwerdahrm_001", -- Swerdahrm
[1000968] = "defaultTalkWithWannore_001", -- Wannore
[1000969] = "defaultTalkWithQmhalawi_001", -- Q'mhalawai
[1000994] = "defaultTalkWithLefchild_001", -- Lefchild
[1001007] = "defaultTalkWithHalstein_001", -- Halstein
[1001009] = "defaultTalkWithMelisie_001", -- Melisie
[1001012] = "defaultTalkWithShamanilohmani_001", -- Shamani Lohmani
[1001022] = "defaultTalkWithSungikelungi_001", -- Sungi Kelungi
[1001055] = "defaultTalkWithBouchard_001", -- Bouchard
[1001056] = "defaultTalkWithHolbubu_001", -- Holbubu
[1001073] = "defaultTalkWithObilitambili_001", -- Obili Tambili
[1001074] = "defaultTalkWithMiyaya_001", -- Miyaya
[1001075] = "defaultTalkWithBerthar_001", -- Berthar
[1001141] = "defaultTalkWithTutubuki_001", -- Tutubuki
[1001142] = "defaultTalkWithKamlitohalito_001", -- Kamlito Halito
[1001143] = "defaultTalkWithTotono_001", -- Totono
[1001144] = "defaultTalkWithFyrilsunn_001", -- Fyrilsunn
[1001145] = "defaultTalkWithSinette_001", -- Sinette
[1001165] = "defaultTalkWithMumukiya_001", -- Mumukiya
[1001166] = "defaultTalkWithYuyubesu_001", -- Yuyubesu
[1001167] = "defaultTalkWithChachai_001", -- Chachai
[1001168] = "defaultTalkWithFifilo_001", -- Fifilo
[1001169] = "defaultTalkWithPierriquet_001", -- Pierriquet
[1001170] = "defaultTalkWithMohtfryd_001", -- Mothfryd
[1001171] = "defaultTalkWithQhotanbolo_001", -- Qhota Nbolo
[1001191] = "defaultTalkWithGuildleveClientU_001", -- Roarich
[1001192] = "defaultTalkWithGuildleveClientU_002", -- Claroise
[1001193] = "defaultTalkWithGuildleveClientU_003", -- Uwilsyng
[1001200] = "defaultTalkWithJannie_001", -- Jannie
[1001201] = "defaultTalkWithDylise_001", -- Dylise
[1001202] = "defaultTalkWithBarnabaix_001", -- Barnabaix
[1001203] = "defaultTalkWithTyagomoui_001", -- Tyago Moui
[1001256] = "defaultTalkWithMaginfred_001", -- Gunnulf
[1001257] = "defaultTalkWithOrisic_001", -- Heibert
[1001260] = "defaultTalkWithKlamahni_001", -- I'paghlo
[1001415] = "defaultTalkWithAnthoinette_001", -- Anthoinette
[1001416] = "defaultTalkWithWisemoon_001", -- Wise Moon
[1001417] = "defaultTalkWithApachonaccho_001", -- Apacho Naccho
[1001418] = "defaultTalkWithWyznguld_001", -- Wyznguld
[1001419] = "defaultTalkWithNeymumu_001", -- Neymumu
[1001420] = "defaultTalkWithSafufu_001", -- Safufu
[1001421] = "defaultTalkWithPenelizuneli_001", -- Peneli Zuneli
[1001422] = "defaultTalkWithMilgogo_001", -- Milgogo
[1001423] = "defaultTalkWithMumutano_001", -- Mumutano
[1001424] = "defaultTalkWithGegeissa_001", -- Gegeissa
[1001426] = "defaultTalkWithHehena_001", -- Hehena
[1001427] = "defaultTalkWithGuillaunaux_001", -- Guillaunaux
[1001428] = "defaultTalkWithYuyuhase_001", -- Yuyuhase
[1001429] = "defaultTalkWithLulumo_001", -- Lulumo
[1001438] = "defaultTalkWithNokksushanksu_001", -- Nokksu Shanksu
[1001439] = "defaultTalkWithThimm_001", -- Thimm
[1001440] = "defaultTalkWithQaruru_001", -- Qaruru
[1001441] = "defaultTalkWithWracwulf_001", -- Wracwulf
[1001442] = "defaultTalkWithWenefreda_001", -- Wenefreda
[1001443] = "defaultTalkWithJudithe_001", -- Judithe
[1001444] = "defaultTalkWithRobyn_001", -- Robyn
[1001445] = "defaultTalkWithSingleton_001", -- Singleton
[1001451] = "defaultTalkWithDoll001_001", -- Mammet (Eshtaime's Lapidaries [GSM])
[1001452] = "defaultTalkWithDoll002_001", -- Mammet (Eshtaime's Lapidaries [GSM] #2)
[1001453] = "defaultTalkWithDoll003_001", -- Mammet (Sunsilk Tapestries [WVR])
[1001454] = "defaultTalkWithDoll004_001", -- Mammet (Frondale's Phrontistery [ALC])
[1001455] = "defaultTalkWithDoll005_001", -- Mammet (Merchant Strip)
[1001462] = "defaultTalkWithQatanelhah_001", -- Qata Nelhah
[1001463] = "defaultTalkWithKukusi_001", -- Kukusi
[1001464] = "defaultTalkWithVannes_001", -- Vannes
[1001465] = "defaultTalkWithTatasha_001", -- Tatasha
[1001466] = "defaultTalkWithXdhilogo_001", -- X'dhilogo
-- [1001467] = "", -- Dariustel - No dialog. Supposed to be flagged as untargetable
-- [1001468] = "", -- Guencen - No dialog. Supposed to be flagged as untargetable
[1001475] = "defaultTalkWithDiriaine_001", -- Diriaine
[1001476] = "defaultTalkWithCrhabye_001", -- C'rhabye
[1001471] = "downTownTalk", -- Kokobi
[1001472] = "defaultTalkWithMimishu_001", -- Mimishu
[1001565] = "defaultTalkWithEleanor_001", -- Eleanor
[1001712] = "defaultTalkWithGuillestet_001", -- Guillestet
[1001713] = "defaultTalkWithHCidjaa_001", -- H'cidjaa
[1001717] = "defaultTalkWithGoodife_001", -- Goodife
[1001726] = "defaultTalkWithAistan_001", -- Aistan
[1001770] = "defaultTalkWithEara_001", -- Eara
[1001771] = "defaultTalkWithLiaime_001", -- Liaime
[1001932] = "defaultTalkWithSIBOLD_001", -- Sibold
[1001953] = "defaultTalkWithBerndan_001", -- Berndan
[1002047] = "defaultTalkWithInn_Desk_2", -- Kopuru Fupuru - Inn NPC.
[1002101] = "defaultTalkWithDuraltharal_001", -- Dural Tharal
[1060042] = "defaultTalkWithJenlyns_001", -- Jenlyns - defaultTalkWithJenlyns_002 (PLD-unlocked specific dialog?)
[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
--]]
}
function onTalk(player, quest, npc, eventName)
local clientFunc = defaultTalkWil[npc:GetActorClassId()];
callClientFunction(player, "delegateEvent", player, quest, clientFunc);
local npcId = npc:GetActorClassId();
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
else
callClientFunction(player, "delegateEvent", player, quest, clientFunc);
end
player:EndEvent();
end

View File

@ -34,7 +34,16 @@ GRINNING_ADVENTURER = 1000451;
ROSTNSTHAL = 1001652;
EXIT_TRIGGER = 1090025;
HOB = 1000151;
GERT = 1500004;
LORHZANT = 1500005;
MUSCLEBOUND_DECKHAND = 1000261;
PEARLYTOOTHED_PORTER = 1000260;
--PASTYFACED_ADVENTURER = 1000264; -- Missing?
PRIVAREA_PAST_EXIT = 1290002;
-- Quest Markers
MRKR_HOB = 11000202;
MRKR_ROSTNSTHAL = 11000203;
MRKR_VOLUPTUOUS_VIXEN = 11000204;
MRKR_BABYFACED_ADVENTURER = 11000205;
@ -58,15 +67,13 @@ function onSequence(player, quest, sequence)
quest:ClearData();
if (sequence == SEQ_000) then
local fStrtTut = quest:GetFlag(FLAG_SEQ000_MINITUT0)
-- Setup states incase we loaded in.
local rostnsthalFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE;
local vixenFlag = quest:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE;
local babyfaceFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE;
local exitFlag = quest:GetFlags() == 0xF and QFLAG_PLATE or QFLAG_NONE;
local rostnsthalCanPush = not fStrtTut;
local rostnsthalCanPush = not quest:GetFlag(FLAG_SEQ000_MINITUT0);
local exitCanPush = quest:GetFlags() == 0xF;
local exitFlag = quest:GetFlags() == 0xF and QFLAG_PLATE or QFLAG_NONE;
quest:AddENpc(WELLTRAVELED_MERCHANT);
quest:AddENpc(TIPSY_ADVENTURER);
@ -80,11 +87,22 @@ function onSequence(player, quest, sequence)
quest:AddENpc(VOLUPTUOUS_VIXEN, vixenFlag);
quest:AddENpc(INDIFFERENT_PASSERBY);
quest:AddENpc(PRATTLING_ADVENTURER);
quest:AddENpc(LANKY_TRAVELER);
quest:AddENpc(GRINNING_ADVENTURER);
quest:AddENpc(ROSTNSTHAL, rostnsthalFlag, true, rostnsthalCanPush);
quest:AddENpc(EXIT_TRIGGER, exitFlag, false, exitCanPush);
quest:AddENpc(EXIT_TRIGGER, exitFlag, false, false, exitCanPush);
elseif (sequence == SEQ_005) then
elseif (sequence == SEQ_010) then
elseif (sequence == SEQ_010) then
quest:AddENpc(HOB);
quest:AddENpc(GERT);
quest:AddENpc(LORHZANT);
quest:AddENpc(MUSCLEBOUND_DECKHAND);
quest:AddENpc(PEARLYTOOTHED_PORTER);
quest:AddENpc(UNDIGNIFIED_ADVENTURER);
quest:AddENpc(WELLTRAVELED_MERCHANT);
quest:AddENpc(VOLUPTUOUS_VIXEN);
quest:AddENpc(LANKY_TRAVELER);
quest:AddENpc(PRIVAREA_PAST_EXIT, QFLAG_NONE, false, false, true);
end
end
@ -95,9 +113,41 @@ function onTalk(player, quest, npc)
if (sequence == SEQ_000) then
seq000_onTalk(player, quest, npc, classId);
elseif (sequence == SEQ_010) then
sequence010_onTalk(player, quest, npc, classId);
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 == EXIT_TRIGGER) then
doExitDoor(player, quest, npc);
return;
elseif (classId == ROSTNSTHAL) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002");
player:EndEvent();
end
elseif (sequence == SEQ_010) then
if (classId == PRIVAREA_PAST_EXIT) then
if (eventName == "caution") then
worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 34109, 0x20);
elseif (eventName == "exit") then
end
end
end
end
function onNotice(player, quest, target)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ");
end
player:EndEvent();
end
function seq000_onTalk(player, quest, npc, classId)
@ -111,8 +161,8 @@ function seq000_onTalk(player, quest, npc, classId)
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_7");
elseif (classId == BABYFACED_ADVENTURER) then
if (not quest:GetFlag(FLAG_SEQ000_MINITUT3)) then
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrMini003");
quest:UpdateENpc(VOLUPTUOUS_VIXEN, BABYFACED_ADVENTURER, QFLAG_NONE);
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini003");
quest:UpdateENpc(BABYFACED_ADVENTURER, ENPC_PROP_QFLAG, QFLAG_NONE);
quest:SetFlag(FLAG_SEQ000_MINITUT3);
else
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_8");
@ -127,7 +177,7 @@ function seq000_onTalk(player, quest, npc, classId)
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_12");
elseif (classId == VOLUPTUOUS_VIXEN) then
if (not quest:GetFlag(FLAG_SEQ000_MINITUT2)) then
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrMini002");
callClientFunction(player, "delegateEvent", player, quest, "processTtrMini002");
quest:UpdateENpc(VOLUPTUOUS_VIXEN, ENPC_PROP_QFLAG, QFLAG_NONE);
quest:SetFlag(FLAG_SEQ000_MINITUT2);
else
@ -157,9 +207,6 @@ function seq000_onTalk(player, quest, npc, classId)
quest:SetFlag(FLAG_SEQ000_MINITUT1);
end
end
elseif (classId == EXIT_TRIGGER) then
doExitDoor(player, quest, npc);
return;
end
if (quest:GetFlags() == 0xF) then
@ -170,30 +217,32 @@ function seq000_onTalk(player, quest, npc, classId)
player:EndEvent();
end
function sequence010_onTalk(player, quest, npc, classId)
end
function onPush(player, quest, npc)
local sequence = quest:getSequence();
local classId = npc:GetActorClassId();
if (sequence == SEQ_000) then
if (classId == EXIT_TRIGGER) then
doExitDoor(player, quest, npc);
function seq010_onTalk(player, quest, npc, classId)
if (classId == MUSCLEBOUND_DECKHAND) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_2");
elseif (classId == PEARLYTOOTHED_PORTER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_3");
elseif (classId == UNDIGNIFIED_ADVENTURER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_5");
elseif (classId == VOLUPTUOUS_VIXEN) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_6");
elseif (classId == WELLTRAVELED_MERCHANT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_7");
elseif (classId == LANKY_TRAVELER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_8");
elseif (classId == HOB) then
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEvent020_9");
if (choice == 1) then
quest:completeAndReplace(110002);
return;
elseif (classId == ROSTNSTHAL) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal002");
player:EndEvent();
end
elseif (classId == GERT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_10");
elseif (classId == LORHZANT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent020_11");
end
end
function onNotice(player, quest, target)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ");
end
player:EndEvent();
end
function getJournalMapMarkerList(player, quest)
@ -201,6 +250,8 @@ function getJournalMapMarkerList(player, quest)
if (sequence == SEQ_000) then
return MRKR_ROSTNSTHAL, MRKR_BABYFACED_ADVENTURER, MRKR_VOLUPTUOUS_VIXEN;
elseif (sequence == SEQ_010) then
return MRKR_HOB;
end
end

View File

@ -0,0 +1,132 @@
require("global");
--[[
Quest Script
Name: Treasures of the Main
Code: Man0l1
Id: 110002
Prereq: Shapeless Melody (Man0l0 - 110001)
]]
-- Sequence Numbers
SEQ_000 = 0; -- On the boat interior; contains the basics tutorial.
SEQ_005 = 5; -- Combat on the top of the boat.
SEQ_010 = 10; -- In Limsa Lominsa's port.
-- Actor Class Ids
WELLTRAVELED_MERCHANT = 1000438;
-- Quest Markers
MRKR_HOB = 11000202;
-- Quest Flags
FLAG_SEQ000_MINITUT0 = 0;
function onStart(player, quest)
quest:StartSequence(SEQ_000);
-- Immediately move to the Adventurer's Guild private area
callClientFunction(player, "delegateEvent", player, quest, "processEvent010");
GetWorldManager():DoZoneChange(player, 133, "PrivateAreaMasterPast", 2, 15, -459.619873, 40.0005722, 196.370377, 2.010813);
player:SendGameMessage(quest, 320, 0x20);
player:SendGameMessage(quest, 321, 0x20);
end
function onFinish(player, quest)
end
function onSequence(player, quest, sequence)
quest:ClearENpcs();
if (sequence == SEQ_000) then
-- Setup states incase we loaded in.
local rostnsthalFlag = quest:GetFlag(FLAG_SEQ000_MINITUT1) and QFLAG_NONE or QFLAG_PLATE;
local vixenFlag = quest:GetFlag(FLAG_SEQ000_MINITUT2) and QFLAG_NONE or QFLAG_PLATE;
local babyfaceFlag = quest:GetFlag(FLAG_SEQ000_MINITUT3) and QFLAG_NONE or QFLAG_PLATE;
local rostnsthalCanPush = not quest:GetFlag(FLAG_SEQ000_MINITUT0);
local exitCanPush = quest:GetFlags() == 0xF;
local exitFlag = quest:GetFlags() == 0xF and QFLAG_PLATE or QFLAG_NONE;
quest:AddENpc(WELLTRAVELED_MERCHANT);
quest:AddENpc(TIPSY_ADVENTURER);
quest:AddENpc(CULTIVATED_TENDER);
quest:AddENpc(ANXIOUS_ADVENTURER);
quest:AddENpc(BABYFACED_ADVENTURER, babyfaceFlag);
quest:AddENpc(AUSTERE_ADVENTURER);
quest:AddENpc(UNDIGNIFIED_ADVENTURER);
quest:AddENpc(SHADOWY_TRAVELER);
quest:AddENpc(ASTUTE_MERCHANT);
quest:AddENpc(VOLUPTUOUS_VIXEN, vixenFlag);
quest:AddENpc(INDIFFERENT_PASSERBY);
quest:AddENpc(PRATTLING_ADVENTURER);
quest:AddENpc(LANKY_TRAVELER);
quest:AddENpc(GRINNING_ADVENTURER);
quest:AddENpc(ROSTNSTHAL, rostnsthalFlag, true, rostnsthalCanPush);
quest:AddENpc(EXIT_TRIGGER, exitFlag, false, false, exitCanPush);
elseif (sequence == SEQ_005) then
elseif (sequence == SEQ_010) then
quest:AddENpc(HOB);
quest:AddENpc(GERT);
quest:AddENpc(LORHZANT);
quest:AddENpc(MUSCLEBOUND_DECKHAND);
quest:AddENpc(PEARLYTOOTHED_PORTER);
quest:AddENpc(UNDIGNIFIED_ADVENTURER);
quest:AddENpc(WELLTRAVELED_MERCHANT);
quest:AddENpc(VOLUPTUOUS_VIXEN);
quest:AddENpc(LANKY_TRAVELER);
quest:AddENpc(PRIVAREA_PAST_EXIT, QFLAG_NONE, false, false, true);
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
elseif (sequence == SEQ_010) then
end
end
function onNotice(player, quest, target)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
callClientFunction(player, "delegateEvent", player, quest, "processTtrNomal001withHQ");
end
end
function seq000_onTalk(player, quest, npc, classId)
if (classId == WELLTRAVELED_MERCHANT) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_4");
elseif (classId == TIPSY_ADVENTURER) then
callClientFunction(player, "delegateEvent", player, quest, "processEvent000_5");
end
player:EndEvent();
end
function getJournalMapMarkerList(player, quest)
local sequence = quest:getSequence();
if (sequence == SEQ_000) then
-- return MRKR_ROSTNSTHAL, MRKR_BABYFACED_ADVENTURER, MRKR_VOLUPTUOUS_VIXEN;
elseif (sequence == SEQ_010) then
-- return MRKR_HOB;
end
end

View File

@ -1,55 +0,0 @@
--[[
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 <itemId> <quality> 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 <quantity> <itemId> <quality> for <price> 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 <quantity> <GC seals> for <quantity> <itemId> <quality>.
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 <quantity> <itemId> <quality> for <quantity> <itemId> <quality>.
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 <quantity> <itemId> <quality> for <cost> gil.
player:SendGameMessage(player, worldMaster, 25075, MESSAGE_TYPE_SYSTEM, itemId, quality, quantity, cost);
end

View File

@ -1,20 +0,0 @@
function onZoneInit(zone)
end
function onZoneIn(player)
openingQuest = player:GetQuest(110001);
--Opening Quest
if (openingQuest ~= nil) then
if (openingQuest:GetQuestFlag(0) == false) then
player:KickEvent(player:GetDirector(), "noticeEvent");
end
end
end
function onZoneOut(zone, player)
end

View File

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

View File

@ -1,6 +0,0 @@
shopInfo = {
welcomeText = 5,
shopPack = 3008,
tutorialId = 35
}

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultSea = GetStaticActor("DftSea");
callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMerchant002_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 97,
shopPack = 3010
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 100,
shopPack = 3013
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 99,
shopPack = 3012
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 98,
shopPack = 3011
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 106,
shopPack = 3007
}

View File

@ -1,7 +0,0 @@
shopInfo = {
selectMode = 2,
welcomeText = 281,
shopPack = {5001, 5002, 5007, 5008},
tutorialId = -1
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 84,
shopPack = 3018
}

View File

@ -1,7 +0,0 @@
shopInfo = {
selectMode = 3,
welcomeText = 281,
shopPack = {5004, 5005, 5006, 5003},
tutorialId = -1
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 103,
shopPack = 3015
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 102,
shopPack = 3016
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 104,
shopPack = 3017
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 112,
shopPack = 3001
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 96,
shopPack = 3009
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 105,
shopPack = 3004
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 108,
shopPack = 3006
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 101,
shopPack = 3014
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 237,
shopPack = 3023
}

View File

@ -1,5 +0,0 @@
shopInfo = {
welcomeText = 109,
shopPack = 3005
}

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithAbylgohamylgo_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithAnthoinette_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithApachonaccho_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithAspipi_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithBabaki_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithBarnabaix_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithBerthar_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithBouchard_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithCahernaut_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithChachai_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithCiceroix_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithCrhabye_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
--NOT TALKABLE
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDeaustie_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDiriaine_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDylise_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithEara_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithEleanor_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithElecotte_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithFifilo_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithFinecoromanecco_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithFhruybolg_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithFyrilsunn_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithGaleren_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithGloiucen_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithGogofu_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithGoodife_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,6 +0,0 @@
require ("global")
function onEventStarted(player, npc)
--THIS NPC IS NOT REACHABLE
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithGuillestet_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithHahayo_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithHawazizowazi_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithHCidjaa_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithHolbubu_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithIllofii_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithIsabella_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithJajanzo_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithJannie_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithJeger_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithJenlyns_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithKamlitohalito_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,19 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk_2", nil, nil, nil);
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
player:EndEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithKukusi_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithLefchild_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithLiaime_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithLinette_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithLohwaeb_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithLulutsu_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithLyngwaek_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMamaza_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMammet_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDoll004_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDoll001_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDoll002_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithDoll003_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMargarete_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMartine_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMilgogo_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMiyaya_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMohtfryd_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMumukiya_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,8 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMumutano_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithNeymumu_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithNhagiamariyo_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithNogeloix_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithObilitambili_001", nil, nil, nil);
player:endEvent();
end

View File

@ -1,7 +0,0 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithOefyrblaet_001", nil, nil, nil);
player:endEvent();
end

Some files were not shown because too many files have changed in this diff Show More