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

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

Moderator: Moderators

Locked
Message
Author
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

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

#1 Post 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
Image
Image

flashdbest
Plain Yogurt
Plain Yogurt
Posts: 61
Joined: 12 Nov 2012, 09:22
Noob?: Yes

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

#2 Post by flashdbest »

Hi Devs,


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

Thanks!!

iMikeLance
Moderators
Moderators
Posts: 209
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG
Contact:

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

#3 Post by iMikeLance »

Maybe each monster should have it's own relog delay to be set inside mon_control. Again, this is a nice feature.

Kaspy
OpenKore Monk
OpenKore Monk
Posts: 401
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

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

#4 Post by Kaspy »

Implemented!
Sorry for the delay of several years for something so simple and useful
Image

Locked