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

Lua Gets PZ when attacking back (Fightback) 0.4 8.60

Imfreezing

Krossa Kapitalismen
Joined
Jun 7, 2012
Messages
1,009
Solutions
1
Reaction score
88
Location
Edron
Hello OTlanders, I have an issue with my server, example, If someone attacks me and gets white skull, I can't attack back without getting PZ, I have Fightback = false in config, I don't know what the problem is, I appriacate all help!
Thanks!
BromanV
 
Hello Imfreezing.

Original System is built up like this: If someone gets skull on you, you'll get pzlocked if you attack him back. This case won't happen only if you're on a Party with someone.

If you take a look under configmanager.cpp on your sources, you'll see that there is no FightBack config declared, which means either you have it true or false, it's not going to change anything.

We could sure work on trying to change the code for acting the same while you're on a party, but then we would have to think on the consequences this could have (about yellowskull and so on...).

Best Regards,

Okke.
 
Hello Imfreezing.

Original System is built up like this: If someone gets skull on you, you'll get pzlocked if you attack him back. This case won't happen only if you're on a Party with someone.

If you take a look under configmanager.cpp on your sources, you'll see that there is no FightBack config declared, which means either you have it true or false, it's not going to change anything.

We could sure work on trying to change the code for acting the same while you're on a party, but then we would have to think on the consequences this could have (about yellowskull and so on...).

Best Regards,

Okke.
Hello Okke, Thank you for your answer,
We might missunderstood each other, I meant like when you fight back from a guy that just attacked you, you should be granted a green pass, Example, you attack me you get white skull, I attack back and I can still enter Protection zone. :D

Imfreezing
 
There is indeed, but as I said, you have to think about consequences that MAY be affected aswell, for example, if someone gets yellow skull on you, will he get PZ lock aswell? (as it should be? I could help you with that, this requires source edits though...) I can take a look on 8.6 sources and see what kind of mod must be done to them, have you got them in a GitHub?
 
So, that is the function you need to modify if you want stuff to work:

Code:
if(Combat::isInPvpZone(this, targetPlayer) || isPartner(targetPlayer) ||
        isAlly(targetPlayer) ||
        (g_config.getBool(ConfigManager::ALLOW_FIGHTBACK) && targetPlayer->hasAttacked(this)
        && !targetPlayer->isEnemy(this, false)
        ))
        return;

It actually does exist on your distro. Have you tried switching it off and on and testing? The code makes sense and it should work the way it is.
 
So, that is the function you need to modify if you want stuff to work:

Code:
if(Combat::isInPvpZone(this, targetPlayer) || isPartner(targetPlayer) ||
        isAlly(targetPlayer) ||
        (g_config.getBool(ConfigManager::ALLOW_FIGHTBACK) && targetPlayer->hasAttacked(this)
        && !targetPlayer->isEnemy(this, false)
        ))
        return;

It actually does exist on your distro. Have you tried switching it off and on and testing? The code makes sense and it should work the way it is.
Seems like 0.4 3777 has way to many errors and issue's, guess I'll switch to 3884, Thank you very much for your assistance though! Appriciated!
 
Back
Top