• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Cast a spell while standing by the stairs

Solution
I guess you're using the latest TFS since you don't specify it.

In
C++:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
Remove
C++:
    if (tile->hasFlag(TILESTATE_FLOORCHANGE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,756
Solutions
24
Reaction score
473
Location
Sweden
I guess you're using the latest TFS since you don't specify it.

In
C++:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
Remove
C++:
    if (tile->hasFlag(TILESTATE_FLOORCHANGE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }
 
Solution

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,756
Solutions
24
Reaction score
473
Location
Sweden
When I come to think of it, what on earth happens if you shoot a magic wall or a firebomb on a stair? Does the field take the stairs?

If that is the case, I'm not fully sure on how to make a proper solution for you, maybe this could work

In:
C++:
ReturnValue Game::internalAddItem(Cylinder* toCylinder, Item* item, int32_t index,
                                  uint32_t flags, bool test, uint32_t& remainderCount)

Under:
C++:
    if (!toCylinder || !item) {
        return RETURNVALUE_NOTPOSSIBLE;
    }

Add:
C++:
Tile* tile = toCylinder->getTile();
if (tile && tile->hasFlag(TILESTATE_FLOORCHANGE) && item->isMagicField()) {
    return RETURNVALUE_NOTPOSSIBLE;
}

But again - not sure if this is the best approach to your potential problem.
 
Last edited:

0x666

Well-Known Member
Joined
Jan 16, 2022
Messages
93
Solutions
2
Reaction score
56
@up fuck, didnt notice your edit
however, it would be neat to block the possibility to throw it too, I think

In
C++:
ReturnValue RuneSpell::canExecuteAction(const Player* player, const Position& to
add
C++:
Tile* targetTile = g_game.map.getTile(toPos);
 if (!targetTile || targetTile->hasFlag(TILESTATE_BLOCKSOLID) || targetTile->hasFlag(TILESTATE_FLOORCHANGE)) {
       return RETURNVALUE_NOTENOUGHROOM;
}

That would be <10 Tibia behavior, not sure how it behaves in newer
 
Last edited:

0x666

Well-Known Member
Joined
Jan 16, 2022
Messages
93
Solutions
2
Reaction score
56
That seems like a better solution all together.
Although both changes are required, otherwise you will be able to create fire fields on other floors shooting fire bombs around the stairs.
 
Last edited:

emil92b

Well-Known Member
Joined
Aug 21, 2013
Messages
294
Solutions
11
Reaction score
96
Location
Sweden
When I come to think of it, what on earth happens if you shoot a magic wall or a firebomb on a stair? Does the field take the stairs?
7.7: fields is only created around the floorchange tile, but you can still see the distance effect from shooting the rune
 

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,756
Solutions
24
Reaction score
473
Location
Sweden
Emil seem to be correct about 7.7, you can shoot AOE (GFB and w/e) on stairs. When using a field rune like magic wall only the shoot effect is visible and the magic wall is not created. This might have changed in newer versions of Tibia but only god knows when.
 

guispiller

New Member
Joined
Nov 29, 2021
Messages
6
Reaction score
3
GitHub
guispiller
Emil seem to be correct about 7.7, you can shoot AOE (GFB and w/e) on stairs. When using a field rune like magic wall only the shoot effect is visible and the magic wall is not created. This might have changed in newer versions of Tibia but only god knows when.
That's correct, the Magic wall is not created, and the charge of the rune is not removed. You have any Idea How to not remove the charge of the rune?
 

0x666

Well-Known Member
Joined
Jan 16, 2022
Messages
93
Solutions
2
Reaction score
56
Just tested in No-Pvp worlds, and in Open PVP worlds, the shoot effect is visible, but a message says: not enough room, and the charge is not removed., when throwing a magic wall.
7.7: fields is only created around the floorchange tile, but you can still see the distance effect from shooting the rune
 
Top