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
Ravena666
a ghoul
a ghoul
Posts: 101
Joined: Fri Aug 23, 2002 2:57 am

Post by Ravena666 » Thu Aug 21, 2003 3:31 am

grimjack
man you did a good job

I must do two thumbs up on dat one.
the spell casting for mages and druids
is just as good to
you have become better at ............. (14.1) rounded to the nearest tenth
~~ SPOON ~~
~~ SPORK ~~

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Mon Aug 25, 2003 10:08 pm

Grim, Would it be possible to check each groupmember for a pet or a way for the master to identify a pet name to the bot as the primary tank for autoheal? I'd like to use this script with a healer and a class that can dire charm a pet.

Slice

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

Post by grimjack » Tue Aug 26, 2003 2:49 am

Slice wrote:Grim, Would it be possible to check each groupmember for a pet or a way for the master to identify a pet name to the bot as the primary tank for autoheal? I'd like to use this script with a healer and a class that can dire charm a pet.

Slice
I'm sure there is a way but I can't think of how easily. What I have always done in this situation is make a hotbutton on the master that tells the bot to heal the pet. I had thought of making a command that could be given with a name of a PC and it would target their pet and heal it so that I would not have to target the pet.

It would take a syntax like this(If thomas was the name of the person who had the pet):

/tell botname petheal thomas

The sub would look something like this:

Code: Select all

Sub Do-petheal
   /if n $strlen("$p1")<=0 {
      /return
   }
|  /echo Targeting "$p1"
   /target "$p1"
   /delay 5
|  /echo Targeting "$target(pet)"
   /target "$target(pet)"
   /delay 5
|  /echo Targets master is "$target(master)"
   /if "$target(master)"=="$p1"
      /call SpellSub "Complete Heal" 
      /return
   }
   /echo failed to target pet
/return 

And of cource you would need to add the command to the array.

Code: Select all

/varset a(1,#) petheal
While I know this is not what you where asking for, I don't play at the moment and I dont' have the time to really get in to the code that would be involved with auto pet heals. Hopefully this would help a bit anyway. If used as a hotkey on the character that is not the bot it would at least make a fast way to kick off the pet heal without having to change targets..

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

Narces
a lesser mummy
a lesser mummy
Posts: 37
Joined: Thu Aug 07, 2003 7:50 am

Post by Narces » Tue Aug 26, 2003 7:37 am

Heya Grimjack, love the work your doing. I've been using a modified version of your rogue bot for all my bot scripts. Just essentially changing the commands, adding specific ones. Only had one problem really from your bot, and haven't seem to found an answer anywhere.. The behind function. Curious if you had ever thought of changing the way your "behind" function worked. Instead of finding the area behind the mob and moving there, maybe using the face command and moving into the back arc of the mob. The idea comes from Calculating rear 'arc' of a mob? over at the Macros: Help forum. Just using /face+ctrl/left or ctrl/right to circle strafe the mob. I will probably work on one while the servers are down today, but I'd also like to compare what I come up with and yours.

This is probably better suited for the rog thread, but I figure it can help more than just rogues as most non-MT melee like to avoid getting hit anyway.

ThatOtherGuy
a lesser mummy
a lesser mummy
Posts: 41
Joined: Tue Aug 05, 2003 6:12 pm

Post by ThatOtherGuy » Tue Aug 26, 2003 10:38 am

Narces ->

I'm currently working on a fighting script to do exactly that :) It's not a bot, but would be put into the genbot code pretty easily, I put an earlier version of my fight script into the genbot code, with more primitive movebehind, not too long ago.

if Grimjack doesn't get to it before me, I'll post a link to my version when I get it working right =p
-TOG

Narces
a lesser mummy
a lesser mummy
Posts: 37
Joined: Thu Aug 07, 2003 7:50 am

Post by Narces » Tue Aug 26, 2003 2:01 pm

Sweet. Was not looking for a bot portion, just the logic behind it. I found *some* form of a circle strafe, but looking over the logic I was a bit puzzled as to "how" it worked, and I never like to run code I don't understand.

Jay Script Libiary - Auto Rogue Script V1.04

Narces
a lesser mummy
a lesser mummy
Posts: 37
Joined: Thu Aug 07, 2003 7:50 am

Post by Narces » Sun Aug 31, 2003 5:33 pm

Jay's script doesn't seem to be working for me, however I am new to scripting so I can't pin down the problem. I attempted to just port it to a small script where it would loop over and over again, just to see how the movement worked in EQ. It would strafe left then right, and loop. Didn't seem to be working correctly.

Code: Select all

Sub Main
   :loop
  | ----- Clockwise Rotate Check ----- 
   /if n $target(heading)>=180 /if n $calc($target(heading)-180)<=$char(heading) /if n $char(heading)<$calc($target(heading)-22.5) /call bsclock 
   /if n $target(heading)>=180 /if n $char(heading)<=180 /if n $calc($char(heading)-22.5)>$calc($target(heading)-360) /call bscounter 
   /if n $target(heading)<=180 /if n $char(heading)<$calc($target(heading)-22.5) /call bsclock 
  | ----- Counter Clockwise Rotate Check ----- 
   /if n $char(heading)>=180 /if n $calc($char(heading)-180)<=$target(heading) /if $char(heading)>$calc($target(heading)+22.5) /call bscounter 
   /if n $char(heading)>=180 /if n $target(heading)<=180 /if n $calc($char(heading)-157.5)<$calc($target(heading)+180) /call bsclock 
   /if n $char(heading)<=180 /if n $target(heading)<=180 /if n $char(heading)>$calc($target(heading)+25) /call bscounter 
   /goto :loop
/return

Sub bsclock 
   /sendkey down ctrl 
   /sendkey down right 
   /sendkey down up 
   /sendkey up up 
   /sendkey down down 
   /sendkey up down 
   /sendkey up right 
   /sendkey up ctrl 
   /press down 
   /press ctrl 
   /face 
/return

Sub bscounter
   /sendkey down ctrl 
   /sendkey down left 
   /sendkey down up 
   /sendkey up up 
   /sendkey down down 
   /sendkey up down 
   /sendkey up left 
   /sendkey up ctrl 
   /press down 
   /press ctrl 
   /face 
/return
All I am trying to get this code to do is loop behind a target.

P.S. Strlen seems broken :(

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 Aug 31, 2003 8:40 pm

It might not be working cuz MQ is broken atm, try again later :P

Draekz

Narces
a lesser mummy
a lesser mummy
Posts: 37
Joined: Thu Aug 07, 2003 7:50 am

Post by Narces » Mon Sep 01, 2003 10:07 am

Actually, MQ is working. Go patch your system.

The $strlen fix can also be found here: General Disscussion

ezeekiel
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Sep 03, 2003 2:36 am

Post by ezeekiel » Wed Sep 03, 2003 5:02 am

How would i go about changing the code too cycle thrue $masternames enstead of group members for the watch health and auto heal portian of the macro?

Thanks for any and all help in advance.

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

Post by grimjack » Wed Sep 03, 2003 7:31 am

I think it would have to target each person every time you checked health which would be really annoying. You may be able to get the hp pct using $spawn but it's more work than I would want to do myself(I never played a healer hehe)

Another option would be to run a macro on all of the masters that told the bot to heal them when they droped below a threshold. That is assuming all the masters have MQ.

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
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Wed Sep 03, 2003 5:44 pm

grimjack wrote:What I have always done in this situation is make a hotbutton on the master that tells the bot to heal the pet.
Is that command in the current script? I was looking through commands in botcore and I see a toggle for autoheal on and off but no direct heal commands for a 3rd party target.

Slice

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

Post by grimjack » Thu Sep 04, 2003 2:11 am

Slice wrote:
grimjack wrote:What I have always done in this situation is make a hotbutton on the master that tells the bot to heal the pet.
Is that command in the current script? I was looking through commands in botcore and I see a toggle for autoheal on and off but no direct heal commands for a 3rd party target.

Slice
Not exactly. The sn command can be used to cast any spell by name but it uses assist. To make a specific command for this would be pretty easy though.

You can use this template to make a command to cast any spell you want really. It will assist the master if a target is not specified. It will also do spell meming if the spell is not loaded. If you use spell loading you will need to have your default spells to be saved as a spell list named default.

Add another array value with the command name you want and copy/paste the sub below into the end of the main macro. Change sub name to be do-<name of command> and edit the end to be the spell you want it to cast.

Code: Select all

/varset a(1,#) command

Code: Select all

Sub do-command
   /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"
   [b]/call SpellSub "Spell to Cast" [/b]
/return

An example of actual code you could use for this is below:

This will allow you to /tell botname heal petname and /tell botname cheal petname. Petname could also be the name of a pc or anything else you would like to heal. If you don't use a name it will use assist off of the master.

Code: Select all

/varset a(1,29) heal
/varset a(1,30) cheal
Here are the sub's for cheal and heal. Edit the end to be the spell name that you want to cast.

Code: Select all

Sub do-heal
   /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"
   [b]/call SpellSub "Spell to Cast" [/b]
/return

Sub do-cheal
   /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"
   [b]/call SpellSub "Spell to Cast" [/b]
/return
You could also make this template shorter if you don't care about multiple names support(Support for multiple names is useful when you have many npc's with the same title or same first name).

Code: Select all

Sub do-command
   /if n $strlen("$p1")<=0 {
      /assist $MasterName
      /delay 3
   } else /target "$p1"
   [b]/call SpellSub "Spell to Cast" [/b]
/return
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

ezeekiel
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Sep 03, 2003 2:36 am

Post by ezeekiel » Sat Sep 06, 2003 5:24 am

stupid question figured it out.

Random()
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Aug 29, 2003 11:31 am

Post by Random() » Sun Sep 07, 2003 6:21 pm

Nice stuff. Might want to update the front page botheal.inc -

/call SpellSub "Complete Heal" to "Complete Healing"


Anyone think of a good way to update botheal for PoP level mobs? Ie, for tanks to throw a supernal elixir on @ 85% & then switch over to CHs?

Was having to do a lot of /tell x target y, /tell x sn supernal elixir until slow was in. Will probably try to work on it tomorrow, but a bit burned out atm.

Thanks in advance.