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

Do quest, get item with ACTIONID

ActionID 2000, UniqueID some unused random number, then add the key into the chest, click on it, and assign ActionID 2091 to the key.

jjmkn5.png
 
Last edited:
If you would still like a Script for it.. heres example

Code:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 30014 and getPlayerStorageValue(cid, 50002) == -1 then
      doPlayerSendTextMessage(cid,22,"You have found a key.")
	  key = doPlayerAddItem(cid, 2089, 1)
      doSetItemActionId(key,30014)
	  setPlayerStorageValue(cid, 50002,1)
    else
      doPlayerSendTextMessage(cid,22,"It is empty.")
	 end
  return 1
end
 
Alright, try using this script instead:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 5000) <= 0 then
		local key = doPlayerAddItem(cid, 2091)
		doItemSetAttribute(key, "aid", 2091)
		setPlayerStorageValue(cid, 5000, 1)
		doPlayerSendTextMessage(cid, 22, "You have found a key.")
	else
		doPlayerSendCancel(cid, "It is empty.")
	end
return true
end
 
Back
Top