Openkore.com

OpenKore Forums
It is currently 25 Feb 2017, 07:19

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Warp to saveMap even when storageAuto_useChatCommand
PostPosted: 01 Apr 2013, 04:19 
Offline
Been there done that!
Been there done that!
User avatar

Joined: 09 Oct 2009, 01:43
Posts: 134
I noticed that when the "storageAuto_useChatCommand" is set, the bot will not warp to save map even when "saveMap_warpToBuyOrSell" is set to 1. This is a problem when Kore is in a highly aggressive map. Kore will do autostorage even when there are already monsters attacking it. The few codes I added will (hopefully) fix that issue. Kore will warp to the save map first before performing autostorage.

In CoreLogic.pm

Code:
elsif (AI::action eq "storageAuto" && timeOut($timeout{'ai_storageAuto'})) {
      # Main autostorage block
      my $args = AI::args;

      my $do_route;
#I added an additional check here (|| ($config{storageAuto_useChatCommand} && $config{'saveMap_warpToBuyOrSell'}))
      if (!$config{storageAuto_useChatCommand} || ($config{storageAuto_useChatCommand} && $config{'saveMap_warpToBuyOrSell'}) ) {
         # Stop if the specified NPC is invalid
         $args->{npc} = {};
         getNPCInfo($config{'storageAuto_npc'}, $args->{npc});
         if (!defined($args->{npc}{ok})) {
            $args->{done} = 1;
            return;
         }
         if (!AI::args->{distance}) {
            # Calculate variable or fixed (old) distance
            if ($config{'storageAuto_minDistance'} && $config{'storageAuto_maxDistance'}) {
               AI::args->{distance} = $config{'storageAuto_minDistance'} + round(rand($config{'storageAuto_maxDistance'} - $config{'storageAuto_minDistance'}));
            } else {
               AI::args->{distance} = $config{'storageAuto_distance'};
            }
         }


I already tested it but it is not working most of the time. I am not sure though if it will make a conflict with other functions. I don't know if this will make sense to others but I find this useful. Hope it can be improved so I won't have to edit it manually every time I download a new version.


Top
 Profile  
 
 Post subject: Re: Warp to saveMap even when storageAuto_useChatCommand
PostPosted: 01 Apr 2013, 22:20 
Offline
OpenKore Monk
OpenKore Monk

Joined: 08 Jun 2012, 15:42
Posts: 401
Location: Brazil
Dark Airnel wrote:
I already tested it but it is not working most of the time. I am not sure though if it will make a conflict with other functions.

Could you describe in more detail the problem?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Warp to saveMap even when storageAuto_useChatCommand
PostPosted: 02 Apr 2013, 09:44 
Offline
Been there done that!
Been there done that!
User avatar

Joined: 09 Oct 2009, 01:43
Posts: 134
There is really no problem. This is just a suggestion.

In the current storageAuto process, the bot will warp to the save point if the option "saveMap_warpToBuyOrSell" is set to 1. However, when the "storageAuto_useChatCommand" is set, (@storage - private server command to open storage w/o talking to kafra), the bot will do the autostorage on the current map which will make the bot prone to attacks specially when in a map with highly aggressive monsters. What I would like to suggest is to make an option for Kore to warp to the save map first before doing the autostorage using the command "@storage". This could prevent the bot from dying.


Top
 Profile  
 
 Post subject: Re: Warp to saveMap even when storageAuto_useChatCommand
PostPosted: 02 Apr 2013, 15:34 
Offline
OpenKore Monk
OpenKore Monk

Joined: 08 Jun 2012, 15:42
Posts: 401
Location: Brazil
In short, before using the @storange, use @warp 0 or what the user configure?
Another solution would be to just use the @storange case has not agressive.


Sorry for my bad English.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Warp to saveMap even when storageAuto_useChatCommand
PostPosted: 05 Apr 2013, 01:21 
Offline
Been there done that!
Been there done that!
User avatar

Joined: 09 Oct 2009, 01:43
Posts: 134
Yeah that is correct.

Doing the autostorage process while there are no aggressive monsters is also okay although there will still be a possibility that the bot can get mobbed while doing it specially on high re-spawn maps.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group