What-Will-Become 2.1 - clientSuspend timeout

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

Moderator: Moderators

ShawnjohnSJ
Noob
Noob
Posts: 2
Joined: 03 Jan 2010, 23:32
Noob?: No

What-Will-Become 2.1 - clientSuspend timeout

#1 Post by ShawnjohnSJ »

Hey there, I'm not sure if this is in the right section.

I'd like to suggest that maybe you add 'ai_clientSuspend <timeout>' to the timeouts.txt
For me, I had to edit it to do this for one of my accounts because it takes longer to switch maps on Xkore 1, so I had to extend the timeout longer than 10 seconds, or else it would not load the map.. it'd lock up the client and show nothing, but I just made it where I can change it in timeouts.txt so its easier.


This is my code for it, I just changed one little line:

AI.pm

Code: Select all

##########################################


##
# ai_clientSuspend(packet_switch, duration, args...)
# initTimeout: a number of seconds.
#
# Freeze the AI for $duration seconds. $packet_switch and @args are only
# used internally and are ignored unless XKore mode is turned on.
sub ai_clientSuspend {
	my ($type, $duration, @args) = @_;
	my %args;
	$args{type} = $type;
	$args{time} = time;
	$args{timeout} = $timeout{ai_clientSuspend}{timeout};
	@{$args{args}} = @args;
	AI::queue("clientSuspend", \%args);
	debug "AI suspended by clientSuspend for $args{timeout} seconds\n";
}
I hope you add this in, I think it would be more flexible to do this.

Of course, you would take out the un-needed duration variable, which I didn't do because I did this in just 5 seconds so I could go back to botting.
Thank you:)
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: What-Will-Become 2.1 - clientSuspend timeout

#2 Post by kLabMouse »

I think, it's better to Suspend AI while client not loaded whole map.
I think, this event can be fetched somehow.
ShawnjohnSJ
Noob
Noob
Posts: 2
Joined: 03 Jan 2010, 23:32
Noob?: No

Re: What-Will-Become 2.1 - clientSuspend timeout

#3 Post by ShawnjohnSJ »

Yes, that sounds a lot better and more reliable.
Unfortunately I don't know any perl at all so I can't suggest any code.:)

But I hope developers and implement/change this.
Thanks for reading.