A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
Undies
- a ghoul

- Posts: 94
- Joined: Mon Oct 20, 2003 9:12 pm
Post
by Undies » Sat Apr 10, 2004 11:45 pm
There is a bug when using advpath.inc.
If the bot is following the master and is told to attack, it doesn't....you need to tell it to stop first, then attack. Or just use afollow....
-
LordGiddion
- a snow griffon

- Posts: 352
- Joined: Sat Sep 13, 2003 6:12 pm
-
Contact:
Post
by LordGiddion » Sun Apr 11, 2004 7:58 am
This is from the other Genbot thread but I figured I'd repeat it here.
Ok just to give people an idea of the enhancements I’m working on:
Smaller code, there are chunks of redundant code in the macro that I am going to be tightening up by adding some functions.
Replacing Nuke, Ice, Snare, Buff, GroupBuff and a bunch of similar commands with 4 new sections of the InI detailed bellow (this will be powered by a new .inc shorcuts.inc). These new sections will allow for more customization without losing function.
Example:
Code:
[shortcut spells]
Nuke=draught of jiva
Sow=Spirt of wolf
PLBuff=Resolution|Shield of words
[shortcut Items]
Sepic=spear of fate
[notarget Spells]
ITU=Invisibility to undead
[notarget items]
Levi=Pegasus cloak
Using this example this INI would add the command Nuke to this bot and when the bot gets the “nuke” command the bot will cast “draught of jiva” with the same targeting options as the old nuke, ice and etc commands. PLBUFF will cast the spells Resolution and Shield of words on the target. Sepic would use the item spear of fate with the same casting options as the other spells. ITU would cause the bot to cast the spell “Invisibility to undead” without changing target. Levi would cause the bot to use the item “Pegasus cloak” without changing target.
New commands:
Setvar - for debugging or just general bot function this will change the value of a global variable to the command arguments
Rptvar - Will cause the bot to chatout the value of the requested global variable
Buff - Will cause the bot to cast the specified buff on the selected target, Bot will then remember the target,spell and duration of the buff when the buff expires (actually a random 5 or so seconds before the expire) the bot will attempt to refresh the buff on the target i.e. /tell Shamanbot buff Spirt of wolf on monkguy
command enhancement
snt – changed so that snt will remember the last spell cast with snt so that on second and subsequent casts of the same spell you don’t need to type out the spells again i.e. /tell shamanbot snt spirt of wolf on rannewbie1 /tell shamanbot snt on rannewbie2
FYI Personal.inc in my release will be stripped back down to a stub and all of the commands currently in it (including the advpath functions) will be ported into the other files or supported through the shortcut functions detailed above.
Natural language support
How commands in each file will be modified slightly, the current commands and functions that you are used to will remain as the defaults but you will have the option to change the command sent to the bot without changing the function of the command.
Example:
Code:
/varset botcore-array(1,0) afk
/varset botcore-array(2,0) Do-afk
/varset botcore-array(1,1) accept
/varset botcore-array(2,1) Do-accept
/varset botcore-array(1,2) reject
/varset botcore-array(2,2) Do-reject
in this example if you change the first line to
Code:
/varset botcore-array(1,0) goaway
then /tell Bot goaway I’m watching TV – will cause the bot to set it’s afk message to “I’m watching TV”
I might have forgotten something I’m throwing in but this should be a good list of the big changes you’ll see.
-
Slugman
- decaying skeleton

- Posts: 9
- Joined: Mon Feb 23, 2004 4:31 pm
Post
by Slugman » Sun Apr 11, 2004 10:22 am
I am also getting the dbl-cast issue.
I put the following in my personal.inc file:
Code: Select all
/varset Commands(0,51) heal1
/varset ArrayPers 51
and
Code: Select all
Sub Do-heal1
/if $defined(Param1)==FALSE {
/assist @MasterName
} else /if "@Param1"=="me" {
/target pc @MasterName
} else /if "@Param1"=="yourself" {
/press F1
/if n $char(id)!=$target(id) /press F1
} else /if "@Param1"=="$char(name)" {
/press F1
/if n $char(id)!=$target(id) /press F1
} else {
/declare ParamString local
/declare ParamCount local
/varset ParamCount 2
/varset ParamString "@Param1"
:Do-Heal1ParamLoop
/if $defined(Param$int(@ParamCount))==TRUE {
/varcat ParamString " @Param$int(@ParamCount)"
/varadd ParamCount 1
/goto :Do-Heal1ParamLoop
}
/target @ParamString
}
/call Delay 5
/call ChatOut 5 GROUP "Supernal Remedy on $target(name,clean)"
/call SpellSub "Supernal Remedy"
/if n @SitAfterCast==1 /varset SitTimer @DelayBeforeSit
/return
in the respective places but it's still casting it once, waiting 10 secs and casting it again.
any ideas?
-
Flea
- a lesser mummy

- Posts: 55
- Joined: Fri Dec 26, 2003 4:56 am
Post
by Flea » Sun Apr 11, 2004 3:06 pm
Ok, I see the template for adding a command to cast items. However, I want to add a command for the monk epic to be clicked every 16 seconds. What extra lines would I put in there? Also, is there a way for it to check for spells that block such as "Strength of Tunare" or "Vallon's Quickening" "Speed of Vallon" etc, before clicking it.
Also, what would be a template for putting in a command to tell it to execute a certain skill. (ie. Feign Death) or a monk evade (Attack off, Feign, Stand, Attack on)
-
Undies
- a ghoul

- Posts: 94
- Joined: Mon Oct 20, 2003 9:12 pm
Post
by Undies » Mon Apr 12, 2004 1:05 am
I have this in my monk.inc file. Personal.inc calls it if the character is a monk (eg. in PersonalMain put /if "$char(class)"=="monk" /call monkroutine)
Code: Select all
Sub monkroutine
/if $combat==TRUE {
/if n @epic_timer==0 {
/cast item "celestial fists"
/varset epic_timer 9s
}
}
/return
/declare epic_timer timer must be declared somewhere first (eg. in SetupPersonalVars)
EDIT: I personally HATE having personal.inc doing everything for all classes and have a very simple personal.inc file that calls relevant routines depending on the char class.
-
LordGiddion
- a snow griffon

- Posts: 352
- Joined: Sat Sep 13, 2003 6:12 pm
-
Contact:
Post
by LordGiddion » Mon Apr 12, 2004 8:24 am
unfortunatly you can't really have a personal.inc for each character unless you run a different mac for each character. #include statements run before the macro does any processing so the include statements can't be dynamic. 2 possiblities exisit, in personal.inc make /if statements based on character names or classes and just skip blocks of code based on class (this is what I do) or create seperate personal.inc files and mac files to call them for each character/class.
-
Undies
- a ghoul

- Posts: 94
- Joined: Mon Oct 20, 2003 9:12 pm
Post
by Undies » Mon Apr 12, 2004 10:43 am
This is all I do.
personal.inc
Code: Select all
|MACROQUEST MACRO FILE
|personal.inc
|Personal commands module example.
|Version 8.13
|Date:10/24/2003 8:56am
|
|
|Commands in this module:
|
|
|
|
#Event Nobind1 "You cannot bandage your target past"
#Event Nobind2 "You cannot be bandaged past"
#Event Nobandages "You can't bandage without bandages"
#Event Bandage_OK "The bandaging is complete"
| Uncomment the line below if you have advpath.inc
#include advpath.inc
#include monk.inc
#include shaman.inc
#include magician.inc
#include cleric.inc
#include enchanter.inc
#include necromancer.inc
Sub PersonalCommands
|general commands go here
/varset Commands(0,0) autobehind
/varset Commands(0,1) door
/varset Commands(0,2) disc
/varset Commands(0,3) sneak
/varset Commands(0,4) bindwounds
/varset ArrayPers 4
|class specific commands go in their own routines
/if "$char(class)"=="Monk" {
/call monkCommands
} else /if "$char(class)"=="Shaman" {
/call shamanCommands
} else /if "$char(class)"=="Magician" {
/call magicianCommands
} else /if "$char(class)"=="Cleric" {
/call clericCommands
} else /if "$char(class)"=="Enchanter" {
/call enchanterCommands
} else /if "$char(class)"=="Necromancer" {
/call NecroCommands
}
/return
Sub SetupPersonalVars
/declare AutoBehind global
/varset AutoBehind "$ini(@IniFile,"Personal",AutoBehind)"
/if "@AutoBehind"=="NOTFOUND" /ini "@IniFile" Personal AutoBehind 0
/declare BWstat global
/varset BWstat 0
/declare bandageinsult global
/varset bandageinsult 0
| ADV PATHING DECS
/declare advpath_v global
/declare advpath global
/varset advpath_v $ini(advpath.inc,"advpath",version)
/if "@advpath_v"=="NOTFOUND" {
/echo Advanced pathing NOT available.
/varset advpath 0
} else {
/if "@advpath_v">="1.04" {
/declare FaceFastini local
/varset FaceFastini "$ini(@IniFile,"advpath",FaceFast)"
/if "@FaceFastini"=="NOTFOUND" {
/ini "@IniFile" advpath FaceFast 1
/varset FaceFastini 1
}
/declare SpeedSenseini local
/varset SpeedSenseini "$ini(@IniFile,"advpath",SpeedSense)"
/if "@SpeedSenseini"=="NOTFOUND" {
/ini "@IniFile" advpath SpeedSense 15
/varset SpeedSenseini 15
}
/declare FollowDistanceini local
/varset FollowDistanceini "$ini(@IniFile,"advpath",FollowDistance)"
/if "@FollowDistanceini"=="NOTFOUND" {
/ini "@IniFile" advpath FollowDistance 20
/varset FollowDistanceini 20
}
/declare SilentFlagini local
/varset SilentFlagini "$ini(@IniFile,"advpath",SilentFlag)"
/if "@SilentFlagini"=="NOTFOUND" {
/ini "@IniFile" advpath SilentFlag 1
/varset SilentFlagini 1
}
/echo Advanced pathing v(@advpath_v) enabled.
/varset advpath 1
/call InitAPFVars @FaceFastini @SpeedSenseini @FollowDistanceini
/varset SilentFlag @SilentFlagini
} else {
/echo Minimum advpath.inc v(1.04) required - you have v(@advpath_v)
/echo Advanced pathing found, but too old. Update it!
/varset advpath 0
}
}
|class specific decs
/if "$char(class)"=="Monk" {
/call SetupMonkVars
} else /if "$char(class)"=="Shaman" {
/call SetupShamanVars
} else /if "$char(class)"=="Magician" {
/call SetupMagicianVars
} else /if "$char(class)"=="Cleric" {
/call SetupclericVars
} else /if "$char(class)"=="Enchanter" {
/call SetupenchanterVars
} else /if "$char(class)"=="Necromancer" {
/call SetupNecroVars
}
/return
Sub TellCmds-personal
/if "$char(class)"=="Monk" {
/call TellCmds-monk
} else /if "$char(class)"=="Shaman" {
/call TellCmds-shaman
} else /if "$char(class)"=="Magician" {
/call TellCmds-magician
} else /if "$char(class)"=="Cleric" {
/call TellCmds-cleric
} else /if "$char(class)"=="Enchanter" {
/call TellCmds-enchanter
} else /if "$char(class)"=="Necromancer" {
/call TellCmds-Necro
}
/return
|Things that you want to happen every loop through the macro go in this sub.
Sub PersonalMain
/if n @AutoBehind==1 {
/if n @Combatstatus==1 {
/if $target()==TRUE {
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>6 {
/call Do-behind
}
}
}
}
/if n @Afollow==0 {
/if n @FollowFlag==0 {
/if n @mdump==0 {
/if n @BWstat!=0 {
/if n $char(ability,"Bind Wound")>0 {
/target myself
/delay 5
/doability "Bind Wound"
:perswaitbind
/if n $char(ability,"Bind Wound")<0 /goto :perswaitbind
/delay 5
}
}
}
}
}
/if "$char(class)"=="Monk" {
/call Monkmain
} else /if "$char(class)"=="Shaman" {
/call Shamanmain
} else /if "$char(class)"=="Magician" {
/call Magicianmain
} else /if "$char(class)"=="Cleric" {
/call clericmain
} else /if "$char(class)"=="Enchanter" {
/call enchantermain
} else /if "$char(class)"=="Necromancer" {
/call Necromain
}
/return
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub Do-Door
/doort
/face look door
/press u
/return
Sub Do-disc
/disc @Param1
/return
Sub Do-sneak
/doability Sneak
/delay 2s
/if n $char(ability,"Sneak")>0 /msg @MasterName Sneak is off.
/if n $char(ability,"Sneak")<=0 /msg @MasterName Sneak is on.
/return
Sub Do-autobehind
/if $defined(Param1)==FALSE {
/if n @AutoBehind==0 /call ChatOut 3 @MasterName "I won't position myself behind the mob."
/if n @AutoBehind==1 /call ChatOut 3 @MasterName "I will position myself behind the mob."
/return
}
/if (@Param1=="off" || @Param1=="0") {
/varset AutoBehind 0
/call ChatOut 5 @MasterName "I will no longer position myself behind the mob."
}
/if (@Param1=="on" || @Param1=="1") {
/varset AutoBehind 1
/call ChatOut 5 @MasterName "I will now position myself behind the mob."
}
/return
Sub Do-bindwounds
/varset BWstat 1
/return
Sub Event_Nobandages
/if n @bandageinsult==0 {
/call ChatOut 1 @MasterName "I need more bandages you scum-sucking turd burglar!"
/beep
/beep
/beep
}
/varset bandageinsult 1
/return
Sub Event_Bandage_OK
/varset bandageinsult 0
/return
Sub Event_Nobind1
/varset BWstat 0
/delay 2s
/if $char(state)!=SIT /sit
/return
Sub Event_Nobind2
/varset BWstat 0
/delay 2s
/if $char(state)!=SIT /sit
/return
stuff that is common to classes goes in the personal.inc file and class specifiic stuff goes in the individual incs. I agree it is somewhat clumsy but still preferable to having one inc file for my tastes.
EDIT: The bindwound stuff is actually not complete and is something I have been developing for my necro bot... probably best to delete it out at this stage.
-
LordGiddion
- a snow griffon

- Posts: 352
- Joined: Sat Sep 13, 2003 6:12 pm
-
Contact:
Post
by LordGiddion » Mon Apr 12, 2004 10:49 am
Makes complete sense, and is 110% in tune with the intent of the inc files.
-
notaguru
- orc pawn

- Posts: 15
- Joined: Tue Apr 13, 2004 1:54 am
Post
by notaguru » Tue Apr 13, 2004 2:22 am
my username says it all,
I used genbot for a good while at version 8.x and decided to try the new features of 9.x.
I recreated all the needed includes and the new genbot.mac, put the advpath.inc in the macro folder and uncommented the line in my personal.inc and I get the following error message.
[MQ2] Advanced pathing v(1.15) enabled.
Ending Macro: Failed to parse /if command
advpath.inc@1486(initApfVars(FaceF,SpeedS,FollowDst)):/newif ${Defined[FaceF]}{
personal.inc@286 (setupPersonalVars): /call InitAPFVars @FaceFastini @SpeedSenseini @Followdistanceini
genbot.mac@44 (Main): /call SetupPseronalVars
Cleared the following: Timers Arrays
The current macro has ended.
I commented out the referenced /newif lines in the advpath.inc and the macro would load fine but if I used "/tell bot follow" or "/bot follow me" it would error out with another failed to parse /if command from the advpath.inc.
Is it possible that changes have been made to advpath.inc that are not supported in genbot.mac now?
Having only worked on simple scripts, I just can't seem to pinpoint the problem on my own so any help would be greatly appreciated.
Thanks
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Tue Apr 13, 2004 9:09 am
Hrm, make sure you have both the old parm system and the new parm system on and then post your results (make sure to change back anything you modified in genbot and advpath.inc.).
-
notaguru
- orc pawn

- Posts: 15
- Joined: Tue Apr 13, 2004 1:54 am
Post
by notaguru » Tue Apr 13, 2004 9:29 am
Thanks for the quick response. I'll research how to do what ya asked today while I'm working :) and I'll try it tonight when I get home. Thank you for providing a direction to start looking to resolve my issue.
-
notaguru
- orc pawn

- Posts: 15
- Joined: Tue Apr 13, 2004 1:54 am
Post
by notaguru » Tue Apr 13, 2004 10:04 am
Ok took a few minutes before work to look at this. I took out the comments in MQ2Main.h to enable the new parms and now the macro loads correctly but I still get the same results as when I commented out the offending /if command from my earlier post. I do "/tell bot follow mastername" and it targets and runs to the master then produces this error
Target Cleared
Ending macro: Failed to parse /if command
advpath.inc@779 (TrackFollow): /newif ${spawn[@FollowID].Distance3D}>@FollowDistance {
advpath.inc@30 (AdvPathPoll): /call TrackFollow
genbot.mac@89 (Main): /if n @advpath==1 /call AdvPathPoll
Cleared the following: Timers Arrays
Another push in the right direction would be big help, Thanks
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Tue Apr 13, 2004 11:44 am
I honestly haven't tested this with genbot at all since Lasher updated the macro.
Someone that is using this in its current mixed old parm/new parm mode would have to comment. The should however be no differences in the way that advpath.inc acts from the old version.
Also, you left both the old parm and new parms enabled and did a batch clean, batch build right?
-
LordGiddion
- a snow griffon

- Posts: 352
- Joined: Sat Sep 13, 2003 6:12 pm
-
Contact:
Post
by LordGiddion » Tue Apr 13, 2004 11:55 am
Right now Genbot is old params, Diggler is working to convert the current version of genbot to MQ2Data and I'm working on a rewrite of Gebot that will use the new system.
-
notaguru
- orc pawn

- Posts: 15
- Joined: Tue Apr 13, 2004 1:54 am
Post
by notaguru » Tue Apr 13, 2004 12:15 pm
I did a batch rebuild in VS6. I didn't do a clean beforehand tho. I'll try that tonight. And I have both old and new params enabled.
LG are you saying that the 2 can't work together because one uses old params and the other uses new?