Move to location and sit to recover (Ai Manual Fail?)

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

Moderator: Moderators

Message
Author
krishna123
Noob
Noob
Posts: 10
Joined: 17 Jul 2017, 04:01
Noob?: Yes

Move to location and sit to recover (Ai Manual Fail?)

#1 Post by krishna123 »

Hey guys,

I'm trying to create a combination of simple automacros to make my bot move to a specific location to sit and recover hp. For example if the bot is in toy factory 2 and it's hp drops below 30%, it should move to toy factory 1, sit down till it's hp is over 60%, stand up and continue with leveling in toy factory 2. I disable the sit to recover in the config file by setting sitAuto_hp_lower and sitAuto_hp_upper both to 100. I also disabled the autoMoveOnDeath. In my code I added a macro to sit in a specific spot in Aldebaran to recover hp.

Code: Select all

automacro sitToRecoverInToyFactory1 {
	hp < 30%
	map xmas_dun02
	status not Sitting
	call {
		do ai manual
		do move xmas_dun01
		do sit
		do ai on
	}
	timeout 30
}

automacro sitToRecoverInAlde {
	hp < 60%
	map aldebaran
	status not Sitting
	call {
		do ai manual
		do move aldebaran 153 114
		do sit
		do ai on
	}
	timeout 30
}

automacro standAfterRecover {
	hp > 60%
	status Sitting
	call {
		do stand
	}
	timeout 30
}
Now to my problems: First of all, everything works fine with the script as long as the bot doesn't die. I had to add the "do ai manual" to prevent the bot from attacking mobs while moving to toy factory 1. (Quick Question: Is there another way to deactivate attacking via automacro?).
But here comes the problem with this: When my bot dies while moving to toy factory 1 (because it got attacked by a cruiser or stormy or whatever), it doesn't respawn most of the time. I guess the problem is, that do ai manual doesn't get revoked by do ai on, because the bot never reached toy factory 1 and sat down. This results in some other weird behaivors, because sometimes my bot does respawn, but then sits in aldebaran and does nothing at the spawn point. Or it does start the sitToRecoverInAlde macro, but doesn't walk back to lockmap xmas_dun02 after it stands up.

So maybe I need something else instead of do ai manual, to keep the bot from attacking while walking to toy factory 1. Or maybe I need a backup macro that checks if the bot did die and the ai is still on manual, to set it back to ai on.

Please let me know if you have any suggestions for my problem here :)

thank you and regards,

Krishna

leozhai
Plain Yogurt
Plain Yogurt
Posts: 71
Joined: 16 Jun 2008, 08:41
Noob?: Yes

Re: Move to location and sit to recover (Ai Manual Fail?)

#2 Post by leozhai »

In macros commands line add
do conf attackauto 0
After that everything
do conf attackauto 2

Just sample , maybe some spelling error

Post Reply