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

need new reborn system

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,812
Solutions
6
Reaction score
822
i want something like:
when someone reach the highest level he says /reborn and he get something says
Will get level 10, Are you sure?
he says "yes"
and he get level 10 and then it says
You can chose 1 donation thing:Donation Uh......
and he chose and get it
he can say /reborn only 2 times

rep++
 
i want something like:
when someone reach the highest level he says /reborn and he get something says
Will get level 10, Are you sure?
he says "yes"
and he get level 10 and then it says
You can chose 1 donation thing:Donation Uh......
and he chose and get it
he can say /reborn only 2 times

rep++

So, you're basically saying that you want a system where when someone reaches LEVEL10, he will be able to say /reborn.
The function /reborn just gives you 1 donation item.
Once you reborn, you stay at level 10?
You can say /reborn twice only.

This is either useless, or makes no sense. :/
Please explain it more clearly.
 
So, you're basically saying that you want a system where when someone reaches LEVEL10, he will be able to say /reborn.
The function /reborn just gives you 1 donation item.
Once you reborn, you stay at level 10?
You can say /reborn twice only.

This is either useless, or makes no sense. :/
Please explain it more clearly.

Nope, he meant this
You reach higer level --> you say /reborn --> you get level 10 --> you get donor item.
Thats what I understood lol..
 
talkactions.xml
LUA:
local l,s,rc = 200,15882,15883 -- level to use this function & storage value.
function onSay(cid,words,param)
local v,g = getThingPos(cid),getPlayerGUID(cid)
	if getPlayerLevel(cid) >= l then
		if getPlayerStorageValue(cid,rc) ~= 2 then
			if getPlayerStorageValue(cid,s) < 2 then
				setPlayerStorageValue(cid,s,2)
				doRemoveCreature(cid)
				db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `health` = 500, `healthmax` = 500, `mana` = 500, `manamax` = 500 WHERE `id` = "..g..";")
			end
		else
			doPlayerSendCancel(cid,'You can only reborn 2 times.')
			doSendMagicEffect(v,CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid,'You need to be level '..l..' to use this function.')
		doSendMagicEffect(v,CONST_ME_POFF)
	end
	return true
end

login.lua

after
LUA:
function onLogin(cid)
paste
LUA:
local donoritems,s,rc = {{id=1295,count=1},{id=1952,count=2}},15882,15883 -- donor weapons,reborn said check, reborn count.
	local r,c,v = donoritems[math.random(1,#donoritems)].id,donoritems[math.random(1,#donoritems)].count,getThingPos(cid)
	if getPlayerStorageValue(cid,s) == 2 then
		if getPlayerStorageValue(cid,rc) == 1 then
			doPlayerAddItem(cid,r,c)
			setPlayerStorageValue(cid,rc,2)
			setPlayerStorageValue(cid,s,0)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,'You now got '..getPlayerStorageValue(cid,rc)..' reborns.')
		elseif getPlayerStorageValue(cid,rc) < 0 then
			doPlayerAddItem(cid,r,c)
			setPlayerStorageValue(cid,rc,1)
			setPlayerStorageValue(cid,s,0)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,'You now got your first reborn!')
		end
	end

works on 0.3.6pl1.
 
talkactions.xml
LUA:
local l,s,rc = 200,15882,15883 -- level to use this function & storage value.
function onSay(cid,words,param)
local v,g = getThingPos(cid),getPlayerGUID(cid)
	if getPlayerLevel(cid) >= l then
		if getPlayerStorageValue(cid,rc) ~= 2 then
			if getPlayerStorageValue(cid,s) < 2 then
				setPlayerStorageValue(cid,s,2)
				doRemoveCreature(cid)
				db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `health` = 500, `healthmax` = 500, `mana` = 500, `manamax` = 500 WHERE `id` = "..g..";")
			end
		else
			doPlayerSendCancel(cid,'You can only reborn 2 times.')
			doSendMagicEffect(v,CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid,'You need to be level '..l..' to use this function.')
		doSendMagicEffect(v,CONST_ME_POFF)
	end
	return true
end

login.lua

after
LUA:
function onLogin(cid)
paste
LUA:
local donoritems,s,rc = {{id=1295,count=1},{id=1952,count=2}},15882,15883 -- donor weapons,reborn said check, reborn count.
	local r,c,v = donoritems[math.random(1,#donoritems)].id,donoritems[math.random(1,#donoritems)].count,getThingPos(cid)
	if getPlayerStorageValue(cid,s) == 2 then
		if getPlayerStorageValue(cid,rc) == 1 then
			doPlayerAddItem(cid,r,c)
			setPlayerStorageValue(cid,rc,2)
			setPlayerStorageValue(cid,s,0)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,'You now got '..getPlayerStorageValue(cid,rc)..' reborns.')
		elseif getPlayerStorageValue(cid,rc) < 0 then
			doPlayerAddItem(cid,r,c)
			setPlayerStorageValue(cid,rc,1)
			setPlayerStorageValue(cid,s,0)
			doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,'You now got your first reborn!')
		end
	end

works on 0.3.6pl1.

i want to chose what to give and he have to be highst level then he can use it!!and only two times
is it like this?
 

Similar threads

Back
Top