DiegoRulez
Member
I need to add the key number.
I'm using this script, but I can use another one.
All the keys use the ID 2088 .. But the number of them in game is different ..
Examples:
Key 4501 - Tibia Wiki
Key 4502 - Tibia Wiki
Same thing for the script I need by on the port, it needs to "read" that number
At the moment it is like this:
Sorry the bad english.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 1001 then
queststatus = getPlayerStorageValue(cid, 1001)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a morning star.")
doAddContainerItem(cid, 2088, 1)
setPlayerStorageValue(cid, 1001, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
end
return true
end
All the keys use the ID 2088 .. But the number of them in game is different ..
Examples:
Key 4501 - Tibia Wiki
Key 4502 - Tibia Wiki
Same thing for the script I need by on the port, it needs to "read" that number
At the moment it is like this:
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(Storage.AnnihilatorDone) ~= 1 then
if item.itemid == 5114 then
player:teleportTo(toPosition, true)
item:transform(item.itemid + 1)
end
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
end
return true
end
Sorry the bad english.