[Idle/Solved]Macro to stop when slave is not on screen

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

[Idle/Solved]Macro to stop when slave is not on screen

#1 Post by Darki »

So, I've used the wait4party pluging till it stopped working, and I was thinking about making a macro to solve the problem of the master going too far from the slave. I can't even play with Agi UP anymore because the master runs like hell and the slave gets behind. D:

Sadly, the "player" label for automacros doesn't have a negative as far as I know, so I can't put something like "distance not 5". I guess then I gotta use an automacro with an eval. I'm not too good with perl, so how would this eval go?
ImageImageImage
ImageImageImage
ImageImageImage

gamenikko
The Way Of Human
The Way Of Human
Posts: 192
Joined: 16 Aug 2009, 03:47
Noob?: Yes
Location: Gonryun

Re: Macro to stop when slave is not on screen

#2 Post by gamenikko »

Subroutine can do it, i did that, but it turns out to be the same thing without it.
Example, when master detected that the slave is far it will go back, but the same thing happens and happens all over again, the master walks to fast then he comes back.
the best solution for it i guess is to lower the route_step of the master.
Just like old times.

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: Macro to stop when slave is not on screen

#3 Post by Darki »

I don't want the master to go back to the slave, the slave is the one who is supposed to be following. :<

The idea would be just to make the master to stop walking when the slave is further than X squares, then continue walking when slave comes under that distance. Also, there could be a function to make it to stop walking when the slave bot is fighting, or when is casting a skill with a certain cast time. If I remember well, kore detects the time a skill is gong to take to be casted, so instead of making an annoying list of skills, you could make a cast time limit, and if the skill is going to cast for more than that, the master will wait.

to avoid macro spam, there could be a macro, or set of macros, that would do the movement stop command, and another macro/set that would put it back to movement.
ImageImageImage
ImageImageImage
ImageImageImage

gamenikko
The Way Of Human
The Way Of Human
Posts: 192
Joined: 16 Aug 2009, 03:47
Noob?: Yes
Location: Gonryun

Re: Macro to stop when slave is not on screen

#4 Post by gamenikko »

I see, you can try to you this,
it will trigger whenever the "slavename" is beyond clientsight.

Code: Select all

sub slaveCheck {

   foreach (@{$playersList->getItems()}) {
      if ($_->{name} eq SlaveName) { #edit the slavename
         return 1;
      } 
   }
}

automacro slaveNotAround {
	eval main::slaveCheck != 1
	timeout 3
	call {
	xxxxx
	}
}


Just like old times.

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: Macro to stop when slave is not on screen

#5 Post by Darki »

the problem of using client sight instead of a lower distance (i.e. 7 squares) would be that your bot would still lose the slave sometimes, even for a little time. Some features, like WhenStatusInactive would get resetted, and that for some buffs like Kyrie Eleison would mean to be recasting all the time.

But with that foreach you wrote I got more or less the idea, if you get the slave position too, then you can calculate the distance between the bots.
ImageImageImage
ImageImageImage
ImageImageImage

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Macro to stop when slave is not on screen

#6 Post by EternalHarvest »

gamenikko wrote:

Code: Select all

if ($_->{name} eq SlaveName) {
Quote all strings in Perl.

Post Reply