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

Lua Help with for(spell)

Fairbanks

Fairbanks Family
Joined
Oct 1, 2010
Messages
90
Reaction score
1
Location
Brazil SAMBA!
My first time trying to create spells with the FOR,of course,made it wrong,and don't know to fix it :$
What i wanted to happen:
A random wave of burning arrows going from the player ( Its going into the player )
40 numbers of effect ( Only happens 1 )
HIT ( It doesn't hit )

If anyone could help,thanks

Code:
local effect = {[1] = 33, [2] = 3}
function onCastSpell(cid, var)
    for a = 1, 40 do
            doAreaCombatHealth (300, cid, getPlayerLookPos(cid), doSendDistanceShoot({x = getCreaturePosition(cid).x + math.random(-7, 7), y = getCreaturePosition(cid).y + math.random(-6, 6), z = getCreaturePosition(cid).z}, getCreaturePosition(cid), effect[math.random(1,2)]), -800, -1500)
            return true
    end
end

fast please,need my beauty sleep
 
Last edited by a moderator:
Back
Top