genbot.mac Generic Bot macro for any class. V9.3 with ini

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

Moderator: MacroQuest Developers

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sun Jan 18, 2004 6:44 am

Sounds to me like some PC's/OS's don't like the multiline comment blocks or something.

Just for curiosity sake, what OS are you running DevlinX?

Edit:
Just thought of something to try. Try to take each one of the comment blocks that look like this:

Code: Select all

|**
[blahblah]
blahblah=9.11
**|
And move them to the bottom of each script. Let me know if that helps. Not everyone has problems running with these multiline comments so its hard to figure out why it effects some and not others.
Last edited by ml2517 on Sun Jan 18, 2004 6:58 am, edited 1 time in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sun Jan 18, 2004 6:50 am

Lasher,
You can change these lines in genbot.mac in a few days (give people time to get the latest advpath.inc):

This can be changed to:

Code: Select all

/if n @FollowFlag==1 { 
    /if n @CheckLocTimer<=0 /if n @PauseFlag==0 /if n @NumLocs>@CurrLoc /call FollowIncLoc $arg(1,"@LocArray(@CurrLoc)") $arg(2,"@LocArray(@CurrLoc)") $arg(3,"@LocArray(@CurrLoc)") 
    /call TrackFollow 
    /call CheckForTarget 
} 
Can be changed to this, if you have advpath.inc 1.04 or greater:

Code: Select all

/call AdvPathPoll

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Sun Jan 18, 2004 1:02 pm

DevlinX wrote:Maybe I am just thick or something, but I can't get it working again. Still getting cannot call when a macro isnt running error. Here is what my personal.inc looks like at the top;

Code: Select all

|personal.inc 
|Personal commands module example. 
|Version 9.11 
|Date:01/17/2004 5:26am 
| 
|** 
[personal] 
version=9.11 
**| 
| 
| Uncomment the line below if you have advpath.inc
 
#include advpath.inc
 
#Event SkillUp "You have become better at" 

Sub PersonalCommands 
   /varset Commands(0,0) stick 
   /varset Commands(0,1) fire 
   /varset Commands(0,2) ice
Hmm. This is becoming a fun thing to track down. It works on some, but not others. Make sure you don't have any trailing spaces on the end of the |** version= **| lines. (just a guess)

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Sun Jan 18, 2004 1:04 pm

ml2517 wrote:Lasher,
I've placed the code block back into advpath.inc but I noticed this line in your coding that might fail if I update my version.

This:

Code: Select all

/if "@advpath_v">="1.0" { 
Might need to be:

Code: Select all

/if n @advpath_v>=1 { 
No?
I was using text comparison in case we ever tried to use version=1.0a or 1.2b, etc.

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Sun Jan 18, 2004 1:16 pm

Found the problem with the script include on the comment blocks.

Make sure there are NO trailing spaces on the following code blocks:

Code: Select all

|**
[advpath]
version=1.04
**|
The phpbb board seems to enjoy adding them when cutting/pasting. The same goes for every version tag at the top of the .mac and .inc files.

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Sun Jan 18, 2004 1:42 pm

Actually, found a good workaround when posting source using the comment blocks.

Add a second comment marker at the front of the comment block.

Code: Select all

||** 
[advpath] 
version=1.04 
**| 
Turns out if there is a space after **| it will throw errors. So the additional pipe (|) at the beginning of the comment block catches the space.

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Sun Jan 18, 2004 1:54 pm

Updated: genbot.mac v9.2 - advpath function changes (v1.04 now required)
other version bugfixes on .inc files v(9.11-9.12)

DevlinX
flagrant idiot
Posts: 11
Joined: Fri Nov 28, 2003 2:25 pm

Post by DevlinX » Sun Jan 18, 2004 3:11 pm

ml2517 wrote: Just for curiosity sake, what OS are you running DevlinX?
All my comps are running Win XP Pro.

I have the new version coding now and I dont get the cannot call when macro isnt running error. I get something completely new now.

Here is what the MQ chat box says upon running genbot now;

Cleared the following: Timers Vars Arrays
[MQ2] Advanced pathing v(1.04) enebled.
Ending macro: Subroutine InitAPFVars wasn't found
personal.inc@272 (SetupPersonalVars):/call InitAPFVars @Fastini @SpeedSenseini @FollowDistance.ini
genbot.mac@44 (Main):/call SetupPersonalVars
Cleared the following: Timers Vars Arrays
The current macro has ended.

Nevermind, I found the problem. For some reason the 3 variables listed above weren't declared in my (char_mastername).ini file. I didn't have time to look at this before I went to work, but figured it out once I got home.

Keep up the good work :D
Last edited by DevlinX on Mon Jan 19, 2004 3:35 am, edited 1 time in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sun Jan 18, 2004 3:14 pm

I'll take care of the comment block thing, hopefully that fixes it. So would your text comparison actually trigger if I change to version=1.04a or version=1.05 etc? If so great, I didn't think you could use a greater than or lesser than when doing text comparison.

vaelin
orc pawn
orc pawn
Posts: 21
Joined: Fri Dec 19, 2003 8:52 pm

Post by vaelin » Sun Jan 18, 2004 3:53 pm

All the recent || inserts fixed my loads. I imagine removing the spaces would as well, but this seems simpler.

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Sun Jan 18, 2004 11:51 pm

ml2517 wrote:I'll take care of the comment block thing, hopefully that fixes it. So would your text comparison actually trigger if I change to version=1.04a or version=1.05 etc? If so great, I didn't think you could use a greater than or lesser than when doing text comparison.
I know some languages interpolate text comparisons based on thier ascii value; I was taking a shot that MQ did the same. It seems to work in my quick tests.

User avatar
lasher
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu Dec 18, 2003 4:09 pm

Post by lasher » Mon Jan 19, 2004 12:14 am

Updated: personal.inc v9.13 - typo in buffcode. inherited (bad karma)

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

possible additions?

Post by Spanky_Monkey » Mon Jan 19, 2004 5:25 am

Would be awesome to be able to issue a command to this bot to allow them to participate in a ch chain... like a way to send a tell command as such:

/t bot ch_chain "cast now botname" 6 "You['re next so and so cast now!!!"

so when the bot sees arg1, it uses that as the trigger for it's start, casts CH, delats for the number in arg2, then sends the outgoing message.

Could even have the outgoing be a raw message so you could make the argument "/3 cast now so and so!" so you can select your own medium for it to go on...

I think that would be cool as hell.

yetanotheruser
a lesser mummy
a lesser mummy
Posts: 48
Joined: Sun Nov 02, 2003 5:35 pm

Post by yetanotheruser » Wed Jan 21, 2004 4:07 am

Another feature that would be neat imho would be some simple cast commands like /tell bot mem SpellXYZ Slot1-8 and especially /tell bot cast Slot1-8.

If i just didnt saw those commands please be patient with me. I have yet to read the whole script and understand it fully :)

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

Post by bob_the_builder » Wed Jan 21, 2004 9:24 am

commands like /tell bot mem SpellXYZ Slot1-8
/t <bot> loadlist <saved spell set>
/tell bot cast Slot1-8
/t <bot> sn <name of spell>

There already there. The "sn" command will actually mem the spell, saying you spelled it right, in the spell slot 2 and then cast it, then re load DEFAULT spell set. ... Unless you changed the default spell list name in the INI.
If i just didnt saw those commands please be patient with me. I have yet to read the whole script and understand it fully
You don't even need to read the code. Just ...

/t <bot> cmds

The bot will report core, spells, etc ...

Bob