[Ask]can kore make a timeout on sent packet (Actor::move) ??

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

[Ask]can kore make a timeout on sent packet (Actor::move) ??

#1 Post by rocknroll »

hello, i have a problem with the server which if the kore is moving, they surely spamm a packet move to server. a normally in other server it's not a problem, but my server took too long to response the requesting packet (to much botter), so the kore looks like lag.

so the question is, can i make a timeout on it??
maybe 2 sec once send the packet. how to edit/make it??

in timeouts.txt only ai_move_retry and ai_move_giveup related with the movement.

i want to make timeout on it, like an ai_attack in timeouts.txt

sorry for my bad english :mrgreen:
Last edited by rocknroll on 29 Oct 2012, 10:18, edited 1 time in total.
Sorry, my english is very bad !

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

#2 Post by EternalHarvest »

Code: Select all

	$self->{retry}{timeout} = $args{retryTime} || 0.5;
	$self->{giveup}{timeout} = $args{giveupTime} || $timeout{ai_move_giveup}{timeout} || 3;
ai_move_retry is unused in Task::Move for some reason, probably should be used just like ai_move_giveup here. Was unused in old movement AI, too.

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

#3 Post by rocknroll »

not ai_move_giveup, but to put a delay packet when moving, how to do that??

*sory i'm noob on perl :(
Sorry, my english is very bad !

xxstreme
Human
Human
Posts: 20
Joined: 03 Dec 2008, 15:46
Noob?: Yes

Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

#4 Post by xxstreme »

this problem was happen in server with large amount of player, in my playing server was 15000 player, and this was always happen with map full of bot,

i took a look at move source at src task folder, i think the problem was at send move packet, kore send move packet after checking timeout, not at the beginning of process move was called, when try to increase timeout ai_move_retry to 10, kore will wait that timeout before move, kore should be move once at begining before checking timeout of actor position whether actor still at same position.

and should have an delay between each send packet, when move packet and two or more packet send within rapid period, actor will not moving, and cause server will not response any send packet after a certain delay, likes a lag, any packet such public chat or group chat, npc talk etc.

add: in src/task/move.pl
at sub iterate

Code: Select all

	} elsif (timeOut($self->{retry})) {
		debug "Move $self->{actor} - (re)trying\n", "move";
		$self->{actor}->sendMove(@{$self}{qw(x y)});
		$self->{retry}{time} = time;
	}
the syntax was check for retry time first before send packet, if one move packet was send and server is lag, another will be send, this may cause for server not respond any send packet after second packet. and actor will move back and forth like bodyrelo.

i think, once send move packet, check current position, if not at begin position and not from goal position, kore must wait for a certain time, because if kore send any more packet, the server will take long time to response future packet.

in retry move, syntax just check current position, actor still at previous position or not,
i just know a little of this problem, and this happens at me too, but i still can't fix this

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: [Ask]can kore make a timeout on sent packet (Actor::move) ??

#5 Post by EternalHarvest »

Doesn't it already stop trying to move if you have started movement?

Code: Select all

	# Stop if we've moved.
	} elsif ($self->{actor}{time_move} > $self->{start_time}) {
		debug "Move $self->{actor} - done\n", "move";

Locked