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

Talkactions Rebirth

GoalTV

NANI?!
Joined
Jul 23, 2011
Messages
589
Reaction score
53
Hello I Have Problem With Rebirth Script For Talkactions When I Try Make Talkaction !rebirth
its not working it says need level 717171 and when I have It nothing happen and no error

Code:
local config = {
	price = 0, -- Price of first rebirth
	priceIncrease = 0, -- Works as 'price' + current rebirths * priceIncrease.
	rebirthLevel = 717171, -- Level for first rebirth.
	rebirthIncrease = 0, -- Works as 'rebirthLevel' + current rebirths * rebirthIncrease.
	maxRebirths = 1000, -- Number of times a player can rebirth.
	level = 1000, -- The level the player is set to apon rebirth.
	healthPercent = 1.00, -- 1.00 = 100%.
	health = 100, -- Only used if 'healthPercent' = 0.
	manaPercent = 1.00, -- 1.00 = 100%.
	mana = 100, -- Only used if 'manaPercent' = 0.
	keepSkills = true, -- Wether players keep skills and level apon rebirth.
	skillLevel = 10, -- Only used if 'keepSkills' = false.
	magicLevel = 0, -- Only used if 'keepSkills' = false.
	capacity = 10000, -- The capacity players are set to apon rebirth.
	templePos = {x = 0, y = 0, z = 0}, -- The place where players reset to should there town id return 0.
	Rebirth = 1 -- how many Rebirth player will get.
}
function onSay(cid, words, param, channel)
      money = config.price + (config.priceIncrease * storage)
		return true
	end
	  
      if (getPlayerLevel(cid) >= rebirthLevel) then
	   end
	    if (getPlayerMoney(cid) >= money) then
      doPlayerRemoveMoney(cid, money)
      addEvent(doRebirthPlayer, 2000, {cid=cid})
	  end
 
function doRebirthPlayer(cid)
	cid = cid.cid
	if (cid == nil) then
		return true
	end
 
	local guid = getPlayerGUID(cid)
 
	if (config.healthPercent > 0) then
		health = getCreatureMaxHealth(cid) * config.healthPercent
	else
		health = config.health
	end
	if (config.manaPercent > 0) then
		mana = getCreatureMaxMana(cid) * config.manaPercent
	else
		mana = config.mana
	end
	if (getPlayerTown(cid) > 0) then
		pos = getTownTemplePosition(getPlayerTown(cid))
	else
		pos = config.templePos
end
doAddRebirth(cid, config.Rebirth, getPlayerRebirth(cid, config.Rebirth) + 1)

	doRemoveCreature(cid, true)
	db.executeQuery("UPDATE `players` SET level = " .. config.level .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET health = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET healthmax = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET mana = " .. mana .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET manamax = " .. mana .. " WHERE id = " .. guid .. ";") 
	db.executeQuery("UPDATE `players` SET posx = " .. pos.x .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posy = " .. pos.y .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posz = " .. pos.z .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET cap = " .. config.capacity .. " WHERE id = " .. guid .. ";")

	if (not config.keepSkills) then
		db.executeQuery("UPDATE `players` SET maglevel = " .. config.magicLevel .. " WHERE id = " .. guid .. ";")
		db.executeQuery("UPDATE `player_skills` SET value = " .. config.skillLevel .. " WHERE id = " .. guid .. ";")
	end
	return true
end

I Have Rebirth On Mysql Named Rebirths
My Rebirth System Is Here http://otland.net/f82/best-rebirth-system-mysql-god-batonik-gensior-script-186274/
thanks
 
Try this.
Code:
local config = {
	price = 0, -- Price of first rebirth
	priceIncrease = 0, -- Works as 'price' + current rebirths * priceIncrease.
	rebirthLevel = 717171, -- Level for first rebirth.
	rebirthIncrease = 0, -- Works as 'rebirthLevel' + current rebirths * rebirthIncrease.
	maxRebirths = 1000, -- Number of times a player can rebirth.
	level = 1000, -- The level the player is set to apon rebirth.
	healthPercent = 1.00, -- 1.00 = 100%.
	health = 100, -- Only used if 'healthPercent' = 0.
	manaPercent = 1.00, -- 1.00 = 100%.
	mana = 100, -- Only used if 'manaPercent' = 0.
	keepSkills = true, -- Wether players keep skills and level apon rebirth.
	skillLevel = 10, -- Only used if 'keepSkills' = false.
	magicLevel = 0, -- Only used if 'keepSkills' = false.
	capacity = 10000, -- The capacity players are set to apon rebirth.
	templePos = {x = 0, y = 0, z = 0}, -- The place where players reset to should there town id return 0.
	Rebirth = 1 -- how many Rebirth player will get.
}
function onSay(cid, words, param, channel)
      money = config.price + (config.priceIncrease * storage)
		return true
	end
	
	if getPlayerLevel(cid) >= rebirthLevel and getPlayerMoney(cid) >= money then
	doPlayerRemoveMoney(cid, money) 
	addEvent(doRebirthPlayer, 2000, {cid=cid})
	else
	doPlayerSendCancel(cid, "You no have level or money for this action")
 end
 
function doRebirthPlayer(cid)
	cid = cid.cid
	if (cid == nil) then
		return true
	end
 
	local guid = getPlayerGUID(cid)
 
	if (config.healthPercent > 0) then
		health = getCreatureMaxHealth(cid) * config.healthPercent
	else
		health = config.health
	end
	if (config.manaPercent > 0) then
		mana = getCreatureMaxMana(cid) * config.manaPercent
	else
		mana = config.mana
	end
	if (getPlayerTown(cid) > 0) then
		pos = getTownTemplePosition(getPlayerTown(cid))
	else
		pos = config.templePos
end
doAddRebirth(cid, config.Rebirth, getPlayerRebirth(cid, config.Rebirth) + 1)

	doRemoveCreature(cid, true)
	db.executeQuery("UPDATE `players` SET level = " .. config.level .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET health = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET healthmax = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET mana = " .. mana .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET manamax = " .. mana .. " WHERE id = " .. guid .. ";") 
	db.executeQuery("UPDATE `players` SET posx = " .. pos.x .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posy = " .. pos.y .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posz = " .. pos.z .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET cap = " .. config.capacity .. " WHERE id = " .. guid .. ";")

	if (not config.keepSkills) then
		db.executeQuery("UPDATE `players` SET maglevel = " .. config.magicLevel .. " WHERE id = " .. guid .. ";")
		db.executeQuery("UPDATE `player_skills` SET value = " .. config.skillLevel .. " WHERE id = " .. guid .. ";")
	end
	return true
end
 
Try this again.
If give some error, tell me and i will pass other talkaction for you.

Code:
local config = {
	price = 0, -- Price of first rebirth
	priceIncrease = 0, -- Works as 'price' + current rebirths * priceIncrease.
	rebirthLevel = 717171, -- Level for first rebirth.
	rebirthIncrease = 0, -- Works as 'rebirthLevel' + current rebirths * rebirthIncrease.
	maxRebirths = 1000, -- Number of times a player can rebirth.
	level = 1000, -- The level the player is set to apon rebirth.
	healthPercent = 1.00, -- 1.00 = 100%.
	health = 100, -- Only used if 'healthPercent' = 0.
	manaPercent = 1.00, -- 1.00 = 100%.
	mana = 100, -- Only used if 'manaPercent' = 0.
	keepSkills = true, -- Wether players keep skills and level apon rebirth.
	skillLevel = 10, -- Only used if 'keepSkills' = false.
	magicLevel = 0, -- Only used if 'keepSkills' = false.
	capacity = 10000, -- The capacity players are set to apon rebirth.
	templePos = {x = 0, y = 0, z = 0}, -- The place where players reset to should there town id return 0.
	Rebirth = 1 -- how many Rebirth player will get.
}
function onSay(cid, words, param, channel)
      money = config.price + (config.priceIncrease * storage)
		return true
	end
	
	if getPlayerLevel(cid) >= rebirthLevel and getPlayerMoney(cid) >= money then
	doPlayerRemoveMoney(cid, money) 
	addEvent(doAddRebirth, 2000, cid)
	else
	doPlayerSendCancel(cid, "You no have level or money for this action")
 end
 
function doRebirthPlayer(cid)
	cid = cid.cid
	if (cid == nil) then
		return true
	end
 
	local guid = getPlayerGUID(cid)
 
	if (config.healthPercent > 0) then
		health = getCreatureMaxHealth(cid) * config.healthPercent
	else
		health = config.health
	end
	if (config.manaPercent > 0) then
		mana = getCreatureMaxMana(cid) * config.manaPercent
	else
		mana = config.mana
	end
	if (getPlayerTown(cid) > 0) then
		pos = getTownTemplePosition(getPlayerTown(cid))
	else
		pos = config.templePos
end

doAddRebirth(cid, config.Rebirth, getPlayerRebirth(cid, config.Rebirth) + 1)
	doRemoveCreature(cid, true)
	db.executeQuery("UPDATE `players` SET level = " .. config.level .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET health = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET healthmax = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET mana = " .. mana .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET manamax = " .. mana .. " WHERE id = " .. guid .. ";") 
	db.executeQuery("UPDATE `players` SET posx = " .. pos.x .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posy = " .. pos.y .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posz = " .. pos.z .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET cap = " .. config.capacity .. " WHERE id = " .. guid .. ";")

	if (not config.keepSkills) then
		db.executeQuery("UPDATE `players` SET maglevel = " .. config.magicLevel .. " WHERE id = " .. guid .. ";")
		db.executeQuery("UPDATE `player_skills` SET value = " .. config.skillLevel .. " WHERE id = " .. guid .. ";")
	end
	return true
end
 
Try this again.
If give some error, tell me and i will pass other talkaction for you.

Code:
local config = {
	price = 0, -- Price of first rebirth
	priceIncrease = 0, -- Works as 'price' + current rebirths * priceIncrease.
	rebirthLevel = 717171, -- Level for first rebirth.
	rebirthIncrease = 0, -- Works as 'rebirthLevel' + current rebirths * rebirthIncrease.
	maxRebirths = 1000, -- Number of times a player can rebirth.
	level = 1000, -- The level the player is set to apon rebirth.
	healthPercent = 1.00, -- 1.00 = 100%.
	health = 100, -- Only used if 'healthPercent' = 0.
	manaPercent = 1.00, -- 1.00 = 100%.
	mana = 100, -- Only used if 'manaPercent' = 0.
	keepSkills = true, -- Wether players keep skills and level apon rebirth.
	skillLevel = 10, -- Only used if 'keepSkills' = false.
	magicLevel = 0, -- Only used if 'keepSkills' = false.
	capacity = 10000, -- The capacity players are set to apon rebirth.
	templePos = {x = 0, y = 0, z = 0}, -- The place where players reset to should there town id return 0.
	Rebirth = 1 -- how many Rebirth player will get.
}
function onSay(cid, words, param, channel)
      money = config.price + (config.priceIncrease * storage)
		return true
	end
	
	if getPlayerLevel(cid) >= rebirthLevel and getPlayerMoney(cid) >= money then
	doPlayerRemoveMoney(cid, money) 
	addEvent(doAddRebirth, 2000, cid)
	else
	doPlayerSendCancel(cid, "You no have level or money for this action")
 end
 
function doRebirthPlayer(cid)
	cid = cid.cid
	if (cid == nil) then
		return true
	end
 
	local guid = getPlayerGUID(cid)
 
	if (config.healthPercent > 0) then
		health = getCreatureMaxHealth(cid) * config.healthPercent
	else
		health = config.health
	end
	if (config.manaPercent > 0) then
		mana = getCreatureMaxMana(cid) * config.manaPercent
	else
		mana = config.mana
	end
	if (getPlayerTown(cid) > 0) then
		pos = getTownTemplePosition(getPlayerTown(cid))
	else
		pos = config.templePos
end

doAddRebirth(cid, config.Rebirth, getPlayerRebirth(cid, config.Rebirth) + 1)
	doRemoveCreature(cid, true)
	db.executeQuery("UPDATE `players` SET level = " .. config.level .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET health = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET healthmax = " .. health .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET mana = " .. mana .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET manamax = " .. mana .. " WHERE id = " .. guid .. ";") 
	db.executeQuery("UPDATE `players` SET posx = " .. pos.x .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posy = " .. pos.y .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET posz = " .. pos.z .. " WHERE id = " .. guid .. ";")
	db.executeQuery("UPDATE `players` SET cap = " .. config.capacity .. " WHERE id = " .. guid .. ";")

	if (not config.keepSkills) then
		db.executeQuery("UPDATE `players` SET maglevel = " .. config.magicLevel .. " WHERE id = " .. guid .. ";")
		db.executeQuery("UPDATE `player_skills` SET value = " .. config.skillLevel .. " WHERE id = " .. guid .. ";")
	end
	return true
end

What the hell is this? There's a lot of things wrong here.

not working and no error thanks

How are you not getting any errors? Have you set-up the talkaction in talkactions.xml?
 
Back
Top