Openkore.com

OpenKore Forums
It is currently 01 Sep 2014, 03:41

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Support Healing Mercenary when hp low than what %
PostPosted: 07 Dec 2009, 10:56 
Offline
Noob
Noob

Joined: 12 Jul 2008, 05:19
Posts: 15
Version 2.1

in config
Code:
mercenary_healAuto 1
mercenary_hp 70


src\AI\CoreLogic.pm



copy
Code:
proccessslaveHealing();
and paste in under processAutoShopOpen();
Code:
   processAutoEquip();
   processAutoAttack();
   processItemsTake();
   processItemsAutoGather();
   processItemsGather();
   processAutoTeleport();
   processAllowedMaps();
   processAutoResponse();
   processAvoid();
   processSendEmotion();
   processAutoShopOpen();



goto CoreLogic.pm lastline before 1;
paste this

Code:
sub proccessslaveHealing {
         if ($config{mercenary_healAuto} && $char->{skills}{AL_HEAL}{lv} > 0) {
         if ($char->{mercenary}->{hpPercent} < $config{mercenary_hp}) {         
         my $target = $slavesList->get($char->{mercenary}->{'binID'});
   my $actorList = $slavesList;
   my $skill = new Skill(auto => 28, level => 10);

   require Task::UseSkill;
   my $skillTask = new Task::UseSkill(
      target => $target,
      actorList => $actorList,
      skill => $skill,
      priority => Task::USER_PRIORITY
   );
   my $task = new Task::ErrorReport(task => $skillTask);
   $taskManager->add($task);   
               }
            }      
}
   


Top
 Profile  
 
 Post subject: Re: Support Healing Mercenary when hp low than what %
PostPosted: 07 Dec 2009, 13:20 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1290
Nice! But Some AutoVivifications may happen. And that's no good.

For Example here:
Code:
$char->{skills}{AL_HEAL}{lv} > 0)


and Here:
Code:
$slavesList->get($char->{mercenary}->{'binID'});


There is no validation whatever thus hash mambers exist.

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: Support Healing Mercenary when hp low than what %
PostPosted: 07 Dec 2009, 17:43 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
Isn't healing a merc already supported by partySkill? :?

_________________
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!


Top
 Profile  
 
 Post subject: Re: Support Healing Mercenary when hp low than what %
PostPosted: 28 Dec 2009, 09:17 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
Can someone confirm if this is already supported trough partySkill?

_________________
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!


Top
 Profile  
 
 Post subject: Re: Support Healing Mercenary when hp low than what %
PostPosted: 28 Dec 2009, 09:32 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1290
Well it has to be supported suing PartySkill.
But, the auto Healing is Better. Shell we add support for this "Auto" feature?

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: Support Healing Mercenary when hp low than what %
PostPosted: 28 Dec 2009, 10:44 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1818
kLabMouse wrote:
Well it has to be supported suing PartySkill.
But, the auto Healing is Better. Shell we add support for this "Auto" feature?

Then add self_healAuto, party_healAuto, etc... But why, if partySkill works?

(Also, somebody can heal mercs not via heal skill, but via merc potions.)


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


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
[ Time : 0.047s | 17 Queries | GZIP : On ]