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

after login player cannot be attacked

Mauzim

Member
Joined
Jan 3, 2011
Messages
568
Reaction score
9
after login player cannot be attacked from x secconds from monsters and players
im using otx 2.9 se and now after login player cannot use spells or attack monsters
but players and mosnters can attack this player
i guess its wrong how to fix that?
 
I don't understand what you want... Do you want to remove the check that won't let you attack after login?
 
If you disable this players will be able to magebomb.

Spells.cpp
Code:
        if(player->checkLoginDelay())
        {
            player->sendCancelMessage(RET_YOUMAYNOTATTACKIMMEDIATELYAFTERLOGGINGIN);
            g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
            return false;
        }

Combat.cpp
Code:
    if(player->checkLoginDelay())
        return RET_YOUMAYNOTATTACKIMMEDIATELYAFTERLOGGINGIN;
 
If you disable this players will be able to magebomb.

Spells.cpp
Code:
        if(player->checkLoginDelay())
        {
            player->sendCancelMessage(RET_YOUMAYNOTATTACKIMMEDIATELYAFTERLOGGINGIN);
            g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
            return false;
        }

Combat.cpp
Code:
    if(player->checkLoginDelay())
        return RET_YOUMAYNOTATTACKIMMEDIATELYAFTERLOGGINGIN;

hey i don't wanna disable cannot attack after login

I just need player protection after login because when player login other players or monsters can attack him and he cannot
 
Holy crap man, stop using Google translate or whatever you are using haha. Its really hard to understand your problem.
I have no idea how to solve it but I will "translate" what he said:


What he wants: Login protection. Monsters and Players can't attack you.

What is happening NOW: There is no login protection (he can get attacked) AND the player can't defend himself (probably because of magebomb script or something like that).

Solution: Create a Login protection. Taking off magebomb script (in other words, leting the player defend himself) is not an option.


Hope this helps anyone that is trying to solve his problem.
 
after login player cannot be attacked from x secconds from monsters and players
im using otx 2.9 se and now after login player cannot use spells or attack monsters
but players and mosnters can attack this player
i guess its wrong how to fix that?
Hi,
First Open config.lua and search
Code:
loginProtectionPeriod = 5 * 1000
and repleace num "5" to "0" (5 is the seconds to attack a player after login). ;)
 
Back
Top