• 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!

TFS 1.X+ [7.4, 7.72][tfs 1.5] Some fluids and runes, being used while approaching, work in a wrong way

tylerdurden

New Member
Joined
Jan 10, 2022
Messages
17
Reaction score
1

Steps to reproduce (include any configuration/script required to reproduce)​

  1. Place a mana fluid in map editor on the ground
  2. Login to the game and type "/i ultimate healing rune" and place it near the mana fluid
  3. Stand at least 2 squares from both mana fluid and ultimate healing rune
  4. Try to use it on yourself from the distance

Expected behaviour​

The mana fluid or ultimate healing rune should be used on yourself. The mana fluid should be poured on the floor when player is not a target

Actual behaviour​

The mana fluid is being poured on the floor and ultimate healing rune returns cancel message "You can only use it on creatures".

Link to github:

Hello, anybody knows how to fix this issue in the newest tfs? I run 7.4 server and I really need this to be done.
I think it needs to be done in source, because checking in lua (if the action is from the distance)
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey

if target.itemid == 1 then
if target.uid == player.uid then
doesnt treat the target as a player but as a ground tile

For runes i tried to check this one in spells.cpp but crashes the server without any message:
C++:
bool Spell::playerRuneSpellCheck(Player* player, const Position& toPos)
{
    const Creature* topVisibleCreature = tile->getBottomVisibleCreature(player);
    const Player* targetPlayer = topVisibleCreature->getPlayer();

    if (targetPlayer && targetPlayer == player) {
        return true;
    }
}
 
Last edited:
Back
Top