Dragon Scale
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Creating a New Macro: Lesson1

2 posters

Go down

Creating a New Macro: Lesson1 Empty Creating a New Macro: Lesson1

Post  Bloodred Sun May 01, 2011 1:40 am

MACRO WRITING:101
First off, if you haven't read my previous post about Macroquest2, installed it and are currently using it... this post isn't for you. Go see MacroQuest2: What can it do for you

The TL:DR Version:
Create a new folder within MQ2 Directory, call it "Macros". Create a new text file, rename it "Template". Copy and paste the code below into the Template Text file. File Save As, "Testbuff.mac" Change the "Save File Type As: to say "ALL not .txt.

The Loooooong Step - By - Step version
Lesson1: Step1
Lets begin by going into your MacroQuest2 folder, If you followed my instructions, its probably on your C:\MQ2\ folder.
Depending on your MQ2 Build and what version you downloaded, you May or May-not have a "Macros" folder already created. Lets assume you don't so start by creating a new folder, name it: Macros
If you already had it there, then open it up and proceed to step 2

Step 2
Macros within MQ2 are basically TEXT files renamed with a .mac instead of .txt. Simple enough, right? Go ahead and create a new Text file by "Right Clicking" on your mouse within the folder, New > Text Document. Depending on your settings on your computer, you might have the ability to see the File Extension or not. (AKA do you see your new text file as "New Text Document" or "New Text Document.txt") For now, Rename this newly created file as "Template" or "Template.txt" (Keeping the file extension for now.)

Step 3
Copy and paste the code below into your new "Template" text file. You'll be able to use this file as a Beginners Template to creating future simple macros.

Code:
| Template Buff Macro written by ~Bloodred
|
| This is a Template Macro to be used for Basic Macros creation in MQ2
| While you can edit and fine tune it for any character, the below is for my
| 75+ Beastlord.  Hence, you'll see a lot of Beastlord and Pet buff related spells
| To execute Macros like this using the MacroQuest2 Emulator, type the follow command
|ingame: /mac NAMEOFMACROFILE.mac
|Replacing the CAPS with the file name you save the macro as.
|
|  -==NOTES to self==-
|    While its not required, create notes to yourself within the macros "text" field
|    so that you can follow along with the logic and remember what everything
|    does.  To do this, enter a vertical line [Shift + \] at the start of the line and
|    MQ2 will ignore any text after it until the return of the next line.
|
|    Here I've written some notes to myself regarding the /casting commands
|
|    --Clicky Gear--
|    My Beastlord currently has several clicky items within bags and on armor he's wearing
|    For example, "Whistle of Vishmitar" is the name of the 2.5 Epic item that Summons the
|    Dino Pet. It takes 10 seconds to cast it. This item is currently located in Bag5.
|    MQ2 Stormhaven build has a Utility called "MQ2Exchange" that will automatically find
|    an item you ask, place said item in the inventory or pack slot you choose, click that item
|    and place it back into your inventory where you found it.
|
|    So, lets say you wanted to call forth a pet using this item. You would type this command
|    within the Macro
|    /casting "Whistle of Vishmitar" Pack8
|    When the macro is executed, MQ2 will find the ITEM (Note: not the spell the item casts)
|    place it in Pack slot 8, click-cast the item and return it to where ever it was in your inventory.
|
|    Here are some additional tips to casting, the /pause feature within the game locks up the client
|    and is a bit comber sum.  In otherwords, its Outdated.  Lets say you wanted to cast several
|    spells back-to-back.
|    /casting "Whistle of Vishmitar" Pack8
|    /delay 11s
|    /casting "Growl of the Panther" gem8 -maxtries|2
|    If you're following the logic, when this macro is executed, it will cast a pet from slot 8, delay
|    itself 11 seconds (its good practice to add a second or 2 to allow spell gem refresh before
|    casting again), and then it will attempt to cast Growl of the Panther spell from Spell Gem slot 8
|    For a maxium amount of tries of 2 times in case of fizzles.
|
|    Here is a cheatsheet of Equipment and Inventory Slots used in casting clickes
|    --=Equipment/Inventory Cheatsheet=--
|0  charm      10  rightwrist    20  waist
|1  leftear    11  ranged        21  powersource
|2  head      12  hands        22  ammo
|3  face      13  mainhand      23  pack1
|4  rightear  14  offhand      24  pack2
|5  neck      15  leftfinger    25  pack3
|6  shoulder  16  rightfinger  26  pack4
|7  arms      17  chest        27  pack5
|8  back      18  legs          28  pack6
|9  leftwrist  19  feet          29  pack7
|              30  pack8
|    For example, if I wante to cast one of my rings, either of these will work
|    /casting "Icy Ring of Boreal Essence" leftfinger
|    /casting "Icy Ring of Boreal Essence" 15
|    Both of these commands will work, but its good practice to use the name of the slot
|    as well as the name of the item/spell.  Technically, if you knew of the ID of the item
|    or the spell, (IE: 48732) this could be placed in the quotes instead of the name.
|
|    Additional tips, I like to have notes one which spells are in my line-up and what they do
|    when I'm writing my macros,  This way I can prevent confusion and spell stacking issues.
|    Lessen my confusion as to what does what and to help tell me the delays between my
|    spell gem refresh times.
|
| Gem1 Spiritual Vim, 72mins, 5s, +62ATK, +336HP
| Gem2 Spiritual Enlightenment, 72mins, 5s, +11Mana and HP regen
| Gem3 Focus of Amilan, 72mins, 8s, +829MAX HP +829HP
| Gem4 Ruthless Ferocity, 6mins30s, 3s, +62STA +224ATK +67ALL Resists
| Gem5 Bark at the Moon, 2s, Summons 2 Pets for 18s. Battle only
| Gem6 Growl of the Panther, 1min, 3s, Adds 20%Damage skill Modifier, +150HP per tick, +1500HP
| Gem7 Unparalleled Voracity, 60mins, 6.5s, Adds 85%Haste, +104ATK, +80AC to Pet
| Gem8 Steeltrap Jaws, Pet Buff, 10mins, 3.0s, Adds pet proc Steel Jaws Strike, +75DEX
| Gem9 Spirit of Lairn, Pet Buff, 40mins, 3.0s, Adds pet proc strike, +75DEX
|
| This being all said, lets begin the process of editing your first macro.
| --=Actual Macro Starts Below this Line=--

Sub Main
|    All Macro's must have a Sub Main and /return command at the beginning and the end.
|    Everything is written in between these code commands.
    /g -Rebuffing my character -
    /Target ID ${Me.ID}

    /casting "Ornate Mask of Fallen Dreams" Pack8
    |Illusionary Spikes, 60mins, +30DS
    /delay 1s

    /casting "Whistle of Vishmitar" Pack8
    |2.5 Epic Pet Summon
    /delay 11s

    /casting "Icy Ring of Boreal Essence" Pack8
    |Ancestal Memories, 27mins, 12%Haste v3, +12HP regen,
    /delay 3s

|    /casting "Guise of the Deceiver" Pack8
|    |Illusion Darkelf, 36mins
|    /delay 7s
|    Note: I commented out this line because I don't to cast this spell right now, yet I don't want to
|    delete it as I may need it in the future.  Helpful for zones or fights that don't always need this spell.

    /casting "Potion of Infinite Shrink" Pack7
    |Shrink
    /delay 2s

    /casting "Unparalleled Voracity" Gem7 -maxtries|3
    |Pet Spell, 60mins, Adds 85%Haste, +104ATK, +80AC to Pet
    /delay 7s

    /casting "Potion of Infinite Shrink" Pack7
    |Shrink
    /delay 2s

    /casting "Steeltrap Jaws" Gem8 -maxtries|3
    |Pet Buff, 10mins, Adds pet proc Steel Jaws Strike, +75DEX
    /delay 5s

    /casting "Potion of Infinite Shrink" Pack7 -targetid|${Me.ID}
    |Shrink
    /delay 3s

    /casting "Spirit of Lairn" Gem9 -maxtries|3
    |Pet Buff (Note: Spelt Lairn not Laim), 40mins, Adds pet proc strike, +75DEX
    /delay 5s

    /casting "Shawl of Shadow Warding" Pack8
    |Pet Spell
    /delay 11s

    /casting "Savage Lord's Dragonhide Leggings" Legs
    |Pet Spell, Wild Spirit Infusion, 38mins
    /delay 11s

    /casting "Savage Lord's Dragonhide Armwraps" Arms
    |Pet Spell
    /delay 4s

    /casting "Spiritual Vim" Gem1 -maxtries|3
    |Group Brawn-HP-ATTK, 72mins, 5s, +62ATK, +336HP
    /delay 7s

    /casting "Spiritual Enlightenment" Gem2 -maxtries|3
    |Group HP/Manaregen, 72mins, 5s, +11Mana and HP regen
    /delay 7s

    /casting "Focus of Amilan" Gem3 -maxtries|3
    |Group +HP Bonus, 72mins, 8s, +829MAX HP +829HP
    /delay 7s

    /casting "Pauldron of Dark Auspices" Pack8
    |Scream of Death, 20mins, Weapons Proc: Mental Damage.
    /delay 4s

    /casting "Visage of the Royal Shadowclaw" Pack8
    |Ward of the Garou I, 35mins, 50% Haste, +35 ATK, +8%crits to 1HB
    /delay 6s

    /casting "Runed Band of Verocity" leftring
    |8min Ferocity
    /delay 7s

    /casting "Spiritual Vim" Gem1 -maxtries|3
    |Group Brawn-HP-ATTK, 72mins, 5s, +62ATK, +336HP
    /delay 7s

    /casting "Spiritual Enlightenment" Gem2 -maxtries|3
    |Group HP/Manaregen, 72mins, 5s, +11Mana and HP regen
    /delay 7s

    /casting "Focus of Amilan" Gem3 -maxtries|3
    |Group +HP Bonus, 72mins, 8s, +829MAX HP +829HP
    /delay 7s

    /casting "Pauldron of Dark Auspices" Pack8
    |Scream of Death, 20mins, Weapons Proc: Mental Damage.
    /delay 4s

    /casting "Visage of the Royal Shadowclaw" Pack8
    |Ward of the Garou I, 35mins, 50% Haste, +35 ATK, +8%crits to 1HB
    /delay 6s

|    /casting "Goblin Tooth Earring" Pack8 -targetid|${Me.ID}
|    |Swift like the Wind, 16mins 60%Haste
|    /delay 7s
|    Note: Swift like wind was overwriting Ward of the GarouI so I commented it out
|    in case I need this spell for the future.

    /casting "Runed Band of Verocity" leftring -targetid|${Me.ID}
    |6:30s Ferocity
    /delay 7s

/return

Step 4
Once pasted into your Template document, go to File > Save As to open up a new window. Name this new macro something like "Testbuff.mac". Be sure to change the "Save as type:" to ALL instead of TEXT. (By default, you should still be on Encoding:ANSI which is how you want to save it as.)

Step5
Run MQ2, Run EQBCServer, Launch EQEmu and log onto your character. type /mac NAMEOFMACROFILENAME.mac
If you edited everything correctly and you have in possession the items on your character, you'll begin casting spells back to back until it ends


Last edited by Bloodred on Sun May 08, 2011 12:31 pm; edited 1 time in total

Bloodred

Posts : 5
Join date : 2011-03-13

Back to top Go down

Creating a New Macro: Lesson1 Empty Re: Creating a New Macro: Lesson1

Post  Bloodred Sun May 01, 2011 9:23 am

While you're editing the above Temple Macro to your own character's needs, you may come across several instances where I cast the same spell twice. IE the Shrink command and the Ferocity spell from my left ring. This is because I'm casting it on both myself and again on my pet. Certain pet buff spells when cast, auto-target the pet and stay targeted until otherwise told to change targets. Using this knowledge, I can cast buffs and spells in a particular order to maximize spell casting efficiency.

/target YOURCHARACTERNAME
vs
/target ID ${Me.ID}
You'll find that I tend to use the MQ2 version of targeting something (in this case, myself) over the traditional method used ingame. The /target YOURCHARACTERNAME command is designed to target the closest thing near your character that resembles the letters in which you type. Well, Beastlord pets are named the same as the characters name, with just a "Warder" at the end of it. Plus, what happens if the player you're attempting to target has a corpse in the zone that's closer to you than the player is. Yup, you've just targeted the corpse. Nooooot cool if you're trying to cast a heal from a hotkey only to find your shaman or cleric has been healing a corpse for the past 20 seconds.

Some additional commands to targeting something.
Code:
/target ID ${Target.ID}
This will tell the game to Target whatever you're targeting. If you're totally confused as to why you would ever use this command, a good example would be
Code:
/bca //target ID ${Target.ID}
This would tell "ALL" of your toons logged in and running to Target whatever it is your main is targeting. Its similar to the /assist command only more efficient in ways too detailed to explain for a beginner's lesson.

What if you did want to have one of your toons target someone else other than itself or you're main,
Code:
/bca //target ID ${PC Yourintendedtargetsname.ID}
Adding the PC in front of the same string will tell to search for a Playable Character. Its important to note that while you are in the { reference } bars, Everything is Case Sensitive. The .ID needs to be CAPS at this point as well as the first Character of your intended targets name.

Bloodred

Posts : 5
Join date : 2011-03-13

Back to top Go down

Creating a New Macro: Lesson1 Empty Re: Creating a New Macro: Lesson1

Post  Syge Thu May 05, 2011 6:07 pm

Thanks Red for this helpful post (and previous posts)! Must have taken awhile to type it up.

Syge

Posts : 7
Join date : 2011-03-06

Back to top Go down

Creating a New Macro: Lesson1 Empty Re: Creating a New Macro: Lesson1

Post  Bloodred Sun May 08, 2011 3:20 am

Note: After you've edited and created your own version of the macro.... if you're having problems with "item not found", you probably don't have a plugin loaded correctly.

type the following commands.
Code:
/plugin list
you "should" have about 14 plugins listed.
Here is the current list of what I was using at the time I was writing that test macro above.
Code:
[Plugins]
mq2cast
mq2chatwnd
mq2custombinds
mq2emusearch
mq2eqbc
mq2fps
mq2hud
mq2itemdisplay
mq2labels
mq2map
mq2moveutils
mq2netbots
mq2exchange
mq2melee

Look for
mq2exchange in your own list.
If its not loaded or you don't see it,

type the following.
Code:
/plugin mq2exchange
Try the macro again and it should work now. If not, contact me ingame as I probably won't be updating these macro help files much anymore.

Very few people have given me feedback except syge and Kray and its just not worth my time to continue typing all this up just for advice I can give them in-game.

Bloodred

Posts : 5
Join date : 2011-03-13

Back to top Go down

Creating a New Macro: Lesson1 Empty Re: Creating a New Macro: Lesson1

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum