Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 01:44:16 am *

Login with username, password and session length
Pages: 1 [2] 3 4
Print
Author Topic: Quality of Life macro commands  (Read 38202 times)
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #15 on: April 02, 2018, 12:32:56 pm »

Loot enough stacks of corpses and eventually you zombie out and press Loot, Stand, Loot, Stand in a rhythm and invariably miss something you actually wanted to loot sucks, so I added a line to my loot hotkey to echo the corpse I am looting by name and ID.  That way you can keep looting the rest and after checking all corpses, /hidec off to display them all again and /tar id 1234, replacing the 1234 with the actual ID you noted before and /loot.

/bc  Looting ${Target.Name} ID: ${Target.ID}
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #16 on: April 02, 2018, 01:00:49 pm »

Added an event to the super basic macro from earlier to let you execute a FindItem and FindItemBank command to check for an existing item and if found to return a count of that item in your inventory and a count of that item in your bank.  This can easily be /bca to any toons running the macro.  The search does not  require an exact match, just a partial match.  Instead of having to type out the whole name of Glowing Sun Shard, I can just /echo  finditem sun shard and get a summary search returned.  Pic posted below the code to illustrate.

Code:
#Event CountAA "Unspent AA: #1#"
#Event MaxHP "Max HP: #1#"
#Event CurrentAA "#*# now have #1# ability points."
#Event FindItem "[MQ2] finditem #1#"



Sub Main()
:Primeloop
/doevents
/goto :Primeloop
/return

|===================================================
|  SUB: Event_CountAA
|===================================================
Sub Event_CountAA(Line, AACount)
/bc Total AA: ${AACount}
/return

|===================================================
|  SUB: Event_MaxHP
|===================================================
Sub Event_MaxHP(Line, HPCount)
/bc Total HP: ${HPCount}
/return

|===================================================
|  SUB: Event_CurrentAA
|===================================================
Sub Event_CurrentAA(Line, WhatsMyAA)
/varset CurrentAA ${WhatsMyAA}
/return

|-----------------------------------------------------------------------------------------------
|  SUB: Event_FindItem
|-----------------------------------------------------------------------------------------------
Sub Event_FindItem(Line, whichItem)
/docommand ${If[${FindItemCount[${whichItem}]} > 0,/bc ${FindItemCount[${whichItem}]} ${FindItem[${whichItem}]} in inventory,/bc None in inventory]}
/docommand ${If[${FindItemBankCount[${whichItem}]},/bc ${FindItemBankCount[${whichItem}]} ${FindItemBank[${whichItem}]} in bank,/bc None in bank]}
/return


Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #17 on: April 14, 2018, 05:16:31 pm »

I fluctuate in how many toons to log on in a session and usually start at 12, but sometimes something will drop that offline alts could use and I end up logging them on.  I like lazy, so I made a macro for being able to invite them to the instance without having to remember the syntax.  Two of the parts  look to see how many toons I have in the Netbots channel and sends each of them an invite.  The first one just raid invites every toon online into a raid instance of my current zone.  The second one lets me supply both the zone name and instance type and then invites every toon in my Netbots.  I made a third part to watch for incoming tells for people who I need to invite to the specified instance and auto-invites them, so if someone wants access to the zone they can just say the trigger text in a tell and receive an automatic invite.  I'm just going to append the simple macro that this post has been fleshing out with the code.

Code:
#Event CountAA "Unspent AA: #1#"
#Event MaxHP "Max HP: #1#"
#Event CurrentAA "#*# now have #1# ability points."
#Event FindItem "[MQ2] finditem #1#"
        #Event InviteAllNetBotsClientsCurrentZoneRaid "#*#inviteall raid#*#"
#Event InviteSuppliedTypeAndZone "#*#invite to #1# #2#"
#Event Inviter "#3# tells you, 'invite me to instance #1# #2#'"


Sub Main()
:Primeloop
/doevents
/goto :Primeloop
/return

|===================================================
|  SUB: Event_CountAA
|===================================================
Sub Event_CountAA(Line, AACount)
/bc Total AA: ${AACount}
/return

|===================================================
|  SUB: Event_MaxHP
|===================================================
Sub Event_MaxHP(Line, HPCount)
/bc Total HP: ${HPCount}
/return

|===================================================
|  SUB: Event_CurrentAA
|===================================================
Sub Event_CurrentAA(Line, WhatsMyAA)
/varset CurrentAA ${WhatsMyAA}
/return

|-----------------------------------------------------------------------------------------------
|  SUB: Event_FindItem
|-----------------------------------------------------------------------------------------------
Sub Event_FindItem(Line, whichItem)
/docommand ${If[${FindItemCount[${whichItem}]} > 0,/bc ${FindItemCount[${whichItem}]} ${FindItem[${whichItem}]} in inventory,/bc None in inventory]}
/docommand ${If[${FindItemBankCount[${whichItem}]},/bc ${FindItemBankCount[${whichItem}]} ${FindItemBank[${whichItem}]} in bank,/bc None in bank]}
/return

|===================================================
|  SUB: Event_InviteAllNetBotsClientsCurrentZoneRaid
|===================================================
Sub Event_InviteAllNetBotsClientsCurrentZoneRaid
/declare i int
/for i 1 to ${NetBots.Counts}
/say raid invite ${Zone.ShortName} ${NetBots.Client.Arg[${i}, ]}
/next i
/return

|===================================================
| SUB: Event_InviteSuppliedTypeAndZone
|===================================================
Sub Event_InviteSuppliedTypeAndZoneTypeAndZone(Line,whichZone,whichType)
/declare j int
/for j 1 to ${NetBots.Counts}
/say ${whichType} invite ${whichZone} ${NetBots.Client[${j}]}
/next j
/return

|===================================================
| Sub Event_Inviter
|===================================================
Sub Event_Inviter(Line,whatZone,whatType,InviteMe)
/say ${whatType} invite ${whatZone} ${InviteMe}
/return
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #18 on: April 15, 2018, 05:26:04 pm »

It's pretty rare to have to form up groups and create a raid, with the server running nonstop and not having to be rebooted for months at a time, but once in a while I get a zone crash that disbands the raid.  I had a hotkey to form the groups then I'd simply raidinvite the leaders, but in the interests of maximizing my laziness I put it all on a single hotkey.

Line 1:/multiline ; /invite toon2; /invite toon3; /invite toon4; /invite toon5; /invite toon5; /invite toon6
Line 2:/multiline ; /bct toon7 //invite toon8; /timed 3 /bct toon7 //invite toon9; /timed 6 /bct toon7 //invite toon10; /timed 9 /bct toon7 //invite toon11; /timed 12 /bct toon7 //invite toon12
Line 3:/multiline ; /bct toon13 //invite toon14; /timed 3 /bct toon13 //invite toon15; /timed 6/bct toon13 //invite toon16; /timed 9 /bct toon13 //invite toon17; /timed 12/bct toon13 //invite toon18; /timed 18 /bca //invite
Line 4:/multiline ; /raidinvite toon7; /raidinvite toon13
Line 5:/timed 30 /bca //raidaccept

Items of note:
    1. Group one is all control toon inviting, group two is control toon sending the command to group 2 leader (toon7) and group 3 is the control toon sending the command to group 3 leader (toon13).
    2. The multiline command uses the semicolon ; as the delimiter, but in order for you to be able to send the invite command the ; must immediately follow the toon name...there can NOT be a space between the /toon2 and the ;.
    3. The commands in the second and third line are all preceeded by a /timed command, this is to space out the commands a bit so stuff doesn't get spammed too fast to process
    4. The third line is appended with a timed command for sending the invite command to all toons, this acts as the way to get the toons to accept the invite they were sent and join their group
    5. The fourth line is a simple command sent to both group leaders to send raidinvites to the group leaders
    6. The fifth line is a timed command to the group leaders to accept the raid invite

Logged
Sarthin
Administrator
Legend
*****
Posts: 1017

Common sense is not so common


View Profile
« Reply #19 on: April 16, 2018, 01:16:31 am »

This is nice. Now I have an open slot for another hot button  Grin I was previously doing it in two hot key macros, like you.
Logged

Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #20 on: April 17, 2018, 11:01:15 am »

While trading items or coin between toons, having to alt+Tab or mouseclick to a window to confirm the trade you are making is far more effort than my lazy can endure, so here's a quick command to tell the toon you are trading with to click trade on their trade confirmation window.

/bct ${Target.CleanName} //notify TradeWnd TRDW_Trade_Button leftmouseup
Logged
Sarthin
Administrator
Legend
*****
Posts: 1017

Common sense is not so common


View Profile
« Reply #21 on: April 17, 2018, 04:21:03 pm »

....... far more effort than my lazy can endure
/bct ${Target.CleanName} //notify TradeWnd TRDW_Trade_Button leftmouseup


My lazy ass just got more lazy. This one was really nice, Dimur.
Logged

Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #22 on: May 22, 2018, 06:31:03 pm »

A new one via a suggestion by Sarthin, it sends a /bca to all toons and checks their cursor...any with an item on their cursor respond with what's on their cursor.  It's handy for T10 when you kill Ro'Ki and want to know how many immaculates end up on your toons' cursors.

/noparse /bca //if (${Cursor.ID}) /bc ${Cursor}

Logged
Kwai
Sr. Member
****
Posts: 299


View Profile
« Reply #23 on: May 23, 2018, 02:12:53 pm »

A new one via a suggestion by Sarthin, it sends a /bca to all toons and checks their cursor...any with an item on their cursor respond with what's on their cursor.  It's handy for T10 when you kill Ro'Ki and want to know how many immaculates end up on your toons' cursors.

/noparse /bca //if (${Cursor.ID}) /bc ${Cursor}



Awesome!  If you don't mind me asking... what would be the code for :

 put that item on your cursor into your first open bag slot
Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #24 on: May 23, 2018, 03:34:07 pm »

/autoinventory

is the command, I believe.
Logged
Sarthin
Administrator
Legend
*****
Posts: 1017

Common sense is not so common


View Profile
« Reply #25 on: May 23, 2018, 04:03:09 pm »

/autoinventory

is the command, I believe.


That one works like a charm. Puts it in the first free bag slot.
Logged

Rent Due
EZ Server Admin GM
Administrator
Master
*****
Posts: 776



View Profile
« Reply #26 on: May 24, 2018, 12:52:27 am »

instead, use: /givetorent command
Logged

Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #27 on: June 10, 2018, 07:26:16 pm »

This little macro will check to see if you have the Embalmers Skinning Knife in inventory and an open inventory slot, if so it just clicks the dagger to summon a 5 stack of mystery meat and autoinventories it until you get 100 stockpiled.

Code:


Sub Main()
/bc Summoning some Mystery Meat, this should net you 100 by the time it's done
:Primeloop
/call ClickFood
/goto :Primeloop
/return

|=====================================================================
| SUB ClickFood
|=====================================================================
Sub ClickFood
/if (${Me.FreeInventory} > 0) {
/if (${FindItem[embalmers].ID}) {
/if (${FindItemCount[mystery]} < 100) {
/casting 29280
/timed 55 /autoinventory
/delay 1s
}
}
}
/return
« Last Edit: June 10, 2018, 07:29:25 pm by Dimur » Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #28 on: August 02, 2018, 11:49:12 am »

Dewphrane was asking on /ooc if there was a macro to do item turn ins like crystals to PoDragons tikis and I didn't know if there was one, so I just made a quick and dirty 3 line social that works for me.  I don't use the compile on mqemulator.net but rather another compile, and maybe that's the issue, but I couldn't get this hotkey to work for him.  I'm posting it here in case anyone else wants to help me troubleshoot it or tell me whether or not it works for them.

First of all, this code is targeting the 10th slot of the 8th bag in your inventory...so it assumes you have a 10 slot bag in your last bag slot.  I have my magic box in that slot by default, but you could use a tinkerer's bag or w/e, as long as it's a 10 slot bag.  I also play in first person, so it's easy for me to center the turn in npc on my screen.  Line 2 doesn't care what's on the screen, it just knows to click in the middle of the screen.  Even if you play in the 3rd person view, you should be able to center the npc on the screen so this works.
Again, you MUST have a 10 slot bag in your last bag slot AND you MUST center the npc on the screen, but if you can meet both conditions this is a quick and simple hotkey press to do the hand ins.

Line 1: /if (${InvSlot[pack8].Item.Item[10].ID}) /ctrl /itemnotify in pack8 10 leftmouseup
Line 2: /if (${Cursor.ID}) /click left center
Line 3: /if (${Window[GiveWnd].Open}) /timed 3 /notify GiveWnd GVW_Give_Button leftmouseup

The code is very simplistic and has a few conditionals before trying to execute.  Line 1 reads as If Slot 10 of Bag 8 is not empty, hold down the control key and click whatever is in that slot.  Since crystals are stacked items, you need to hold the control key down or you'll get the quantity window to pop up.  Line 2 simply says If you have an item on your cursor, mouseclick the center of the screen with your left mouse button.  You shouldn't have an item on your cursor if the line 1 doesn't find an item it can pick up, so this only executes if there's an item on the cursor.  Line 3 reads as If the window to hand items to NPCs is open, click the give button on that window.  You won't have the give window open if line 2 doesn't succeed so you can't press the give button anyhow.

***I recently discovered the click command can just click the target for you, so updating line 2 in this social to do that instead of having to center the npc on the screeen.  This just tells MQ2 to simulate you left mouse clicking on your target, regardless of how many character models may be around your target.

Line 1: /if (${InvSlot[pack8].Item.Item[10].ID}) /ctrl /itemnotify in pack8 10 leftmouseup
Line 2: /if (${Cursor.ID}) /click left target
Line 3: /if (${Window[GiveWnd].Open}) /timed 3 /notify GiveWnd GVW_Give_Button leftmouseup
« Last Edit: September 06, 2018, 04:02:31 pm by Dimur » Logged
ZerarWarrior
Jr. Member
**
Posts: 61


View Profile
« Reply #29 on: August 14, 2018, 03:34:16 am »

I am trying to get that food summoning thing working for the Dead Dracnid item that summons Special Dracnid Steaks... any idea how to adjust that macro for summoning Special Dreacnid Steaks? (Item ID for Dead Dracnid is 112947 according to MQ2, and the spell ID is 9917 also per MQ2, but I tried plugging in those numbers into the macro and it just doesn't work.
Logged

Pages: 1 [2] 3 4
Print
Jump to:  

Recent

Stats

Members
Stats
  • Total Posts: 64970
  • Total Topics: 5050
  • Online Today: 81
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 0
Guests: 66
Total: 66
TinyPortal v1.0 beta 4 © Bloc