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

[Request] Key Door

danielpt

Banned User
Joined
Jan 20, 2010
Messages
181
Reaction score
0
Hello, i needing a script when the player have "x" key, he can open "x" door....

Repp++ :thumbup:
 
Here you are:
LUA:
function onUse(cid, item, frompos, item2, topos)
if item.actionid == XXXX and getPlayerStorageValue(cid,3523) == -1 then
local key = doPlayerAddItem(cid,2088,1)
doItemSetAttribute(key, "aid", XXXX)
doPlayerSendTextMessage(cid,25,"You have found key.")
setPlayerStorageValue(cid,3523,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return true
end
 
why don't you just do this?

y0uQs.png
 
See in actions.xml have scripts with AID, in XXX you put a diferent number 10023 ( example ) and put in action.xml
 
since when does it work that you add the item in a chest? ive been manually making scripts for all my quest boxes!!!?

so it works by just adding the item inside the chest? you dont have to make action scripts now?
 
Back
Top