genbot.mac Generic Bot macro for any class. V9.3 with ini

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

vaelin
orc pawn
orc pawn
Posts: 21
Joined: Fri Dec 19, 2003 8:52 pm

Some fixes...

Post by vaelin » Sat Jan 03, 2004 12:13 am

In bothealer.inc...

The ResetWatchTargets had a message sent without quotes, generating an odd message, fix is below...

Code: Select all

Sub ResetWatchTargets 
   /declare counter local 
   /for counter 1 to @WatchTargetCount 
   /target PC @WatchTargets(@counter) 
   /delay 25 
   /if $target(name)==@WatchTargets(@counter) { 
      /varset WatchTargetIDs(@counter) $target(id) 
   } else { 
      /call ChatOut 5 @MasterName "I failed to target @WatchTargets(@counter)."
   } 
/return 
In botcore.inc, a silly spelling mistake that's been bugging me: ("Stoping.")

Code: Select all

Sub Do-stop 
   /dismount 
   /varset Supportstatus 0 
   /varset BreakOut 1 
   /varset LootTooFar 1 
   /varset Fail 1 
   /call ChatOut 5 @MasterName "Stopping." 
   /sendkey up up 
   /press d 
   /press d 
   /target clear 
   /press right 
/return 

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Sat Jan 03, 2004 3:12 am

if we wanted to put the autoblas into the v9 with yalp how would it look?


old auto blast

Code: Select all

Sub PersonalMain 
   /if n @ReportLom==1 /call CheckMana 
   /if n @AutoBehind==1 { 
      /if n @Combatstatus==1 { 
         /if $target()==TRUE { 
            /if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>6 { 
               /call Do-behind 
            } 
         } 
      } 
   } 
   /if n @Supportstatus==1 { 
      /if "$target(name,clean)"=="@FollowTarget" { 
         /varset Supportstatus 0 
         /return 
      } 
      /if n @AutoBlast==1 { 
         /if "$target()"=="TRUE" { 
            /if n $target(hp,pct)<=@BlastPct { 
               /call ChatOut 5 @MasterName "Blasting %t. with @BlastSpell." 
               /call SpellSub "@BlastSpell" 
            } 
         } 
      } 
   }        
/return
current main with yalp/ canni

Code: Select all

Sub PersonalMain 
   /if n @ReportLom==1 { 
   /call CheckMana 
   /if n @IsCleric==1 /call CheckYaulp 
   /if n @IsShaman==1 /call CheckCann 
   } 
   /if n @Performing==1 /call Singalong 
   /if n @AutoBehind==1 { 
      /if n @Combatstatus==1 { 
         /if $target()==TRUE { 
            /if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>6 { 
               /call Do-behind 
            } 
         } 
      } 
   } 
   /if n @DoIncite==1 { 
      /if n @Combatstatus==1 { 
         /if $target()==TRUE { 
            /if @InciteTimer<=1 { 
         /disc incite 
         /varset InciteTimer 35s 
      } 
         } 
      } 
   } 
/return 


would it look like

Code: Select all

Sub PersonalMain 
   /if n @ReportLom==1 
   /call CheckMana{ 
   /if n @IsCleric==1 /call CheckYaulp 
   /if n @IsShaman==1 /call CheckCann 
   } 
   /if n @Performing==1 /call Singalong 
   /if n @AutoBehind==1 { 
   /if n @Combatstatus==1 { 
         /if $target()==TRUE { 
            /if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>6 { 
               /call Do-behind 
            } 
         } 
      } 
   } 
    /if n @AutoBlast==1 { 
         /if "$target()"=="TRUE" { 
            /if n $target(hp,pct)<=@BlastPct { 
               /call ChatOut 5 @MasterName "Blasting %t. with @BlastSpell." 
               /call SpellSub "@BlastSpell"


    /if n @DoIncite==1 { 
      /if n @Combatstatus==1 { 
         /if $target()==TRUE { 
            /if @InciteTimer<=1 { 
         /disc incite 
         /varset InciteTimer 35s 
      } 
         } 
      } 
   } 


/return 

fatmike
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sat Dec 27, 2003 12:42 pm

couldnt open file

Post by fatmike » Sat Jan 03, 2004 9:55 am

ok, i saved everything to the folder as directed, then when i /mac genbot (Mastername) i get in red "Couldnt open macro file: ( path to file, which is correct)"

obviously im doing something wrong, but i cant figure out what, i can run other macros on this machine with no problems

fatmike
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sat Dec 27, 2003 12:42 pm

something else weird

Post by fatmike » Sat Jan 03, 2004 10:00 am

ok, just found out somthing else.

in my release directory, all the other macros i run have a differnt icon, so i figured maybe semething is messed up with the prg i saved.

i tried to open up all the other macros, which work, but they give me an error saying cannot open etc.

can anyone tell me how i can open one mac but the game cant, then i cant open the macs that the game can?

i know im a retard, but any help would be appreciated.

Otterboyy
decaying skeleton
decaying skeleton
Posts: 9
Joined: Fri Nov 14, 2003 11:21 am

Post by Otterboyy » Sat Jan 03, 2004 10:56 am

just off the top of my head, it sounds like you might have a file extension issue.

go to dos and check the name of the file from there.

chances are the file that has the different icon that the rest of the macros has a .txt extension.

fatmike
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sat Dec 27, 2003 12:42 pm

solved the mystery

Post by fatmike » Sat Jan 03, 2004 11:39 am

thanks for the tip. the problem was that i had caps lock on , so the name of the file apparently was "GENBOT.MAC.txt" didnt know that was possible.

fatmike
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sat Dec 27, 2003 12:42 pm

still cant get this to work

Post by fatmike » Sat Jan 03, 2004 2:39 pm

ok, i have 3 comps, on 2 of em it works fine, but on the other, i finally got the genbot saved correctly, but now when i run it, i get an error saying cannot open include file botcore.inc.

all i did was copy and paste and save it as "botcore.inc", which worked fine on my other copms, but this one comp still is giving me problems, any ideas?

Achy Wrists
a lesser mummy
a lesser mummy
Posts: 36
Joined: Wed Aug 27, 2003 4:17 pm

Post by Achy Wrists » Sat Jan 03, 2004 10:22 pm

In the following code:

Code: Select all

Sub ResetWatchTargets 
   /declare counter local 
   /for counter 1 to @WatchTargetCount 
   /target PC @WatchTargets(@counter) 
   /delay 25 
   /if $target(name)==@WatchTargets(@counter) { 
      /varset WatchTargetIDs(@counter) $target(id) 
   } else { 
      /call ChatOut 5 @MasterName "I failed to target @WatchTargets(@counter)." 
   } 
/return 
Don't you need a "/next counter"?

Also, how would i check buffs to see if my bot has haste and to cast item haste every 6 seconds while fighting if he doesn't?

Zacaria
orc pawn
orc pawn
Posts: 19
Joined: Wed Dec 03, 2003 5:47 pm

Post by Zacaria » Sun Jan 04, 2004 11:38 am

good call, was wondering why that didnt work :)

2boxingFiend
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Dec 16, 2003 11:39 am

genbot v9 ferine avatar buff cycle

Post by 2boxingFiend » Tue Jan 06, 2004 3:35 pm

i was thinking about adding this add on to personal but don't know which loop to add this into.

in personal.inc added

/declare FACycleCount global
/declare FACycleDur timer
/declare FACycleTarget global
/declare FACycleTargetID global

Sub Do-fa
/if $defined(Param1)==FALSE (
/return
}
/if @Param1="off" {
/varset FACycleCount 0
/return
}
/target @Param1
/delay 25
/if $target()==TRUE {
/varadd FACycleCount 1
/varset FACycleTarget(@FACycleCount) $target(name)
/varset FACycleID(@FACycleCount) $target(id)
} else {
/call ChatOut 3 @MasterName "Who did you want to me to target?"
}
/return

Sub CheckFA
/declare counter local
/for counter 1 to @FACycleCount
/target PC @FACycleTarget(@counter)
/delay 25
/if $target(name)==@FACycleTarget(@counter) {
/if n @FACycleDur>0 {
/call SpellSub Ferine Avatar
}
}
/varset FACycle 9m
/if n @SitAfterCast==1 /varset SitTimer @DelayBeforeSit
/return

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Tue Jan 06, 2004 7:57 pm

Achy Wrists wrote:Also, how would i check buffs to see if my bot has haste and to cast item haste every 6 seconds while fighting if he doesn't?
You could do something to the effect of:

Code: Select all

/if n $char(buff,"@haste")==0 /call cast item "clicky haste item name"
You would have to set up a list of....all....the possible haste spells in an .ini and cycle through this....or include it in a series for each spell... I do not know believe that there is any way to tell if a buff with a specific EFFECT is currently active or not. [char$(buff,xx) where xx = AC, HP, HASTE, etc. - would be nice, but doubt it's possible...unless you have spellsearch...but that's for another forum topic to discuss!]

As for only doing this while in combat, you can check $combat, or just put it in your attack loop so it only gets checked during that routine.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

Spliffeh
orc pawn
orc pawn
Posts: 15
Joined: Wed Jan 07, 2004 4:42 pm

Post by Spliffeh » Wed Jan 07, 2004 5:03 pm

Just a quick note to say thanks to the author(s) of this awesome Macro. It's an excellent contribution. THANKS!

:P

DevlinX
flagrant idiot
Posts: 11
Joined: Fri Nov 28, 2003 2:25 pm

Post by DevlinX » Thu Jan 08, 2004 2:53 am

Really lik this macro, but have been having some problems. It seems to want to do everything twice. I issue a command, lets say "Root", it will stand up do that spell, sit down then stand up again and cast the spell again. Does this with any heal spell i say to cast also, as well as the nuke spell. It also doesnt seem to want to auto heal either. It could be just something I set up wrong, I don't know. I am going to delete the ini file for the bot and try it again to see if I have better results.

User avatar
operat0r
RTFM, then ask again
Posts: 61
Joined: Thu Aug 28, 2003 2:04 am

starts and crashes

Post by operat0r » Thu Jan 08, 2004 4:13 pm

EDIT
Last edited by operat0r on Fri Jan 09, 2004 1:41 am, edited 1 time in total.
with love moron #6895423686

User avatar
operat0r
RTFM, then ask again
Posts: 61
Joined: Thu Aug 28, 2003 2:04 am

events not working at all

Post by operat0r » Thu Jan 08, 2004 5:16 pm

:( I let something attack me and ntohing happends ...

1.mac

EDIT : for evernts to work you have to add /doevents and must be in loops
Last edited by operat0r on Fri Jan 09, 2004 1:40 am, edited 1 time in total.
with love moron #6895423686