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

Spells like exori con/hur 7.6

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
Hello everyone,

Im hosting a 7.6 server and want to create a spell like exori con (paladins) and exori hur (knight), with the spell following target, Anybody can help me?
 
Im not sure, but my console show this:

The OTX Server Version: (2.100 - 6000) - Codename: (FINAL)
Compilied with Microsoft Visual C++ version 12.0 for arch 32 Bits at Jul 15 2014 23:16:04
 
Here's a simple script of how to do that on old 7.6 distros

Just change the annimations to your needs :)
Lua:
attackType = ATTACK_NONE
    animationEffect = NM_ANI_NONE
    
    hitEffect = NM_ME_NONE
    damageEffect = NM_ME_MAGIC_ENERGIE
    animationColor = GREEN
    offensive = true
    drawblood = true
    
    HealFriendObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)
    
    function onCast(cid, creaturePos, level, maglv, var)
    centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z} targetpos = getPosition(var)
    HealFriendObject.minDmg = (level * -3 + maglv * -1) * -5
    HealFriendObject.maxDmg = (level * -3 + maglv * -1) * -5 + -20
    
    if targetpos.x ~= nil and targetpos.z ~= nil and targetpos.y ~= nil then
        if math.abs(targetpos.x - centerpos.x) < 18 and math.abs(targetpos.y - centerpos.y) < 14 and targetpos.z == centerpos.z then
            return doTargetMagic(cid, targetpos, HealFriendObject:ordered())
        end
    end
    
    return false
    end

Notice how I'm using exura sio but instead of healing the player I use minus on the formula -3 , hope that's clear
 
Last edited:
Here's a simple script of how to do that on old 7.6 distros

Just change the annimations to your needs :)
Lua:
attackType = ATTACK_NONE
    animationEffect = NM_ANI_NONE
 
    hitEffect = NM_ME_NONE
    damageEffect = NM_ME_MAGIC_ENERGIE
    animationColor = GREEN
    offensive = true
    drawblood = true
 
    HealFriendObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)
 
    function onCast(cid, creaturePos, level, maglv, var)
    centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z} targetpos = getPosition(var)
    HealFriendObject.minDmg = (level * -3 + maglv * -1) * -5
    HealFriendObject.maxDmg = (level * -3 + maglv * -1) * -5 + -20
 
    if targetpos.x ~= nil and targetpos.z ~= nil and targetpos.y ~= nil then
        if math.abs(targetpos.x - centerpos.x) < 18 and math.abs(targetpos.y - centerpos.y) < 14 and targetpos.z == centerpos.z then
            return doTargetMagic(cid, targetpos, HealFriendObject:ordered())
        end
    end
 
    return false
    end

Notice how I'm using exura sio but instead of healing the player I use minus on the formula -3 , hope that's clear

Got error
[Error - Event::checkScript] Event onCastSpell not found (data/spells/scripts/attack/energy strike.lua)
Post automatically merged:

Got it, i change in spells.xml to:

XML:
<instant name="Energy Strike" words="exori vis" mana="20" maglv="3" prem="1" needtarget="1" blockwalls="0" exhaustion="1000" needlearn="0" event="script" value="attack/energy strike.lua">
        <vocation id="1;5"/>
        <vocation id="2;6"/>
    </instant>
 
Last edited:
Back
Top