Openkore.com

OpenKore Forums
It is currently 23 Jun 2018, 04:18

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Bots to move to priest for buffs when skill is inactive.
PostPosted: 01 Aug 2017, 20:26 
Offline
Noob
Noob

Joined: 21 Jul 2017, 12:02
Posts: 17
So the priest will be in a party and be planted in a stationery spot in a given map.
I want the other party members to move to the priest for buffs when statusInactive.

Any idea how to do it? I've tried researching about it but to no avail. Please help.


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 02 Aug 2017, 00:34 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Two macro/automacro blocks that set/unset lockMap_x/lockMap_y depending on the currently active/inactive status

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 02 Aug 2017, 18:10 
Offline
Noob
Noob

Joined: 21 Jul 2017, 12:02
Posts: 17
hakore wrote:
Two macro/automacro blocks that set/unset lockMap_x/lockMap_y depending on the currently active/inactive status


I've tried draft coding, can you see it for me and correct the mistakes? :(

Code:
automacro buff
{
   location mapname
   run-once 1
   if ($.status!=blessing || $.status!=agi)
   {
      log Buffs inactive, moving to priest. # print msg in console
      do move 100 100 # move to stationery priest coordinates
   }
   if ($.status==blessing && $.status==agi)
   {
      log I have Blessing & Agi on me.
      release buff
   }
   exclusive 1
}


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 02 Aug 2017, 22:47 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Nice try on your macro. The logic is there, but the syntax is shouting "Oh shit!"

Also, issuing a move command may not be the best solution as this may conflict with other AI routines along the way. So like I said, setting lockMap_x and _y will force the bot to move on its own to that spot as intended.

Maybe others can help you build your macro correctly.

BTW, the doCommand block will fairly do well for this purpose.

Code:
## This assumes there are only two doCommand blocks in your config.txt

doCommand conf lockMap_x 100;;conf lockMap_y 100;;conf doCommand_0_disabled 1;;conf doCommand_1_disabled 0 {
   inLockOnly 1
   whenStatusInactive Blessing, Increase AGI
   disabled 0
   timeout 10
}

doCommand conf lockMap_x none;;conf lockMap_y none;;conf doCommand_0_disabled 0;;conf doCommand_1_disabled 1 {
   inLockOnly 1
   whenStatusActive Blessing, Increase AGI
   disabled 0
   timeout 10
}


You can also set lockMap_randX and Y if you wish so you won't easily be pranked by warpers.

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 03 Aug 2017, 06:21 
Offline
Noob
Noob

Joined: 21 Jul 2017, 12:02
Posts: 17
Uhh I've tried with your codes but the error keeps popping up

Code:
Unknown command 'lockMap_x'. Please read the documentation for a list of commands.
http://openkore.com/index.php/Category:Console_Command


Have any idea? I pasted it in config.txt. No macros.

Seems like the "doCommand conf" is a wrong syntax?


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 03 Aug 2017, 06:42 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
A quick review, there should be no space after the double semi-colons. My bad.

Code:
doCommand conf lockMap_x 100;;conf lockMap_y 100;;etc...


Please try this.

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 03 Aug 2017, 07:51 
Offline
Noob
Noob

Joined: 21 Jul 2017, 12:02
Posts: 17
Alright no errors this time but this came up.

Code:
Invalid coordinates specified for lockMap, coordinates are unwalkable
Invalid coordinates specified for randomWalk (coordinates are unwalkable); randomWalk disabled


I then added route_randomWalk 0 & 1 to the given codes to make it move.

However this still comes up,
Code:
Config 'lockMap_x' is already *None*
Config 'lockMap_y' is already *None*


thus making it not move again.


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 03 Aug 2017, 09:47 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Of course you need to change 100, 100 to the correct coordinates. Is it even walkable to begin with? If it is, then _randX/Y should be set so that it only covers walkable tiles. Experiment with different values.

You should reset routeRandomWalk to 1 again since openkore disabled it for you when you specified lockMap_randX/Y that covers unwalkable tiles.

If you also notice, I wrote it assumes there are exactly two doCommand blocks in your whole config.txt

If you're not sure, manually type conf doCommand_0 up to _5 so you'll see you're disabling the correct one. The basic idea is if one triggers, it should disable itself and enable the other, so the "config is already" notice should never appear.

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 03 Aug 2017, 10:22 
Offline
Noob
Noob

Joined: 21 Jul 2017, 12:02
Posts: 17
It seems quite buggy, sometimes it moves to the coordinates when it doesn't have bless or agi, and sometimes it just continues with attacking mobs.

And when it does reach the correct coordinates and gets the buffs, it still continues sitting there without doing anything.

Code:
doCommand conf lockMap_x 364;;conf lockMap_y 220;;conf doCommand_0_disabled 1;;conf doCommand_1_disabled 0 {
   inLockOnly 1
   whenStatusInactive Blessing, Increase AGI
   attackAuto 0
   disabled 0
   timeout 10
}

doCommand conf lockMap_x none;;conf lockMap_y none;;conf doCommand_0_disabled 0;;conf doCommand_1_disabled 1 {
   inLockOnly 1
   whenStatusActive Blessing, Increase AGI
   attackAuto 2
   route_randomWalk 1
   disabled 0
   timeout 10
}


Am I doing something wrong here?


Top
 Profile  
 
 Post subject: Re: Bots to move to priest for buffs when skill is inactive.
PostPosted: 03 Aug 2017, 10:32 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Code:
doCommand conf lockMap_x 364;;conf lockMap_y 220;;conf attackAuto 0;;conf route_randomWalk 0;;conf doCommand_0_disabled 1;;conf doCommand_1_disabled 0 {
   inLockOnly 1
   whenStatusInactive Blessing, Increase AGI
   disabled 0
   timeout 10
}

doCommand conf lockMap_x none;;conf lockMap_y none;;conf attackAuto 2;;conf route_randomWalk 1;;conf doCommand_0_disabled 0;;conf doCommand_1_disabled 1 {
   inLockOnly 1
   whenStatusActive Blessing, Increase AGI
   disabled 0
   timeout 10
}

_________________
Whatever...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group