dcOnAtkMiss is here!

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

What do you think about this function?

Good, should be implemented
1
100%
Bad, it's useless
0
No votes
Could be better (explain how)
0
No votes
 
Total votes: 1

Message
Author
WAZAAAAA
Noob
Noob
Posts: 6
Joined: 18 Jul 2014, 22:14
Noob?: No

  dcOnAtkMiss is here!

#1 Post by WAZAAAAA »

I use this function as an anti-ban measure while botting. In the server that I play on, the most common method that GM's use to ban botters is to cast Safety Walls on the monsters (you won't see that in the console logs but the skill is there) that you're going to attack so you will miss them forever (alternatively Pneuma for long ranged attacks like arrows I imagine). One of my accounts got banned in about 23 seconds by a bot hunter because of that reason... in that case I was already using "TeleportAuto atkMiss" to escape such situation, but I was unlucky enough that the Fly Wing made me teleport close to the same location where I was already so the bot attacked the same monster inside the Safety Wall again.
You may want to get the fuck out of the game completely when a GM is in your map, not just teleport away, especially in highly botted ones. I would do that even when I play normally because they are too fast to decide lol.
Consider also that monsters in this game have a stat called "HitRequiredFor100%" / "100% Hit". That means that if your character has an hit rate high enough, it is virtually impossible for you to miss, so if you're really missing it's a proof that something fishy is going on.

dcOnAtkMiss is here to help this.

WIKI DOCUMENTATIONS:

Code: Select all

 ; dcOnAtkMiss [<number>]
: Automatically reconnect when the number of times your attacks have missed a monster is greater than or equal to the specified number. 

[[Category:config.txt]]
[[Category:auto disconnect]]

Code: Select all

; dcOnAtkMiss_reconnect [<seconds>]
: If [[dcOnAtkMiss]] is set and you disconnect after consecutive missed attacks, this option specifies the time in seconds Kore will wait and sleep before reconnecting again.

[[Category:config.txt]]
[[Category:auto disconnect]]
dcOnAtkMiss default = 0
dcOnAtkMiss_reconnect default = 1800 (like the other reconnects)

src\Misc.pm CODE:
to add BEFORE this line:
if (AI::action eq "attack" && mon_control($monster->{name},$monster->{nameID})->{attack_auto} == 3 && $damage)

Code: Select all

			if ($config{dcOnAtkMiss} && $monster->{atkMiss} >= $config{dcOnAtkMiss}) {
				warning TF("*** Disconnecting after missing a monster %d times ***\n", $config{dcOnAtkMiss});
				warning TF("Disconnect for %s seconds...\n", $config{dcOnAtkMiss_reconnect});
				relog($config{dcOnAtkMiss_reconnect}, 1);
Alternatively, there's also the "quit completely without relogging" version that only needs dcOnAtkMiss to function. Didn't know if setting it as -1 was possible through config.txt, so I'm putting this here:

Code: Select all

			if ($config{dcOnAtkMiss} && $monster->{atkMiss} >= $config{dcOnAtkMiss}) {
				warning TF("*** Disconnecting after missing a monster %d times ***\n", $config{dcOnAtkMiss});
				quit();



So what do you think about this?
YOU'RE NOT ALEXANDER

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re:   dcOnAtkMiss is here!

#2 Post by Kaspy »

Last year I made a plugin that does this.
http://forums.openkore.com/viewtopic.ph ... 352#p74352
Image

WAZAAAAA
Noob
Noob
Posts: 6
Joined: 18 Jul 2014, 22:14
Noob?: No

Re:   dcOnAtkMiss is here!

#3 Post by WAZAAAAA »

I've replied to it, you had a great idea.
YOU'RE NOT ALEXANDER

Post Reply