Page 1 of 1

relogDelay if monster set to relog (not relog only in 30sec)

Posted: 09 Apr 2009, 09:01
by help_us
find sub processAvoid inside coreLogic.pm

Code: Select all

sub processAvoid {
	##### AVOID GM OR PLAYERS #####
	if (timeOut($timeout{ai_avoidcheck})) {
		avoidGM_near() if ($config{avoidGM_near} && (!$cities_lut{"$field{name}.rsw"} || $config{avoidGM_near_inTown}));
		avoidList_near() if $config{avoidList};
		$timeout{ai_avoidcheck}{time} = time;
	}
	foreach (@monstersID) {
		next unless $_;
		if (mon_control($monsters{$_}{name},$monsters{$_}{nameID})->{teleport_auto} == 3) {
		   warning TF("Disconnecting for 30 secs to avoid %s\n", $monsters{$_}{name});
		   relog(30);
		}
	}
}
change it to :-

Code: Select all

sub processAvoid {
	##### AVOID GM OR PLAYERS #####
	if (timeOut($timeout{ai_avoidcheck})) {
		avoidGM_near() if ($config{avoidGM_near} && (!$cities_lut{"$field{name}.rsw"} || $config{avoidGM_near_inTown}));
		avoidList_near() if $config{avoidList};
		$timeout{ai_avoidcheck}{time} = time;
	}
	foreach (@monstersID) {
		next unless $_;
		if ((mon_control($monsters{$_}{name},$monsters{$_}{nameID})->{teleport_auto} == 3) && exists $config{relogDelay}) {
			warning TF("Disconnecting for %s secs to avoid %s\n", $config{relogDelay}, $monsters{$_}{name});
			relog($config{relogDelay});
		}
		if ((mon_control($monsters{$_}{name},$monsters{$_}{nameID})->{teleport_auto} == 3) && (!exists $config{relogDelay})) {
			warning TF("Disconnecting for 30 secs to avoid %s\n", $monsters{$_}{name});
			relog(30);
		}
	}
}
example :
inside config.txt :-

Code: Select all

relogDelay 300
mon_control.txt :-

Code: Select all

Poring 0 3 0
result:-
Image

Re: relogDelay if monster set to relog (not relog only in 30sec)

Posted: 26 Nov 2012, 17:32
by flashdbest
Hi Devs,


I think this is a very good feature... If possible please add to SVN.

Thanks!!

Re: relogDelay if monster set to relog (not relog only in 30sec)

Posted: 12 Mar 2013, 16:11
by iMikeLance
Maybe each monster should have it's own relog delay to be set inside mon_control. Again, this is a nice feature.

Re: relogDelay if monster set to relog (not relog only in 30sec)

Posted: 12 Mar 2013, 17:30
by Kaspy
Implemented!
Sorry for the delay of several years for something so simple and useful