eternalthug
New Member
- Joined
- Jul 25, 2009
- Messages
- 51
- Reaction score
- 0
Hello, this is my current rebirth system, it is npc based.
And i have no idea how how to get my damage boost to work. iv tried scripting it myself (fail) can anyone help me out ill rep.
Code:
if(msgcontains(msg, 'rebirth')) then
selfSay('Would you like to be reborn?', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
------------------------------------------------CONFIGURATION-------------------------------------------------------------------------
local level = 100000 -- Put here the level to rebirth
------------------------------------------------Dont Touch These----------------------------------------------------------------------
local id = getPlayerGUID(cid)
local name = getCreatureName(cid)
local vocation = getPlayerVocation(cid)
------------------------------------------------------------------------------------------------------------------------------
if getPlayerLevel(cid) >= level then
if(isInArray({5,6,7,8}, getPlayerVocation(cid)) == TRUE) then
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `health` = 500, `healthmax` = 500, `mana` = 500, `manamax` = 500, `promotion` = 2 WHERE `id` ='"..id.."';")
elseif(isInArray({9,10,11,12}, getPlayerVocation(cid)) == TRUE) then
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `health` = 500, `healthmax` = 500, `mana` = 500, `manamax` = 500, `promotion` = 3 WHERE `id` ='"..id.."';")
else
selfSay('Youre not the right level, vocation, or havent enough cash to rebirth yourself.', cid)
talkState[talkUser] = 0
end
end
end
return TRUE
end
And i have no idea how how to get my damage boost to work. iv tried scripting it myself (fail) can anyone help me out ill rep.