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

Rebirth System Free

bodycarcoo11

Mapper
Joined
Apr 26, 2011
Messages
213
Reaction score
9
Location
USA
Hello And Welcome To The Rebirth System Free I will Use it to my OT Server ;) and Have Fun USing IT :D

First for the NPC
1-Open a new notepad or w.e you use. I use Notepad++ alot neater Notepad++ v5.9.3 - Current Version
2-Past the following script below in your npc folder, and save it as Prestige NPC.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Prestige Npc" script="data/npc/scripts/rebirth.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
<look type="73" head="78" body="88" legs="0" feet="88" addons="3"/>
    <parameters>
        <parameter key="message_greet" value="Hello |PLAYERNAME|. Im in charge of the 'Prestige' system."/>
        <parameter key="message_farewell" value="Good bye my dear friend."/>
    </parameters>
</npc>
3-Paste the following script below in your npc/scripts folder and save it as Rebirth.lua
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
 
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 talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
 
	if(msgcontains(msg, 'prestige')) then
		selfSay('Are you ready to prestige and start a new life?', cid)
		talkState[talkUser] = 1
	elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
		-------CONFIGS-------
		local level = 717217
		local cost = 0
		------/CONFIGS-------
		-----LOCALS-----
		local id = getPlayerGUID(cid)
		local name = getCreatureName(cid)
		local vocation = getPlayerVocation(cid)
		local storage = getCreatureStorage(cid, 85987)
		----/LOCALS-----
		if(getPlayerLevel(cid) >= level) then
			if(doPlayerRemoveMoney(cid, cost) == TRUE) then
				if(isInArray({1, 2, 3, 4, 5, 6, 7, 8}, vocation)) then
					doCreatureSetStorage(cid, 85987, storage == -1 and 1 or storage + 1)
					doRemoveCreature(cid)
					db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `promotion` = 0 WHERE `id` ='"..id.."';")
					db.executeQuery("UPDATE `players` SET `name` = '"..name.."' WHERE `id` ='"..id.."';")
				else
					selfSay('Please talk with Forgotten King and promote first.', cid)
					talkState[talkUser] = 0
				end
			else
				selfSay('You don\'t have enough money. You need to pay 1 gold coin to be rebirthed.', cid)
				talkState[talkUser] = 0
			end
		else
			selfSay('Only characters of level 717217 or higher can be rebirthed.', cid)
			talkState[talkUser] = 0
		end
	elseif(msgcontains(msg, 'no') and talkState[talkUser] == 1) then
		selfSay('Okey. Come back when you feel ready.', cid)
		talkState[talkUser] = 0
	end
 
	return true
end
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
If you need help understanding the configs etc just ask.

4-Onlook- for yall that dont know what this is it basicly just adds this to when u look at a character
----Past the following script below in your Creaturescripts scripts folder, and save it as RebirthDescription.lua
Code:
Efunction onLook(cid, thing, position, lookDistance)
	if(isPlayer(thing.uid) and thing.uid ~= cid and getCreatureStorage(thing.uid, 85987) ~= -1) then
		doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has prestiged " .. getCreatureStorage(thing.uid, 85987) .. " " .. (getCreatureStorage(thing.uid, 85987) == 1 and "time" or "times"))
	elseif(thing.uid == cid and getCreatureStorage(cid, 85987) ~= -1) then
		local message = "You see yourself."
		if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then
			message = message .. " You are " .. getPlayerGroupName(cid) .. "."
		elseif(getPlayerVocation(cid) ~= 0) then
			message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "."
		else
			message = message .. " You have no vocation."
		end
 
		if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then
			message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "."
		end
 
		if(getPlayerGuildId(cid) > 0) then
			message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid)
			message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "."
		end
 
		if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then
			message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]."
			message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "."
		end
 
		if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
			message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
		end
 
		return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. getCreatureStorage(cid, 85987) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times."))
	end
 
	return true
end
5-Add the code below to ur creaturescripts.xml
Code:
<event type="look" name="RebirthDescription" event="script" value="rebirthdescription.lua"/>
6-Lastly just register it in your login.lua located in ur creaturescripts script folder. just add this in on a new line
Code:
registerCreatureEvent(cid, "RebirthDescription")
Hope this helps. Sorry if it isnt in right section really didnt know to use it as a npc or a creaturescript. move if in wrong section.
 
Last edited:
Seems legitimate. Not.
Also shouldn't you give credits to the real maker of the script?
 
LoL
i will block you i no like you when i need you help from you you say no and these So GET OUT
 
He just said give the credits for the real maker of the script.. why so mad?
 
Thread should be moved completely wrong section here is for "Tutorials" and ur thread should be in releases.
 
Nice job copy-pasting this script without even one single credit ,, http://otland.net/f83/prestige-rebirth-system-onlook-working-137755/ << proof... next time before you post something like this at least say that you did not create it , plus this is a useless post since there is one there ^ , and if anyone needs a rebirth system they can use the search function. Thank you for your time reading this.
 
theres a bug, if the player dont have the promotion needed, the npc still takes the money without rebirth you...
 
This doesnt seem to work for me for some reason, when i go to the king and ask for a promotion he doesnt reply any help?
 
Korrex, are you the one who created it?

I believe you did since you're Korrex, and I have seen something about you did something like that.
 
Back
Top