Blue Identity
Member
Hello Supporters,
I want, as in real tibia, to place the Silver Key in the Necromant House. This key will give you the acces to the closed door and the teleport behind it.
How can I make it so ones used the tile you will find that sertain item (a key in this case) but it will also have a action ID, see the red text in the script.
Thanks lots
I want, as in real tibia, to place the Silver Key in the Necromant House. This key will give you the acces to the closed door and the teleport behind it.
How can I make it so ones used the tile you will find that sertain item (a key in this case) but it will also have a action ID, see the red text in the script.
Code:
function onUse(cid, item, frompos, item2, topos)
local config = {
storage = 16025, -- change to your own storage value :)
item = 2088, [COLOR="#FF0000"]This item needs action ID: 3701[/COLOR]
}
if getPlayerStorageValue(cid, config.storage) == -1 then
setPlayerStorageValue(cid, config.storage, 1)
doPlayerSendTextMessage(cid,25,"You have found a silver key.")
key = doPlayerAddItem(cid, config.item, 1)
else
doPlayerSendTextMessage(cid,25,"The tile is empty.")
end
return TRUE
end
Thanks lots