• 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 Spell, need help TFS 1.2

Vladimir Glebov

http://www.zorgania.com
Joined
Mar 25, 2016
Messages
79
Reaction score
15
Location
Russia
yo. TFS 1.2 make a error anyone can help?

Code:
local area = createCombatArea(AREA_SQUARE1X1)

function onCastSpell(cid, var) 

local target = getCreatureTarget(cid)

doSendDistanceShoot(getCreaturePosition(cid),{x = getCreaturePosition(cid).x - math.random(4,6), y = getCreaturePosition(cid).y - 5, z = getCreaturePosition(cid).z},CONST_ANI_ARROW)

for x = 1, 10 do

   addEvent(furyAttackTarget,200*x+500,cid,target,{x = getCreaturePosition(target).x + math.random(-1,1), y = getCreaturePosition(target).y + math.random(-1,1), z = getCreaturePosition(target).z})

end

end

function furyAttackTarget(cid,target,pos)

if isCreature(cid) == TRUE and isCreature(target) == TRUE then

  doSendDistanceShoot({x = getCreaturePosition(target).x - math.random(4,6), y = getCreaturePosition(target).y - 5, z = getCreaturePosition(target).z},pos,CONST_ANI_ARROW)

  doAreaCombatHealth(cid,COMBAT_PHYSICALDAMAGE,pos,area,(-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5)+50,(-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5)-50,CONST_ME_DRAWBLOOD)

end
end

rg_hcdBXtS0.jpg
 
Back
Top