genbot.mac - Bot for any class scirpts.

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Revamp

Post by grimjack » Fri Sep 19, 2003 1:00 pm

Major revamp. All includes updated. Added a ton of stuff for healers, spellcasters, and melee. Hoping to add more melee abilities soon. New commands for melee include getbehind, bash, taunt, backstab, slam, and evade. These will toggle weather the bot automaticly does these abilities. You can also set the defaults at the begining of the main macro.

Spellcasting and meming was also revamped as well as some HOT issues. You will need a working /memspell to use the spellmeming and you will need a spellfavorite named default(Your spells you want up 90 percent of the time).

Let me know of any bugs you find and I will try to get them asap.

Expect more updates now that I'm playing again.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

GuardianX99
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 6:31 pm
Contact:

Post by GuardianX99 » Sat Sep 20, 2003 5:26 am

This is in reguards to the "botcombat.ini" I can't seem to find it anywhere. Was this file ment as a "write it yourself" file? Or was it accidentaly left out? One thing I did notice is that you copied "botcore.ini" 2x in your original post. Maybe you ment to copy the combat INI and did a re-paste of the core.

Oh well, thought I'd point that out or whatever. Looks like a great macro, cant wait to test it out!

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

botcombat.inc

Post by grimjack » Sat Sep 20, 2003 12:56 pm

Sorry had double posted botcore.inc. botcombat.inc is up there now.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Sun Sep 21, 2003 1:21 pm

Grimjack,


I have noticed that if the MASTER selects himself and instructs the bot to cast a buff spell on him it will NOT select him and cast it....

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Sun Sep 21, 2003 3:21 pm

RogerWilco wrote:Grimjack,


I have noticed that if the MASTER selects himself and instructs the bot to cast a buff spell on him it will NOT select him and cast it....
The sn command uses assist to get a target. If you assist someone who has himself targetted I think it won't do anything. You have a few options at this point. You can tell the bot to target the master before issuing the sn comand.

/msg botname target targetname
/msg botname sn buffname

Or you can write commands for your buffs that can specify a target.


Template posted earlier in the thread:

This goes in the /varset a(1,#) area in the genbot.mac file. Paste this at the end of that list and change # to the next nuber that is not used. Also be sure to edit command to be the name of the command you want:

Code: Select all

/varset a(1,[color=red]#[/color]) [color=red]command[/color]

Paste this at the bottom of the genbot.mac file and chage "command" to the name of your new command. Replace the "Spell to Cast" with the name of the spell you want the command to cast inside the quotes.

Code: Select all

Sub Do-[color=red]command[/color]
   /if n $strlen("$p1")<=0 {
      /assist $MasterName
      /delay 3
   } else /if n $strlen("$p2")<=0 {
      /target "$p1"
   } else /if n $strlen("$p3")<=0 {
      /target "$p1 $p2"
   } else /if n $strlen("$p4)<=0 {
      /target "$p1 $p2 $p3"
   } else /target "$p1 $p2 $p3 $p4"
   /call SpellSub "[color=red]Spell to Cast[/color]"
/return
example of that template updated for a wizard for casting invisibility:

genbot.mac

Code: Select all

   /varset a(1,37) setdefaultheal
   /varset a(1,38) heal
   /varset a(1,39) togglehot
|||||||||||||||||||||||Personal Commands|||||||||||||||||||||||||||||||||
|||Add commands you want here.
|||Example:
|||   /varset a(1,40) mycommand
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[color=red]/varset a(1,40) invis[/color]
genbot.mac

Code: Select all

|||||||||||||||||||||||Personal Commands|||||||||||||||||||||||||||||||||
|||Add Sub routines for any commands you added here.
|||Example:
|||   Sub do-mycommand
|||      /echo this is my command
|||   /return
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

|||||||||||||||||||||||Personal Commands||||||||||||||||||||||||||||||||| 
[color=red]
Sub do-invis
   /if n $strlen("$p1")<=0 {
      /assist $MasterName
      /delay 3
   } else /if n $strlen("$p2")<=0 {
      /target "$p1"
   } else /if n $strlen("$p3")<=0 {
      /target "$p1 $p2"
   } else /if n $strlen("$p4)<=0 {
      /target "$p1 $p2 $p3"
   } else /target "$p1 $p2 $p3 $p4"
   /call SpellSub "invisibility"
/return[/color]
This would allow you to /tell botname invis <target>.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Sun Sep 21, 2003 6:56 pm

hummm Grimjack...

When I run the new verson I get the following errors

genbot.mac@## (main): /varset Dobackstab

I get the same error for Evade, Slam, Bash, casterhealishot, casterspell...

on a positive note... Taunt works :P

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Sun Sep 21, 2003 10:23 pm

RogerWilco wrote:hummm Grimjack...

When I run the new verson I get the following errors

genbot.mac@## (main): /varset Dobackstab

I get the same error for Evade, Slam, Bash, casterhealishot, casterspell...

on a positive note... Taunt works :P
Maybe I mis-posted somthing. I reposted all 5 files. Make sure you update all of them. genbot.mac, bocore.inc, bothealer.inc, botspell.inc, and botcombat.inc. They should all say v4.1 at the top when you are done.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Mon Sep 22, 2003 11:18 am

Grimjack,

thanks I got it to work.... did not have the updated botcore.inc file...


here is a thought.... what about kick??

want to see what you think... hhummmm it is not working ... any suggections???


in botcombat.inc

/if $Dokick==1 {
/if n $char(ability,"Kick")>0 {
/doability "Kick"

also in botcombat.inc

Sub Do-kick
/if $DoKick==1 {
/tell $MasterName AutoKick is now off
/varset DoKick 0


/return
}
/if $DoKick==0 {
/tell $MasterName AutoKick is now on
/varset DoKick 1
/return
}
/return



in the genbot.mac

/varset DoKick 0

then

/varset a(1,##) kick

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Mon Sep 22, 2003 1:15 pm

You need a #define for DoKick.

In botcore.inc add one.

Adding kick to the bot now.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Mon Sep 22, 2003 3:46 pm

<<<EDITED>>>

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Tue Sep 23, 2003 11:13 pm

Grimjack... on v. 4.1 I ran accross this error .......

Master tells you, 'sn Spiritual Dominion'
Insufficient Mana to cast this spell!
Ending macro: {} pairing ran into anther subroutine
botspell.inc@226 (Event_CastNoMana): /if $v77==1 {
botspell.inc@107 (WaitForStart): :StartLoop
botspell.inc@79 (SpellSub): /call WaitForStart
botspell.inc@127 (Do-sn): /call SpellSub "$p1 $p2"
botcore.inc@76 (Event_Chat): /call Do-$a(1,$v51) $p2
Genbot.mac@159 (Main): /if $v80=="1" /call Do-moveto blah $v79
Cleared the following: Timers Vars Arrays
The current macro has ended.
You told Master, 'Casting Spiritual Dominion on Target'

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Wed Sep 24, 2003 12:53 am

Should now be fixed. Was missing a closing }.

THanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Thu Sep 25, 2003 7:35 am

I have had some people ask for a list of commands and a description of what they do.

Here is the current list of commands. Expect a new update sometime today.

Code: Select all

Core Commands
afk               Make bot set afk.  You can give up to an 8 word message.
accept		Make the bot accept a group invite.
reject		 Make the bot reject a group invite.
invite		 Make the bot invite a person by name or by assisting master.
follow		 Make the bot turn on in game follow on master.  Must be grouped.
stop		  Stop doing everything.  Moving, Casting, Attacking...
moveto		Move to target by name or by assisting master.
sit		    Make the bot sit.
stand		  Make the bot stand.
camp		 Make the bot camp.
duck		  Make the bot toggle duck.
run		   Make the bot toggle run/walk.
say		   Make the bot /say up to 8 words at a time.
tell		     Make the bot /tell up to 8 words at a time. Example /msg botname tell joe how are you.
group		  Make the bot /group up to 8 words at a time.
cmds		  Make the bot /tell the master a list of commands.
target		   Make the bot /target by name.
notarget          Make the bot lose target.
assist		    Make the bot assist the master or by name.
saytarget	  Make the bot /tell the master what it's current target is.
afollow		   Make the bot /assist master and afollow target or follow target by name.
trade              Make bot click trade.
yesres            Make bot click yes on res window
petattack         Make bot send pet to attack
petguard          Make bot tell pet guard here.
petbackoff       Make bot tell pet to back off.
anchor            Set/remove anchor point for bot to return to after combat.

Fix for tankheals, and possible fix for healing shadow knights.
Other minor fixes. 

Combat commands
attack          Bot will target using /assist off of master or target by name and enter combat mode.
noattack	Turn off combat mode.
backstab	Toggle auto backstab.
taunt		Toggle auto taunt.
evade		Toggle auto evade.
slam		Toggle auto slam.
bash		Toggle auto bash.
traps		Toggle auto traps.
kick		Toggle auto kick.
getbehind	Make bot get behind it's current target.

Spell Commands
sn		Make bot cast spell by name. Bot will mem spells if needed.
mana		Make bot report mana to master.
evac		Make bot move close to master and attempt to cast evac.
aftercastsit	Toggle sit after cast.
loadlist	Make bot /memspellset by name.
itemcast	Make bot cast item by name.
lootup           Make bot loot whatever the master has targeted or specifies.

Healer Commands
autoheal	Toggle auto heal.
settankheal	Set heal used to heal tanks.
setcasterheal	Set heal used to heal casters.
setdefaultheal	Set heal used with the heal command.
heal		Heal target by name or using assist off of master.
autohealpets  Turn on/off auto heal for pets.
setpetheal   Set heal used to heal pets

Thanks
GrimJack
Last edited by grimjack on Sun Sep 28, 2003 11:46 pm, edited 3 times in total.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: genbot.mac - Bot for any class scirpts.

Post by grimjack » Thu Sep 25, 2003 12:30 pm

New version: 4.4

Major new commands:

itemcast
lootup

Many minor bug fixes and tweaks.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Thu Sep 25, 2003 9:11 pm

in your next revision Grimjack can you add the petattack command..