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

molinero's death curse spells help

zerghel

Tsuni
Joined
Jul 1, 2008
Messages
299
Reaction score
9
Hello guy's
FIRST OF ALL, SORRY FOR MY POOR ENGLISH
this is molinero's death curse spell
i was wondering if someone can make to cast JUST ON PLAYERS
i don't want ppl to kill my monsters that easy
but is good foor puszies that are just making stair jumps to keep themselves alive
Code:
-- >> Small Config --
local statictimer = FALSE -- Options: TRUE or FALSE, if TRUE death timer will be the same for all creatures, if FALSE timer will be target's current hp divided by variabletimerbase --
local timersec = 30 -- Time in seconds before killing target, Only works if statictimer = TRUE --
local variabletimerbase = 600 -- if statictimer = FALSE death timer will be equal to target's current hp divided by this variable value --
local workonplayers = FALSE -- Options: TRUE or FALSE, if FALSE this spell won't work on players, else it will --
local dispelable = TRUE -- Options: TRUE or FALSE, if true the curse can be stopped ---
-- Small Config << --
 
function deathtimer(param)
if isCreature(variantToNumber(param.var)) then
local cpos = getCreaturePosition(variantToNumber(param.var))
param.maxtimer = param.maxtimer - 1
doSendAnimatedText(cpos, param.maxtimer, 255)
doSendMagicEffect(cpos, CONST_ME_GROUNDSHAKER)
doSendMagicEffect(cpos, CONST_ME_POFF)
if isPlayer(variantToNumber(param.var)) == TRUE and dispelable == TRUE then
local dispelcurse = getPlayerStorageValue(variantToNumber(param.var), 28901)
if dispelcurse == 1 then
stopEvent(deathtimer)
setPlayerStorageValue(variantToNumber(param.var), 28901, 0)
doSendMagicEffect(getCreaturePosition(variantToNumber(param.var)), CONST_ME_POFF)
return LUA_NO_ERROR
end
end
if param.maxtimer > 0 then
addEvent(deathtimer, 1000, param)
else
local hp = getCreatureMaxHealth(variantToNumber(param.var))
doCreatureAddHealth(variantToNumber(param.var), -hp)
doSendMagicEffect(cpos, CONST_ME_MORTAREA)
return LUA_NO_ERROR
end
end
end
 
function onCastSpell(cid, var)
if isPlayer(variantToNumber(var)) == TRUE and workonplayers == FALSE then
doPlayerSendCancel(cid, "You can't cast this on players!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return LUA_ERROR
end
local maxtimer = 0
if statictimer == FALSE then
local chp = getCreatureHealth(variantToNumber(var))
maxtimer = math.floor(chp/variabletimerbase)
else
maxtimer = timersec
end 
local cpos = getCreaturePosition(variantToNumber(var))
doSendMagicEffect(cpos, CONST_ME_GROUNDSHAKER)
doSendMagicEffect(cpos, CONST_ME_MORTAREA)
doSendAnimatedText(cpos, maxtimer, 255)
local param = {cid = cid, var = var, maxtimer = maxtimer}
addEvent(deathtimer, 1000, param)
return LUA_NO_ERROR
end
is for Mystic Spirit ^^
Thx In adv
if can i rep i will
 
Back
Top