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

Runes damaged and healing.

Nashalito

New Member
Joined
May 21, 2009
Messages
273
Reaction score
0
Hello , i want to configure sds that they damage 1000 and uh they healing 1000.

any1 have any idea how i can do that?
 
SD:

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)



local condition = createConditionObject(CONDITION_CURSED)
setCombatCondition(combat, condition)
local damage = math.random(900,1000)

function onCastSpell(cid, var)
doPlayerAddHealth(cid,-damage)
return doCombat(cid, combat, var)
end

UH:

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
local health = math.random(900,1000)

function onCastSpell(cid, var)
	doPlayerAddHealth(cid,health)
return doCombat(cid, combat, var)
end
 
Why does i get this error?
[07/07/2010 19:48:30] [Error - Spell Interface]
[07/07/2010 19:48:30] data/spells/scripts/attack/Super sd.lua:eek:nCastSpell
[07/07/2010 19:48:30] Description:
[07/07/2010 19:48:30] data/spells/scripts/attack/Super sd.lua:14: attempt to call global 'doPlayerAddHealth' (a nil value)
[07/07/2010 19:48:31] stack traceback:
[07/07/2010 19:48:31] data/spells/scripts/attack/Super sd.lua:14: in function <data/spells/scripts/attack/Super sd.lua:13>

[07/07/2010 19:48:39] [Error - Spell Interface]
[07/07/2010 19:48:39] data/spells/scripts/healing/donationhealing.lua:eek:nCastSpell
[07/07/2010 19:48:39] Description:
[07/07/2010 19:48:39] data/spells/scripts/healing/donationhealing.lua:9: attempt to call global 'doPlayerAddHealth' (a nil value)
[07/07/2010 19:48:39] stack traceback:
[07/07/2010 19:48:39] data/spells/scripts/healing/donationhealing.lua:9: in function <data/spells/scripts/healing/donationhealing.lua:8>
 
The uh is solved with this script .
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0, 1000, 1000)
doCreatureSay(cid,"Donation UH",19)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 
Back
Top