Genbot Version 12 Ready

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

OgreB
orc pawn
orc pawn
Posts: 12
Joined: Wed Jun 19, 2002 4:50 pm

shortcut.inc

Post by OgreB » Fri Apr 30, 2004 5:05 pm

I have this is my ini file but it Tells me that this speel is not memoriezed. I figure that its trying to do a /cast vs /cast item.

[shortcut Items]
mask=Tae Ew Ritualists Mask

also Root Malo both work but spells with space in them fail.

[shortcut spells]
root=instill
slow=Turgur's Insects
Malo=Malos

doing aa command shows ability out of range message.
[shortcut noTarget AA]
bear=Rabid Bear
Last edited by OgreB on Fri Apr 30, 2004 5:21 pm, edited 1 time in total.

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

Post by Dulapore » Fri Apr 30, 2004 5:13 pm

Here are a few fixes to the Sub Loot.

First a case issue. Then /face look gives errors "There were no matches for (0-100) any look". It appears to be something with /face look, not the macro though. /face works just fine in this instance. Finally changed the /varset of LootSlot to 1 instead of 0 as there is no Slot0 and it was giving an erro about it.

Code: Select all

sub Loot 
   /declare counter int local 
   /declare [color=red]L[/color]oot[color=red]S[/color]lot int local 
   /if (${Me.Combat}) /return 
   /if (!${Target.ID}) /target corpse radius 100 
   /if (${Target.State.NotEqual[DEAD]}) /return 
   /call Rangesub 
   [color=red]/face[/color]
   /varset LootTooFar 0 
   /varset LootSlot [color=red]1[/color]

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

Post by Dulapore » Fri Apr 30, 2004 5:16 pm

Ogreb, is that with the 3pm update?

OgreB
orc pawn
orc pawn
Posts: 12
Joined: Wed Jun 19, 2002 4:50 pm

Post by OgreB » Fri Apr 30, 2004 5:22 pm

That is with 3pm update updating to 5pm install right now to see if errors persist.

Charisa
a hill giant
a hill giant
Posts: 165
Joined: Tue Apr 06, 2004 5:38 pm

Post by Charisa » Fri Apr 30, 2004 5:38 pm

Man talk about update city. I'm sure part of this is to discourage people who don't have the time or inclination to wade through all the posts, update and test, etc, but it sure seems it would be easier if we could somehow get a thread that was updated only by the 'main' contact for the macro, (At this point appears to be Lord Giddeon) with the most recent version, and have all the debugging, input, etc, in a seperate thread. I do think if nothing else it would really help avoid some fo the stupid questions we do see.

But honestly thanks for all your hard work to all that have been working on this, I've been cuttig and pasting all day. I'm at work so I don't have the ability to test anything beyond reading over the code.

fez_ajer
a ghoul
a ghoul
Posts: 106
Joined: Fri Apr 23, 2004 6:44 pm
Location: If I was up your ass you'd know where I was...

First glance...

Post by fez_ajer » Fri Apr 30, 2004 5:54 pm

All I see is this from my previous list:

botcore.inc (515)

Code: Select all

/if (${Target.Distance}>${FastRange}) /keypress [color=red]FORWARD[/color] hold
WRT the chain-casting... Before I found genbot I started writing a decision-list based bot. What I mean by this is that events would add things to a 'to-do' list then immediately exit. The bot would cycle, prioritize (or sometimes clear) the to-do list and then do the highest priority thing.

Maybe a scaled down version of this would be useful... When a request to cast comes in, put it in a cast queue then remove it after the spell is cast.

Just thinking out loud ;)

--- EDIT ---

botspell.inc (568)

Code: Select all

/varset BuffList[color=red][[/color]${NewBuff},1[color=red]][/color] "${Target.CleanName}" 
/varset BuffList[color=red][[/color]${NewBuff},2[color=red]][/color] "${SpellName}Param" 
/varset BuffList[color=red][[/color]${NewBuff},3[color=red]][/color] ${Spell[${SpellNameParam}].Duration.TotalSeconds} 
Last edited by fez_ajer on Fri Apr 30, 2004 6:13 pm, edited 1 time in total.
- Fez

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

Post by ml2517 » Fri Apr 30, 2004 6:11 pm

Quotes on /varset lines are pretty much a no-no from here on out, unless of course you actually want the quotes to show up in your string variable.

newb-n-training
a lesser mummy
a lesser mummy
Posts: 39
Joined: Mon Apr 19, 2004 8:51 pm

Post by newb-n-training » Fri Apr 30, 2004 6:20 pm

Issues with BotCombat v. 12.21--

Line 265 appears to have an extra (

Code: Select all

 /if [color=red]([/color]((${Me.Heading.Degrees}<=180)&&(${Target.Heading.Degrees}<=180)&&(${Me.Heading.Degrees}>${Math.Calc[${Target.Heading.Degrees}+25]})) /goto :MoreCounter
Line 266 appears to have an extra (

Code: Select all

 /if [color=red]([/color]((${Me.Heading.Degrees}>=180)&&(${Target.Heading.Degrees}<=180)&&(${Math.Calc[${Me.Heading.Degrees}-157.5]}<${Math.Calc[${Target.Heading.Degrees}+180]})) /goto :MoreCounter

Line 264 gives errors, not sure if this is the way you intended it be written but it gave a fatal error:

Code: Select all

 /if [color=red]([/color][color=green]((${Me.Heading.Degrees}>=180)&&(${Math.Calc[${Me.Heading.Degrees}-180]}<=${Target.Heading.Degrees}))[/color]&&[color=cyan](${Me.Heading.Degrees}>${Math.Calc[${Target.Heading.Degrees}+22.5]})[/color][color=red])[/color] /goto :MoreCounter
I commented it out to be 3 separate && statements but it's not exactly the same calculation that way now is it.... My head is swimming so I'm not sure which way is intended.



Additionally, I was getting errors for Backstab and changed the statements on lines 198, 244, & 276 from:

Code: Select all

(${DoBackstab})
to read

Code: Select all

(${DoBackstab}==1)
in order to fix those


Anyway, great mac !! I'm still pluggin away.....

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Fri Apr 30, 2004 6:22 pm

Just give Lord G access rights to upload to a folder within the Downloads, this should be a ZIP file in it's own right :)
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

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 » Fri Apr 30, 2004 6:51 pm

ap50 wrote:Just give Lord G access rights to upload to a folder within the Downloads, this should be a ZIP file in it's own right :)
I'm gonna come check the thread just to see ap50's avatar!

fez_ajer
a ghoul
a ghoul
Posts: 106
Joined: Fri Apr 23, 2004 6:44 pm
Location: If I was up your ass you'd know where I was...

LOL!

Post by fez_ajer » Fri Apr 30, 2004 6:58 pm

It's like a train-wreck. I just can't look away.

Oh, yah, I was doing something:

botspell.inc (442)

Code: Select all

/if (!${Me.[color=red]Class[/color].CanCast}) /return
This should fix the crash in Do-mana. In fact, now that I think about it, RL folks never say '63m' they say '60m' or '65m' or 'fm' rather than '100m'. Here's a patch to do that:

Code: Select all

Sub Do-mana
   /if (!${Me.Class.CanCast}) /return
   /declare RoundMana int local ${Math.Calc[${Math.Calc[${Me.PctMana}/5].Int}*5].Int}
   /if (${RoundMana}==100) {
     /call ChatOut 2 ${MasterName} "fm"
   } else {
     /call ChatOut 2 ${MasterName} "${RoundMana}m"
   }
/return

Last edited by fez_ajer on Sat May 01, 2004 2:16 am, edited 1 time in total.
- Fez

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Fri Apr 30, 2004 7:44 pm

Ok first thank you everyone for helping each other out with this thing. Glad that it is working ok for some of you at least, and I am sorry to those that it's not working for. I've grabbed all the fixes you folks have posted and they'll be incorperate in my next update. Now as far as that goes I've really got to do some packing, gotta pack up a 5 bedroom house so I can more out on the 15th and into a shared 2 bedroom appartment. Working 24hrs a week sucks big time. So anyways what this means is that this should be my last post for the weekend - ok maybe it won't be but it should be.

Suggested fix for spell recasting - Untested it's an idea
in BotCore.inc
change

Code: Select all

Sub SpellSub(string SpellName)
	/if (${Me.Casting.ID}) /return
To

Code: Select all

Sub SpellSub(string SpellName)
	/if (${Me.Casting.ID} || ${CTimer}>0) /return

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

Post by Diggler » Fri Apr 30, 2004 7:53 pm

ap50, as if the rubbing one wasn't enough. this one is just flat out ridiculous, and i APPLAUD you good sir. keep up the good work!

Nightshift
a lesser mummy
a lesser mummy
Posts: 54
Joined: Mon Oct 13, 2003 8:52 am

Getting this Error

Post by Nightshift » Fri Apr 30, 2004 8:08 pm

This happens when using; /tell botname BUff <SpellName> ON <TargetName>

It will mem the spell if not memed.
It will cast the spell after memed.

The macro will end at that time with the following.


/for loops must use an int variable
botcore.inc@600 (Event_timer(string TimerName,string
OldValue)):/for counter 1 to $[BuffListCount}
genbot.mac@50 (Main)::MainLoop

I think it comes from this code;

In Botcore.inc

Code: Select all

Sub Event_timer(string TimerName,string OldValue)
   /if (${TimerName.Equal[SitTimer]}) {
      /if (${Me.Standing}) /sit
   }
   /if (${TimerName.Equal[ChainStunTime]}) {
      /call NextStun
   }
   /if (${TimerName.Equal[BuffListAdvance]}) {
      /declare counter local
      /for counter 1 to ${BuffListCount}
         /varcalc BuffList[${counter},3] ${BuffList[${counter},3]}-1
         /if (${BuffList[${counter},3]}<5) {
            /call StandardTarget "${BuffList[${counter},1]}"
            /if (${Target.CleanName.Equal[${BuffList[${counter},1]}]}) {
               /call SpellSub "${BuffList[${counter},2]}"
               /if (${Macro.Return}==0) /varset BuffList[${counter},3] ${Spell[${BuffList[${counter},2]}].Duration.TotalSeconds}
            }
         }
      /next counter
      /varset BuffListAdvance 5s
   }
/return 

Remove the red text..

Code: Select all

Sub Event_timer[color=red](string TimerName,string OldValue)[/color]
   /if (${TimerName.Equal[SitTimer]}) {
      /if (${Me.Standing}) /sit
   }
   /if (${TimerName.Equal[ChainStunTime]}) {
      /call NextStun
   }
   /if (${TimerName.Equal[BuffListAdvance]}) {
      /declare counter local
      /for counter 1 to ${BuffListCount}
         /varcalc BuffList[${counter},3] ${BuffList[${counter},3]}-1
         /if (${BuffList[${counter},3]}<5) {
            /call StandardTarget "${BuffList[${counter},1]}"
            /if (${Target.CleanName.Equal[${BuffList[${counter},1]}]}) {
               /call SpellSub "${BuffList[${counter},2]}"
               /if (${Macro.Return}==0) /varset BuffList[${counter},3] ${Spell[${BuffList[${counter},2]}].Duration.TotalSeconds}
            }
         }
      /next counter
      /varset BuffListAdvance 5s
   }
/return 
NightShift
Last edited by Nightshift on Fri Apr 30, 2004 11:48 pm, edited 1 time in total.

Tazmanium
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Feb 05, 2004 4:42 pm

Fix for spell casting

Post by Tazmanium » Fri Apr 30, 2004 9:29 pm

Someone else posted this, but I'll say it again since it is not in current version of shortcuts.inc.

This

Code: Select all

      /if (${ShortCuts[4,${ShortcutNum}]}==1) /call Spellsub "${CastText} "
should be :

Code: Select all

      /if (${ShortCuts[4,${ShortcutNum}]}==1) /call Spellsub ${CastText}