• 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 Magma Storm Effect repositioning X and Y

Walox

Active Member
Joined
Jul 31, 2017
Messages
39
Reaction score
29
Hello guys, how are you?
Can anybody help me ? I am trying to create a spell for my Pokémon server but I am not able to keep the spell fixed in the center of the Pokémon.
the spells are slightly above the pokémon; -;
I've tried everything but to no avail .......
Could anyone help me with this?


original magic that I'm trying to copy

Gravar_2020_02_29_23_04_25_256.gif


My magic that I created

Gravar_2020_02_29_23_02_24_10.gif

SCRIPT
elseif spell == "Magma Storm" then

local eff = {5, 35, 475, 506}
local area = {flames1, flames2, flames3, flames4}

addEvent(doMoveInArea2, 2*450, cid, 35, flames0, FIREDAMAGE, min, max, spell)
for i = 0, 3 do
addEvent(doMoveInArea2, i*450, cid, eff[i+1], area[i+1], FIREDAMAGE, min, max, spell)
end
 
What do the flames variables look like? (flames1, flames2, etc..)
I'm sorry I ended up forgetting that part
flames0 = { --explosao
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 2, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
}

flames1 = { --explosao
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 2, 1, 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},
{0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 1},
}
Post automatically merged:

can anybody help me ?
 
Last edited:
Ensure that this is not only visual issue. Explosion effect might be rendered this way.
Change the effect and try again.
 
Ensure that this is not only visual issue. Explosion effect might be rendered this way.
Change the effect and try again.
yes, this is a visual error but I think it can be fixed by adjusting the X + 1 and Y + 1
but I don't know how to do that: /
I can only adjust when the effect is on top of a body, but as you can see there the effect is coming out according to some areas
 
You would have to add offset to that effect. Possibly in Object Builder.
I tried to do this but the effect is not yet centralized, the Object Builder only centralizes by adding + pixel in the logout; -;
if I try to add -1 it prevents me, I would have to do it through the server

I usually use this to center just one effect.
local sps = getThingPosWithDebug(target)
sps.x = sps.x+1
sps.y = sps.y+1
doDanoWithProtect(cid, GRASSDAMAGE, sps, 0, -min, -max, 508)
 
I tried to do this but the effect is not yet centralized, the Object Builder only centralizes by adding + pixel in the logout; -;
if I try to add -1 it prevents me, I would have to do it through the server

I usually use this to center just one effect.
local sps = getThingPosWithDebug(target)
sps.x = sps.x+1
sps.y = sps.y+1
doDanoWithProtect(cid, GRASSDAMAGE, sps, 0, -min, -max, 508)
Then edit your client and change the way offsets are used (possibly just * -1).
 
Then edit your client and change the way offsets are used (possibly just * -1).
I tried to do it with Tibia.otml from otclient
but I can't get him to change his position; -;

I'm doing it there.
effects:
507:
displacement: -1 -1
 
Back
Top