Index: TextIDs.lua =================================================================== --- TextIDs.lua (revision 3296) +++ TextIDs.lua (working copy) @@ -1,11 +1,11 @@ --- Variable TextID Description text - --- General Texts -ITEM_CANNOT_BE_OBTAINED = 6375; -- You cannot obtain the item come back again after sorting your inventory - ITEM_OBTAINED = 6378; -- Obtained: - GIL_OBTAINED = 6379; -- Obtained gil - KEYITEM_OBTAINED = 6381; -- Obtained key item: - FISHING_MESSAGE_OFFSET = 6994; -- You can't fish here - --- Other Texts -NOTHING_HAPPENS = 7266; -- Nothing happens... \ No newline at end of file +-- Variable TextID Description text + +-- General Texts +ITEM_CANNOT_BE_OBTAINED = 6375; -- You cannot obtain the item come back again after sorting your inventory + ITEM_OBTAINED = 6378; -- Obtained: + GIL_OBTAINED = 6379; -- Obtained gil + KEYITEM_OBTAINED = 6381; -- Obtained key item: + +-- Other Texts +NOTHING_HAPPENS = 7266; -- Nothing happens... +RESPONSE = 7276; --no response Index: Zone.lua =================================================================== --- Zone.lua (revision 3296) +++ Zone.lua (working copy) @@ -7,12 +7,16 @@ package.loaded["scripts/zones/Arrapago_Reef/TextIDs"] = nil; require("scripts/globals/settings"); require("scripts/zones/Arrapago_Reef/TextIDs"); +require("scripts/globals/titles"); +require("scripts/globals/keyitems"); +require("scripts/globals/missions"); ----------------------------------- -- onInitialize ----------------------------------- function onInitialize(zone) +zone:registerRegion(1,-462,-4,-420,-455,-1,-392); end; ----------------------------------- @@ -32,6 +36,9 @@ ----------------------------------- function onRegionEnter(player,region) +if(player:getCurrentMission(TOAU) == THE_BLACK_COFFIN and player:hasKeyItem(EPHRAMADIAN_GOLD_COIN) and player:getVar("TOAUM15") ==0)then +player:startEvent(0x0008); +end end; ----------------------------------- @@ -48,6 +55,13 @@ ----------------------------------- function onEventFinish(player,csid,option) - --printf("CSID: %u",csid); - --printf("RESULT: %u",option); + printf("CSID: %u",csid); + printf("RESULT: %u",option); +if(csid == 0x0008)then +player:setVar("TOAUM15",1); +player:delKeyItem(EPHRAMADIAN_GOLD_COIN); +player:startEvent(0x0022,1,1,1,1,1,1,1,1); +elseif(csid == 0x0022 and player:getVar("TOAUM15") == 1)then +player:startEvent(0x0023); +end end;