Index: scripts/globals/bcnm.lua =================================================================== --- scripts/globals/bcnm.lua (revision 3296) +++ scripts/globals/bcnm.lua (working copy) @@ -1,5 +1,6 @@ require("scripts/globals/status"); - +require("scripts/globals/keyitems"); +require("scripts/globals/missions"); -- NEW SYSTEM BCNM NOTES -- The "core" functions TradeBCNM EventUpdateBCNM EventTriggerBCNM EventFinishBCNM all return TRUE if the action performed is covered by the function. -- This means all the old code will still be executed if the new functions don't support it. This means that there is effectively 'backwards compatibility' with the old system. @@ -7,12 +8,16 @@ -- array to map (for each zone) the item id of the valid trade item with the bcnmid in the database -- e.g. zone,{itemid,bcnmid,itemid,bcnmid,itemid,bcnmid} -- DO NOT INCLUDE MAAT FIGHTS -itemid_bcnmid_map = {10,{0,0},--The_Shrouded_Maw - 17,{0,0},--spire of holla +itemid_bcnmid_map = {10,{0,0},--The_Shrouded_Maw + 6,{0,0},--bearclaw + 8,{0,0},--Boneyard + 13,{0,0},--mineshaft + 17,{0,0},--spire of holla 19,{0,0},--spire of dem 21,{0,0},--spire of mea 23,{0,0},--Spire_of_Vahzl 31,{0,0},--Monarch Linn + 32,{0,0},--sealion den 139,{1553,11,1175,15,1180,17}, -- Horlais Peak 140,{1551,34,1552,35,1552,36}, -- Ghelsba Outpost 144,{1166,68,1178,81,1553,76,1180,82,1130,79}, -- Waughroon Shrine @@ -20,6 +25,8 @@ 168,{0,0}, -- Chamber of Oracles 170,{0,0}, -- Full Moon Fountain 180,{1550,293}, -- LaLoff Amphitheater + 181,{0,0}, -- celestial nexus + 201,{1546,418,1174,417}, -- Cloister of Gales 202,{1548,450,1172,449}, -- Cloister of Storms 203,{1545,482,1171,481}, -- Cloister of Frost @@ -34,13 +41,17 @@ -- The BCNMID is found via the database. -- The paramid is a bitmask which you need to find out. Being a bitmask, it will be one of: -- 0,1,2,3,4,5,... -bcnmid_param_map = {10,{704,0,706,2}, - 17,{768,0}, +bcnmid_param_map = {6,{640,0}, + 8,{672,0}, + 10,{704,0,706,2}, + 13,{736,0}, + 17,{768,0}, 19,{800,0}, 21,{832,0}, - 23,{864,0}, + 23,{864,0}, 31,{960,0,961,1}, - 139,{0,0,5,5,6,6,7,7,11,11,15,15,17,17}, + 32,{992,0,993,1}, + 139,{0,0,5,5,6,6,7,7,11,11,15,15,17,17}, 140,{32,0,33,1,34,2,35,3,36,4}, 144,{64,0,67,3,68,4,70,6,71,7,72,8,81,17,76,12,82,18,79,15}, 146,{96,0,101,5,102,6,103,7,107,11,105,9}, @@ -50,6 +61,7 @@ 170,{224,0}, 179,{256,0}, 180,{293,5}, + 181,{320,0}, 201,{416,0,417,1,418,2}, 202,{448,0,449,1,450,2}, 203,{480,0,481,1,482,2}, @@ -341,7 +353,18 @@ local mask = 0; Zone = player:getZone(); - if(Zone == 10) then--The_Shrouded_Maw + if(Zone == 6) then--bearclaw + if(player:getCurrentMission(COP) >= THREE_PATHS and player:getVar("Prishe") == 9) then--snoll + mask = GetBattleBitmask(640,Zone,1); + player:setVar("trade_bcnmid",640); + end + elseif(Zone == 8) then--boneyard + if(player:getVar("Prishe") == 5) then--h_wind + mask = GetBattleBitmask(672,Zone,1); + player:setVar("trade_bcnmid",672); + end + + elseif(Zone == 10) then--The_Shrouded_Maw if(player:getCurrentMission(COP) == DARKNESS_NAMED and player:getVar("PromathiaStatus") == 2) then--DARKNESS_NAMED mask = GetBattleBitmask(704,Zone,1); player:setVar("trade_bcnmid",704); @@ -349,18 +372,26 @@ mask = GetBattleBitmask(706,Zone,1); player:setVar("trade_bcnmid",706); end + + elseif(Zone == 13) then--mineshaft + if(player:getCurrentMission(COP) >= THREE_PATHS and player:getVar("louverance") == 5) then--bugbear + mask = GetBattleBitmask(736,Zone,1); + player:setVar("trade_bcnmid",736); + end + + elseif(Zone == 17) then --Spire of Holla - if(player:getCurrentMission(COP) == THE_MOTHERCRYSTALS and player:hasKeyItem(LIGHT_OF_HOLLA) == false) then -- light of holla + if(not(player:hasKeyItem(LIGHT_OF_HOLLA)))then mask = GetBattleBitmask(768,Zone,1); player:setVar("trade_bcnmid",768); end elseif(Zone == 19) then --Spire of Dem - if(player:getCurrentMission(COP) == THE_MOTHERCRYSTALS and player:hasKeyItem(LIGHT_OF_DEM) == false) then -- light of dem + if(not(player:hasKeyItem(LIGHT_OF_DEM)))then -- light of dem mask = GetBattleBitmask(800,Zone,1); player:setVar("trade_bcnmid",800); end elseif(Zone == 21) then --Spire of Mea - if(player:getCurrentMission(COP) == THE_MOTHERCRYSTALS and player:hasKeyItem(LIGHT_OF_MEA) == false) then -- light of mea + if(not(player:hasKeyItem(LIGHT_OF_MEA))) then -- light of mea mask = GetBattleBitmask(832,Zone,1); player:setVar("trade_bcnmid",832); end @@ -376,6 +407,17 @@ elseif(player:getCurrentMission(COP) == THE_SAVAGE and player:getVar("PromathiaStatus") == 1) then mask = GetBattleBitmask(961,Zone,1); player:setVar("trade_bcnmid",961); + + elseif(Zone == 32) then --sealion den + if(player:getCurrentMission(COP) == ONE_TO_BE_FEARED and player:getVar("PromathiaStatus") == 1) then + mask = GetBattleBitmask(992,Zone,1); + player:setVar("trade_bcnmid",992); + elseif(player:getCurrentMission(COP) == THE_WARRIOR_S_PATH and player:getVar("PromathiaStatus") == 0) then + mask = GetBattleBitmask(993,Zone,1); + player:setVar("trade_bcnmid",993); + end + + end elseif(Zone == 139) then -- Horlais Peak if((player:getCurrentMission(BASTOK) == THE_EMISSARY_SANDORIA2 or @@ -431,7 +473,12 @@ if(player:getCurrentMission(ZILART) == RETURN_TO_DELKFUTTS_TOWER and player:getVar("ZilartStatus") == 3) then -- Zilart Mission 8 mask = GetBattleBitmask(256,Zone,1); player:setVar("trade_bcnmid",256); - end + end + elseif(Zone == 181) then + if(player:getCurrentMission(ZILART) == THE_CELESTIAL_NEXUS)then + mask = GetBattleBitmask(320,Zone,1); + player:setVar("trade_bcnmid",320); + end elseif(Zone == 201) then -- Cloister of Gales if(player:hasKeyItem(TUNING_FORK_OF_WIND)) then -- Trial by Wind mask = GetBattleBitmask(416,Zone,1); Index: scripts/zones/Lower_Jeuno/npcs/_6tf.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/_6tf.lua (revision 0) +++ scripts/zones/Lower_Jeuno/npcs/_6tf.lua (working copy) @@ -0,0 +1,57 @@ +----------------------------------- +-- Area: Lower Jeuno +-- Door: +----------------------------------- +package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/missions"); +require("scripts/globals/titles"); +require("scripts/globals/quests"); +require("scripts/zones/Lower_Jeuno/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) +if(player:getCurrentMission(ZILART) == AWAKENING and player:getVar("ZMPM") ==0 or player:getVar("ZMPM") ==2)then +player:startEvent(0x0014) +else +return; +end +end; + +----------------------------------- +-- 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 == 0x0014)then + if(player:getVar("ZMPM") ==2)then + player:setVar("ZMPM",3); + else + player:setVar("ZMPM",1); + end + end +end; \ No newline at end of file Index: scripts/zones/Lower_Jeuno/npcs/Aldo.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Aldo.lua (revision 3296) +++ scripts/zones/Lower_Jeuno/npcs/Aldo.lua (working copy) @@ -30,6 +30,8 @@ player:startEvent(0x00B7); elseif(player:getCurrentMission(ZILART) == RETURN_TO_DELKFUTTS_TOWER and player:getVar("ZilartStatus") == 0) then player:startEvent(0x0068); + elseif(player:getCurrentMission(ZILART) == THE_SEALED_SHRINE and (player:getVar("ZM15") == 0 or player:getVar("ZM15") ==2))then +player:startEvent(0x006F); end end; @@ -58,6 +60,11 @@ player:setVar("MissionStatus",3); elseif(csid == 0x0068) then player:setVar("ZilartStatus",1); + elseif(csid == 0x006F)then + if(player:getVar("ZM15") == 2)then + player:setVar("ZM15",3); + else + player:setVar("ZM15",1); + end end - end; \ No newline at end of file Index: scripts/zones/Norg/npcs/_700.lua =================================================================== --- scripts/zones/Norg/npcs/_700.lua (revision 3296) +++ scripts/zones/Norg/npcs/_700.lua (working copy) @@ -30,6 +30,8 @@ player:startEvent(0x00a9); -- Zilart Missions 11 elseif(currentMission == THE_PIRATE_S_COVE and player:getVar("MissionStatus") == 1) then player:startEvent(0x0062); -- Bastok Mission 6-2 + elseif(ZilartMission == THE_SEALED_SHRINE and (player:getVar("ZM15") == 0) or player:getVar("ZM15") == 1))then + player:startEvent(0x00ac); else player:startEvent(0x0005); end @@ -71,6 +73,12 @@ player:addMission(ZILART,THE_MITHRA_AND_THE_CRYSTAL); elseif(csid == 0x0062) then player:setVar("MissionStatus",2); + elseif(csid == 0x00ac)then + if(player:getVar("ZM15") ==1)then + player:setVar("ZM15",3); + else + player:setVar("ZM15",2); + end end end; \ No newline at end of file Index: scripts/zones/Norg/npcs/Gilgamesh.lua =================================================================== --- scripts/zones/Norg/npcs/Gilgamesh.lua (revision 3296) +++ scripts/zones/Norg/npcs/Gilgamesh.lua (working copy) @@ -1,78 +1,82 @@ ------------------------------------ --- Area: Norg --- NPC: Gilgamesh --- @pos 122.452 -9.009 -12.052 252 ------------------------------------ - -require("scripts/globals/missions"); - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) - - if(player:getCurrentMission(BASTOK) == THE_PIRATE_S_COVE and player:getVar("MissionStatus") == 2) then - if(trade:hasItemQty(1160,1) and trade:getItemCount() == 1) then -- Frag Rock - player:startEvent(0x0063); -- Bastok Mission 6-2 - end - end - -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - - local ZilartMission = player:getCurrentMission(ZILART); - - if(ZilartMission == KAZAMS_CHIEFTAINESS) then - player:startEvent(0x0007); - elseif(ZilartMission == THE_TEMPLE_OF_UGGALEPIH) then - player:startEvent(0x0008); - elseif(ZilartMission == HEADSTONE_PILGRIMAGE) then - player:startEvent(0x0009); - elseif(ZilartMission == RETURN_TO_DELKFUTTS_TOWER) then - player:startEvent(0x000d); - elseif(ZilartMission == ROMAEVE) then - player:startEvent(0x000b); - elseif(ZilartMission == THE_MITHRA_AND_THE_CRYSTAL) then - player:startEvent(0x00aa); - elseif(ZilartMission == ARK_ANGELS) then - player:startEvent(0x00ab); - end - -end; - ---0x00af 0x0000 0x0002 0x0003 0x0004 0x0007 0x0008 0x0009 0x000a 0x0062 0x0063 0x001d 0x000c ---0x000d 0x0092 0x009e 0x00a4 0x00a9 0x00aa 0x00ab 0x00ac 0x00ad 0x00b0 0x00b1 0x00e8 0x00e9 ---0x00ea --- 0x0062 0x0063 mission bastok --- 0x000c parle de kuzotz ? parle de bijoux aussi --- 0x000a parle de zitah - ------------------------------------ --- 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 == 0x0063) then - player:tradeComplete(); - player:setVar("MissionStatus",3); - end - +----------------------------------- +-- Area: Norg +-- NPC: Gilgamesh +-- @pos 122.452 -9.009 -12.052 252 +----------------------------------- + +require("scripts/globals/missions"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + + if(player:getCurrentMission(BASTOK) == THE_PIRATE_S_COVE and player:getVar("MissionStatus") == 2) then + if(trade:hasItemQty(1160,1) and trade:getItemCount() == 1) then -- Frag Rock + player:startEvent(0x0063); -- Bastok Mission 6-2 + end + end + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + local ZilartMission = player:getCurrentMission(ZILART); + + if(ZilartMission == KAZAMS_CHIEFTAINESS) then + player:startEvent(0x0007); + elseif(ZilartMission == THE_TEMPLE_OF_UGGALEPIH) then + player:startEvent(0x0008); + elseif(ZilartMission == HEADSTONE_PILGRIMAGE) then + player:startEvent(0x0009); + elseif(ZilartMission == RETURN_TO_DELKFUTTS_TOWER) then + player:startEvent(0x000d); + elseif(ZilartMission == ROMAEVE) then + player:startEvent(0x000b); + elseif(ZilartMission == THE_MITHRA_AND_THE_CRYSTAL) then + player:startEvent(0x00aa); + elseif(ZilartMission == ARK_ANGELS) then + player:startEvent(0x00ab); + elseif(ZilartMission == THE_SEALED_SHRINE and player:getVar("ZM15") >= 2 )then + player:startEvent(0x00ad); + elseif(ZilartMission == AWAKENING)then + player:startEvent(0x00B1); + end + +end; + +--0x00af 0x0000 0x0002 0x0003 0x0004 0x0007 0x0008 0x0009 0x000a 0x0062 0x0063 0x001d 0x000c +--0x000d 0x0092 0x009e 0x00a4 0x00a9 0x00aa 0x00ab 0x00ac 0x00ad 0x00b0 0x00b1 0x00e8 0x00e9 +--0x00ea +-- 0x0062 0x0063 mission bastok +-- 0x000c parle de kuzotz ? parle de bijoux aussi +-- 0x000a parle de zitah + +----------------------------------- +-- 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 == 0x0063) then + player:tradeComplete(); + player:setVar("MissionStatus",3); +end + end; \ No newline at end of file Index: scripts/zones/Norg/Zone.lua =================================================================== --- scripts/zones/Norg/Zone.lua (revision 3296) +++ scripts/zones/Norg/Zone.lua (working copy) @@ -25,8 +25,10 @@ function onZoneIn(player,prevZone) cs = -1; + if(player:getCurrentMission(ZILART) == AWAKENING and (player:getVar("ZMPM") == 0 or player:getVar("ZMPM") ==1))then + cs = 0x00b0 - if((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + elseif((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-19.238,-2.163,-63.964,187); elseif(player:getCurrentMission(ZILART) == THE_NEW_FRONTIER) then cs = 0x0001; @@ -65,6 +67,11 @@ player:messageSpecial(KEYITEM_OBTAINED,MAP_OF_NORG); player:completeMission(ZILART,THE_NEW_FRONTIER); player:addMission(ZILART,WELCOME_TNORG); + elseif(csid == 0x00b0)then + if(player:getVar("ZMPM") ==1)then + player:setVar("ZMPM",3); + else + player:setVar("ZMPM",2); + end end - -end; \ No newline at end of file + end; \ No newline at end of file Index: scripts/zones/The_Celestial_Nexus/bcnms/celestial_nexus.lua =================================================================== --- scripts/zones/The_Celestial_Nexus/bcnms/celestial_nexus.lua (revision 0) +++ scripts/zones/The_Celestial_Nexus/bcnms/celestial_nexus.lua (working copy) @@ -0,0 +1,74 @@ +----------------------------------- +-- Area: 181 +-- Name: celestial nexus +----------------------------------- +package.loaded["scripts/zones/The_Celestial_Nexus/TextIDs"] = nil; +----------------------------------- +require("scripts/globals/bcnm"); +require("scripts/globals/titles"); +require("scripts/globals/quests"); +require("scripts/globals/status"); +require("scripts/globals/settings"); +require("scripts/globals/missions"); +require("scripts/zones/The_Celestial_Nexus/TextIDs"); + +----------------------------------- +-- EXAMPLE SCRIPT +-- +-- What should go here: +-- giving key items, playing ENDING cutscenes +-- +-- What should NOT go here: +-- Handling of "battlefield" status, spawning of monsters, +-- putting loot into treasure pool, +-- enforcing ANY rules (SJ/number of people/etc), moving +-- chars around, playing entrance CSes (entrance CSes go in bcnm.lua) + +-- After registering the BCNM via bcnmRegister(bcnmid) +function OnBcnmRegister(player,instance) +end; + +-- Physically entering the BCNM via bcnmEnter(bcnmid) +function OnBcnmEnter(player,instance) +print("instance code "); +end; + +-- Leaving the BCNM by every mean possible, given by the LeaveCode +-- 1=Select Exit on circle +-- 2=Winning the BC +-- 3=Disconnected or warped out +-- 4=Losing the BC +-- via bcnmLeave(1) or bcnmLeave(2). LeaveCodes 3 and 4 are called +-- from the core when a player disconnects or the time limit is up, etc + +function OnBcnmLeave(player,instance,leavecode) +printf("leavecode: %u",leavecode); + + +if(leavecode == 2) then +player:startEvent(0x7D01,0,0,0,instance:getTimeInside(),0,0,1,1); + +elseif(leavecode == 4) then +player:startEvent(0x7d02); +end + +end; + +function onEventUpdate(player,csid,option) +print("bc update csid "..csid.." and option "..option); +if(player:getVar("ZM16") == 2)then +player:startEvent(0x7D04) +end +end; + +function onEventFinish(player,csid,option) +print("bc finish csid "..csid.." and option "..option); +if(csid == 0x7D01)then +player:setPos(0.001,-12,40,071,251); +player:completeMission(ZILART,THE_CELESTIAL_NEXUS); +player:addMission(ZILART_AWAKENING); +player:setVar("ZM16",0); +end +end; + + Index: scripts/zones/The_Celestial_Nexus/mobs/Eald_Narche.lua =================================================================== --- scripts/zones/The_Celestial_Nexus/mobs/Eald_Narche.lua (revision 0) +++ scripts/zones/The_Celestial_Nexus/mobs/Eald_Narche.lua (working copy) @@ -0,0 +1,70 @@ +----------------------------------- +-- Area: +-- NPC: +----------------------------------- + +require("scripts/globals/quests"); +require("scripts/globals/missions"); +require("scripts/globals/titles"); +require("scripts/globals/conquest"); +require("scripts/globals/status"); +require("scripts/globals/settings"); + + +----------------------------------- +-- onMobSpawn +----------------------------------- + +function onMobSpawn(mob) +end; +----------------------------------- +-- onMobEngaged +----------------------------------- +function onMobEngaged(mob,target) + GetMobByID(17518594):updateEnmity(target); + SpawnMob(17518596):updateEnmity(target); + SpawnMob(17518597):updateEnmity(target); + +end; + + +----------------------------------- +-- onMobFight +----------------------------------- +function onMobFight(mob,target) + +end; + + +----------------------------------- +-- onMobDeath +----------------------------------- + +function onMobDeath(mob, killer) + +if(mob:getID() < 17518594) then +DespawnMob(17518596); +DespawnMob(17518597); +killer:startEvent(0x7d04); + +else +DespawnMob(17518596); +DespawnMob(17518597); +killer:addTitle(BURIER_OF_THE_ILLUSION); +end +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +printf("finishCSID: %u",csid); +printf("RESULT: %u",option); + + if(csid == 0x7d04) then + SpawnMob(17518595); + end + end; + + Index: scripts/zones/The_Celestial_Nexus/mobs/Exoplates.lua =================================================================== --- scripts/zones/The_Celestial_Nexus/mobs/Exoplates.lua (revision 0) +++ scripts/zones/The_Celestial_Nexus/mobs/Exoplates.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Area: +-- NPC: +----------------------------------- + +require("scripts/globals/quests"); +require("scripts/globals/missions"); +require("scripts/globals/conquest"); +require("scripts/globals/status"); +require("scripts/globals/settings"); + + +----------------------------------- +-- onMobSpawn +----------------------------------- + +function onMobSpawn(mob) +if(mob:AnimationSub() == 0) then mob:AnimationSub(1); +end +end; +----------------------------------- +-- onMobEngaged +----------------------------------- +function onMobEngaged(mob,target) +GetMobByID(17518593):updateEnmity(target); + +end; + +----------------------------------- +-- onMobDeath +----------------------------------- + +function onMobDeath(mob, killer) +GetMobByID(17518593):delMod(MOD_UDMGPHYS, -200); +GetMobByID(17518593):delMod(MOD_UDMGMAGIC, -200); +end; + + Index: scripts/zones/The_Celestial_Nexus/mobs/Orbital.lua =================================================================== --- scripts/zones/The_Celestial_Nexus/mobs/Orbital.lua (revision 0) +++ scripts/zones/The_Celestial_Nexus/mobs/Orbital.lua (working copy) @@ -0,0 +1,32 @@ +----------------------------------- +-- Area: +-- NPC: +----------------------------------- + +require("scripts/globals/quests"); +require("scripts/globals/missions"); +require("scripts/globals/conquest"); +require("scripts/globals/status"); +require("scripts/globals/settings"); + + +----------------------------------- +-- onMobSpawn +----------------------------------- + +function OnMobSpawn(mob) +end; +----------------------------------- +-- onMobEngaged +----------------------------------- +function onMobEngaged(mob,target) +end; + +----------------------------------- +-- onMobDeath +----------------------------------- + +function onMobDeath(mob, killer) +end; + + Index: scripts/zones/The_Celestial_Nexus/npcs/_515.lua =================================================================== --- scripts/zones/The_Celestial_Nexus/npcs/_515.lua (revision 0) +++ scripts/zones/The_Celestial_Nexus/npcs/_515.lua (working copy) @@ -0,0 +1,66 @@ +----------------------------------- +-- Area: 181 +-- NPC: Celestial gate +----------------------------------- +package.loaded["scripts/zones/The_Celestial_Nexus/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/bcnm"); +require("scripts/globals/quests"); +require("scripts/globals/missions"); +require("scripts/globals/settings"); +require("scripts/zones/The_Celestial_Nexus/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + + if(TradeBCNM(player,player:getZone(),trade,npc))then + return; + end + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + if(EventTriggerBCNM(player,npc))then + return 1; + else + return 1; + end + +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("onUpdate CSID: %u",csid); +--printf("onUpdate RESULT: %u",option); + + if(EventUpdateBCNM(player,csid,option))then + return; + end + +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("onFinish CSID: %u",csid); +--printf("onFinish RESULT: %u",option); + + if(EventFinishBCNM(player,csid,option))then + return; + end + +end; Index: scripts/zones/The_Shrine_of_RuAvitau/Zone.lua =================================================================== --- scripts/zones/The_Shrine_of_RuAvitau/Zone.lua (revision 3296) +++ scripts/zones/The_Shrine_of_RuAvitau/Zone.lua (working copy) @@ -48,6 +48,9 @@ function onZoneIn(player,prevZone) cs = -1; + if(player:getCurrentMission(ZILART) == THE_SEALED_SHRINE and player:getVar("ZM15") >= 2) then +cs = 0x0033; + end if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-3.38,46.326,60,122); end @@ -139,4 +142,9 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); +if(csid == 0x0033)then +player:setVar("ZM15",0); +player:completeMission(ZILART,THE_SEALED_SHRINE); +player:addMission(ZILART,THE_CELESTIAL_NEXUS); +end end; Index: sql/bcnm_instance.sql =================================================================== --- sql/bcnm_instance.sql (revision 3296) +++ sql/bcnm_instance.sql (working copy) @@ -978,4 +978,17 @@ INSERT INTO `bcnm_instance` VALUES ('1284', '1', '17326781', '3'); INSERT INTO `bcnm_instance` VALUES ('1284', '1', '17326786', '3'); INSERT INTO `bcnm_instance` VALUES ('1284', '1', '17326790', '3'); -INSERT INTO `bcnm_instance` VALUES ('1284', '1', '17326081', '3'); \ No newline at end of file +INSERT INTO `bcnm_instance` VALUES ('1284', '1', '17326081', '3'); + + +INSERT INTO `bcnm_instance` VALUES ('320', '1', '17518593', '3'); +INSERT INTO `bcnm_instance` VALUES ('320', '1', '17518594', '3'); +INSERT INTO `bcnm_instance` VALUES ('320', '1', '17518595', '3'); +INSERT INTO `bcnm_instance` VALUES ('320', '1', '17518596', '3'); +INSERT INTO `bcnm_instance` VALUES ('320', '1', '17518597', '3'); + + + + + +