MQ2Data GenBot, 99% Complete

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

Moderator: MacroQuest Developers

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 » Tue Apr 20, 2004 5:25 pm

I took close look at the conversions Diggler made.

He did quite a bit of work but much of what I see needs to be fixed/adjusted.

I don't know how it works if people actually use it.

Diggler: Get with me in IRC and I could help you out with some stuff.

nald
orc pawn
orc pawn
Posts: 15
Joined: Sat Dec 20, 2003 9:30 am

Post by nald » Tue Apr 20, 2004 7:17 pm

The macro never makes any ini files so there where none to delete. I made the changes in the quote below and still get this error. I am supose to supply a name for the master or not? I did it both ways and neither made an ini file for me.

CCommandHook::Detour(/mac genbot)

Macro - Loading macro: C:\Program Files\MQ2-Latest\Release\Macros\genbot.mac

Macro - Starting macro with '/call Main'

WriteChatColor(Ending macro: Failed to parse /newif condition '${Ini[genbot_${Me.Name}.ini,Core,RangeMin]}==0', non-numeric encountered)

WriteChatColor(botcore.inc@143 (SetupCoreVars): /newif @RangeMin==0 {)

WriteChatColor(genbot.mac@38 (Main): /call SetupCoreVars)

WriteChatColor(Cleared the following: Timers Arrays)

WriteChatColor(The current macro has ended.)



CCommandHook::Detour(/mac genbot master1)

Macro - Loading macro: C:\Program Files\MQ2-Latest\Release\Macros\genbot.mac

Macro - Starting macro with '/call Main master1'

WriteChatColor(Ending macro: Failed to parse /newif condition '${Ini[genbot_${Me.Name}.ini,Core,RangeMin]}==0', non-numeric encountered)

WriteChatColor(botcore.inc@143 (SetupCoreVars): /newif @RangeMin==0 {)

WriteChatColor(genbot.mac@38 (Main): /call SetupCoreVars)

WriteChatColor(Cleared the following: Timers Arrays)

WriteChatColor(The current macro has ended.)
Wassup wrote:Some changes you could make to genbot.mac:

Example:

Code: Select all

   /newif ${Me.Combat}==1 {
      /newif ${Bool[${Target}]}==1 {
         /newif ${String[${Target.CleanName}].Equal[${Me.Name}]}==0 {
            /newif @AutoEngage==1 /varset Combatstatus 1
         }
      }
   }
Can be changed to:

Code: Select all

   /newif (${Me.Combat} && ${Target.ID} {
         /newif ${Target.CleanName.NotEqual[${Me.Name}]} {
            /newif @AutoEngage==1 /varset Combatstatus 1
         }
   }
- ${Me.Combat} returns a Boolean, so no need to use ==1
- ${Target.ID} is numeric, so if ${Target.ID} is anything other than 0, it is TRUE
- ${Target.CleanName} returns a string, so you don't need to convert it to a string since it already is a string.

Diggler
> Oid
Posts: 120
Joined: Thu Oct 09, 2003 3:28 pm
Location: Lexington, KY

Update 4/20

Post by Diggler » Wed Apr 21, 2004 12:48 am

Cleaned up tons of code, grab the new files if you want it to work better =P

botspell and botcore tomorrow!

Spanky_Monkey
a ghoul
a ghoul
Posts: 103
Joined: Wed Feb 19, 2003 3:10 pm

Pondering

Post by Spanky_Monkey » Wed Apr 21, 2004 3:14 am

I have cleaned up a lot iof unclosed /nbewifs missing lots of closeing )'d. Now I find myself no longer crashing but immediately starting to auto attack upon start of the script. I am unsure why this is happening and prolly could use a hand with it. I will look some more but it is something to look at. I am using the 19'th zip.

Spanky_Monkey
a ghoul
a ghoul
Posts: 103
Joined: Wed Feb 19, 2003 3:10 pm

/attacking

Post by Spanky_Monkey » Wed Apr 21, 2004 3:40 am

I have changed every instance of /attack on or commented it out one at a time to find out where the script feels it should be attacking and I am as yet unable to stop the behavior. Any thoughts? (I am using exact code copied from page one of the post)

Diggler
> Oid
Posts: 120
Joined: Thu Oct 09, 2003 3:28 pm
Location: Lexington, KY

Post by Diggler » Wed Apr 21, 2004 2:45 pm

Fixed combat issues etc. Use botcombat/genbot/personal/bothealer from page 1.

Spanky_Monkey
a ghoul
a ghoul
Posts: 103
Joined: Wed Feb 19, 2003 3:10 pm

Botcore

Post by Spanky_Monkey » Wed Apr 21, 2004 5:56 pm

Lots of problems parsing botcore.inc with todays zip. Had to add parenthesis around every /newif and around line 230 there are just problems. Script will not start as posted.

Diggler
> Oid
Posts: 120
Joined: Thu Oct 09, 2003 3:28 pm
Location: Lexington, KY

Post by Diggler » Wed Apr 21, 2004 6:11 pm

Like I said, still working on botcore, but so you know, I ran it earlier and it functioned fine hehe ;)

Diggler
> Oid
Posts: 120
Joined: Thu Oct 09, 2003 3:28 pm
Location: Lexington, KY

Post by Diggler » Wed Apr 21, 2004 6:57 pm

K updated all files and those ran for me as is before a few last min changes. Gonna be rewriting again tonight trying to consolidate a lot of that shit that's called constantly.

** CURRENT VERSION = 10.01 (All Files but spell), 10.02 botspell.inc **

Dulapore
a lesser mummy
a lesser mummy
Posts: 67
Joined: Thu Feb 26, 2004 4:39 am

Post by Dulapore » Wed Apr 21, 2004 10:37 pm

Botspell was missing an | in order to work right from cut and paste.

Code: Select all

[color=red]|[/color]|** 
[botspell] 
version=10.02 
**| 

Wendel
a lesser mummy
a lesser mummy
Posts: 58
Joined: Wed Jul 24, 2002 1:48 am

Post by Wendel » Wed Apr 21, 2004 10:39 pm

Anyone else having problems with auto healing?

my bot never auto heals
I have her set to ishealer and iscleric, and have valid heal spells in her ini file.

I think she just hates me now and refuses to heal me!

EDIT: I did try and manually issue the autoheal command, says she will watch the group, but never heals

Spanky_Monkey
a ghoul
a ghoul
Posts: 103
Joined: Wed Feb 19, 2003 3:10 pm

No Autoheals

Post by Spanky_Monkey » Thu Apr 22, 2004 12:37 am

Script executes fine, no autoheals however.

bollox
orc pawn
orc pawn
Posts: 17
Joined: Tue Oct 28, 2003 2:14 pm

Correction

Post by bollox » Thu Apr 22, 2004 2:28 am

botcore.inc: Sub Do-moveto (line 993)

Code: Select all

   /if (${String[${Target.CleanName}].NotEqual[@ParamString]) /target "@ParamString"
..is missing a closing sqiggly brace, should be

Code: Select all

   /if (${String[${Target.CleanName}].NotEqual[@ParamString]}) /target "@ParamString"

bollox
orc pawn
orc pawn
Posts: 17
Joined: Tue Oct 28, 2003 2:14 pm

Multiple genbots per channel

Post by bollox » Thu Apr 22, 2004 2:46 am

Genbot is fine is you are talking to them in their own channel, but what if you want to control several genbots inside a single IRC channel? They would simultaneously execute each command. My solution to this is a new syntax:

<botname> <command string>

So you could issue

/irc keimaster autoheal off

...to Keimaster, and all the other bots in the channel will ignore that command. Here's the proposed code change to Sub Event_Chat in botcore.inc:

Code: Select all

Sub Event_Chat

[b]   /declare ParamCount local
   /declare ParamString local[/b]
   /if (${String[@Param0].NotEqual[GROUP]} && ${String[@Param0].NotEqual[@ListenChan]} && ${String[@Param0].NotEqual[TELL]}) /return
   /if (${String[@Param0].Equal[GROUP]} && @ListenGroup==0) /return
   /if (${String[@Param0].Equal[@ListenChan]} && @ListenChat==0) /return
   /for tempvar 0 to @MasterCount
      /if (${String[@MName(@tempvar)].Equal[@Param1]}) /goto :SetupTime
   /next tempvar
   /if (${String[@Param0].Equal[GROUP]}) /return
   /if (${String[@Param0].Equal[@ListenChan]}) /return
   /if (@Relaytells==1 && ${String[@Param0].Equal[TELL]}) /call ChatOut 1 @MasterName "@Param1 told me: @Param2"
   /return
   :SetupTime
   /varset MasterName @Param1
[b]
   | Commands must be preceded by bot's name!
   /if (${String["@Param2"].Arg[1].NotEqual["${Me.CleanName}"]})  /return

   | Remove BotName from Param2 string.
   /varset ParamCount 2
   /varset ParamString ""
   :Do-RemoveBotNameLoop
      /if (${String[${String["@Param2"].Arg[@ParamCount]}].NotEqualCS["NULL"]}) {
         /varcat ParamString " ${String["@Param2"].Arg[@ParamCount]}"
         /varadd ParamCount 1
         /goto :Do-RemoveBotNameLoop
      }
   /varset Param2 "@ParamString"
[/b]
   /if (${String[@Param0].Equal[GROUP]}) {
      /for tempvar 0 to @IgnGroupNum
         /if (${String[@Param2].Arg[1].Equal[@IgnGroup(@tempvar)]}) /return
      /next tempvar
   }
   /if (${String[@Param0].Equal[@ListenChan]}) {
      /for tempvar 0 to @IgnGroupNum
         /if (${String[@Param2].Arg[1].Equal[@IgnGroup(@tempvar)]}) /return
      /next tempvar
   }
   /if (${Defined[ArrayCore]}) {
      /for tempvar 0 to @ArrayCore
         /if (${String[@Param2].Arg[1].Equal[@Commands(botcore-array,@tempvar)]}) {
            /call Do-@Commands(botcore-array,@tempvar) @Param2
            /return
         }
      /next tempvar
   }
   /if (${Defined[ArraySpell]}) {
      /for tempvar 0 to @ArraySpell
         /if (${String[@Param2].Arg[1].Equal[@Commands(botspell-array,@tempvar)]}) {
            /call Do-@Commands(botspell-array,@tempvar) @Param2
            /return
         }
      /next tempvar
   }
   /if (${Defined[ArrayComb]}) {
      /for tempvar 0 to @ArrayComb
         /if (${String[@Param2].Arg[1].Equal[@Commands(botcombat-array,@tempvar)]}) {
            /call Do-@Commands(botcombat-array,@tempvar) @Param2
            /return
         }
      /next tempvar
   }
   /if (${Defined[ArrayHeal]}) {
      /for tempvar 0 to @ArrayHeal
         /if (${String[@Param2].Arg[1].Equal[@Commands(bothealer-array,@tempvar)]}) {
            /call Do-@Commands(bothealer-array,@tempvar) @Param2
            /return
         }
      /next tempvar
   }
   /if (${Defined[ArrayPers]}) {
         /for tempvar 0 to @ArrayPers
         /if (${String[@Param2].Arg[1].Equal[@Commands(personal-array,@tempvar)]}) {
            /call Do-@Commands(personal-array,@tempvar) @Param2
            /return
         }
      /next tempvar
   }
/return

spektralkat
orc pawn
orc pawn
Posts: 22
Joined: Sat Dec 20, 2003 5:25 am

Autoheal and loadspell...

Post by spektralkat » Thu Apr 22, 2004 3:22 am

Autoheal still is not working and it apears if you issue a comand to cast a spell genbot no longer mems the spell to slot 8 to cast it... however if you manualy load the spell, in my case usualy a buff lets say hand of virtue it casts.

/g groupbuffme

mybot tells the group casting Hand of Virtue on {me}

nothing happens...

i do a /loadspell buff

the gems pop ready and viola mybot begins to cast.....

Little details like this one around,, also seems the old afollow will crash me

Loadspell functionality needs a lil atention and auto heal too but thus far great work