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

[Request] Script Chest

danielpt

Banned User
Joined
Jan 20, 2010
Messages
181
Reaction score
0
I need a script, when the player open the chest he get the iten and receive a menssagem, this is a normaly quest...
but i don't have :D

repp++
 
Set action id of the chest to 2000 and right click on the chest and add the items, which you want to be the reward of the quest, in the chest.
 
PHP:
function onUse(cid, item, frompos, item2, topos)
		queststatus = getPlayerStorageValue(cid, YOUR STORAGE)
		if queststatus == -1 then
				doPlayerSendTextMessage(cid,22,'You have found ---.')
				doPlayerAddItem(cid,????,?)
				setPlayerStorageValue(cid,YOURSTORAGE,1)
		else
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end

		return 1

	end
 
here
LUA:
  function onUse(cid, item, frompos, item2, topos)


if item.uid ==7516 then
queststatus = getPlayerStorageValue(cid,7616)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found item.")
doPlayerAddItem(cid,item id,1)
setPlayerStorageValue(cid,7616,1)
else
doPlayerSendTextMessage(cid,22,"You aledry done this quest.")
end
else
return 0
end

return 1
end

NOTE:
LUA:
doPlayerAddItem(cid,item id,1)
here change item id, for numbers item id
example
7795
doPlayerAddItem(cid,7795,1)

,1 <-- how much take
 
Back
Top