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

Need some script execution

norrow

Member
Joined
Dec 16, 2012
Messages
129
Reaction score
7
Location
Poland
Hello, as he did not want to do bigger spam topics which will write the scripts need and maybe someone will help me
1.rewrite this code to 0.3.6
http://otland.net/threads/vocations...t-amount-of-summons-for-each-vocation.197418/
2.spell beats at a distance of 5 squares and attacks only when he sees the target
3.how to download variable formulas setHealingFormula
Code:
(combat, COMBAT_FORMULA_LEVELMAGIC, 77, 30, 2, 1)
with
Code:
doSendAnimatedText
I tried so
Code:
doSendAnimatedText (getCreaturePosition (cid), COMBAT_HEALING, 66)
but the way it displays only a constant number of treatment
4.in the source code if we do not have x storage is monster no attack me
5. code creatureevent x summon does not respond to the selected target
That's all very please help with this :)
 
Last edited:
Code:
(combat, COMBAT_FORMULA_LEVELMAGIC, 77, 30, 2, 1)
Code:
COMBAT_FORMULA_LEVELMAGIC, a, b, c, d
"a" can't be higher then "c" becouse in mathematic is a STEEL rule:
Lower value can't be higher then higher value.

Code:
doSendAnimatedText (getCreaturePosition (cid), COMBAT_HEALING, 66)

If you would like to use doSendAnimatedText you have to rewrite your spell. It can't longer use formula inside combat, you have to add it into onCastSpell.

Eg. (these spells are the same)
Heal1:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1.08, 0, 1.7, 0)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

Heal2
Code:
function onCastSpell(cid, var)
    local lv = getPlayerLevel(cid)
    local mlv = getPlayerMagLevel(cid)

    local heal = math.random((lv + mlv) * 1.08 + 0, (lv + mlv) * 1.7 + 0)
    if isCreature(variantToNumber(var)) == true then
        doCreatureAddHealth(variantToNumber(var), heal)
        doSendMagicEffect(getCreaturePosition(variantToNumber(var)), CONST_ME_MAGIC_BLUE)
        -- doSendAnimatedText(getCreaturePosition(variantToNumber(var)), heal, 66)   -- added for you
    else
        return false
    end
    return true
end
 
Last edited:
Back
Top