• 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 Storm Gust

Jano

oturhaN
Joined
Feb 21, 2008
Messages
876
Solutions
1
Reaction score
68
Location
Chile
Lua:
local arr = 
    {
        {
            {1, 0, 1, 0, 1},
            {0, 1, 0, 1, 0},
            {1, 0, 3, 0, 1},
            {0, 1, 0, 1, 0},
            {1, 0, 1, 0, 1}
        },
        {
            {0, 1, 0, 1, 0},
            {1, 0, 1, 0, 1},
            {0, 1, 3, 1, 0},
            {1, 0, 1, 0, 1},
            {0, 1, 0, 1, 0}
        },
        {
            {1, 1, 1, 1, 1},
            {1, 1, 1, 1, 1},
            {1, 1, 3, 1, 1},
            {1, 1, 1, 1, 1},
            {1, 1, 1, 1, 1}
        }
    }
    
local effect, combat = {CONST_ME_ICEATTACK, CONST_ME_ICEATTACK, CONST_ME_ICEAREA}, {}

local function tileChecker(pos)
    local myTable = {}
    if (type(pos) == 'table') then
        for i = 1, 5 do
            pos.stackpos = i
            local Thing = getThingFromPos(pos)
            local thisID, thisUID = Thing.itemid, Thing.uid
            if thisID > 1 then
                table.insert(myTable, thisUID)
            end
        end
    end
    return #myTable > 0 and myTable or nil
end

local function MoveAgain(p)
    if isCreature(p.player) then
        doCreatureSetNoMove(p.player, false)
    end
end

local function GetPosToPush(cid, pos)
    local nPos = {
        [0]={x=pos.x, y=pos.y-1, z=pos.z}, 
        [1]={x=pos.x+1, y=pos.y, z=pos.z}, 
        [2]={x=pos.x, y=pos.y+1, z=pos.z}, 
        [3]={x=pos.x-1, y=pos.y, z=pos.z}}
    return nPos[getCreatureLookDirection(cid)]
end

function onTargetTile(cid, pos)
    pos.stackpos = 253
    local player = getThingFromPos(pos).uid
    if isCreature(player) then
        if cid ~= player then
            if math.random(1, 2) == 1 then
                doCreatureSetNoMove(player, true)
                addEvent(MoveAgain, 2000, {player=player})
            else
                local P = GetPosToPush(player, pos)
                local tileItems, count = tileChecker(P) or {}, 0
                if #tileItems > 0 then
                    for _, i in ipairs(tileItems) do
                        if not getTilePzInfo(P) then
                            if not hasProperty(i, CONST_PROP_BLOCKSOLID) then
                                count = count + 1
                            end
                        end
                    end
                end
                if count == #tileItems then
                    doTeleportThing(player, P, TRUE)
                end
                tileItems, count = {}, 0
            end
        end
    end
end

for i = 1, 3 do
    combat[i] = createCombatObject()
    setCombatParam(combat[i], COMBAT_PARAM_EFFECT, effect[i])
    setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
    setAttackFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, 5, 5, 4, 7) --Test the formula 8)
    setCombatArea(combat[i], createCombatArea(arr[i]))
    _G["onTargetTile" .. i] = onTargetTile
    setCombatCallback(combat[i], CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i)
end

local function Spell(x)
    doCombat(x.cid, combat[x.i], x.var)
end

function onCastSpell(cid, var)
    for i = 1, 3 do
        addEvent(Spell, 500 * i, {cid=cid, var=var, i=i})
    end
    return true
end

based on ragnarok onlike skill, there is a chance that target get "frozen" (for tibia may not move) or the target can be pushed 8)
 
looks alike a function of mine ^_^

Lua:
local function  GetPosToPush(cid, pos)
    local nPos = {
        [0]={x=pos.x, y=pos.y-1, z=pos.z},
        [1]={x=pos.x+1, y=pos.y, z=pos.z},
        [2]={x=pos.x, y=pos.y+1, z=pos.z},
        [3]={x=pos.x-1, y=pos.y, z=pos.z}}
    return nPos[getCreatureLookDirection(cid)]
end
 
looks alike a function of mine ^_^

Lua:
local function  GetPosToPush(cid, pos)
    local nPos = {
        [0]={x=pos.x, y=pos.y-1, z=pos.z},
        [1]={x=pos.x+1, y=pos.y, z=pos.z},
        [2]={x=pos.x, y=pos.y+1, z=pos.z},
        [3]={x=pos.x-1, y=pos.y, z=pos.z}}
    return nPos[getCreatureLookDirection(cid)]
end

No offence Cyb3r, but just because a function looks like yours, does not mean he took it or anything. I am sure you did not mean any harm, but you did not really state if you were angry, or just pointing it out.

In my opinion: Nahruto created LUA, kthxbye.
 
No offence Cyb3r, but just because a function looks like yours, does not mean he took it or anything. I am sure you did not mean any harm, but you did not really state if you were angry, or just pointing it out.

In my opinion: Nahruto created LUA, kthxbye.
lol i just say it's a coincidence :peace:
Lua:
  function getNextPos(cid, tiles)
p = getCreaturePosition(cid)
x,y,z = p.x,p.y,p.z
local places = {
  [0] = {x=x, y=(y-tiles), z=z, stackpos = 253},
  [1] = {x=(x+tiles), y=y, z=z, stackpos = 253},
  [2] = {x=x, y=(y+tiles), z=z, stackpos = 253},
  [3] = {x=(x-tiles), y=y, z=z, stackpos = 253}}
    return places[getPlayerLookDir(cid)]
end
they don't even look alike ^^

lua was created at brasil
kkthnxbye

oh yeah sure (y) but i use it since years 8))))

Simple football script. - OpenTibia Fans

even long before that post i already used it 8) but ok i_ think_i_copied_you_okkk


edit : just noticed that my post is EVEN older that your join date xddddd

yes, my bad ^^
@topic: screenshots?
 
Last edited:
lol i just say it's a coincidence :peace:
they don't even look alike ^^

lua was created at brasil
kkthnxbye



yes, my bad ^^
@topic: screenshots?

^^ i will rec a litle video tomorrow then upload :]

off : no me tomes como un pesado 8(
 
Es bueno verte por aca de nuevo! Good Spells! a taste of ragnarok in tibia :)
 
Back
Top