we have made the treasure coffers for the af gear :)

Post Reply
mvd1987
Posts: 112
Joined: Wed Oct 17, 2012 8:36 am

we have made the treasure coffers for the af gear :)

Post by mvd1987 » Sat Dec 08, 2012 2:05 pm

i have a new partner/owner on the server now and his name is brose and he did a lot for me and the server and we are both working on making it a nice and respect full server and to help the project where we can.
we are going to make the server a dedicated server so we both can play and make changes on it.

but we dont have commit power yet and hope we can have it once the developers think we helped enough.

while i was working on the 75+ weapons (i made the modds working and working through the mid's now)
my partner took a crack at the coffers and he did a very nice job on it.

i saw that it was assigned to whasf so hope he can take a look and check them and put them in and the developers can let me know on the commit power for the server.

we tested them for 3 days now and they all work.

the list of coffers fixed:

scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua
scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua
scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua
scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua
scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua
scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua
scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua
scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua
scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua
scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua
scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua
scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua


we have the mods of all 75+ rings and the weapons done but i will give the full packages when its all done and i have the mid's for the weapons complete so all will work also.
but like i said we cant commit now so hope that will change so we dont have to wait to help the project getting where it needs to be.cause when i fixed the hut_door for the mission (was a minor fix_ i had to wait for link to commit it.

i will give the patch for the coffers and let me know how they work :) (we tested them so they will work now)

script of the patch:

Code: Select all

Index: scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua	(working copy)
@@ -69,7 +69,7 @@
 			if(diceroll <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
Index: scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua	(working copy)
@@ -61,7 +61,7 @@
 			if(math.random() <= success) then  -- 0 or 1
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 2) then
 					for nb = 1,table.getn(listAF),3 do
 						if(mJob == listAF[nb]) then
Index: scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua	(working copy)
@@ -45,14 +45,15 @@
 			for nb = 1,table.getn(listAF),3 do
 				if(player:getQuestStatus(JEUNO,listAF[nb + 1]) ~= QUEST_AVAILABLE and mJob == listAF[nb] and player:hasItem(listAF[nb + 2]) == false) then
 					questItemNeeded = 2;
+					AFgear = listAF[nb+2];
 					break
 				end
 			end
 		end
 		--------------------------------------
 		
-		local  pack = openChance(player,npc,trade,TreasureType,TreasureLvL,TreasureMinLvL,questItemNeeded);
-		local  success = 0;
+		local pack = openChance(player,npc,trade,TreasureType,TreasureLvL,TreasureMinLvL,questItemNeeded);
+		local success = 0;
 		if(pack[2] ~= nil) then
 			player:messageSpecial(pack[2]);
 			success = pack[1];
@@ -63,10 +64,10 @@
 		if(success ~= -2) then
 			player:tradeComplete();
 			
-			if(math.random() <= success) then  -- 0 or 1
+			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
@@ -101,6 +102,7 @@
 
 end;
 
+
 -----------------------------------
 -- onTrigger Action
 -----------------------------------
Index: scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua
===================================================================
--- scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua	(revision 2069)
+++ scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua	(working copy)
@@ -31,11 +31,30 @@
 	
 	-- Player traded a key.
 	if((trade:hasItemQty(1040,1) or trade:hasItemQty(1115,1) or trade:hasItemQty(1023,1) or trade:hasItemQty(1022,1)) and trade:getItemCount() == 1) then 
+
+		local mJob = player:getMainJob();
 		local zone = player:getZone();
+		local AFHandsActivated = player:getVar("BorghertzAlreadyActiveWithJob");
+		local zone = player:getZone();
 		-- IMPORTANT ITEM: AF2 RDM QUEST -----------
 		if(player:getVar("needs_crawler_blood") == 1) then 
+			questItemNeeded = 3;
+		end
+		
+		if((AFHandsActivated == 2 or AFHandsActivated == 9) and player:hasKeyItem(OLD_GAUNTLETS) == false) then 
 			questItemNeeded = 1;
+		else
+			local listAF = getAFbyZone(zone);
+			
+			for nb = 1,table.getn(listAF),3 do
+				if(player:getQuestStatus(JEUNO,listAF[nb + 1]) ~= QUEST_AVAILABLE and mJob == listAF[nb] and player:hasItem(listAF[nb + 2]) == false) then
+					questItemNeeded = 2;
+					break
+				end
+			end
 		end
+		
+		
 		--------------------------------------
 		
 		local pack = openChance(player,npc,trade,TreasureType,TreasureLvL,TreasureMinLvL,questItemNeeded);
@@ -54,10 +73,23 @@
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
 				
-				if(questItemNeeded == 1) then
+				if(questItemNeeded == 3) then
 					player:addKeyItem(CRAWLER_BLOOD);
 					player:messageSpecial(KEYITEM_OBTAINED,CRAWLER_BLOOD); -- Crawler Blood (KI)
 					player:setVar("needs_crawler_blood",0);
+				listAF = getAFbyZone(zone);
+				elseif(questItemNeeded == 1) then
+					player:addKeyItem(OLD_GAUNTLETS);
+					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
+				elseif(questItemNeeded == 2) then
+					for nb = 1,table.getn(listAF),3 do
+						if(mJob == listAF[nb]) then
+							player:addItem(listAF[nb + 2]);
+							player:messageSpecial(ITEM_OBTAINED,listAF[nb + 2]);
+							break
+						end
+					end
+
 				else
 					player:setVar("["..zone.."]".."Treasure_"..TreasureType,os.time() + math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME)); 
 					
@@ -87,6 +119,9 @@
 
 function onTrigger(player,npc)
 	player:messageSpecial(CHEST_LOCKED,1040);
+	player:addKeyItem(CRAWLER_BLOOD);
+	player:messageSpecial(KEYITEM_OBTAINED,CRAWLER_BLOOD); -- Crawler Blood (KI)
+	player:setVar("needs_crawler_blood",0);
 end; 
 
 -----------------------------------
Index: scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua	(working copy)
@@ -41,7 +41,7 @@
 			questItemNeeded = 1;
 		else
 			local listAF = getAFbyZone(zone);
-			
+
 			for nb = 1,table.getn(listAF),3 do
 				if(player:getQuestStatus(JEUNO,listAF[nb + 1]) ~= QUEST_AVAILABLE and mJob == listAF[nb] and player:hasItem(listAF[nb + 2]) == false) then
 					questItemNeeded = 2;
@@ -66,18 +66,22 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
 				elseif(questItemNeeded == 2) then
-					for nb = 1,table.getn(listAF),3 do
+				for nb = 1,table.getn(listAF),3 do
 						if(mJob == listAF[nb]) then
 							player:addItem(listAF[nb + 2]);
 							player:messageSpecial(ITEM_OBTAINED,listAF[nb + 2]);
 							break
 						end
 					end
+
+
+							
+				
 				else
 					player:setVar("["..zone.."]".."Treasure_"..TreasureType,os.time() + math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME)); 
 					
Index: scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua	(working copy)
@@ -70,7 +70,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
Index: scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua	(working copy)
@@ -66,7 +66,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
Index: scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua	(working copy)
@@ -65,7 +65,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 3) then
 					player:addKeyItem(MAP_OF_THE_QUICKSAND_CAVES);
 					player:messageSpecial(KEYITEM_OBTAINED,MAP_OF_THE_QUICKSAND_CAVES); -- Map of the Quicksand Caves (KI)
Index: scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua	(working copy)
@@ -70,7 +70,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
Index: scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua	(working copy)
@@ -65,7 +65,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 3) then
 					player:addKeyItem(MAP_OF_THE_TEMPLE_OF_UGGALEPIH);
 					player:messageSpecial(KEYITEM_OBTAINED,MAP_OF_THE_TEMPLE_OF_UGGALEPIH); -- Map of the Temple of Uggalepih (KI)
Index: scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua	(working copy)
@@ -70,7 +70,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
Index: scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Coffer.lua	(working copy)
@@ -63,10 +63,10 @@
 		if(success ~= -2) then
 			player:tradeComplete();
 			
-			if(math.random() <= success) then   -- 0 or 1
+			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 1) then
 					player:addKeyItem(OLD_GAUNTLETS);
 					player:messageSpecial(KEYITEM_OBTAINED,OLD_GAUNTLETS); -- Old Gauntlets (KI)
@@ -77,7 +77,8 @@
 							player:messageSpecial(ITEM_OBTAINED,listAF[nb + 2]);
 							break
 						end
-					end
+					end		
+				
 				else
 					player:setVar("["..zone.."]".."Treasure_"..TreasureType,os.time() + math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME)); 
 					
Index: scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua
===================================================================
--- scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua	(revision 2069)
+++ scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua	(working copy)
@@ -67,7 +67,7 @@
 			if(math.random() <= success) then
 				-- Succeded to open the coffer
 				player:messageSpecial(CHEST_UNLOCKED);
-				
+				local listAF = getAFbyZone(zone);
 				if(questItemNeeded == 2) then
 					for nb = 1,table.getn(listAF),3 do
 						if(mJob == listAF[nb]) then
patch treasure coffers.patch
the coffer for af gear
(12.15 KiB) Downloaded 177 times
thanx brose on your nice work and that we can be partners in crime from now on :P
Last edited by mvd1987 on Sat Dec 08, 2012 5:09 pm, edited 3 times in total.
Owner/GMLeader mvd1987/michaelvandun Fantasy World International Server

xtcraver2003
Posts: 5
Joined: Wed Nov 21, 2012 12:01 am

Re: we have made the treasure coffers for the af gear :)

Post by xtcraver2003 » Sat Dec 08, 2012 2:56 pm

Image

mvd1987
Posts: 112
Joined: Wed Oct 17, 2012 8:36 am

Re: we have made the treasure coffers for the af gear :)

Post by mvd1987 » Sat Dec 08, 2012 5:03 pm

yes nice work brose (xtcraver2003 here on the forum :P)

and keep up the nice teamwork we have :)
Owner/GMLeader mvd1987/michaelvandun Fantasy World International Server

link
Developer
Posts: 169
Joined: Fri Jul 27, 2012 3:27 pm

Re: we have made the treasure coffers for the af gear :)

Post by link » Sat Dec 08, 2012 5:55 pm

I'm able to get all my af + shadow gauntlets (r2074). Not sure why others are having problems.

mvd1987
Posts: 112
Joined: Wed Oct 17, 2012 8:36 am

Re: we have made the treasure coffers for the af gear :)

Post by mvd1987 » Sat Dec 08, 2012 7:20 pm

it took the item but didnt gave the af gear inside,

it got confused so to speak and let itself in a loop.
it was when it checked the af list to give the right gear for the job that opened it.

greetings michael
Owner/GMLeader mvd1987/michaelvandun Fantasy World International Server

link
Developer
Posts: 169
Joined: Fri Jul 27, 2012 3:27 pm

Re: we have made the treasure coffers for the af gear :)

Post by link » Sat Dec 08, 2012 7:49 pm

I just tried it again on Whasf's test server i got the AF gear (thf).

Are you openning coffers with correct job?

link
Developer
Posts: 169
Joined: Fri Jul 27, 2012 3:27 pm

Re: we have made the treasure coffers for the af gear :)

Post by link » Sat Dec 08, 2012 8:09 pm

One of our members burned a key in davoi (DRK), looks like there is a problem.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: we have made the treasure coffers for the af gear :)

Post by whasf » Sun Dec 09, 2012 12:56 am

The \scripts\zones\Monastic_Cavern\npcs\Treasure_Coffer.lua had an error in it. I don't know how widespread it is (or even it's the problem) until I can get it tested.

Right now it's "Fixed" on the test server until I can confirm. If the other treasure_coffer LUAs have the same problem they will be fixed too.
-- Whasf

ciradan
Posts: 25
Joined: Fri Jul 27, 2012 7:47 pm

Re: we have made the treasure coffers for the af gear :)

Post by ciradan » Sun Dec 09, 2012 11:47 am

The coffer in Zahl Baileys has the same problem.
Tried to get the thf body, got "Chest unlocked" but no af.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: we have made the treasure coffers for the af gear :)

Post by whasf » Sun Dec 09, 2012 2:35 pm

Thank you, I found the root cause and fixed it. Your fix was duplicating line 43 (why assign the variable twice?). By moving line 43 out of the if()..else statement it applies to the whole section.

r2077

This also fixes bug 350.
-- Whasf

Post Reply