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
}
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