• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

regain health/mana spell

Fazer

New Member
Joined
Feb 17, 2014
Messages
10
Reaction score
0
I want to script in 8.60 ot server data base a spell that regains ((mana/health)) and cost money so people dont half to buy potions from the store can anyone help me out with the scripting?
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_TICKS, 5000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 50)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setConditionParam(condition, CONDITION_PARAM_MANAGAIN, 40)
setConditionParam(condition, CONDITION_PARAM_MANATICKS, 1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
     if not doPlayerRemoveMoney(cid, 100) then
         doPlayerSendCancel(cid, "You don't have enough money, you need 100 gold.")
         return false
     end
     return doCombat(cid, combat, var)
end
 
Back
Top