• 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!

chest problem

Something like this?

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local QuestID = 10000
local QuestITEM = 2160
local QuestQTY = 10
local QuestMSG = "You have found 10 Crystal Coins."

   	if item.uid == QuestID then
   		queststatus = getPlayerStorageValue(cid,QuestID)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, QuestMSG)
   			doPlayerAddItem(cid,QuestITEM, QuestQTY)
   			setPlayerStorageValue(cid,QuestID,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
	else
		return 0
   	end

   	return 1
end

Just set the Unique ID of a chest to 10000 or change the QuestID in the top of the script to whatever you want.
 
Do you know how to add a script to your sever??

All you have to do to change it from 10 - 2 is

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local QuestID = 10000
local QuestITEM = 2160
local QuestQTY = 2   -- CHANGE QUANTITY HERE
local QuestMSG = "You have found 2 Crystal Coins." -- CHANGE YOUR MESSAGE HERE

   	if item.uid == QuestID then
   		queststatus = getPlayerStorageValue(cid,QuestID)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, QuestMSG)
   			doPlayerAddItem(cid,QuestITEM, QuestQTY)
   			setPlayerStorageValue(cid,QuestID,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
	else
		return 0
   	end

   	return 1
end
 
Back
Top