Index: scripts/zones/Balgas_Dais/bcnms/shattering_stars.lua =================================================================== --- scripts/zones/Balgas_Dais/bcnms/shattering_stars.lua (revision 3296) +++ scripts/zones/Balgas_Dais/bcnms/shattering_stars.lua (working copy) @@ -51,9 +51,42 @@ if(player:getQuestStatus(JEUNO,SHATTERING_STARS) == QUEST_ACCEPTED and player:getFreeSlotsCount() > 0) then player:addItem(4181); player:messageSpecial(ITEM_OBTAINED,4181); + player:setVar("maatDefeated",player:getMainJob()); + --i moved it here so you can keep fighting maat after turning in quest end - player:setVar("maatDefeated",player:getMainJob()); + + + if (player:getVar("maatCap")>0 and player:getVar("UpdatedMaatCapValue") == 0) then + MaatFirstWonJob = "MaatJob"; + MaatFirstWonJob = MaatFirstWonJob .. player:getVar("maatCap"); + player:setVar(MaatFirstWonJob, player:getVar("maatCap")); + player:setVar("UpdatedMaatCapValue", 1); + end + --this is mainly for people that have killed Maat before on a previous job before cap was added + + MaatCapTotal = 0; + MaatWonJob = "MaatJob"; + MaatWonJob = MaatWonJob .. player:getMainJob(); + player:setVar(MaatWonJob, player:getMainJob()); + --gets value of job, adds it to a dynamic variable, for example, BRD is job 10, so it updates MaatJob10 with 10, etc + --this prevents duplicate victories from accidentally being added + for i=1,15 do --checks Maat victories + + MaatCheck = "MaatJob"; + MaatCheck = MaatCheck .. i; + MaatCapTotal = MaatCapTotal + player:getVar(MaatCheck); + end + + + + player:setVar("maatCap", MaatCapTotal); --update maat's cap progress player:addTitle(MAAT_MASHER); + + if(player:getVar("maatCap") == 120) then --120 is WAR to SMN values added together, so beating him with the 15 jobs + player:addQuest(JEUNO,BEYOND_THE_SUN); + --this isn't really necessary, but it's a helpful way to indicate to the player they can get Maat's Cap + end + end end; \ No newline at end of file Index: scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua =================================================================== --- scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua (revision 3296) +++ scripts/zones/Chamber_of_Oracles/bcnms/shattering_stars.lua (working copy) @@ -43,9 +43,42 @@ if(player:getQuestStatus(JEUNO,SHATTERING_STARS) == QUEST_ACCEPTED and player:getFreeSlotsCount() > 0) then player:addItem(4181); player:messageSpecial(ITEM_OBTAINED,4181); + player:setVar("maatDefeated",player:getMainJob()); + --i moved it here so you can keep fighting maat after turning in quest end - player:setVar("maatDefeated",player:getMainJob()); + + + if (player:getVar("maatCap")>0 and player:getVar("UpdatedMaatCapValue") == 0) then + MaatFirstWonJob = "MaatJob"; + MaatFirstWonJob = MaatFirstWonJob .. player:getVar("maatCap"); + player:setVar(MaatFirstWonJob, player:getVar("maatCap")); + player:setVar("UpdatedMaatCapValue", 1); + end + --this is mainly for people that have killed Maat before on a previous job before cap was added + + MaatCapTotal = 0; + MaatWonJob = "MaatJob"; + MaatWonJob = MaatWonJob .. player:getMainJob(); + player:setVar(MaatWonJob, player:getMainJob()); + --gets value of job, adds it to a dynamic variable, for example, BRD is job 10, so it updates MaatJob10 with 10, etc + --this prevents duplicate victories from accidentally being added + for i=1,15 do --checks Maat victories + + MaatCheck = "MaatJob"; + MaatCheck = MaatCheck .. i; + MaatCapTotal = MaatCapTotal + player:getVar(MaatCheck); + end + + + + player:setVar("maatCap", MaatCapTotal); --update maat's cap progress player:addTitle(MAAT_MASHER); + + if(player:getVar("maatCap") == 120) then --120 is WAR to SMN values added together, so beating him with the 15 jobs + player:addQuest(JEUNO,BEYOND_THE_SUN); + --this isn't really necessary, but it's a helpful way to indicate to the player they can get Maat's Cap + end + end end; \ No newline at end of file Index: scripts/zones/Horlais_Peak/bcnms/shattering_stars.lua =================================================================== --- scripts/zones/Horlais_Peak/bcnms/shattering_stars.lua (revision 3296) +++ scripts/zones/Horlais_Peak/bcnms/shattering_stars.lua (working copy) @@ -59,12 +59,46 @@ -- print("bc finish csid "..csid.." and option "..option); if(csid == 0x7d01) then + if(player:getQuestStatus(JEUNO,SHATTERING_STARS) == QUEST_ACCEPTED and player:getFreeSlotsCount() > 0) then player:addItem(4181); player:messageSpecial(ITEM_OBTAINED,4181); + player:setVar("maatDefeated",player:getMainJob()); + --i moved it here so you can keep fighting maat after turning in quest end - player:setVar("maatDefeated",player:getMainJob()); + + + if (player:getVar("maatCap")>0 and player:getVar("UpdatedMaatCapValue") == 0) then + MaatFirstWonJob = "MaatJob"; + MaatFirstWonJob = MaatFirstWonJob .. player:getVar("maatCap"); + player:setVar(MaatFirstWonJob, player:getVar("maatCap")); + player:setVar("UpdatedMaatCapValue", 1); + end + --this is mainly for people that have killed Maat before on a previous job before cap was added + + MaatCapTotal = 0; + MaatWonJob = "MaatJob"; + MaatWonJob = MaatWonJob .. player:getMainJob(); + player:setVar(MaatWonJob, player:getMainJob()); + --gets value of job, adds it to a dynamic variable, for example, BRD is job 10, so it updates MaatJob10 with 10, etc + --this prevents duplicate victories from accidentally being added + for i=1,15 do --checks Maat victories + + MaatCheck = "MaatJob"; + MaatCheck = MaatCheck .. i; + MaatCapTotal = MaatCapTotal + player:getVar(MaatCheck); + end + + + + player:setVar("maatCap", MaatCapTotal); --update maat's cap progress player:addTitle(MAAT_MASHER); + + if(player:getVar("maatCap") == 120) then --120 is WAR to SMN values added together, so beating him with the 15 jobs + player:addQuest(JEUNO,BEYOND_THE_SUN); + --this isn't really necessary, but it's a helpful way to indicate to the player they can get Maat's Cap + end + end end; \ No newline at end of file Index: scripts/zones/QuBia_Arena/bcnms/shattering_stars.lua =================================================================== --- scripts/zones/QuBia_Arena/bcnms/shattering_stars.lua (revision 3296) +++ scripts/zones/QuBia_Arena/bcnms/shattering_stars.lua (working copy) @@ -43,9 +43,42 @@ if(player:getQuestStatus(JEUNO,SHATTERING_STARS) == QUEST_ACCEPTED and player:getFreeSlotsCount() > 0) then player:addItem(4181); player:messageSpecial(ITEM_OBTAINED,4181); + player:setVar("maatDefeated",player:getMainJob()); + --i moved it here so you can keep fighting maat after turning in quest end - player:setVar("maatDefeated",player:getMainJob()); + + + if (player:getVar("maatCap")>0 and player:getVar("UpdatedMaatCapValue") == 0) then + MaatFirstWonJob = "MaatJob"; + MaatFirstWonJob = MaatFirstWonJob .. player:getVar("maatCap"); + player:setVar(MaatFirstWonJob, player:getVar("maatCap")); + player:setVar("UpdatedMaatCapValue", 1); + end + --this is mainly for people that have killed Maat before on a previous job before cap was added + + MaatCapTotal = 0; + MaatWonJob = "MaatJob"; + MaatWonJob = MaatWonJob .. player:getMainJob(); + player:setVar(MaatWonJob, player:getMainJob()); + --gets value of job, adds it to a dynamic variable, for example, BRD is job 10, so it updates MaatJob10 with 10, etc + --this prevents duplicate victories from accidentally being added + for i=1,15 do --checks Maat victories + + MaatCheck = "MaatJob"; + MaatCheck = MaatCheck .. i; + MaatCapTotal = MaatCapTotal + player:getVar(MaatCheck); + end + + + + player:setVar("maatCap", MaatCapTotal); --update maat's cap progress player:addTitle(MAAT_MASHER); + + if(player:getVar("maatCap") == 120) then --120 is WAR to SMN values added together, so beating him with the 15 jobs + player:addQuest(JEUNO,BEYOND_THE_SUN); + --this isn't really necessary, but it's a helpful way to indicate to the player they can get Maat's Cap + end + end end; \ No newline at end of file Index: scripts/zones/RuLude_Gardens/npcs/Maat.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Maat.lua (revision 3296) +++ scripts/zones/RuLude_Gardens/npcs/Maat.lua (working copy) @@ -97,6 +97,8 @@ player:startEvent(0x005b,player:getMainJob()); -- During Quest "Shattering Stars" elseif(shatteringStars == QUEST_ACCEPTED and LvL >= 66 and mJob <= 15 and player:getVar("maatDefeated") >= 1) then player:startEvent(0x005d); -- Finish Quest "Shattering Stars" + elseif(player:getVar("maatCap") == 120 and player:getVar("maatCapearned") == 0 and mJob <=15) then + player:startEvent(0x004a); else player:showText(npc,10259); end @@ -188,11 +190,17 @@ elseif(csid == 0x005d) then player:addTitle(STAR_BREAKER); player:levelCap(75); - player:setVar("maatCap",player:getVar("maatDefeated")); + player:setVar("maatCap",player:getVar("maatDefeated")); player:setVar("maatDefeated",0); player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_75); player:addFame(JEUNO,80); player:completeQuest(JEUNO,SHATTERING_STARS); + elseif(csid == 0x004a) then --maatCap + player:addTitle(ULTIMATE_CHAMPION_OF_THE_WORLD); + player:setVar("maatCapearned",1); --no idea how you get another cap if you accidentally toss it, try using this var for an event + player:addItem(15194, 1); + player:messageSpecial(ITEM_OBTAINED,15194); + player:completeQuest(JEUNO,BEYOND_THE_SUN); end end; \ No newline at end of file Index: scripts/zones/Waughroon_Shrine/bcnms/shattering_stars.lua =================================================================== --- scripts/zones/Waughroon_Shrine/bcnms/shattering_stars.lua (revision 3296) +++ scripts/zones/Waughroon_Shrine/bcnms/shattering_stars.lua (working copy) @@ -43,9 +43,42 @@ if(player:getQuestStatus(JEUNO,SHATTERING_STARS) == QUEST_ACCEPTED and player:getFreeSlotsCount() > 0) then player:addItem(4181); player:messageSpecial(ITEM_OBTAINED,4181); + player:setVar("maatDefeated",player:getMainJob()); + --i moved it here so you can keep fighting maat after turning in quest end - player:setVar("maatDefeated",player:getMainJob()); + + + if (player:getVar("maatCap")>0 and player:getVar("UpdatedMaatCapValue") == 0) then + MaatFirstWonJob = "MaatJob"; + MaatFirstWonJob = MaatFirstWonJob .. player:getVar("maatCap"); + player:setVar(MaatFirstWonJob, player:getVar("maatCap")); + player:setVar("UpdatedMaatCapValue", 1); + end + --this is mainly for people that have killed Maat before on a previous job before cap was added + + MaatCapTotal = 0; + MaatWonJob = "MaatJob"; + MaatWonJob = MaatWonJob .. player:getMainJob(); + player:setVar(MaatWonJob, player:getMainJob()); + --gets value of job, adds it to a dynamic variable, for example, BRD is job 10, so it updates MaatJob10 with 10, etc + --this prevents duplicate victories from accidentally being added + for i=1,15 do --checks Maat victories + + MaatCheck = "MaatJob"; + MaatCheck = MaatCheck .. i; + MaatCapTotal = MaatCapTotal + player:getVar(MaatCheck); + end + + + + player:setVar("maatCap", MaatCapTotal); --update maat's cap progress player:addTitle(MAAT_MASHER); + + if(player:getVar("maatCap") == 120) then --120 is WAR to SMN values added together, so beating him with the 15 jobs + player:addQuest(JEUNO,BEYOND_THE_SUN); + --this isn't really necessary, but it's a helpful way to indicate to the player they can get Maat's Cap + end + end end; \ No newline at end of file