if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
what do you mean by storage, should i write reborn.lua or what? didn't really understand what to write instead of storage?Use the storage you use for the reborns.
Go to doors.lua (data/actions/scriots/other) and look for something like this.
Change getPlayerLevel(cid) to getPlayerStorageValue(cid, storage), instead of storage, use the storage for the reborns.Code:if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
local keywordHandler = KeywordHandler:new()What does your reborn system use to set reborns to someone? If it's storage, you can use the storage number your reborn script is using.
local str = 456 -- rebirth storage
local rebirth = 5 -- rebirth to pass the door
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureStorage(cid, str) >= rebirth then
if getCreaturePosition(cid).x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, true)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, true)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
end
return false
end