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

Solved Rune condition problem

Apoccalypse

New Member
Joined
Apr 15, 2017
Messages
114
Solutions
2
Reaction score
4
Hello guys,
I created rune which weakens health potions on my server but I have some problems about it.

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 59)

local curse = createConditionObject(CONDITION_CURSED) -- CONST_ME_DRAWBLOOD
setConditionParam(curse, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(curse, 1, 1000, -124)
addDamageCondition(curse, 1, 1000, -192)
addDamageCondition(curse, 1, 1000, -298)
addDamageCondition(curse, 1, 1000, -462)
setCombatCondition(combat, curse)

arr = {

{ 1 }

}

local area = createCombatArea(arr)
setCombatArea(combat, area)


function onCastSpell(cid, var)

local paradelay = 5000 --delay in ms-->

return doCombat(cid, combat, var), exhaustion.set(getCreatureTarget(cid), 30035, paradelay/1000)

end

I have the following problems:
1.The Rune only works when I have marked a player, otherwise the console returns creature not found and the storage 20035 is not set for the target.
2.The script should add four consecutive damages but it adds only two or three.
3.I would like to param object (it is a skull)) was in line with the direction of the target.So if the target is diracted to the north ,then the skull should be diracted also to the north and so on.

If anyone would take a look on it ,that would be great.
 
Last edited:
Back
Top