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

Mortedamour
orc pawn
orc pawn
Posts: 28
Joined: Tue Jan 07, 2003 2:30 pm

Post by Mortedamour » Mon Sep 29, 2003 10:32 am

This script has become very very nice.

Still dont want to replace MCS for my main char, but very nice for a quickie replacement when botting new chars.

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Mon Sep 29, 2003 11:04 am

Was trying to add a "pul"l command to genbot. Not working as intended.

Code: Select all

Sub do-pull
   |# The pull command, takes Master /assist and runs to it, smacks it and comes back to anchor
   /varset Afollow 1 
   /varset FollowTarget "NULL" 
   /varset Combatstatus 0 
   /sit off 
   /if n $strlen("$p1")<=0 { 
      /assist $MasterName 
      /delay 5 
   } else /if n $strlen("$p2")<=0 { 
      /target npc "$p1" 
   } else /if n $strlen("$p3")<=0 { 
      /target npc "$p1 $p2" 
   } else /if n $strlen("$p4")<=0 { 
      /target npc "$p1 $p2 $p3" 
   } else npc /target "$p1 $p2 $p3 $p4" 
     /call Do-moveto
     /if n $char(ability,taunt)>0 /doability taunt 
     /if n $char(ability,kick)>0 /doability kick
     /tell $MasterName I am pulling %t
     /call Do-anchor
/return
By the way, any reason why not to use $target(id) anymore?
I am trying to move away from the old pet.mac which uses $target(id) but there are some functions I did like; pull and auto-follow/guard after attack.

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

Post by grimjack » Mon Sep 29, 2003 11:47 am

bob_the_builder wrote:Was trying to add a "pul"l command to genbot. Not working as intended.

Code: Select all

Sub do-pull
   |# The pull command, takes Master /assist and runs to it, smacks it and comes back to anchor
   /varset Afollow 1 
   /varset FollowTarget "NULL" 
   /varset Combatstatus 0 
   /sit off 
   /if n $strlen("$p1")<=0 { 
      /assist $MasterName 
      /delay 5 
   } else /if n $strlen("$p2")<=0 { 
      /target npc "$p1" 
   } else /if n $strlen("$p3")<=0 { 
      /target npc "$p1 $p2" 
   } else /if n $strlen("$p4")<=0 { 
      /target npc "$p1 $p2 $p3" 
   } else npc /target "$p1 $p2 $p3 $p4" 
     /call Do-moveto
     /if n $char(ability,taunt)>0 /doability taunt 
     /if n $char(ability,kick)>0 /doability kick
     /tell $MasterName I am pulling %t
     /call Do-anchor
/return
By the way, any reason why not to use $target(id) anymore?
I am trying to move away from the old pet.mac which uses $target(id) but there are some functions I did like; pull and auto-follow/guard after attack.
I can try to work on something that takes one command to do this. ATM though you can simply make an anchor.

Once you tell the bot where to anchor to, all you have is tell him to attack then after he wacks the mob tell him to stop. He will return to the anchor point that you created. I have attack and stop on socials for this.

As for the $target(id) question, if you mean telling the bot what to attack using $target(id) and having the bot use that id, some people who give commands to bots may not be using mq.

I'll see what I can come up with for Do-pull if I can get some extra time. ATM I'm doing a pretty big rewrite of how things are structured in an attempt to make the macro even easier to add commands.

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 29, 2003 12:28 pm

Grimjack


when loading the new verson of genbot I get

Cleared the Following: timers vars arrays


and now the petattack command will not work...

been looking at the code and I can not see why it would be saying - Cleared the Following: timers vars arrays - maybe I am overlooking something


<<< EDITED>>>

Figured it out....

first off... the Cleared the Following: timers vars array...

in genbot.mac you have the following:

/zapvars

when I took that out... I didnt get the message again... what is the importants of /zapvars?


now for pet attack

in the botcore.ini you have


Sub Do-petattack
/assist $MasterName
/delay 5
/pet attack %t
/return



needs to be changed to:


Sub Do-petattack
/assist $MasterName
/delay 1s
/if $target()=="FALSE" {
/msg $MasterName failed to get target for pet.
/return
}
/pet attack
/return

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

Zapvars

Post by grimjack » Mon Sep 29, 2003 5:24 pm

Zapvars clears all variables and timers.

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 » Tue Sep 30, 2003 3:08 am

grimjack, the Cleric portion of this works great for me. Now im trying to personalize this for my shadow knight, and have a few questions. Im trying to learn this as I go, but not having as much luck as I would like.

I've added a few Events fine, yet Im having trouble trying to implement what I call WIMPOUT.

This would allow me to feign death if I get below 15 percent health and stay down until I am at 60 percent or better.

This is what I tried, with no success:

in genbot.mac:

/call Combatcheck
|||Sub from botcombat.inc
/if n $char(hp,pct)<15 /call WimpOut

/if n $Combatstatus==0 {


at eof of same file:

Sub WimpOut
/attack off
/varset $Combatstatus 0
/delay 5
/call spellsub "feign death"
/delay 5
:wimp
/if n $char(hp,pct)>60 {
/stand
/g Im ready for more
/return
}
/goto :wimp

As soon as I got below 15 percent health the macro dumped out. It wanted to call wimpout, but it complained about some varset or another.

Idea for wimpout code from :

http://macroquest2.com/phpBB2/viewtopic ... ight=feign

Thanks...

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

Post by grimjack » Tue Sep 30, 2003 3:50 am

rencro wrote:grimjack, the Cleric portion of this works great for me. Now im trying to personalize this for my shadow knight, and have a few questions. Im trying to learn this as I go, but not having as much luck as I would like.

I've added a few Events fine, yet Im having trouble trying to implement what I call WIMPOUT.

This would allow me to feign death if I get below 15 percent health and stay down until I am at 60 percent or better.

This is what I tried, with no success:

in genbot.mac:

/call Combatcheck
|||Sub from botcombat.inc
/if n $char(hp,pct)<15 /call WimpOut

/if n $Combatstatus==0 {


at eof of same file:

Sub WimpOut
/attack off
/varset $Combatstatus 0
/delay 5
/call spellsub "feign death"
/delay 5
:wimp
/if n $char(hp,pct)>60 {
/stand
/g Im ready for more
/return
}
/goto :wimp

As soon as I got below 15 percent health the macro dumped out. It wanted to call wimpout, but it complained about some varset or another.

Idea for wimpout code from :

http://macroquest2.com/phpBB2/viewtopic ... ight=feign

Thanks...
Try this:

Code: Select all

Sub WimpOut
   /attack off
   /varset $Combatstatus 0
   /delay 5
   /call spellsub "feign death"
   /delay 5
   :wim
   /delay 1s
   /if n $char(hp,pct)>60 {
      /stand
      /g Im ready for more
      /return
   }
   /goto :wimp
/return

You may want to add a check of some sort to make sure fd worked also.

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

Arangar
orc pawn
orc pawn
Posts: 14
Joined: Tue Aug 26, 2003 3:59 pm

Post by Arangar » Tue Sep 30, 2003 6:34 am

Ok, silly n00b question ;) :

Is there any general purpose description and usage of this script? To my understanding it is a way that you, from one character, sends commands to another character (running MQ and this script).

Is that correct?
N000b

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

Post by insanitywiz » Tue Sep 30, 2003 7:41 am

That is correct. This script is designed for you to "bot" another character. Basically a pet.

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

Post by Draekz » Tue Sep 30, 2003 10:11 am

Quick question, as a test for the cleric portion of this, I started the bot with my cleric below the "recommended health" line (at like 40 percent health or something) and when he went to heal himself, he would say it group chat, would stand up but wouldnt attempt to cast anything.

After that, the macro wouldnt do anything as tho it was stuck at the part where he was going to heal but just doesnt (yes i changed the name of the spells in the macro). So essentially it recognizes it needs healing (using the autoheal on ) but doesnt manage to end up healing.

Any idea whats wrong? It doesnt crash or anything, just stops working altogether. In order to send it commands again i have to /endm and start over.

Thanks for any ideas on whats going on,

Draekz

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

Post by Draekz » Tue Sep 30, 2003 12:19 pm

hey i was just wondering, is there a way to add a /channel to the place where commands can be sent? such as /j Draekz (channelname)

So that when a command is sent there from ANYONE it will register it as a command? i tried doing it myself but couldnt figure anything out hehe.

Not sure how extensive this would be but wanted to ask :)

Thanks! Draekz

MQSEQ
Hypocrite fag
Posts: 181
Joined: Fri Sep 19, 2003 5:18 pm

Post by MQSEQ » Tue Sep 30, 2003 12:28 pm

It should be doable. You can talk in channel via MQ by using the normal /1, /2, etc.

You would need to setup triggers that monitors the channel and then pharse out the players name then search the spawnlist to target them. Then cast heals or whatever you want it to do.

That should be the basic approach to write the script.

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

Post by RogerWilco » Tue Sep 30, 2003 1:39 pm

Grimjack...

been playing around with the autohealpets.... seems like it is not working like it should... the bot just stands there and watches the pet die... hehe


still looking at it to try and figure it out.... just wanted to give you a heads up

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

Post by grimjack » Tue Sep 30, 2003 5:15 pm

RogerWilco wrote:Grimjack...

been playing around with the autohealpets.... seems like it is not working like it should... the bot just stands there and watches the pet die... hehe


still looking at it to try and figure it out.... just wanted to give you a heads up
Tested it last night and it worked fine. I did notice that I didn't put a varset for the pet heal and I had to use the setpetheal command. I have added the /varset PetSpell "Name of Pet Heal" to the begining of genbot. Be sure to edit if you don't want to have to use the setpetheal command every time you load the macro. You will also want to make sure you have set the variable that tells it you want to autoheal pets at the begining of the genbot macro as well or use the in game command autohealpets on/off to toggle it.

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

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

Post by Draekz » Wed Oct 01, 2003 12:36 pm

Ok, sorry to ask but I need a point in the right direction here (regarding using a different channel then /tell)

Ok, i see that to use tell chan u gotta set #chat tell, so to use a /j channel would i type #chat /1 or something? im not quite sure how to set that up. Or would i have to define /1 as something?

I recall another bot a while back making use of those channels but i cant remember what it was called or who it was by or even what it was used for, i just remember testing it out!

Any help would be great :) thanks!

(come to think of it, it could be the warpet one, not sure tho)