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

Feature No exp from same IP when killing another player (PVP - Enforced/Hardcore).

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,246
Solutions
26
Reaction score
713
Location
Germany
I've seen this requested a few times now.

Players wont gain any exp from other Players which have the same IP now.

Configmanager.cpp:

0.3.6 / 0.4:

search for:
Code:
m_confBool[REMOVE_WEAPON_CHARGES] = getGlobalBool("removeWeaponCharges", true);

add this after it:
Code:
m_confBool[GAIN_EXP_FROM_SAME_IP] = getGlobalBool("gainExpFromSameIP", true);

0.2.4+

search for:
Code:
m_confBoolean[REMOVE_RUNE_CHARGES] = (getGlobalString(L, "removeChargesFromRunes", "yes") == "yes");

add after it:
Code:
m_confBoolean[GAIN_EXP_FROM_SAME_IP] = (getGlobalString(L, "gainExpFromSameIp", "no") == "yes");


Configmanager.h:

search for:
Code:
REMOVE_WEAPON_CHARGES,

add this after it:
Code:
GAIN_EXP_FROM_SAME_IP,



Player.cpp:

0.3.6 / 0.4

search the function:
Code:
double Player::getGainedExperience(Creature* attacker) const

then goto:
Code:
Player* attackerPlayer = attacker->getPlayer();
	if(!attackerPlayer || attackerPlayer == this)
		return 0;

and add this:
Code:
if(attackerPlayer->getIP() == getIP() && !g_config.getBool(ConfigManager::GAIN_EXP_FROM_SAME_IP))
        return 0;

0.2.4+

search the function:
Code:
uint64_t Player::getGainedExperience(Creature* attacker) const

then goto:
Code:
Player* attackerPlayer = attacker->getPlayer();

after that add this:
Code:
if(attackerPlayer->getIP() == getIP() && !g_config.getBoolean(ConfigManager::GAIN_EXP_FROM_SAME_IP))
            return 0;


then open your config.lua

and add this somewhere:

0.3.6 / 0.4
Code:
gainExpFromSameIp = false

0.2.4+
Code:
gainExpFromSameIp = "no"

Now we are done. enjoy
 
Do not use this, if like 2 brothers play on the same network they wont get any exp :/ nice feature but its not that good
 
It's probably more for mc-uses, killing himselves characters
 
Yeah.. seen alot pvp enf servers where they kill each other just for exp.
 
Do not use this, if like 2 brothers play on the same network they wont get any exp :/ nice feature but its not that good

99,9% of the people who play on the same network, wont kill eachother anyway and if they do it, then it was on purpose to gain something.

So I can't see a reason why it aint good at all.

Yeah.. seen alot pvp enf servers where they kill each other just for exp.

that's exactly what it was meant to be used for.
 
You should point out in the main post

"No exp from same IP when killing another player (PVP - Enforced/Hardcore)."

Users like Milice tend to don't read it properly through and think you don't get exp from killing monsters :|

I fixed your title :thumbup:
 
There is a script for this in simplewarOT1.51PL check that out its more simple to add (Copy/paste)
but on that script you dont get 0 exp, you can configure a punishment also to take exp from the player. im not to sure if it has the same network play bug ul have to tet it
 
Dont work for me error in configmanager.cpp
PHP:
 " In member function 'bool ConfigManager::load()': " "166 C:\Users\3\Desktop\tibiaot\linux\server\configmanager.cpp 'GAIN_EXP_FROM_SAME_IP' was not declared in this scope "
"166 C:\Users\3\Desktop\tibiaot\linux\server\configmanager.cpp *** [obj//configmanager.o] Error 1 "
 
many ppl are using estate's network and its possible to ONE ip is assignated to many computers (sometimes 100 or more)


assuming
if 10 of these are playing tibia this code is useless becouse many friends for one estate are playing on one ots
this code make ur server worse for them
for ex. I and my 10 or more fiends have the same ip. if u add this code we 'cant' play

do u know how many ppl have internal ip?
also ban on ip is stupid idea;p

u made nice work but useless ;/

i seen alot scripts and codes what dont allow more then 1 connect at same time
another stupid idea;p
 
Last edited:
many ppl are using estate's network and its possible to ONE ip is assignated to many computers (sometimes 100 or more)


assuming
if 10 of these are playing tibia this code is useless becouse many friends for one estate are playing on one ots
this code make ur server worse for them
for ex. I and my 10 or more fiends have the same ip. if u add this code we 'cant' play

do u know how many ppl have internal ip?
also ban on ip is stupid idea;p

u made nice work but useless ;/

i seen alot scripts and codes what dont allow more then 1 connect at same time
another stupid idea;p

Mind explaining me, in which way this system interrupts you and your friends in playing?

This system is to avoid people on pvp enforced / hardcore servers to gain exp with mc clients.

You and your friends can still login just as normal, you'll all get normal exp for killing monsters, you just wont get any exp if you kill eachother.

So I don't see any reason why this system would make it "worse" to play on a server.


kind regards, Evil Hero.
 
Mind explaining me, in which way this system interrupts you and your friends in playing?

This system is to avoid people on pvp enforced / hardcore servers to gain exp with mc clients.

You and your friends can still login just as normal, you'll all get normal exp for killing monsters, you just wont get any exp if you kill eachother.

So I don't see any reason why this system would make it "worse" to play on a server.


kind regards, Evil Hero.


lol, u are wrong
if i and few ppl have same ip, we dont gain exp -.-


learn something more
http://en.wikipedia.org/wiki/Local_area_network
"computer network covering a [...] small groups of buildings"
some times not small but big group like 20 buildings
all ppl in these building have the same ip (now always but in 95% cases)
and they can play on ur serv :)
aslo ban one person from the 20 buildings banish automaticly all ppl for these 20 buildings;p

that its too hard to understand?
sorry for my eng;p
 
Last edited:
lol, u are wrong
if i and few ppl have same ip, we dont gain exp -.-


learn something more
Local area network - Wikipedia, the free encyclopedia
"computer network covering a [...] small groups of buildings"
some times not small but big group like 20 buildings
all ppl in these building have the same ip (now always but in 95% cases)
and they can play on ur serv :)
aslo ban one person from the 20 buildings banish automaticly all ppl for these 20 buildings;p

that its too hard to understand?
sorry for my eng;p

You just failed pretty much with your post.

1.
If you can't even read the code properly then don't talk like you have any idea.

2.
Even if 20 people with the same ip are online on a server, they still gain exp from others which don't share the same ip as their own.
(This code does not effect, when people kill monsters)

3.
In atleast 90% of times you play in the same team with your teammates, so yeah it wouldn't matter then anyways.

4.
I never stated somewhere that my code supports auto banning, so why do you still care to bother me with it?
 
This isn't working coz you can still make the other char pz and then x-log it.

Of course it's betten than nothing.
 
You just failed pretty much with your post.

1.
If you can't even read the code properly then don't talk like you have any idea.

2.
Even if 20 people with the same ip are online on a server, they still gain exp from others which don't share the same ip as their own.
(This code does not effect, when people kill monsters)

3.
In atleast 90% of times you play in the same team with your teammates, so yeah it wouldn't matter then anyways.

4.
I never stated somewhere that my code supports auto banning, so why do you still care to bother me with it?

He mean that those 20 players would like to fight each other. Why y'all try make it look like nobody fight each other from the same network? Especially in LAN parties as mentioned you'd like to do that.
 
Nice, but it would be better if you didnt gain exp from killing someone from the same IP over and over again.

1: 100% exp
2: 50% exp
3: 25% exp
etc etc

This one is good too though, cuz when you play from same network you would most likely play together anways, so it wont disturb ppl playing on lan.
 
Back
Top