Ticket #411 (closed defect: fixed)

Opened 12 months ago

Last modified 4 months ago

watch tk utility

Reported by: Twerp Owned by: subby
Priority: normal Component: Bots - Other
Version: Latest version from repository Severity: minor
Keywords: Cc:

Description

if(i > allowedTKs) {

The above is line 155. I think that a simple change to:

if(i >= allowedTKs) {

will make it so that there is no 1 extra kill allowed. This is especially useful in zombie games like ?go bug. The bot will not allow 0 teamkills (like it's supposed to)

HTF <ER> has activated TK watcher. You will be spec'd for 60 minute(s) after 1 TKs.
Each TK will decay after 5 minute(s).
2:Twerp> can you do 0 tk's?
2:HTF <ER>> not possible
2:HTF <ER>> HTF <ER>> !watchtk 0 99

With the current code, the bot allows a free kill. This can be used, and has been used in the past because people know about it. It's a very simple change that can be easily implemented

Attachments

Change History

Changed 12 months ago by Maverick

Link to the file + line: utilwatchtk.java

Ok I checked the file and from what I can see it seems like I can confirm your problem.
The bot does announce it correctly, right? "You will be spec'd for 60 minute(s) after 1 TKs." However, if the host has set !watchtk 1 , the bot spectates the player after his second teamkill because of the > on line 155 , right?

In the code, the variable is named allowedTKs. If this variable holds the number of allowed teamkills, then the > on line 155 is correct. However, the !help interface is then not clear and it should allow specifying '0' for the allowed teamkills on the !watchtk command.

Changed 5 months ago by subby

Line 101 clearly sets the minimun allowed tks to 1

aT = Math.max(1, Math.min(aT, 100));

Changed 4 months ago by subby

  • owner set to subby
  • status changed from new to assigned

Changed 4 months ago by subby

  • status changed from assigned to closed
  • resolution set to fixed

Add/Change #411 (watch tk utility)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.