Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.
Moderator: Moderators
-
toro88
- Noob

- Posts: 15
- Joined: 12 Jul 2008, 05:19
- Noob?: No
#1
Post
by toro88 »
Version 2.1
in config
Code: Select all
mercenary_healAuto 1
mercenary_hp 70
src\AI\CoreLogic.pm
copy
and paste in under
processAutoShopOpen();
Code: Select all
processAutoEquip();
processAutoAttack();
processItemsTake();
processItemsAutoGather();
processItemsGather();
processAutoTeleport();
processAllowedMaps();
processAutoResponse();
processAvoid();
processSendEmotion();
processAutoShopOpen();
goto CoreLogic.pm lastline before 1;
paste this
Code: Select all
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);
}
}
}
-
kLabMouse
- Administrator

- Posts: 1301
- Joined: 24 Apr 2008, 12:02
#2
Post
by kLabMouse »
Nice! But Some AutoVivifications may happen. And that's no good.
For Example here:
and Here:
Code: Select all
$slavesList->get($char->{mercenary}->{'binID'});
There is no validation whatever thus hash mambers exist.
-
Technology
- Super Moderators

- Posts: 801
- Joined: 06 May 2008, 12:47
- Noob?: No
#3
Post
by Technology »
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!
-
Technology
- Super Moderators

- Posts: 801
- Joined: 06 May 2008, 12:47
- Noob?: No
#4
Post
by Technology »
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!
-
kLabMouse
- Administrator

- Posts: 1301
- Joined: 24 Apr 2008, 12:02
#5
Post
by kLabMouse »
Well it has to be supported suing PartySkill.
But, the auto Healing is Better. Shell we add support for this "Auto" feature?
-
EternalHarvest
- Developers

- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
#6
Post
by EternalHarvest »
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.)