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

Lua Exura Sio - Heal monsters too

WiLDTuRTLE

Member
Joined
Feb 26, 2011
Messages
478
Reaction score
5
Can it be possible to make exura sio heal monsters, or my summons? (utevo res "fire devil) heal those <===
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2.08, 0, 2.7, 0)

function onSay(cid, words, param)
    local creature = false

    local summons = getCreatureSummons(cid)
    for _, summon in pairs(summons) do
        if getCreatureName(summon) == param then
            creature = summon
        end
    end

    if not creature then
        creature = getPlayerByName(param)
    end

    if(not creature) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature with this name doesn't exists.")
        return true
    end

    return doCombat(cid, combat, numberToVariant(creature))
end
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2.08, 0, 2.7, 0)

function onSay(cid, words, param)
    local creature = false

    local summons = getCreatureSummons(cid)
    for _, summon in pairs(summons) do
        if getCreatureName(summon) == param then
            creature = summon
        end
    end

    if not creature then
        creature = getPlayerByName(param)
    end

    if(not creature) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature with this name doesn't exists.")
        return true
    end

    return doCombat(cid, combat, numberToVariant(creature))
end

What if there are 2 summons with the same name? Script should choose the one which has lower HP i think.
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2.08, 0, 2.7, 0)

function onSay(cid, words, param)
    local creature = false

    local summons = getCreatureSummons(cid)
    for _, summon in pairs(summons) do
        if getCreatureName(summon) == param then
            creature = summon
        end
    end

    if not creature then
        creature = getPlayerByName(param)
    end

    if(not creature) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature with this name doesn't exists.")
        return true
    end

    return doCombat(cid, combat, numberToVariant(creature))
end

Nao work :o
f1jsw8.png


05:12 Druid One [3856]: exura sio "druid one
05:12 Druid One [3856]: exura sio "hydra
 
Back
Top