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

Windows How do i create exp door but reborns?

chekhn

New Member
Joined
Apr 8, 2011
Messages
33
Reaction score
0
Hey guys i can't figure out to to make exp doors but with reborns.
So for example entering a quest you need lets say 50 reborns.
 
Use the storage you use for the reborns.
Go to doors.lua (data/actions/scriots/other) and look for something like this.
Code:
if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
Change getPlayerLevel(cid) to getPlayerStorageValue(cid, storage), instead of storage, use the storage for the reborns.
 
Use the storage you use for the reborns.
Go to doors.lua (data/actions/scriots/other) and look for something like this.
Code:
if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
Change getPlayerLevel(cid) to getPlayerStorageValue(cid, storage), instead of storage, use the storage for the reborns.
what do you mean by storage, should i write reborn.lua or what? didn't really understand what to write instead of storage?
 
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.
 
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 keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local Topic = {}

local reborn = 2500 -- free storage

So you mean i should write 2500 instead of storage in doors.lua ?
 
i did it before
Code:
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
 
Back
Top