• 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] Reborn System

semary

[BB] OTland
Joined
May 3, 2009
Messages
813
Reaction score
18
Location
E G Y P T
Hello Otlander
I need Reborn system.
When player rich level 450 he will rebron to level 8 with his old skills and items, And he will gain more mana and health like 100 Point Extra than the normal Players. [First Reborn] [+ A Gift][Rank]

And the same thing in the [Second Reborn] but he will gain 200 Point in Health and mana Extra and more stamina. [+ A Gift][Rank]

[Rank][like]: You see yourself you are an elderdruid , First Reborn. [ EXampLE ]

After the Second Reborn he can't Get Reborn again.
But the Exp will be Very low.


It can be happened :confused::confused:
 
LUA:
function onAdvance(cid, skill, oldlevel, newlevel)
config = { 
level=450, -- level necessary to reset. 
RemainingLvl=8, -- that level will be reset after. 
exper=4200, -- experience that will be reset after. 
pid=getPlayerGUID(cid),  
skull="no", -- players with white skull can reset? ("yes" or "no"). 
redskull="no", -- players with red skull can reset? ("yes" or "no"). 
prot="no", -- players need to be in protection zone to reset? ("yes" or "no"). 
bat="no" --Players must be no fight to reset ("yes" or "no"). 
} 
if skill == SKILL__LEVEL and newlevel >= 450) then
function getResets(cid) 
reset = getPlayerStorageValue(cid,1020) 
if reset < 0 then 
reset = 0 
end 
return reset 
end 

if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then 
doPlayerSendTextMessage(cid,22,"only players without white skull can reset.") 
return TRUE 
end 

if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then 
doPlayerSendTextMessage(cid,22,"only player without red skull can reset.") 
return TRUE 
end 

if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then 
doPlayerSendTextMessage(cid,22,"you need stay in PZ to reset.") 
return TRUE 
end 

if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then 
doPlayerSendTextMessage(cid,22,"players without battle can reset.") 
return TRUE 
end 

if getPlayerLevel(cid) >= config.level then 
setPlayerStorageValue(cid,1020,getResets(cid)+1) 
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.") 
doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") 
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) 
doRemoveCreature(cid) 
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) 
else 
doPlayerSendCancel(cid, "You need to have level "..config.level.." or more you may be reset.") 
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
end 

return TRUE 
end
Try it, in config there must be
skull = no
pro = no
bat= no
and
redskull = no
 

Similar threads

Back
Top