president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Spell~
by nord
OTLand.Neet ~
This time I decided to bring something different, there is no system to do this or that, those are 1 spells that everyone would want.
a spell that I created is one that pushes the air (wind wave)
Photos:
Time to install ...
Go in the folder data / spells / scripts and create a file named wave.lua wind like this:
Did you see how easy it is? It only remains to add these two tags below into your spells.xml in the data / spells:
REP ++eace:
by nord
OTLand.Neet ~
This time I decided to bring something different, there is no system to do this or that, those are 1 spells that everyone would want.
a spell that I created is one that pushes the air (wind wave)
Photos:
Time to install ...
Go in the folder data / spells / scripts and create a file named wave.lua wind like this:
Code:
local mayNotMove = doCreatureSetNoMove
function doPushCreature(pos, target)
creature = getThingfromPos({x=target.x, y=target.y, z=target.z, stackpos=253}).uid
if target.y < pos.y and target.x == pos.x then
newpos = {x=target.x, y=target.y-1, z=target.z}
elseif target.y > pos.y and target.x == pos.x then
newpos = {x=target.x, y=target.y+1, z=target.z}
elseif target.y == pos.y and target.x > pos.x then
newpos = {x=target.x+1, y=target.y, z=target.z}
elseif target.y == pos.y and target.x < pos.x then
newpos = {x=target.x-1, y=target.y, z=target.z}
elseif target.y < pos.y and target.x > pos.x then
newpos = {x=target.x+1, y=target.y-1, z=target.z}
elseif target.y > pos.y and target.x < pos.x then
newpos = {x=target.x-1, y=target.y+1, z=target.z}
elseif target.y > pos.y and target.x > pos.x then
newpos = {x=target.x+1, y=target.y+1, z=target.z}
elseif target.y < pos.y and target.x < pos.x then
newpos = {x=target.x-1, y=target.y-1, z=target.z}
end
if creature > 0 then
if queryTileAddThing(creature, newpos) == TRUE then
doTeleportThing(creature, newpos, TRUE)
end
end
end
local arr = {
[1] = {
{1,1,1},
{1,2,1},
{1,1,1}
},
[2] = {
{0,1,1,1,0},
{1,0,0,0,1},
{1,0,2,0,1},
{1,0,0,0,1},
{0,1,1,1,0}
},
[3] = {
{0,0,1,1,1,0,0},
{0,1,0,0,0,1,0},
{1,0,0,0,0,0,1},
{1,0,0,2,0,0,1},
{1,0,0,0,0,0,1},
{0,1,0,0,0,1,0},
{0,0,1,1,1,0,0}
},
[4] = {
{0,0,0,1,1,1,0,0,0},
{0,0,1,0,0,0,1,0,0},
{0,1,0,0,0,0,0,1,0},
{1,0,0,0,0,0,0,0,1},
{1,0,0,0,2,0,0,0,1},
{1,0,0,0,0,0,0,0,1},
{0,1,0,0,0,0,0,1,0},
{0,0,1,0,0,0,1,0,0},
{0,0,0,1,1,1,0,0,0}
}
}
function onTargetCreature(cid, target)
doPushCreature(getCreaturePosition(cid), target)
end
combat = {}
for n, v in pairs(arr) do
combat[n] = createCombatObject()
_G["callback"..n] = onTargetCreature
setCombatCallback(combat[n], CALLBACK_PARAM_TARGETTILE, "callback"..n)
setCombatParam(combat[n], COMBAT_PARAM_EFFECT, 2)
setCombatArea(combat[n], createCombatArea(v))
end
function onCastSpell(cid, var)
mayNotMove(cid, TRUE)
for i = 1, #combat do
addEvent(doCombat, i*150-150, cid, combat[i], var)
if i == #combat then
addEvent(mayNotMove, i*150-150, cid, FALSE)
end
end
end
Did you see how easy it is? It only remains to add these two tags below into your spells.xml in the data / spells:
Code:
<instant name="Wind Wave" words="exevo mas air" lvl="25" mana="90" exhaustion="2000" script="wind wave.lua">
<vocation name="Druid" />
<vocation name="Elder Druid" />
</instant>
REP ++eace:
Last edited: