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

Feature Reborn System | Reset level, increase power, set exclusive items, spells, houses, web and more!

This is a reborn system, on which player reaches level X and then goes back to level 8, you choose how and what status will be available.

This system was designed to TFS 1.2, but can be adapted to any version, the only difference is maybe a function name. Comment if you have problem adapting to your source.

I have attached sources, and few .lua files such as action and movements, to help you make your configurations

Here is the list of features:

  • Storage of Rebirths database, this can be handy when creating new websites page
  • Rebirth information when looking at a character
  • Increase in damage and spells damage by rebirth
  • Bonus on acquired health and mana on level up
  • Exclusive houses based on rebirth level
  • Exclusive spells based on rebirth level
  • Exclusive items based on rebirth level
  • Doors and teleport access based on rebirth level
  • Simple highscore Gesior page
  • Lua rebirth functions
  • Configuration on config.lua on basic rebirth status, such as required level, damage bonus, percentage of level and hp

Pictures:







Coding:

The c++ code is all labeled with REBIRTH, so if you Ctrl + F for it, you will find it all.

To add houses rebirth requirements, add this to houses.xml:
Code:
 reqrebirth="10"

To add rebirth requirements to spells, add this to spells.xml:
Code:
rebirth="1"

To add rebirth requirements to items, add this to weapons.xml:
Code:
rebirth="1" unproperly="0" -- 0 means that it must fit the requirements to wield

To make custom doors, use a regular quest door, and set action id to 10000 + required reborns, 10010 for 10 reborns for example.

To make custom tiles or teleport, do the same process on the action id.

config.lua configuration:
Code:
rebornLevel = 500000 -- min level to reborn
rebornStats = 5 -- % more hp and mp on every reset ()
rebornDmg = 10 -- % attack bonus per reborn. 10 = 1%, 100 = 10%, 1000 = 100%. accumulative, keep it low!!!!

Files:

rebirth (https://www.dropbox.com/sh/323ahk3obcrhk21/AAAu1Qz96A1PCFS_8pu5dy7Qa?dl=0)
Can we help me with compile on this files??
 
Would you happen to be able to tell me how make your system

  • Send killers rebirth too the mysql table "player_death"
  • Set it to show on the corpse of the player, so like "You see -blank- they were rebirth -rebirth level- they were killed by -blank- who is rebirth -rebirth-level-."
  • Limit player killing to rebirth
  • Give attack speed bonus per rebirth
 
Last edited:
have some1 rebirth npc?

For everyone asking, here you go, it does rebirths for free, but here is a NPC script you can use.

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()                          npcHandler:onThink()                        end

function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    local player = Player(cid)
    if(msgcontains(msg, 'rebirth')) then
        selfSay('Are you ready to be reborn and to start a new life?', cid)
    elseif(msgcontains(msg, 'yes')) then
    player:doRebirth()
    doRemoveCreature(cid)             
    end
end
    

    
    
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
For everyone asking, here you go, it does rebirths for free, but here is a NPC script you can use.

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()                          npcHandler:onThink()                        end

function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    local player = Player(cid)
    if(msgcontains(msg, 'rebirth')) then
        selfSay('Are you ready to be reborn and to start a new life?', cid)
    elseif(msgcontains(msg, 'yes')) then
    player:doRebirth()
    doRemoveCreature(cid)           
    end
end
  

  
  
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
when i did it like this before i could rebirth whatever my level is so if anybody faced the same issue the solution is :
Lua:
local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()                          npcHandler:onThink()                        end

function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    local player = Player(cid)
    local reblevel = 700000  -- reborn level
    if(msgcontains(msg, 'rebirth')) then
        selfSay('Are you ready to be reborn and to start a new life?', cid)
    elseif(msgcontains(msg, 'yes')) then
        if player:getLevel() >= reblevel then
            player:doRebirth()
            player:remove()
        else
            selfSay('Come back when your level is '..reblevel..'.')
        end          
    end
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
I managed to make the code work in otx2. However, when a player dies and the level returns, or I remove the player's level via / addskill, the server simply crashes!
 
I had a bug with the house I had to remove an error pops up class not identified client 8.6 tfs 1.2
 
you will have to search and add everything by hand because apparently github didn't existed back in 2016 🤔
Is this also the case for TFS 1.5? I tried adding stuff manually, but some things are different in my version compared to the one given

EDIT: I still need help, but these are the files you should edit (will hopefully save time for others)
GAME.CPP
HOUSE.CPP
HOUSE.H
IOLOGINDATA.CPP
ITEM.CPP
LUASCRIPTS.CPP
LUASCRIPTS.H
PLAYER.CPP
PLAYER.H
SPELLS.CPP
SPELLS.H
WEAPONS.CPP
WEAPONS.H
 
Last edited:

Similar threads

Back
Top