Index: scripts/globals/missions.lua =================================================================== --- scripts/globals/missions.lua (revision 3986) +++ scripts/globals/missions.lua (working copy) @@ -65,9 +65,9 @@ RETURN_OF_THE_TALEKEEPER = 16; -- ± -- THE_PIRATE_S_COVE = 17; -- ± -- THE_FINAL_IMAGE = 18; -- ± -- -ON_MY_WAY = 19; -THE_CHAINS_THAT_BIND_US = 20; -ENTER_THE_TALEKEEPER = 21; +ON_MY_WAY = 19; --done +THE_CHAINS_THAT_BIND_US = 20; --done(mobs die then respawn fast) +ENTER_THE_TALEKEEPER = 21; --done THE_SALT_OF_THE_EARTH = 22; WHERE_TWO_PATHS_CONVERGE = 23; @@ -716,13 +716,20 @@ Index: scripts/zones/Bastok_Mines/npcs/Detzo.lua =================================================================== --- scripts/zones/Bastok_Mines/npcs/Detzo.lua (revision 3986) +++ scripts/zones/Bastok_Mines/npcs/Detzo.lua (working copy) @@ -45,10 +45,12 @@ function onTrigger(player,npc) Rivals = player:getQuestStatus(BASTOK,RIVALS); - + if(player:getVar("theTalekeeperGiftCS") == 1) then player:startEvent(0x00ab); player:setVar("theTalekeeperGiftCS",2); + elseif(player:hasCompletedMission(BASTOK,ENTER_THE_TALEKEEPER) == true and player:getVar("OptionalcsD") == 0)then + player:startEvent(0x00B8); elseif(Rivals == QUEST_AVAILABLE and player:getFameLevel(BASTOK) >= 3) then player:startEvent(0x005d); elseif(Rivals == QUEST_ACCEPTED) then @@ -84,6 +86,8 @@ player:messageSpecial(ITEM_OBTAINED,13571); player:addFame(BASTOK,BAS_FAME*30); player:completeQuest(BASTOK,RIVALS); + elseif (csid == 0x00b8)then + player:setVar("OptionalcsD",1); end end; \ No newline at end of file Index: scripts/zones/Bastok_Mines/npcs/Gumbah.lua =================================================================== --- scripts/zones/Bastok_Mines/npcs/Gumbah.lua (revision 3986) +++ scripts/zones/Bastok_Mines/npcs/Gumbah.lua (working copy) @@ -35,6 +35,8 @@ or ((player:getCurrentMission(BASTOK) == ON_MY_WAY) and (player:getVar("MissionStatus") == 3))) and (player:getVar("[B7-2]Werei") == 0) then player:startEvent(0x00b1); + elseif(player:hasCompletedMission(BASTOK,ENTER_THE_TALEKEEPER) == true and player:getVar("OptionalcsG") == 0)then + player:startEvent(0x00b7); else --DEFAULT player:startEvent(0x0034); @@ -64,6 +66,8 @@ player:addQuest(BASTOK, BLADE_OF_DEATH); player:addKeyItem(LETTER_FROM_ZEID); player:messageSpecial(KEYITEM_OBTAINED,LETTER_FROM_ZEID); + elseif(csid ==0x00b7)then + player:setVar("OptionalcsG",1); elseif(csid == 0x00b1) then player:setVar("[B7-2]Werei", 1); end Index: scripts/zones/Bastok_Mines/Zone.lua =================================================================== --- scripts/zones/Bastok_Mines/Zone.lua (revision 3986) +++ scripts/zones/Bastok_Mines/Zone.lua (working copy) @@ -22,6 +22,9 @@ function onZoneIn(player,prevZone) cs = -1; + if(player:getCurrentMission(BASTOK) == ENTER_THE_TALEKEEPER and player:getVar("MissionStatus") == 3)then + cs = 0x00B0; + end -- FIRST LOGIN (START CS) if (prevZone == 0) then if (OPENING_CUTSCENE_ENABLE == 1) then @@ -70,5 +73,12 @@ elseif (csid == 0x7534 and option == 0) then player:setHomePoint(); player:messageSpecial(HOMEPOINT_SET); + elseif (csid == 0x00b0)then + player:completeMission(BASTOK,ENTER_THE_TALEKEEPER); + player:setRank(9); + player:setRankPoints(0); + player:addGil(GIL_RATE*80000) + player:messageSpecial(GIL_OBTAINED,GIL_RATE*80000); + player:setVar("MissionStatus",0); end end; Index: scripts/zones/Kuftal_Tunnel/TextIDs.lua =================================================================== --- scripts/zones/Kuftal_Tunnel/TextIDs.lua (revision 3986) +++ scripts/zones/Kuftal_Tunnel/TextIDs.lua (working copy) @@ -1,20 +1,20 @@ --- 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 = 7163; -- You can't fish here - --- Treasure Coffer/Chest Dialog -CHEST_UNLOCKED = 7262; -- You unlock the chest! - CHEST_FAIL = 7263; -- Fails to open the chest. - CHEST_TRAP = 7264; -- The chest was trapped! - CHEST_WEAK = 7265; -- You cannot open the chest when you are in a weakened state. - CHEST_MIMIC = 7266; -- The chest was a mimic! - CHEST_MOOGLE = 7267; -- You cannot open the chest while participating in the moogle event. -CHEST_ILLUSION = 7268; -- The chest was but an illusion... - CHEST_LOCKED = 7269; -- The chest appears to be locked. - FELL = 7280; -- wood fell - EVIL = 7281; -- evil presence +-- 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 = 7163; -- You can't fish here + +-- Treasure Coffer/Chest Dialog +CHEST_UNLOCKED = 7262; -- You unlock the chest! + CHEST_FAIL = 7263; -- Fails to open the chest. + CHEST_TRAP = 7264; -- The chest was trapped! + CHEST_WEAK = 7265; -- You cannot open the chest when you are in a weakened state. + CHEST_MIMIC = 7266; -- The chest was a mimic! + CHEST_MOOGLE = 7267; -- You cannot open the chest while participating in the moogle event. +CHEST_ILLUSION = 7268; -- The chest was but an illusion... + CHEST_LOCKED = 7269; -- The chest appears to be locked. + FELL = 7282; -- wood fell= 1) then - if(player:getVar("MissionStatus") == 1) then - player:startEvent(0x00c8); - else - player:startEvent(0x00c9); - end - - else - player:startEvent(0x006c); - end - -end; - --- 0x006c 0x00c8 0x00c9 0x00ca 0x00cb 0x00cc - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) --- printf("CSID: %u",csid); --- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) --- printf("CSID: %u",csid); --- printf("RESULT: %u",option); - - if(csid == 0x00c8) then - player:setVar("MissionStatus",2); - end - +----------------------------------- +-- Area: Zeruhn Mines +-- NPC: Drake Fang +-- Involved in Mission: Bastok 6-1 +-- @pos -74 0 58 172 +----------------------------------- +package.loaded["scripts/zones/Zeruhn_Mines/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/missions"); +require("scripts/zones/Zeruhn_Mines/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + if(player:getCurrentMission(BASTOK) == RETURN_OF_THE_TALEKEEPER or player:getCurrentMission(BASTOK) == ENTER_THE_TALEKEEPER) then + if(player:getCurrentMission(BASTOK) == RETURN_OF_THE_TALEKEEPER) then + if(player:getVar("MissionStatus") == 1) then + player:startEvent(0x00c8); + elseif(player:getVar("MissionStatus") == 2) then + player:startEvent(0x00c9); + end + elseif(player:getCurrentMission(BASTOK) == ENTER_THE_TALEKEEPER) then + if(player:getVar("MissionStatus") == 0)then + player:startEvent(0x00ca); + elseif(player:getVar("MissionStatus") == 1) then + player:startEvent(0x00cb); + elseif(player:getVar("MissionStatus") == 2) then + player:startEvent(0x00cc, 1); + player:setVar("MissionStatus",3); + end + end + else + player:startEvent(0x006c); + end +end; +-- 0x006c 0x00c8 0x00c9 0x00ca 0x00cb 0x00cc + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); + + if(csid == 0x00c8) then + player:setVar("MissionStatus",2); + elseif(csid == 0x00ca) then + player:setVar("MissionStatus",1); + end + end; \ No newline at end of file