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

adding damage boost to rebirth system.

eternalthug

New Member
Joined
Jul 25, 2009
Messages
51
Reaction score
0
Hello, this is my current rebirth system, it is npc based.

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.
 
Maybe onStatsChange script that will be executed for players, and for all monsters? If attacker is player then it should check his storage (how many rebirths he had?) to determine how much damage to "add". :p!

Or if you're only going to allow 1 rebirth, you can keep using your current script.
Does it change player's promotion level properly?? If it does then just edit the damage formula multipliers for the promoted vocations in vocations.xml
 
atm i don't even know if it works as what i want i can't find what i want -.- i need a reborn system that allows you to get 2nd promo (reborn knight, reborn sorc) but also so i can get a 3rd promotion (2nd reborn knight, 2nd reborn sorc) so i can just add mana/hp by editing in vocations.xml, but i also need to make it so everytime they rebirth they get more damage could you hook me up? i know theres one around, hellot has one, and a few others
 
Back
Top