• Congratulations to the OTLand January Mapping Competition Winner! The grand prize of Otland Premium goes to Andréew.
  • Sign up for February Mapping Competition! The prize includes Otland Premium time.
  • 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!

Spells Versus Walls

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
110
Best answers
0
Reaction score
2
Well.. Wel..

Im using a server based on TFS 1.3

My problem is that :
When You conjure a instant spell, infront of a wall, the spell pass trought it.
Im trying to figure it out how to block the spell to not pass trought the wall.


A video explaining it:

A picture:
1579790219550.png

if there is another wall, it get blocked.

1579790256297.png
 

M0ustafa

Î Àm ŁĕğẹňĎ
Premium User
Support Team
Joined
Mar 4, 2017
Messages
1,304
Best answers
153
Reaction score
477
Location
Egypt
Post your spell script and post how you add it to spells.xml
 

kay

Veteran OT User
Joined
Apr 23, 2013
Messages
404
Best answers
1
Reaction score
448
It looks like it's checking all the squares except for the one in front of you.
 
OP
IgoR lYCAN

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
110
Best answers
0
Reaction score
2
Might be a sprite problem try another wall id 3361
Nope;
1579805476166.png
Post automatically merged:

Post your spell script and post how you add it to spells.xml
XML:
    <instant group="attack" spellid="13" name="Energy Wave" words="exevo vis hur" lvl="1" mana="170" direction="1" exhaustion="8000" groupcooldown="2000" needlearn="0" script="attack/energy wave.lua">
        <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" />
    </instant>


Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setArea(createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5))

function onGetFormulaValues(player, level, magicLevel)
    local min = (level / 4) + (magicLevel * 12) + 50
    local max = (level / 4) + (magicLevel * 14) + 75
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
Post automatically merged:

It looks like it's checking all the squares except for the one in front of you.

?:/
 

Leesne

Active Member
Joined
Dec 4, 2017
Messages
115
Best answers
18
Reaction score
48
XML:
    <instant group="attack" spellid="13" name="Energy Wave" words="exevo vis hur" lvl="1" mana="170" direction="1" exhaustion="8000" groupcooldown="2000" needlearn="0"  blockwalls="1" script="attack/energy wave.lua">
        <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" />
    </instant>
 
OP
IgoR lYCAN

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
110
Best answers
0
Reaction score
2
XML:
    <instant group="attack" spellid="13" name="Energy Wave" words="exevo vis hur" lvl="1" mana="170" direction="1" exhaustion="8000" groupcooldown="2000" needlearn="0"  blockwalls="1" script="attack/energy wave.lua">
        <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" />
    </instant>
Nope;

1579814197361.png
 

Leesne

Active Member
Joined
Dec 4, 2017
Messages
115
Best answers
18
Reaction score
48
just tried it on my server with the walls you mentioned and it works fine. Guessing your tibia.spr/tibia.dat or items.otb is not set correct for those sprites. try an older wall such as 1026 etc
 

M0ustafa

Î Àm ŁĕğẹňĎ
Premium User
Support Team
Joined
Mar 4, 2017
Messages
1,304
Best answers
153
Reaction score
477
Location
Egypt
Try this
XML:
    <instant group="attack" spellid="13" name="Energy Wave" words="exevo vis hur" lvl="1" mana="170" direction="1" exhaustion="8000" groupcooldown="2000" needlearn="0"  blocktype="solid" blockwalls="1" script="attack/energy wave.lua">
        <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" />
    </instant>
Does it happen with all wave spells? or only this 1
 

kay

Veteran OT User
Joined
Apr 23, 2013
Messages
404
Best answers
1
Reaction score
448
Your movie clearly shows the wall in general does block a wave, except for when you're standing on an adjacent square. As if it was checking 'possible', but starting from two squares further instead of one. That'd be in your cpp sources, I guess.
Unless it only happens with this specific spell. Try other spells and using, throwing items etc.
 
OP
IgoR lYCAN

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
110
Best answers
0
Reaction score
2
Your movie clearly shows the wall in general does block a wave, except for when you're standing on an adjacent square. As if it was checking 'possible', but starting from two squares further instead of one. That'd be in your cpp sources, I guess.
Unless it only happens with this specific spell. Try other spells and using, throwing items etc.
Yes, it only happens with spells that "go in front" the player.


1579815837904.png


1579815857301.png


Trying throw a item ~

1579815891107.png
Post automatically merged:

Try this
XML:
    <instant group="attack" spellid="13" name="Energy Wave" words="exevo vis hur" lvl="1" mana="170" direction="1" exhaustion="8000" groupcooldown="2000" needlearn="0"  blocktype="solid" blockwalls="1" script="attack/energy wave.lua">
        <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" />
    </instant>
Does it happen with all wave spells? or only this 1
all spells that are infront of the player.
Post automatically merged:

just tried it on my server with the walls you mentioned and it works fine. Guessing your tibia.spr/tibia.dat or items.otb is not set correct for those sprites. try an older wall such as 1026 etc
Nope.. The problem is on the src, Im sure of it, but dont know where to look;
 

Baahzera

Member
Joined
Apr 4, 2014
Messages
70
Best answers
0
Reaction score
9
The only reason for that happening is that you have made changes when the code verifies if there is a blocking item in front of out if you cast area spell.
 
OP
IgoR lYCAN

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
110
Best answers
0
Reaction score
2
The only reason for that happening is that you have made changes when the code verifies if there is a blocking item in front of out if you cast area spell.
Yes, Ive made a few changes about it, to make exori min , works with a wall infront of the player;

Cuz before I made it, when have a single item(that blocks spells) infront of the player, the others 2 sqms, doenst been attacked by the exori min
Post automatically merged:

Yes, Ive made a few changes about it, to make exori min , works with a wall infront of the player;

Cuz before I made it, when have a single item(that blocks spells) infront of the player, the others 2 sqms, doenst been attacked by the exori min
Also, when I remove these lines, like u said, on these commits:

if (tile->getGround() && !tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->hasProperty(CONST_PROP_BLOCKSOLID)) {
Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
}

and leave it like :

if (params.impactEffect != CONST_ME_NONE) {
Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
}
}
The things go wrost than before xD
1579966605100.png
 
Last edited:
Top