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

TFS 0.X Attack rune, but exausted on heal

sabodden

Member
Joined
Sep 27, 2019
Messages
138
Reaction score
18
There are two exausteds, to attack and to heal
You can use a SD and a exura together

But for this rune, only, i want to make different
I would like to this rune use heal exausted

So u could use sd together to this attack rune
But couldn't use this rune and exura or exura gran...

Is it possible?

Code:
<rune name="Holy Missile" id="2295" allowfaruse="1" charges="5" maglv="4" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/holy missile.lua">
        <vocation id="3"/>
        <vocation id="7" showInDescription="0"/>
    </rune>

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
function onGetFormulaValues(cid, level, maglevel)
    if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then
        min = ( (((maglevel) * 4) * 0.5 ) + (20)) * -1
        max = ( (((maglevel) * 4) * 1.0 ) + (20)) * -1
        return min, max
    elseif getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
        min = ( (((maglevel) * 3) * 0.5 ) + (20)) * -1
        max = ( (((maglevel) * 3) * 1.0 ) + (20)) * -1
        return min, max
    elseif getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
        min = ( (((maglevel) * 3) * 0.5 ) + (20)) * -1
        max = ( (((maglevel) * 3) * 1.0 ) + (20)) * -1
        return min, max
    end
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Runes are using "on use exhaust". SD is a offensive rune and it's using both "attack exhaust" and "on use exhaust".
You can use only one rune at the same time. It's not possible to use UH and SD at the same time.

You can change on use exhaust in your cfg for something below 1000 ms. But it will affect all things what are using on use exhaust
 
Runes are using "on use exhaust". SD is a offensive rune and it's using both "attack exhaust" and "on use exhaust".

You can use only one rune at the same time. It's not possible to use UH and SD at the same time.

You can change on use exhaust in your cfg for something below 1000 ms. But it will affect all things what are using on use exhaust

Oh fk, i dindn't know, i had so many ideas to do with this, this rune was only a base :(
There is a way to use a rune just like a spell, i mean is it possible to use this rune, divine missile in spell exausted?
So players could use divine missile + sd, but couldn't use divine missile + exura vita or any other spell?
It would be even better, if was possible ofc
 
every item, everytime you use it, it triggers 'on use' or 'use' cd

you can convert runes to normal spells, so they will work like a exori vis
 
Thats is what are u mean?
Code:
    <!-- runes on spell exausted -->
    <action itemid="2295" event="script" value="runes_spellexausted/holy_hmm.lua"/>
    <action itemid="2296" event="script" value="runes_spellexausted/holy_gfb.lua"/>

runes_spellexausted/holy_hmm.lua
Code:
--local exhaust = createConditionObject(CONDITION_EXHAUST)
--setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
--local combat = createCombatObject()
--setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
--setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
--setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
--setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local target = getCreatureTarget(cid)
    if target == 0 then
        doPlayerSendCancel(cid, "You need to have a target to use this rune.")
        return true
    end

    local maglevel = getPlayerMagLevel(cid)
    if maglevel < 3 then
        doPlayerSendCancel(cid, "You do not have enought magic level.")
        return true
    end

    -- blockwall?
    -- hit on distance?

    local min = ( (((maglevel) * 10) * 0.5 ) + (40)) * -1
    local max = ( (((maglevel) * 10) * 1.0 ) + (40)) * -1
    local dmg = math.random(min, max)

    -- distance effect?
    -- const energy hit effect?
    doSendMagicEffect(getThingPos(target), 7)

    -- remove health?
    -- combat something?
    -- how to do an elemental hit?

    doRemoveitem(item.uid)
    return TRUE
end

Code:
[12:9:19.572] [Error - Action Interface] 
[12:9:19.572] data/actions/scripts/runes_spellexausted/holy_hmm.lua:onUse
[12:9:19.572] Description: 
[12:9:19.572] ...ata/actions/scripts/runes_spellexausted/holy_hmm.lua:28: bad argument #2 to 'random' (interval is empty)
[12:9:19.572] stack traceback:
[12:9:19.572]     [C]: in function 'random'
[12:9:19.572]     ...ata/actions/scripts/runes_spellexausted/holy_hmm.lua:28: in function <...ata/actions/scripts/runes_spellexausted/holy_hmm.lua:10>

Could u help me to fix the parts i put a '?'
 
u ot have the spell exhausted group?

if it has then try with
groups="1,2000" --attack group
groups="3,2000" --support group
groups="2,1000" --healing group
groups="4,2000" --attack (mas vis,frigo,flam,tera) group
 
u ot have the spell exhausted group?

if it has then try with
groups="1,2000" --attack group
groups="3,2000" --support group
groups="2,1000" --healing group
groups="4,2000" --attack (mas vis,frigo,flam,tera) group

No it haven't


It isn't possible to do as @andu suggest?
On actions to runes uses spell exausted?
It would be perfect to me
 
Back
Top