Page 4 of 4

Re: Tension Relax. . .

Posted: 14 Nov 2010, 04:19
by anti-pyretic
ultragun wrote:take note this is for the plugin.

first add this to your config.txt

Code: Select all

sitAuto_tensionRelax 1
then copy the code:

Code: Select all

package tensionRelax;

use strict;
use Time::HiRes qw(time);
use Globals;
use Plugins;
use Log qw(debug message warning error);
use Utils;
use Commands;
use Network;
use Network::Send;
Plugins::register('tensionRelax', 'Tension Relax', \&onUnload, \&onReload);
my $hookAIpre = Plugins::addHook('AI_pre', \&onAIpre);
my $tensionRelax_timeout;

sub onUnload {
   Plugins::delHook('AI_pre', $hookAIpre);
}

sub onReload {
   &onUnload;
}

sub onAIpre {
   return if (!$char->{skills}{LK_TENSIONRELAX} || $char->{skills}{LK_TENSIONRELAX}{lv} < 1);
   
   if ($config{sitAuto_tensionRelax} && AI::action eq "sitAuto" && $char->hp_percent < 100
    && $char->{sp} > 15 && !$char->statusActive("Tension Relax") && !$char->statusActive("Silenced")
    && main::timeOut($tensionRelax_timeout, 5)) {
      Commands::stand() if $char->{sitting};
      $messageSender->sendSkillUse(358, $char->{skills}{LK_TENSIONRELAX}{lv}, $accountID);
      $tensionRelax_timeout = time;
   }
}

1;
save it as tensionrelax.pl and put it in your plugins folder.

if you don't know how to use plugins, please read here:
http://forums.openkore.com/viewtopic.php?f=34&t=58
thank you very much. :D just made it work. and also the link about the plug-ins is really helpful

Re: Tension Relax. . .

Posted: 14 Nov 2010, 07:37
by brocken_08
yes it is working but sometime's it only just sit and stand after being hit by agrre mobs. . .

Re: Tension Relax. . .

Posted: 14 Nov 2010, 08:36
by ultragun
brocken_08 wrote:yes it is working but sometime's it only just sit and stand after being hit by agrre mobs. . .
yes i does that sometimes. i really have no clue why.

Re: Tension Relax. . .

Posted: 15 Nov 2010, 05:15
by brocken_08
package tensionRelax;

use strict;
use Time::HiRes qw(time);
use Globals;
use Plugins;
use Log qw(debug message warning error);
use Utils;
use Commands;
use Network;
use Network::Send;
Plugins::register('tensionRelax', 'Tension Relax', \&onUnload, \&onReload);
my $hookAIpre = Plugins::addHook('AI_pre', \&onAIpre);
my $tensionRelax_timeout;

sub onUnload {
Plugins::delHook('AI_pre', $hookAIpre);
}

sub onReload {
&onUnload;
}

sub onAIpre {
return if (!$char->{skills}{LK_TENSIONRELAX} || $char->{skills}{LK_TENSIONRELAX}{lv} < 1);

if ($config{sitAuto_tensionRelax} && AI::action eq "sitAuto" && $char->hp_percent < 100
&& $char->{sp} > 5 && !$char->statusActive("Tension Relax") && !$char->statusActive("Silenced")
&& main::timeOut($tensionRelax_timeout, 5)) { ---------------------------> main::timeOut($tensionRelax_timeout, 1)
Commands::stand() if $char->{sitting}; ---------------------------------> Commands::run('stand') if $char->{sitting}
$messageSender->sendSkillUse(358, $char->{skills}{LK_TENSIONRELAX}{lv}, $accountID);
$tensionRelax_timeout = time;
}
}

1;



i have tried this one and still the same . . .
sometime's it'll sit and stand over and over again after being hit by agrre mobs :P

Re: Tension Relax. . .

Posted: 15 Nov 2010, 14:21
by ultragun

Code: Select all

Commands::stand() if $char->{sitting};
i tried deleting this line. will watch if anything happens.

edit-
most of the time tension relax will kick in. it will not do the sit/stand forever, it will just sit w/out tension relax.

Re: Tension Relax. . .

Posted: 09 Nov 2013, 20:17
by gential
brocken_08 wrote:it didn't work : (
you dont need fancy macro for tension relax. if your not really good in creating macros hope this helps.

sitAuto_hp_lower 40%
sitAuto_hp_upper 100

useSelf_skill Relax {
lvl 10
maxCastTime 0
minCastTime 0
hp <= 50%
sp
homunculus_hp
homunculus_sp
homunculus_dead
onAction
whenStatusActive
whenStatusInactive
whenFollowing
spirit
amuletType
aggressives 0
monsters
notMonsters
monstersCount
stopWhenHit 0
inLockOnly 0
notWhileSitting 1
notInTown 0
timeout 5
disabled 0
inInventory
manualAI 0
}

this is mine and its working for me
- first your auto sit shoul always be lower than your relax skillslot triger.
- it will sit when hp is below or equal to 50% but will just normally sit at 40% or you can lower it if you want relax so badly
- second you need to set your aggressives to 0 so he will use relax when no monster is attacking him. if hes engage then the kore will not use the skill slot.
- inlockonly is just a preference weather you want it to use anywhere or just in the lockmap
- of course notwhilesitting so it will not spam the skill continually.
-then timeouts just in case. if you get what i mean
-or equal your autotele when HP is? with your skills so that if monster bothers you with relaxing it will just teleported.
Image

Re: Tension Relax. . .

Posted: 06 Sep 2016, 19:52
by Astoria
For future LKs wondering how to use Relax on Chaos renewal - unless you're trying to do something above and beyond you don't need a macro at all. There is an option for relax. Just change it to 1 and your bot will use relax as the default sit when healing.

I've copied my config for sitting. No macro - no extra conditional statements. Simple and no bloat.

Code: Select all

sitAuto_hp_lower 20
sitAuto_hp_upper 100
sitAuto_sp_lower 0
sitAuto_sp_upper 0
sitAuto_follow 0
sitAuto_over_50 0
sitAuto_idle 1
sitAuto_look
sitAuto_look_from_wall
sitTensionRelax 1