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

CreatureEvent Best Rebirth System Mysql By mlody.1039 With Gesior Script

hmm same error
changed the line in npchandler to local distance = getDistanceBetween(getCreaturePosition(getNpcCid()), getCreaturePosition(cid))

[20:14:31.693] [Error - NpcScript Interface]
[20:14:31.694] data/npc/scripts/rebirth.lua:eek:nThink
[20:14:31.694] Description:
[20:14:31.695] data/npc/scripts/rebirth.lua:120: attempt to call global 'getDistanceTo' (a nil value)
[20:14:31.696] stack traceback:
[20:14:31.697] data/npc/scripts/rebirth.lua:120: in function <data/npc/scripts/rebirth.lua:115>
 
I just changed the line in npchandler.lua and the npc script rebirth.lua
now I have these errors:

280nzet.png
 
Today I have made Automatic Rebirth by level 717217 player will reset to level 1000 and add rebirth automatic without kicking so player can exp while rebirth is added at same time :)

To Install
We enter
creaturescripts

And enter creaturescripts.xml

and add

Code:
<event value="reblevel.lua" event="script" name="reblevel" type="advance"/>

now we enter creaturescripts/scripts

And make reblevel.lua

and add this code

Code:
local level = 717217 -- the min level
function onAdvance(cid, skill, oldlevel, newlevel)
        if getPlayerLevel(cid) >= level then
        local guid = getPlayerGUID(cid)
        doPlayerAddLevel(cid,getPlayerLevel(cid)*-1+1000)
        db.executeQuery("UPDATE `players` SET `Rebirths` = `Rebirths` + 1 WHERE `id` = " .. guid)
    else
    end
    return true
end

Now we enter login.lua

and add this

Code:
registerCreatureEvent(cid, "reblevel")


Enjoy!
 
Last edited:
Back
Top