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

Spell Sky Fury

zfrank17

New Member
Joined
Jul 6, 2010
Messages
27
Reaction score
1
data/spells/scripts/create a new lua called: sky fury
PHP:
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_FLAMMINGARROW)

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_FIRE)

  doAreaCombatHealth(cid,COMBAT_FIREDAMAGE,pos,area,(-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5)+50,(-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5)-50,CONST_ME_HITBYFIRE)

end

data/spells/spells xml
PHP:
<instant name="Sky Fury" words="exevo flam tempest" lvl="50" manapercent="70" prem="0" range="5" nedtarget="1" blockwalls="1" exhaustion="2000" needlearn="0" script="Sky Fury.lua"><vocation name="Paladin"/><vocation name="Royal Paladin"/></instant>
 
i never give rep for another persons..... he or she dont post the script... i post the script (I DONT WANT REP)
 
lol who talked about rep
 
[5:54:53.921] [Error - LuaInterface::loadFile] data/spells/scripts/sky.lua:25: '
end' expected (to close 'function' at line 17) near '<eof>'
[5:54:53.921] [Warning - Event::loadScript] Cannot load script (data/spells/scri
pts/sky.lua)

<shooort>
 
well, he didn't make it
maybe he has skills to fix it
 
Try this one:
Code:
local area = createCombatArea(AREA_SQUARE1X1)

local function furyAttackTarget(cid, target, pos)
	if(isCreature(cid) and isCreature(target)) then
		doSendDistanceShoot({x = getCreaturePosition(target).x - math.random(4,6), y = getCreaturePosition(target).y - 5, z = getCreaturePosition(target).z}, pos, CONST_ANI_FIRE) 
		doAreaCombatHealth(cid, COMBAT_FIREDAMAGE, pos, area, (-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5) + 50, (-(getPlayerLevel(cid)*getPlayerMagLevel(cid))/5) - 50, CONST_ME_HITBYFIRE) 
	end
	return true
end

function onCastSpell(cid, var)  
	local target = variantTuNumber(var)
	doSendDistanceShoot(getCreaturePosition(cid), {x = getCreaturePosition(cid).x - math.random(4,6), y = getCreaturePosition(cid).y - 5, z = getCreaturePosition(cid).z}, CONST_ANI_FLAMMINGARROW) 
	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 
	return true
end
 
Im remake its for paladins. but have 2 errors + 1 question

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

qOHAdlazORM.jpg


1. how to fix this Error - TFS 1.2
2. it possable for change dmg by ammunition? like Arrows.
3. it posable use amunition for this spell?
 
Back
Top