• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Air e Burst Spells - Peerfeect

Status
Not open for further replies.

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:
exevomasair.png




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 ++:peace:
 
Last edited:
Another wonderful touch from Beon. +1
 
@eletross:
Signed.

I'm sure it's not his script ;)
 
is yes o_O' ~Chojrak
and this script is not stupid -.- ' ~ Lava Titan

~ Lava Titan
at least do better scripter you
 
@Beon:
For what TFS is this spell? 0.3.5?
 
Code:
queryTileAddThing(creature, newpos)
What is it? I can't find this function in 0.3.5...

Also...
Can you explain what does mean _G in:
Code:
_G["callback"..n] = onTargetCreature

Can you explain this?
Code:
for n, v in pairs(arr) do


I'm just noob and don't know what is it, can you? ;)
 
is yes o_O' ~Chojrak
and this script is not stupid -.- ' ~ Lava Titan

~ Lava Titan
at least do better scripter you

I dont understand you, would you fucking learn to talk english before you post something?
 
@Chojrak

actually this part of
Code:
_G["callback"..n] = onTargetCreature
my cousin who did ...
then I ask him how he did
and
Code:
for n, v in pairs(arr) do
and a variable , arry *
I'm just noob and don't know what is it, can you? ;)
 
Somebody removed posts! Argh, it's still not your script and you don't know how explain global variable and loop. And why are you using not existing function? :eek:
 
I havent posted any scripts in the last moth.
How do you know that he's scripting better than me?
Oh i'm talking bad english?

Your the one talking bad english.

Okj soz nowz i spek god eglisx lyke Beon
 
@ALL
Without discussion in the topic
... discursão menge to send private one to the other
 
All Lava Titan ever does in this forum is posting stupid post on other threads saying how stupid the thread starter is. ALWAYS!

Your no better yourself, your always saying negative things about everyone and everything they create when you yourself copied a whole server that wasnt even yours from the beginning. THE FORGOTTEN L. now I say you suck ok?..

Make your own things.
 
Status
Not open for further replies.
Back
Top