All-Inclusive Macro

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

All-Inclusive Macro

Post by jacensolo » Wed May 16, 2007 6:50 pm

While I was camping a mob last night, I realized I was spending quite a bit of time just swapping between macros. I had the idea of creating one macro that handled many diverse but universally useful functions. I've had a few ideas on what to put in it, mostly drawn from macros and snippets I already use, but I'm fairly certain there are lots of things I haven't thought off that would be useful. Here is a list of the ideas I plan on incorporating so far:

* Experience Tracker
* Skill Routines
* A Timer
* A Spell Memming tool (INI spell sets)
* Spawn Watcher (like my macro in the depot)
* Force Feeding
* TS Combiner (nothing fancy, just combine and autoinventory)



Anyone have any suggestions for other features?

Note: Three seconds after posting this, it occurred to me that this might be more appropriate in the Macro Help forum, because it is asking for suggestions, not a new macro. However, after reading the information on how to go about posting in the Macro Help forum, it seemed to me that the steps listed had almost nothing to do with what I'm asking for. There wasn't really anything related to my problem to add to the wiki that would be of much use to others. If I'm wrong, please tell me, and let me know what kind of info I need to add to the wiki about this so as to be constructive, and I'll do so and move this to the Macro Help forum.

mekaniak
a hill giant
a hill giant
Posts: 290
Joined: Thu Sep 18, 2003 3:21 pm

Post by mekaniak » Wed May 16, 2007 7:14 pm

You should make each set of things you want a seperate .inc file and call routines from a main macro...It would probably keep your macro quite clean looking (kinda). I did that with a script I used for personal use when I used Innerspace. IS > MQ2
I love the Power Glove, it's so bad

Say hello to M.C. Smurf!

[quote]<mekaniak> adios guys.
<dont_know_at_all> idiot
* mekaniak is now known as mekaniak_dinner
<Jacensolo> me?
<dont_know_at_all> not this time
[/quote]

[quote]
<dont_know_at_all> A_Enchanter_00, how the fuck should i know? it's your code[/quote]

I love quoting IRC chat.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Post by dewey2461 » Wed May 16, 2007 7:17 pm

Or make each of them into plugins.

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

Post by jacensolo » Wed May 16, 2007 7:39 pm

The way I have it written now (first version almost ready for testing), each function is in its own include file. The major thing I wanted to accomplish was not just to have 1 macro that called lots of included subs, but to have 1 macro with lots of functions which ran as a whole. For instance, I wanted to be able to run my timer, WHILE having skill_routines going, WHILE having it scan for a specific mob to pop, WHILE it tracked EXP gains, etc.

As for IS being better than EQ, that isn't really relevant. I don't have access to IS, nor do I have knowledge of how to write IS scripts. MQ is readily available, and I can already code in MQ most everything I need.

I also have 0 knowledge of C++ right now, so writing my own plugins at the moment is out of the question. And, as my cash flow is less than wonderful, I don't have VIP, so I have only a few plugins to view in an attempt to learn how to code them. Another benefit is that I know that so long as MQ lives, my macros should only need the occasional tweak. Plugins, if what I understand is correct, need to be tweaked almost every time a new MQ is released.

mekaniak
a hill giant
a hill giant
Posts: 290
Joined: Thu Sep 18, 2003 3:21 pm

Post by mekaniak » Thu May 17, 2007 12:12 am

Sorry too hear you don't have the cash-flow for VIP. It's very very helpful/informative and help is wonderful when you ask the right questions.
I love the Power Glove, it's so bad

Say hello to M.C. Smurf!

[quote]<mekaniak> adios guys.
<dont_know_at_all> idiot
* mekaniak is now known as mekaniak_dinner
<Jacensolo> me?
<dont_know_at_all> not this time
[/quote]

[quote]
<dont_know_at_all> A_Enchanter_00, how the fuck should i know? it's your code[/quote]

I love quoting IRC chat.

wakkedup
a ghoul
a ghoul
Posts: 114
Joined: Tue Apr 11, 2006 5:25 am

Post by wakkedup » Thu May 17, 2007 11:14 am

Nothing to see here. Move along.

NFC
a hill giant
a hill giant
Posts: 151
Joined: Mon Dec 19, 2005 2:16 pm

Post by NFC » Thu May 17, 2007 11:44 am

Some of what you're looking for is, as stated above, VIP plugins. But much of it is also handled by a macro. With the exception of the TS combiner, you're describing Krust Mac.


http://macroquest2.com/phpBB2/viewtopic ... highlight=

User avatar
KungFuHamster
a snow griffon
a snow griffon
Posts: 337
Joined: Wed Oct 02, 2002 7:47 am

Post by KungFuHamster » Thu May 17, 2007 5:40 pm

I have an INC file that adds a bunch of stuff like setting up friends, joining on invite, standard junk, and one line of code I add to the main routine in my macro to run it all. So basically two lines to each macro adds everything.

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

Post by jacensolo » Thu May 17, 2007 6:47 pm

Thanks for pointing out Krust, it had a few things I didn't think of and a some effective ways of doing them that would never have occurred to me.

As for using 1 include with commonly used functions, that's what I had been doing before, but that still limited me to either using just the functions I wanted to put in 1 include, or adding multiple includes, which would then have to be coded in. What I've got in the works right now is a script which I can add an include to for each of my scripts, and then make an INI with scripts to run on startup and scripts to autorun every time it cycles. From there, I can do like you said, and add 1 line to each script, and it integrates all my scripts.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Post by dewey2461 » Thu May 17, 2007 11:33 pm

It sounds like you already have a bunch of inc files with the functionallity you want. If this is correct couldn't you just arrange a "master.mac" ?

Psudo coded here as ...

#include exptrack.inc
#include skills.inc
#include timer.inc
... etc ...

then in the main

:Mainloop
/call exptrack_main
/call skills_main
/call timers_main
/doevents
/goto :Mainloop

/end


The other suggestion is to use plugins. There are several available which do the various peices of this macro.

mq2XpTracker
mq2AutoSkills
mq2Melee
mq2SpawnMaster
mq2AutoRez
etc.

The nice thing about the plugins is when they are enabled they run independantly of the others. Turn them each on/off as you need them. Or leave them all on.

As far as VIP status . Pack your lunch for a week and save the $10-$15 and donate that to the developers. Just think what EQ would be like with out MQ2 and its easy to justify.

[/url][/code]

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Fri May 18, 2007 3:49 am

you could check out the krust macro, it has many of the pieces you want

xp tracker
force feed
auto clicking items
auto buffing
and many other things
spawn checker
auto using skills

feel free to molest the code any way you like

oh, and its not in vip :)

http://www.macroquest2.com/phpBB2/viewtopic.php?t=13016

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

Post by jacensolo » Fri May 18, 2007 3:06 pm

Yea, I've already downloaded the Krust mac and looked through it. Several nice concepts, and it got me around a few coding roadblocks that I couldn't figure out.

As to the idea of having a "master.mac", and the design you listed, thats very close to what I ended up with.

Here is my preliminary version of my main script. (Note: Haven't tested In-Game, so probably a few errors)

Code: Select all

#include assist.inc
#include Camp.inc
#include clickies.inc
#include Combine.inc
#include drag.inc
#include drunk.inc
#include EXPTrack.inc
#include farm.inc
#include FeedMe.inc
#include fish.inc
#include lang.inc
#include memspell.inc
#include Selfbuff.inc
#include skills.inc
#include spells.inc
#include spelltrain.inc
#include timer.inc
#include zonecheck.inc

#event Start "[MQ2] Start: #1#."
#event Start "[MQ2] Start: #1#, #2#."

Sub Main
   /call Aliases
   /call Run Setup
   /squelch /alias /run /echo Start:
   /call Idle
/return

Sub Aliases
   /declare run int 1
   :loop
   /if (${Ini[${Me.CleanName}.ini,Aliases,${run}].Equal[NULL]}) /return
   /squelch /docommand ${Ini[${Me.CleanName}.ini,Aliases,${run}]}
   /varcalc run ${run}+1
   /goto :loop
/return

Sub Run
   /declare run int 1
   :loop
   /if (${Ini[${Me.CleanName}.ini,${Param0},${run}].Equal[NULL]}) /return
   /call ${Ini[${Me.CleanName}.ini,${Param0},${run}]}
   /varcalc run ${run}+1
   /goto :loop
/return

Sub Idle
   :loop
   /call Run Auto
   /doevents
   /goto :loop
/return

Sub Event_Start
   /call ${Param1}${If[${Defined[Param2]}, ${Param2},]}
/return
And this is what my INI file looks like:

Code: Select all

[Setup]
1=AssistPrep
2=ExpPrep
3=BuffPrep

[Auto]
1=CampCheck
2=Clickies
3=ExpTrack
4=FeedMe
5=SelfBuff
6=Skill_Routines

[Clickies]
1=Eyepatch of Plunder
2=Journeyman's Boots
3=Fabled Shrunken Goblin Skull Earring

[SelfBuffs]
1=Cloak of the Akheva
2=Shroud of Death

[Skills]
Backstab=FALSE
Bash=TRUE
Begging=TRUE
Disarm=TRUE
Evade=FALSE
FeignDeath=FALSE
FlyingKick=FALSE
Forage=FALSE
Intimidation=FALSE
Kick=FALSE
Mend=FALSE
PickPockets=FALSE
SenseTraps=FALSE
Slam=FALSE
Taunt=TRUE

[Options]
HitBox=15

[Spell:Solo]
Spell1=Drain Soul
Spell2=Asystole
Spell3=Cascading Darkness
Spell4=Spear of Plague
Spell5=Torrent of Hate
Spell6=Shroud of Death
Spell7=Gather Shadows
Spell8=Death Peace

[Food]
Food1=Ration

[Drink]
Drink1=Bottle of Milk

[Aliases]
1=/declare textgauge global
2=/varset textgauge ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3=/mapnames normal [%l %c] %N
4=/mapnames target [%l %c] %N - %h%%
5=/alias /pf /pet follow
6=/alias /pb /pet back
7=/alias /pd /pet get lost
8=/alias /ps /pet sit
Basically, here's what it does:

* Loads all my aliases and other settings (Had been in a cfg file, but this puts all my character settings in one place)
* Runs all the subs I've put in the INI as "Setup" subs.
* Enters its "Idling" loop, and calling subs listed in the INI as "Auto"
* When I start a script with "/run blahblahblah", it calls that sub, and if I gave params, it sends those too.
* Each Sub that lasts more than 1 loop has a /call Run Auto, which checks all the Auto Subs from the INI.

The functions I have build into it so far are:
* A Timer
* A Spawn Checker (Checks a manually entered string. I plan to add ini support for checks by zone, like krust has)
* An EXP Tracker (Regular and AA, with per minute gain and time till ding/ping. This is Neolesh's snippet)
* Main and Secondary Assist storing (like Krust)
* Auto-Clickie refresh (Not like Krust. It clicks anything in the "clickie" section of INI, instead of having it click by buff type.)
* Tradeskill Combiner (Nothing fancy: combine, autoinventory)
* Corpse dragging. (support for unlimited names. Code from Diggler's script)
* Alcohol Tolerance Trainer (Brells fishing pole)
* Farming Macro (the one I posted in the Depot)
* Force Feeding (From the script by A_Druid_00)
* Language Trainer (3 types: 1 just spams and you manually change language, 2nd spams and auto changes language, 3rd accepts a specific tell, invites, then spams and changes languages.)
* Spell Set Loader (With INI support)
* Self Buff Refresh (With INI support)
* Skill_Routines
* Spell_Routines (Not called by itself, but called by various other functions)
* Spell Skill Trainer (You mem spells with skills to train, it practices till maxed)

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: All-Inclusive Macro

Post by xyilla » Tue Aug 12, 2025 11:29 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: All-Inclusive Macro

Post by xyilla » Tue Aug 12, 2025 11:31 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: All-Inclusive Macro

Post by xyilla » Tue Aug 12, 2025 11:32 pm