Index: scripts/globals/bcnm.lua =================================================================== --- scripts/globals/bcnm.lua (revision 3994) +++ scripts/globals/bcnm.lua (working copy) @@ -55,7 +55,7 @@ 32,{992,0,993,1}, 35,{1024,0}, 36,{1056,0}, - 139,{0,0,5,5,6,6,7,7,11,11,15,15,17,17}, + 139,{0,0,3,3,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}, @@ -431,6 +431,9 @@ player:getCurrentMission(WINDURST) == THE_THREE_KINGDOMS_SANDORIA2) and player:getVar("MissionStatus") == 9) then -- Mission 2-3 mask = GetBattleBitmask(0,Zone,1); player:setVar("trade_bcnmid",0); + elseif(player:getCurrentMission(SANDORIA) == THE_SECRET_WEAPON and player:getVar("SecretWeaponStatus") == 2) then + mask = GetBattleBitmask(3,Zone,1) + player:setVar("trade_bcnmid",3); end elseif(Zone == 140) then -- Ghelsba Outpost MissionStatus = player:getVar("MissionStatus"); @@ -447,7 +450,7 @@ player:getCurrentMission(WINDURST) == THE_THREE_KINGDOMS_BASTOK2) and player:getVar("MissionStatus") == 10) then -- Mission 2-3 mask = GetBattleBitmask(64,Zone,1); player:setVar("trade_bcnmid",64); - elseif((player:getCurrentMission(BASTOK) == ON_MY_WAY) and (player:getVar("MissionStatus") == 2)) then + elseif((player:getCurrentMission(BASTOK) == ON_MY_WAY) and (player:getVar("MissionStatus") == 2)) then mask = GetBattleBitmask(67,Zone,1); player:setVar("trade_bcnmid",67); end Index: scripts/globals/missions.lua =================================================================== --- scripts/globals/missions.lua (revision 3994) +++ scripts/globals/missions.lua (working copy) @@ -36,7 +36,7 @@ LEAUTE_S_LAST_WISHES = 16; -- ± -- RANPERRE_S_FINAL_REST = 17; -- ± -- PRESTIGE_OF_THE_PAPSQUE = 18; -- ± -- -THE_SECRET_WEAPON = 19; +THE_SECRET_WEAPON = 19; -- ± -- COMING_OF_AGE = 20; LIGHTBRINGER = 21; BREAKING_BARRIERS = 22; @@ -846,9 +846,12 @@ 15,{0,0}, {0,0}, {0x0224,0},{0,0},{{11,6},{14,4}}, -- MISSION 5-2 (Finish 1st Part (Halver)) 15,{0,0}, {0,0}, {0x003D,0},{0,0},{{14,0},{9,74},{8,20000},{6},{12}}, -- MISSION 5-2 (Finish 2nd Part (Trion in Great Hall)) 16,{0,0}, {0,0}, {0x006f,0},{0,0},{{14,0},{9,268},{10,270},{12}}, -- MISSION 6-1 (Finish (Chalvatot)) - 17,{0x040a,0},{0x0409,0},{0,0},{0,0},{{14,0},{11,7},{8,40000},{6},{12}}, -- MISSION 6-2 (Finish (Guard)) + 17,{0x040a,0},{0x0409,0},{0,0},{0,0},{{14,0},{11,7},{8,40000},{6},{12}}, -- MISSION 6-2 (Finish (Guard)) 18,{0,0}, {0,0}, {0x0007,0},{0,0},{{14,1}}, -- MISSION 7-1 (setVar("MissionStatus",1) (Door: Papal Chambers)) - 18,{0,0}, {0,0}, {0x0008,0},{0,0},{{14,0},{9,283},{5,1000},{12}} -- MISSION 7-1 (Finish (Door: Papal Chambers)) + 18,{0,0}, {0,0}, {0x0008,0},{0,0},{{14,0},{9,283},{5,1000},{12}}, -- MISSION 7-1 (Finish (Door: Papal Chambers)) + 19,{0x0414,0},{0x0413,0},{0,0},{0,0},{{14,0},{6},{3,"SecretWeaponStatus",0},{9,284},{11,8},{8,60000},{12}} -- MISSION 7-2 (Finish) + + --[[0,{0,0},{0,0},{0,0},{0,0},{0},{0,0},{0,0},{0,0},{0,0},{0}, 0,{0,0},{0,0},{0,0},{0,0},{0},{0,0},{0,0},{0,0},{0,0},{0}, ]]-- }; @@ -878,6 +881,7 @@ 18,{0x02fc,0},{0,0},{0,0},{0,0},{{14,0},{9,289},{5,700},{12}}, -- MISSION 7-1 (Finish (Cid)) 19,{0x02fe,0},{0,0},{0,0},{0,0},{{14,0},{6},{11,8},{8,60000},{3,"OptionalCSforOMW",1},{12}}, -- MISSION 7-2 (Finish (Karst)) 20,{0x0300,0},{0,0},{0,0},{0,0},{{14,0},{5,1133},{12}} -- MISSION 8-1 (Finish (Iron Eater)) + }; end elseif(nation == WINDURST) then Index: scripts/zones/Chateau_dOraguille/Zone.lua =================================================================== --- scripts/zones/Chateau_dOraguille/Zone.lua (revision 3994) +++ scripts/zones/Chateau_dOraguille/Zone.lua (working copy) @@ -33,6 +33,8 @@ cs = 0x022b; elseif(prevZone == 231 and player:hasKeyItem(MESSAGE_TO_JEUNO_SANDORIA)) then cs = 0x01FD; + elseif(player:getVar("SecretWeaponStatus") == 1) then + cs = 0x0000; end return cs; @@ -68,6 +70,8 @@ elseif(csid == 0x01FD) then player:setVar("MissionStatus",9); player:delKeyItem(MESSAGE_TO_JEUNO_SANDORIA); + elseif(csid == 0) then + player:setVar("SecretWeaponStatus",2) end end; Index: scripts/zones/Horlais_Peak/bcnms/the_secret_weapon.lua =================================================================== --- scripts/zones/Horlais_Peak/bcnms/the_secret_weapon.lua (revision 0) +++ scripts/zones/Horlais_Peak/bcnms/the_secret_weapon.lua (working copy) @@ -0,0 +1,72 @@ +----------------------------------- +-- Area: Horlais Peak +-- Name: Mission Rank 7 +-- @pos -509 158 -211 139 +----------------------------------- +package.loaded["scripts/zones/Horlais_Peak/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/keyitems"); +require("scripts/globals/missions"); +require("scripts/zones/Horlais_Peak/TextIDs"); + +----------------------------------- +-- Maat Battle in Horlais Peak +-- 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) +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) +-- print("leave code "..leavecode); + + if(leavecode == 2) then -- play end CS. Need time and battle id for record keeping + storage + if(player:hasCompletedMission(SANDORIA,THE_SECRET_WEAPON)) then + player:startEvent(0x7d01,1,1,1,instance:getTimeInside(),1,3,1); + else + player:startEvent(0x7d01,1,1,1,instance:getTimeInside(),1,3,0); + end + elseif(leavecode == 4) then + player:startEvent(0x7d02); + end + +end; + +function onEventUpdate(player,csid,option) +-- print("bc update csid "..csid.." and option "..option); +end; + +function onEventFinish(player,csid,option) +-- print("bc finish csid "..csid.." and option "..option); + + if(csid == 0x7d01) then + if(player:getCurrentMission(SANDORIA) == THE_SECRET_WEAPON) then + player:addKeyItem(CRYSTAL_DOWSER); + player:messageSpecial(KEYITEM_OBTAINED,CRYSTAL_DOWSER); + player:setVar("SecretWeaponStatus",3) + end + end + +end; \ No newline at end of file Index: scripts/zones/Northern_San_dOria/npcs/Grilau.lua =================================================================== --- scripts/zones/Northern_San_dOria/npcs/Grilau.lua (revision 3994) +++ scripts/zones/Northern_San_dOria/npcs/Grilau.lua (working copy) @@ -51,6 +51,8 @@ ----------------------------------- function onTrigger(player,npc) + +local PresOfPapsqueCompleted = player:hasCompletedMission(SANDORIA,PRESTIGE_OF_THE_PAPSQUE); if(player:getNation() ~= SANDORIA) then player:startEvent(0x03f3); -- for Non-San d'Orians @@ -76,6 +78,10 @@ player:startEvent(0x040f); elseif(CurrentMission == RANPERRE_S_FINAL_REST and player:getVar("MissionStatus") == 9) then player:startEvent(0x0409); + elseif(CurrentMission ~= THE_SECRET_WEAPON and pRank == 7 and PresOfPapsqueCompleted == true and getMissionRankPoints(player,19) == 1 and player:getVar("SecretWeaponStatus") == 0) then + player:startEvent(0x0034); + elseif(CurrentMission == THE_SECRET_WEAPON and player:getVar("SecretWeaponStatus") == 3) then + player:startEvent(0x0413); elseif(CurrentMission ~= 255) then player:startEvent(0x03e9); -- Have mission already activated else @@ -115,5 +121,10 @@ player:setVar("Wait1DayForRanperre_date",0); elseif(csid == 0x0409) then finishMissionTimeline(player,2,csid,option); + elseif(csid == 0x0034) then + player:setVar("SecretWeaponStatus",1); + elseif(csid == 0x0413) then + finishMissionTimeline(player,2,csid,option); end + end; Index: scripts/zones/Southern_San_dOria/npcs/Ambrotien.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Ambrotien.lua (revision 3994) +++ scripts/zones/Southern_San_dOria/npcs/Ambrotien.lua (working copy) @@ -51,6 +51,8 @@ ----------------------------------- function onTrigger(player,npc) + +local PresOfPapsqueCompleted = player:hasCompletedMission(SANDORIA,PRESTIGE_OF_THE_PAPSQUE); if(player:getNation() ~= SANDORIA) then player:startEvent(0x07db); -- for Non-San d'Orians @@ -76,6 +78,10 @@ player:startEvent(0x0410); elseif(CurrentMission == RANPERRE_S_FINAL_REST and player:getVar("MissionStatus") == 9) then player:startEvent(0x040a); + elseif(CurrentMission ~= THE_SECRET_WEAPON and pRank == 7 and PresOfPapsqueCompleted == true and getMissionRankPoints(player,19) == 1 and player:getVar("SecretWeaponStatus") == 0) then + player:startEvent(0x003e); + elseif(CurrentMission == THE_SECRET_WEAPON and player:getVar("SecretWeaponStatus") == 3) then + player:startEvent(0x0414); elseif(CurrentMission ~= 255) then player:startEvent(0x07d1); -- Have mission already activated else @@ -115,6 +121,10 @@ player:setVar("Wait1DayForRanperre_date",0); elseif(csid == 0x040a) then finishMissionTimeline(player,1,csid,option); + elseif(csid == 0x003e) then + player:setVar("SecretWeaponStatus",1); + elseif(csid == 0x0414) then + finishMissionTimeline(player,1,csid,option); end end; Index: scripts/zones/Southern_San_dOria/npcs/Endracion.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Endracion.lua (revision 3994) +++ scripts/zones/Southern_San_dOria/npcs/Endracion.lua (working copy) @@ -52,6 +52,8 @@ function onTrigger(player,npc) +local PresOfPapsqueCompleted = player:hasCompletedMission(SANDORIA,PRESTIGE_OF_THE_PAPSQUE); + if(player:getNation() ~= SANDORIA) then player:startEvent(0x03F3); -- for Non-San d'Orians else @@ -59,7 +61,7 @@ MissionStatus = player:getVar("MissionStatus"); pRank = player:getRank(); cs, p, offset = getMissionOffset(player,1,CurrentMission,MissionStatus); - + if(CurrentMission <= 15 and (cs ~= 0 or offset ~= 0 or (CurrentMission == 0 and offset == 0))) then if(cs == 0) then player:showText(npc,ORIGINAL_MISSION_OFFSET + offset); -- dialog after accepting mission @@ -76,6 +78,10 @@ player:startEvent(0x040f); elseif(CurrentMission == RANPERRE_S_FINAL_REST and player:getVar("MissionStatus") == 9) then player:startEvent(0x0409); + elseif(CurrentMission ~= THE_SECRET_WEAPON and pRank == 7 and PresOfPapsqueCompleted == true and getMissionRankPoints(player,19) == 1 and player:getVar("SecretWeaponStatus") == 0) then + player:startEvent(0x003d); + elseif(CurrentMission == THE_SECRET_WEAPON and player:getVar("SecretWeaponStatus") == 3) then + player:startEvent(0x0413); elseif((CurrentMission ~= 255) and not (player:getVar("MissionStatus") == 8)) then player:startEvent(0x03e9); -- Have mission already activated else @@ -115,6 +121,10 @@ player:setVar("Wait1DayForRanperre_date",0); elseif(csid == 0x0409) then finishMissionTimeline(player,2,csid,option); + elseif(csid == 0x003d) then + player:setVar("SecretWeaponStatus",1); + elseif(csid == 0x0413) then + finishMissionTimeline(player,2,csid,option); end end; Index: sql/bcnm_instance.sql =================================================================== --- sql/bcnm_instance.sql (revision 3994) +++ sql/bcnm_instance.sql (working copy) @@ -28,6 +28,24 @@ INSERT INTO `bcnm_instance` VALUES ('0', '2', '17346564', '3'); INSERT INTO `bcnm_instance` VALUES ('0', '3', '17346565', '3'); INSERT INTO `bcnm_instance` VALUES ('0', '3', '17346566', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '1', '17346567', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '1', '17346568', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '1', '17346569', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '1', '17346570', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '1', '17346571', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '1', '17346572', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '2', '17346573', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '2', '17346574', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '2', '17346575', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '2', '17346576', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '2', '17346577', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '2', '17346578', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '3', '17346579', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '3', '17346580', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '3', '17346581', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '3', '17346582', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '3', '17346583', '3'); +INSERT INTO `bcnm_instance` VALUES ('3', '3', '17346584', '3'); INSERT INTO `bcnm_instance` VALUES ('5', '1', '17346585', '3'); INSERT INTO `bcnm_instance` VALUES ('5', '2', '17346586', '3'); INSERT INTO `bcnm_instance` VALUES ('5', '3', '17346587', '3'); Index: sql/mob_groups.sql =================================================================== --- sql/mob_groups.sql (revision 3994) +++ sql/mob_groups.sql (working copy) @@ -7724,8 +7724,8 @@ INSERT INTO `mob_groups` VALUES (7697,723,139,0,128,0,0,0,75,75); INSERT INTO `mob_groups` VALUES (7698,773,139,0,128,0,0,0,40,40); INSERT INTO `mob_groups` VALUES (7699,804,139,0,128,0,0,0,40,40); -INSERT INTO `mob_groups` VALUES (7700,919,139,0,0,0,0,0,0,0); -INSERT INTO `mob_groups` VALUES (7701,1002,139,0,0,0,0,0,0,0); +INSERT INTO `mob_groups` VALUES (7700,919,139,0,128,0,4000,0,68,68); +INSERT INTO `mob_groups` VALUES (7701,1002,139,0,128,0,4000,0,68,68); INSERT INTO `mob_groups` VALUES (7702,1100,139,0,128,0,0,0,75,75); INSERT INTO `mob_groups` VALUES (7703,1101,139,0,128,0,0,0,75,75); INSERT INTO `mob_groups` VALUES (7704,1116,139,0,128,0,0,0,25,25); @@ -7736,7 +7736,7 @@ INSERT INTO `mob_groups` VALUES (7709,1993,139,0,128,0,0,0,30,30); INSERT INTO `mob_groups` VALUES (7710,2011,139,0,128,0,0,0,30,30); INSERT INTO `mob_groups` VALUES (7711,2086,139,0,128,0,0,0,60,60); -INSERT INTO `mob_groups` VALUES (7712,2126,139,0,0,1830,0,0,0,0); +INSERT INTO `mob_groups` VALUES (7712,2126,139,0,128,1830,4000,0,68,68); INSERT INTO `mob_groups` VALUES (7713,2202,139,0,128,0,0,0,60,60); INSERT INTO `mob_groups` VALUES (7714,2226,139,0,0,0,0,0,0,0); INSERT INTO `mob_groups` VALUES (7715,2405,139,0,0,0,0,0,0,0); @@ -7747,12 +7747,12 @@ INSERT INTO `mob_groups` VALUES (7720,3026,139,0,128,0,0,0,60,60); INSERT INTO `mob_groups` VALUES (7721,3048,139,0,128,0,0,0,54,54); INSERT INTO `mob_groups` VALUES (7722,3136,139,0,128,0,0,0,30,30); -INSERT INTO `mob_groups` VALUES (7723,3341,139,0,0,0,0,0,0,0); +INSERT INTO `mob_groups` VALUES (7723,3341,139,0,128,0,1800,0,68,68); INSERT INTO `mob_groups` VALUES (7724,3681,139,0,128,0,0,0,20,20); INSERT INTO `mob_groups` VALUES (7725,3693,139,0,128,0,0,0,40,40); INSERT INTO `mob_groups` VALUES (7726,3740,139,0,128,0,0,0,23,23); INSERT INTO `mob_groups` VALUES (7727,4097,139,0,128,0,0,0,60,60); -INSERT INTO `mob_groups` VALUES (7728,4358,139,0,0,0,0,0,0,0); +INSERT INTO `mob_groups` VALUES (7728,4358,139,0,128,0,1800,0,68,68); INSERT INTO `mob_groups` VALUES (7729,248,140,0,0,0,0,0,0,0); INSERT INTO `mob_groups` VALUES (7730,468,140,0,128,339,0,0,14,14); INSERT INTO `mob_groups` VALUES (7731,651,140,0,128,0,0,0,40,40); Index: sql/mob_spawn_points.sql =================================================================== --- sql/mob_spawn_points.sql (revision 3994) +++ sql/mob_spawn_points.sql (working copy) @@ -28045,12 +28045,12 @@ INSERT INTO `mob_spawn_points` VALUES ('17346564', 'Spotter', '7726', '-160.000', '-25.000', '-115.000', '45'); INSERT INTO `mob_spawn_points` VALUES ('17346565', 'Dread_Dragon', '7704', '83.000', '-145.000', '295.000', '49'); INSERT INTO `mob_spawn_points` VALUES ('17346566', 'Spotter', '7726', '79.000', '-145.000', '295.000', '49'); -INSERT INTO `mob_spawn_points` VALUES ('17346567', 'Darokbok_of_Clan_Reaper', '7700', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17346568', 'Jagidbod_of_Clan_Reaper', '7712', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17346569', 'Derakbak_of_Clan_Wolf', '7701', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17346570', 'Reaper_Clan_Warmachine', '7723', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17346571', 'Wolf_Clan_Warmachine', '7728', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17346572', 'Orc_s_Wyvern', '7721', '0.000', '0.000', '0.000', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17346567', 'Darokbok_of_Clan_Reaper', '7700', '-395.090', '94.751', '-66.691', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17346568', 'Jagidbod_of_Clan_Reaper', '7712', '-392.669', '94.910', '-63.111', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17346569', 'Derakbak_of_Clan_Wolf', '7701', '-399.629', '94.910', '-66.259', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17346570', 'Reaper_Clan_Warmachine', '7723', '-395.314', '84.813', '-59.798', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17346571', 'Wolf_Clan_Warmachine', '7728', '-400.811', '94.859', '-64.510', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17346572', 'Orc_s_Wyvern', '7721', '-398.337', '94.763', '-65.268', '0'); INSERT INTO `mob_spawn_points` VALUES ('17346573', 'Darokbok_of_Clan_Reaper', '7700', '0.000', '0.000', '0.000', '0'); INSERT INTO `mob_spawn_points` VALUES ('17346574', 'Jagidbod_of_Clan_Reaper', '7712', '0.000', '0.000', '0.000', '0'); INSERT INTO `mob_spawn_points` VALUES ('17346575', 'Derakbak_of_Clan_Wolf', '7701', '0.000', '0.000', '0.000', '0');