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

Windows Help With Spell

juansanchez

Advanced OT User
Joined
Apr 2, 2015
Messages
223
Reaction score
151
Hey people, i'm trying to create a new spell in my server, but i just can't seem to make it work.
I want to create a Exori Hur like spell, but instead of only 1 exori hur at a time, when you use, it's like 3 exoris hur come out, one followed by the other, and also, i would like it to everytime the exori hur goes out as a Axe, but it only works like the normal one, whatever weapon you use is the one that is coming out.

I'm using this script for it:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, TRUE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -60, 1.1, 0)

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

I've tried everything, but i just can't make it work, can someone help me?

I'm using Tfs 0.3.7
 
Last edited:
I already done spells like that one you need to do with spell maker and i'm using 0.3.6.

I Downloaded spell creator, but for some reason i just couldn't create the spell because there was no effects in the Spell creator, is it something i'm doing wrong?
 
Yea i used it 2 years ago.

This is happening...

EXhTxKM.jpg

QL2a2aP.jpg
 
TFS 3.7 SVN
Code:
    local times = 3
    local combat = {}

    for i = 1, times do
        combat[i] = createCombatObject()
        setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat[i], COMBAT_PARAM_BLOCKARMOR, TRUE)
        setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
        setCombatParam(combat[i], COMBAT_PARAM_USECHARGES, TRUE)
        setCombatFormula(combat[i], COMBAT_FORMULA_SKILL, 0, -60, 1.1, 0)
    end
  
    local function castSpell(p, i)
        if isPlayer(p.cid) then
            doCombat(p.cid, p.combat[i], p.var)
        end
    end

    function onCastSpell(cid, var)
        local p = {cid = cid, combat = combat, var = var}
        for x = 1, times do
            addEvent(castSpell, x * 1000, p, x)
        end
        return true
    end
 
TFS 3.7 SVN
Code:
    local times = 3
    local combat = {}

    for i = 1, times do
        combat[i] = createCombatObject()
        setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat[i], COMBAT_PARAM_BLOCKARMOR, TRUE)
        setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
        setCombatParam(combat[i], COMBAT_PARAM_USECHARGES, TRUE)
        setCombatFormula(combat[i], COMBAT_FORMULA_SKILL, 0, -60, 1.1, 0)
    end
 
    local function castSpell(p, i)
        if isPlayer(p.cid) then
            doCombat(p.cid, p.combat[i], p.var)
        end
    end

    function onCastSpell(cid, var)
        local p = {cid = cid, combat = combat, var = var}
        for x = 1, times do
            addEvent(castSpell, x * 1000, p, x)
        end
        return true
    end

It worked!! Thanks! Let me just ask you something, when i lower the number (1000) it goes faster, when i don't touch it, it goes too slow, and it takes a while to do something. You say for example: Exori Hur, after... 2 seconds it does something. Is there a way to make it, when you say it, the spell goes off, but not go too fast? But it worked anyways thanks :D
 
It worked!! Thanks! Let me just ask you something, when i lower the number (1000) it goes faster, when i don't touch it, it goes too slow, and it takes a while to do something. You say for example: Exori Hur, after... 2 seconds it does something. Is there a way to make it, when you say it, the spell goes off, but not go too fast? But it worked anyways thanks :D
Yes, learn lua and you will be able to write these scripts too.... not the easy you are looking for but it is an answer.
 
Back
Top