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

Solved edite spell and need stun spell

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
Hello otland i need spell that stun target .. can't heal ...can't move ... can't use spells for 2 sec

and spells that make char block all damge for 2 sec

and need edite thi spell for char tp to other char +1 not on othere char \/
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

function onCastSpell(cid, var)
    local target = variantToNumber(var)
    if(isPlayer(target) and doCombat(cid, combat, var)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
        doTeleportThing(cid, getCreaturePosition(target), false)
                return true
    end
    return false
end
 
Call your pos like this
Local pos = getCreaturePosition(target)
Then
Pos.x or pos.y = pos.x +1 or pos.y + 1
DoTeleportThing(cid, pos)

And you can also verify the look dir of the player and add some more function ;) i would do it like that
 
Back
Top