• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Quest chest

111a111

Banned User
Joined
Jan 29, 2008
Messages
78
Reaction score
0
Hello all can some one give me a script so i can only take 1 item but i have 4 Chest like anni ?
 
You should use the search tool next time :thumbup:
Here's a script for inquisition quest. (Edit it to your needs)
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

   	if item.uid == 12901 then
   		queststatus = getPlayerStorageValue(cid,50090)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found demon legs.")
   			doPlayerAddItem(cid,2495,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
   		end
   	elseif item.uid == 12902 then
   		queststatus = getPlayerStorageValue(cid,50090)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a rainbow shield.")
   			doPlayerAddItem(cid,8905,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
   		end
   	elseif item.uid == 12903 then
   		queststatus = getPlayerStorageValue(cid,50090)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a royal crossbow.")
   			doPlayerAddItem(cid,8851,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
		end
   	elseif item.uid == 12904 then
   		queststatus = getPlayerStorageValue(cid,50090)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Spellbook of Dark Mysteries.")
   			doPlayerAddItem(cid,8918,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
   		end
	end
   	return 1
end
 
i edited this for anni and its not working for me using 2000 for aid and 12901-demon armor, 12902-magic sword, 12903-stonecutteraxe, 12904-present w/ anni bear

edited it to my needs but nothing pops up when i click on the chests testing it ingame

@Bintzer Using The Forgotten Server - Version 0.2.13
 
Last edited by a moderator:
Try using a single action script (not the default one). Try using the above one, obviously you will only need to add the correct uniqueID to the chests (without AID) 12901 to 12904. Then register in actions.xml.
 
Back
Top