• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell How to change this so it adds health not mana

Strata

Hoster
Joined
Apr 12, 2010
Messages
124
Reaction score
6
Location
USA
iv tryed changing it to addhealth and then it does not work anyone have a idea


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000)
return doCombat(cid, combat, var)
end
 
doPlayerAddHealth... you must have the upper case letters or else it wont work.
 
Code:
	//do*
	doCreatureAddHealth(cid, health[, force])
	doCreatureAddMana(cid, mana)

Try this:

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

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