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:

Post by grimjack » Fri Sep 26, 2003 1:31 am

RogerWilco wrote:in your next revision Grimjack can you add the petattack command..
What all pet commands do you want? I don't play a pet class so I don't know any but attack. For pets I was thinking having the bot /assist the master and sending in the pet. If you want more complex mechanics than that I think I'll leave it up to the person to add that command.

Code: Select all

/varset a(1,#)

Code: Select all

Sub Do-petattack
   /assist $MasterName
   /delay 5
   /pet attack
/return
I'll add this into the next update along with any other commands a pet can be given once I find them.

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

rencro
Custom Builder
Custom Builder
Posts: 56
Joined: Sat Sep 27, 2003 12:39 am

Post by rencro » Sat Sep 27, 2003 12:53 am

In bothealer.inc

/if n $spawn($group($GroupMember),hp,pct)<41 {
/if n $spawn($group($GroupMember),hp,pct)=1 {
/if $spawn($group($GroupMember),class)=="Warrior" /call Tankheal
/if $spawn($group($GroupMember),class)=="Paladin" /call Tankheal
/if $spawn($group($GroupMember),class)=="Shadow Knight" /call Tankheal

Would never call tankheal for me, edited above to >=1 and calls to tankheal works, now problem is I have a Shadow Knight and I get:

"Could not find comparison operator in "shadow"

Ive tried changing "Shadow Knight" to "shadow" "Shadow" "Shadow_Knight" all to no avail, will always skip "tankheal" and moves into "casterheal", even though I am a shadow knight, dunno if it is because of shadow knight consisting of two words or what. BTW, using my Monk, the Tank heal routine works perfectly, ie Big healing soandso.

Rassilon
a lesser mummy
a lesser mummy
Posts: 73
Joined: Thu Sep 04, 2003 6:34 pm

Post by Rassilon » Sat Sep 27, 2003 1:25 am

Is it possible to have it cast a gem slot instead of having to do the memspell section? I use the same spells all the time and only change them for like levi or invis etc..


Thanks,

Rass

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

Post by grimjack » Sat Sep 27, 2003 7:02 am

Rassilon wrote:Is it possible to have it cast a gem slot instead of having to do the memspell section? I use the same spells all the time and only change them for like levi or invis etc..


Thanks,

Rass
It only mems a spell if it's not in a gem. Also if you have a default spell set name it default so that if it does have to mem a spell it remems your default spell set. It checks to see what gem the spell is in, if it's not in a gem it mems the spell. If it is in a gem it casts the spell from that gem.

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 » Sat Sep 27, 2003 7:38 am

rencro wrote:In bothealer.inc

/if n $spawn($group($GroupMember),hp,pct)<41 {
/if n $spawn($group($GroupMember),hp,pct)=1 {
/if $spawn($group($GroupMember),class)=="Warrior" /call Tankheal
/if $spawn($group($GroupMember),class)=="Paladin" /call Tankheal
/if $spawn($group($GroupMember),class)=="Shadow Knight" /call Tankheal

Would never call tankheal for me, edited above to >=1 and calls to tankheal works, now problem is I have a Shadow Knight and I get:

"Could not find comparison operator in "shadow"

Ive tried changing "Shadow Knight" to "shadow" "Shadow" "Shadow_Knight" all to no avail, will always skip "tankheal" and moves into "casterheal", even though I am a shadow knight, dunno if it is because of shadow knight consisting of two words or what. BTW, using my Monk, the Tank heal routine works perfectly, ie Big healing soandso.

This should now be fixed. Let me know if there are any other problems.

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

rencro
Custom Builder
Custom Builder
Posts: 56
Joined: Sat Sep 27, 2003 12:39 am

Post by rencro » Sat Sep 27, 2003 5:34 pm

Thanks grimjack, this is now tankhealing my shadow knight, I still get:

Could not find comparison operator for "shadow"

when it makes its call for the shadow knight, but, I will not look a gifthorse in the mouth. It works :D

Thanks for all your efforts.

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

Post by RogerWilco » Sat Sep 27, 2003 9:36 pm

i was wondering, could you have it set up to heal your pet once your pet's health gets to a certain lvl??

sounds like I am being lazy, and I am, but I am just wondering if it is even doable




I could alway do a /t <bot> sn <Pet heal spell>

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Sun Sep 28, 2003 5:43 am

I thought there was already a pet health command in MQ, but I was wrong. The only way right now you could have it monitor your pets health is to have your pet targeted.

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

New version of botcore.inc and genbot.mac

Post by grimjack » Sun Sep 28, 2003 7:36 am

New version of the botcore.inc file and the genbot.mac file.
Updated list of commands earlier in this thread.
New commands:
trade Click trade on trade box.
yesres Click yes on res box.

May have fixed error with healing SK's. If not I'll continue to look into this. I don't have a healer to test this with.

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

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sun Sep 28, 2003 8:14 am

insanitywiz wrote:I thought there was already a pet health command in MQ, but I was wrong. The only way right now you could have it monitor your pets health is to have your pet targeted.
Not true...

you type /pet health

The pet replies by tells to you with the first line being it's health % and the following lines (if any) of what buffs the pet has.

You could probably parse the health % from these tells with an event fairly easily.

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Sun Sep 28, 2003 9:00 am

True in a way, though I was reffering more towards MQ being able to read your pets health directly. Since your pet's health is reported on your UI, it shouldn't be any harder to find it then it is to find the health of your party members, and get the information directly from the client rather then relying on events to parse a continuous flow of tells from the pet to you. Which in my opinion would require an inordinant amount of spam to keep an accurat tally of it's health in time to heal it if needed.

The only way for MQ to pick up on the health of your pet directly is still it being targeted. Though your suggestion is a good work around.

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Sun Sep 28, 2003 5:50 pm

*EDIT* Ignore this, im just a moron :P


Thanks

Draekz
Last edited by Draekz on Sun Sep 28, 2003 5:53 pm, edited 1 time in total.

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Sep 28, 2003 5:51 pm

for your pet:

Code: Select all

/if n $char(pet)!=0 /if n $spawn($char(pet),hp,pct)<41 {dowhatever}
in context with genbot's group loop, to check all group members' pets:

Code: Select all

/if n $spawn($group($GroupMember),pet)!=0 /if n $spawn($spawn($group($GroupMember),pet),hp,pct)<41 {dowhatever}
- Plazmic

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Sun Sep 28, 2003 11:40 pm

Aha! Great, thanks Plaz.

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

Petheals

Post by grimjack » Sun Sep 28, 2003 11:43 pm

Added petheals support to genbot. Thanks plazmic.

New commands:
autohealpets Turn on/off autohealing pets.
setpetheal Set the spell used for healing pets.
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