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

request script sudden death hit by Rebirth system

Sir Islam

Never Give Up
Joined
Jun 6, 2008
Messages
504
Solutions
1
Reaction score
116
Location
Suez , Egypt
if Rebirth 1 hit 500

Rebirth 2 hit 600

Rebirth 3 hit 700

and anther


:)

and

weapons atk by rebirth
 
like this

Lua:
 local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -1, -100, -1, -100, 4, 7)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat2, COMBAT_FORMULA_DAMAGE, 0, -200, 0, -200, 0, 0)

function onCastSpell(cid, var)
if getPlayerRebirth(cid) >= 1 then
doCombat(cid, combat1, var)
end
if getPlayerRebirth(cid) >= 2 then
doCombat(cid, combat2, var)
end

	return 
end


but this script atk 100 + 200 = 300
 
in rebirth 2 this atk 300 but in script i put in rebirth 2 atk 200

so this script make atk rebirth 1 + rebirth 2 + + +

i know i can Change

if getPlayerRebirth(cid) >= 1 then to if getPlayerRebirth(cid) == 1 then

but i will make like 1000 rebirth so this too much in file script

i wanna make like this

rebirth 15 atk 5000 /. rebirth 30 atk 6000 / rebirth 50 atk 9000

and i wanna this script have loops

Lua:
local c =
{

  [here Number of Rebirth ] = { min_atk = 1000 ,max_atk = 5000},
  [15] = {min_atk= 5000,max_atk = 6000},
  [50] = {min_atk= 2000,max_atk = 9000},
 
Why don't you use it like this?
Lua:
min = -(maglevel*2) -level/5 -(getPlayerRebirth(cid)*10) 
max = -(maglevel*3) -level/5 -(getPlayerRebirth(cid)*11)
 
Like this:
Lua:
    function onGetFormulaValues(cid, level, maglevel)
 
    min = -(maglevel*2) -level/5 -(getPlayerRebirth(cid)*10) 
    max = -(maglevel*3) -level/5 -(getPlayerRebirth(cid)*11)
 
    return min, max
    end
 
    setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

Or don't you understand how to calculate the damage like this?
 
It's an alternative way to calculate the damage, so use it instead of
Lua:
setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -1, -100, -1, -100, 4, 7)
And set the combat in setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") to the right name, so for example combat1 if it's for combat1.

About the damage, its like math.

magiclevel x 2 + level : 5 + rebirthnumber x 10 = the damage

The reason that it's here with - is because it's separated and - stands for damage and + for healing.
So the damage is like this: - magiclevel x 2 and - level : 5 and - rebirth number x 10
If it was for example like this - (maglevel*2 + 200) then it would take the value between ( ) as total number and with a - it becomes damage.

If you say the amount of damage you want with a certain level, magiclevel and rebirth number I can give you an example.
 
Tell with which level and magic level and rebirth you want to have x damage.

So for example with level 200 and magic level 100 and rebirth 10 = 500 damage
Also how much should the damage increase with every rebirth?
 
Well then this:
Lua:
min = -100000 -(getPlayerRebirth(cid)*200000) 
max = -100000 -(getPlayerRebirth(cid)*200000)

But like this a lvl 50 would have the same damage as a lvl 200000.
 
the script will be ?


Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
 function onGetFormulaValues(cid, level, maglevel)
 
   min = -100000 (getPlayerRebirth(cid)*200000) 
  max = -100000 -(getPlayerRebirth(cid)*200000)
 
return min, max
end
 
  setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

- - - Updated - - -

ty alot Limos this work good :)


if i wanna weapons atk by rebirth how ? like sword how i make it atk by rebirth not by level
 
Weapons can work the same way as spells, so just add a script to the weapon in weapons.xml and use
Lua:
function onUseWeapon(cid, var)
instead of
Lua:
function onCastSpell(cid, var)
 
Back
Top