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

[8.6] Shoot through Magic Wall! [PICS]

Tyronoz

Immortal Technique
Joined
Feb 11, 2012
Messages
178
Reaction score
3
Location
Underground
Aight here's the deal: I will pay you, rep you, whatever you wish for, if you manage to fix so people may wave through a magic wall, or use runes similiar to GFB (people should NOT be able to shoot sd through a magic wall)

5jv39u.png

(The pictures are taken from a 8.1 XML server)
The pictures shows clearly what i'm looking after, i've been trying for weeks now to make it work in 8,6 but failed multiple times. I've read that this is only able to fix through sources, and if someone manages to fix this i'll highly reward him.

Thanks.

Tyronoz.
 
Try this,

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 8759)

	return doCombat(cid, combat, var)
end
 
You're not actually suppost to be able to shoot runes through it, but if you use runes similiar to gfb,explo, and use them on the magic wall then it will form the explosion like shown in pic 2.

also only waves should go through the magic wall, not any other kind of spells like ue etc.
 
combat.cpp: ReturnValue Combat::canDoCombat
Code:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
{
    //using spells of type: "exevo vis lux" through magical walls
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()) {              //here change
        return RETURNVALUE_NOTENOUGHROOM;
    }

    if (tile->hasFlag(TILESTATE_FLOORCHANGE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }

and spells.cpp: bool Spell::playerRuneSpellCheck
Code:
    const Creature* topVisibleCreature = tile->getBottomVisibleCreature(player);
    if (blockingCreature && topVisibleCreature) {
        player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
        g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF);
        return false;
    } else if (!blockingSolid && tile->hasFlag(TILESTATE_BLOCKSOLID)) {                //here change
        player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
        g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF);
        return false;
    }

    if (needTarget && !topVisibleCreature) {
        player->sendCancelMessage(RETURNVALUE_CANONLYUSETHISRUNEONCREATURES);
        g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF);
        return false;
    }

but I need help, because I can use magic wall rune on the already existing magic wall, the same for other items, such as the garbage can I "throw (use)" magic wall rune
 
combat.cpp: ReturnValue Combat::canDoCombat
Code:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
{
    //using spells of type: "exevo vis lux" through magical walls
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()) {              //here change
        return RETURNVALUE_NOTENOUGHROOM;
    }

    if (tile->hasFlag(TILESTATE_FLOORCHANGE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }

and spells.cpp: bool Spell::playerRuneSpellCheck
Code:
    const Creature* topVisibleCreature = tile->getBottomVisibleCreature(player);
    if (blockingCreature && topVisibleCreature) {
        player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
        g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF);
        return false;
    } else if (!blockingSolid && tile->hasFlag(TILESTATE_BLOCKSOLID)) {                //here change
        player->sendCancelMessage(RETURNVALUE_NOTENOUGHROOM);
        g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF);
        return false;
    }

    if (needTarget && !topVisibleCreature) {
        player->sendCancelMessage(RETURNVALUE_CANONLYUSETHISRUNEONCREATURES);
        g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF);
        return false;
    }

but I need help, because I can use magic wall rune on the already existing magic wall, the same for other items, such as the garbage can I "throw (use)" magic wall rune
this work in tfs 1.2?
 
Back
Top