Welcome, Guest. Please login or register.
Did you miss your activation email?
November 28, 2024, 10:24:29 pm *

Login with username, password and session length
Pages: 1 2 [3] 4
Print
Author Topic: Quality of Life macro commands  (Read 49887 times)
Peign
Guest
« Reply #30 on: August 14, 2018, 10:06:37 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.

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[dracnid].ID}) {
/if (${FindItemCount[steaks]} < 100) {
/casting 29280
/timed 55 /autoinventory
/delay 1s
}
}
}
/return


Try that.   Need to change the FindItem value and the FindItemCount value to correspond to the Dead Dracnid item.      Should spend some time in tofs level 4 and get the skinning knife though, its moar HP!
Logged
synthaxx_17
Full Member
***
Posts: 124

rawr!


View Profile
« Reply #31 on: August 15, 2018, 12:25:24 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.

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[dracnid].ID}) {
/if (${FindItemCount[steaks]} < 100) {
/casting 29280
/timed 55 /autoinventory
/delay 1s
}
}
}
/return


Try that.   Need to change the FindItem value and the FindItemCount value to correspond to the Dead Dracnid item.      Should spend some time in tofs level 4 and get the skinning knife though, its moar HP!


!!!
Logged

Ectheldir/Thoruz
(Alliance of the Savage)
ZerarWarrior
Jr. Member
**
Posts: 61


View Profile
« Reply #32 on: August 15, 2018, 04:07:10 pm »

I tried that coding, but it did not work for me, are there specific plugins or something that need to be loaded for this to work?
Logged

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


View Profile
« Reply #33 on: August 18, 2018, 01:48:36 pm »

No special plugins should be required for this to work.  It uses the FindItem TLO of the mq2main plugin to see if you have the item by name and if you do it uses the FindItemCount TLO to see if you have less than 100 of whatever you are summoning by name using a partial match parameter, this can be done by id as well. If both the item used to summon is found and there are less than 100 of the summoned food it issues the cast command based on id of the click spell on the item. This assumes the item being clicked is not required to be equipped to be activated, does the drachnid leg thing say Must Equip on it? Additionally you can't activate an item if you have the bank window open. Aside from those two possibilities I don't know why it wouldn't work if the conditions are met.
Logged
ZerarWarrior
Jr. Member
**
Posts: 61


View Profile
« Reply #34 on: August 19, 2018, 06:04:30 pm »

The item does not have to be equipped and the bank window is not open
Logged

ZerarWarrior
Jr. Member
**
Posts: 61


View Profile
« Reply #35 on: August 30, 2018, 01:21:14 pm »

So here is how we (Thanks Dimurwar for helping me work through it) came up with that works.

This works well and I will run it when I am going to leave my computer for a while and I am trying to make sure my toons keep their food levels up. You can change the message and the qty for your liking.

The clickie needs to be in the second bag and in the 7th slot (Or 6th if you count the first slot as 0 like MQ does. Basically 4th from the last.)

Sub Main()
   /bc Summoning some Special Dracnid Steaks, this should net you 1000 by the time it's done
   :Primeloop
      /call ClickFood
      /goto :Primeloop
   /return
   
|=====================================================================
| SUB ClickFood
|=====================================================================
   Sub ClickFood
      /if (${Me.FreeInventory} > 0) {
         /if (${FindItem[dracnid].ID}) {
            /if (${FindItemCount[steak]} < 1000) {
               /useitem 24 6
               /timed 55 /autoinventory
               /delay 1s
            }
         }
      }
      /return
Logged

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


View Profile
« Reply #36 on: September 03, 2018, 02:42:12 am »

I had a huge stack of MCP tokens banked that I never turned in because it's a pain in the ass to click 4 tokens and hand them to the Observer dude and click give to bother spawning random bosses, so my laziness motivated me to create a social to send a tell to a toon I positioned at the observer to hand in 4 and spawn the boss from just pressing the hotkey.  The toon doing the hand ins has a 10 slot bag in their 8th bag slot and in the last slot in the bag, so this code only works if you put a stack of MCP tokens in that slot.

***DISCLAIMER***This code does NOT contain error handling, so if you are a dumbass and place anything in the specified slot, IT WILL NOT CARE and it WILL try to give whatever item was in that slot to the Observer npc.  Error handling can be added, but there is a limit to the number of character slots available in a social hotkey, in order to enable error handling for social hotkeys that exceed the character limit you would have to assign some of the social lines as ALIAS commands.  Without doing this, there simply isn't enough room on the line to use conditional statements...I can post the code you can use in an alias if people want error checking for this, if you want this please respond so I don't end up wasting my time explaining how it works to people who don't care. I take no responsibility for anyone being stupid enough to hand shit into this npc because of their own negligence. YOU HAVE BEEN WARNED!

First and foremost, this using the /timed command to execute the hand ins so it doesn't try to hand all 4 in at the same time.  The character name I use in this code is Dimurskank, so replace that name with whatever the name of your toon doing the hand ins is.  This also prepends the commands being sent with /squelch to keep your mq2 window from being spammed with each command.  The last line tells you in your mq2 window how many turn ins of 4 tokens you have left in the stack on the hand in toon.  The code is simple, it just tells the hand in toon to pick up one item from the stack in the last slot of bag 8 and hand it in to the npc you have targeted...the target is assigned on the first line as the Observer.  It does this 4 times then clicks the give button in the window.  The code is posted below, if there are issues with implementing this I'll do my best to help...post issues/questions in this thread.

Line 1: /multiline ; /squelch /bct dimurskank //target observer ; /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 3 /squelch /bct dimurskank //click left target
Line 2: /multiline ; /timed 6 /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 9 /squelch /bct dimurskank //click left target
Line 3: /multiline ; /timed 12 /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 15 /squelch /bct dimurskank //click left target
Line 4: /multiline ; /timed 18 /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 21 /squelch /bct dimurskank //click left target ; /noparse /squelch /bct dimurskank //timed 24 /notify GiveWnd GVW_Give_Button leftmouseup
Line 5: /noparse /squelch /bct dimurskank //bc Handing in, boss mob soon...${Math.Calc[${FindItemCount[mcp]} / 4].Int} sets of 4 MCP token turn ins left

***AGAIN***Please make sure the 8th bag, last slot has a stack of MCP tokens in it before blindly pressing this button.  If people want to use error checking by assigning these lines/commands to alias commands, I can do that as well but unless there is active interest I'm not going to bother.USE THIS AT YOUR OWN RISK

***Updated below***
The error handling code, to make sure you only execute the command when you have MCP tokens in the 10th slot of the 8th bag.  It only fires if you are in the correct zone and the item id of the item in that slot is the item id for an MCP token.
/if (${InvSlot[pack8].Item.Item[10].ID} == 112938)
To use this conditional, all you need to do is prepend the code for Line 1 through Line 4 with it.  The problem is when you get to line 4, the code is already almost as long as you can fit into the social hotkey so this is where you'd set up an alias command in mq2 and call that.  The alias can be whatever you want to call it, when you set it mq2 will save it to the mq2.ini file and you can call it in game. So even if I just want to call it /mcp, assign it like this:
/alias /mcp /noparse /squelch /bct dimurskank //if (${Zone.ShortName.Equal[airplane]} && ${InvSlot[pack8].Item.Item[10].ID} == 112938)

Then you'd just prepend line 1 - 4 with the alias, resulting in a hotkey that looks like:
Line 1: /mcp /multiline ; /squelch /bct dimurskank //target observer ; /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 3 /squelch /bct dimurskank //click left target
Line 2: /mcp /multiline ; /timed 6 /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 9 /squelch /bct dimurskank //click left target
Line 3: /mcp /multiline ; /timed 12 /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 15 /squelch /bct dimurskank //click left target
Line 4: /mcp /multiline ; /timed 18 /noparse /squelch /bct dimurskank //ctrlkey /itemnotify in pack8 10 leftmouseup ; /timed 21 /squelch /bct dimurskank //click left target ; /noparse /squelch /bct dimurskank //timed 24 /notify GiveWnd GVW_Give_Button leftmouseup
Line 5: /noparse /squelch /bct dimurskank //bc Handing in, boss mob soon...${Math.Calc[${FindItemCount[mcp]} / 4].Int} sets of 4 MCP token turn ins left

Now every time a line of code is executed, it first checks to see that you have MCP tokens in the 10th slot of the 8th bag.  If you don't, the conditional fails and the multiline doesn't execute.

** Added an additional check to the conditional for correct zonee
« Last Edit: September 06, 2018, 04:04:17 pm by Dimur » Logged
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« Reply #37 on: September 04, 2018, 05:00:51 pm »

Considering that this is a bot heavy server and you'll generally have a mass of toons clumped together, it can be a bit tedious to transfer items from one toon to another.  If I have a cluster of toons, I used to cycle to the toon who I need to hand it to and move them away from the pack so I could click them without accidentally handing in to the wrong one.  You can do this in a simple command to the toon, just tell them to move to you.  In this case, I prefer to use the /moveto command as opposed to /stick, because I only want them to move to me, not follow me around.

/bct dimur //moveto id ${Me.ID}

That's an easy social to set up and it works, but it's not the only way to do it.  You can also /target the PC and tell MQ2 to hand it to your target.

First, target the person you are handing to using the /target command.  Note the additional parameter PC, this keeps it from targeting a pet if the toon has one up.
/target dimur pc
Once targeted, use the following command:
/click left target

That will simulate left clicking the mouse onto your target and open up the trade window.  Then you can use the code posted earlier in this thread to tell the receiving toon to click the trade button.
/bct ${Target.CleanName} //notify TradeWnd TRDW_Trade_Button leftmouseup

And that's how to do a transfer to a toon the lazy way, without having to cycle through windows.

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


View Profile
« Reply #38 on: September 22, 2018, 03:30:44 pm »

Here's a quick 3 line social for handing in the Mask of Experience.  This code assumes you have the Mask of Experience on your cursor and ready to hand in.  If you have multiple hand ins to do, just keep the mask on the cursor and hit the button as many times as you need to.

Line 1: /target experience npc
Line 2: /if (${Target.CleanName.Find[experience]} > 0) /click left target
Line 3: /timed 2 /if (${Window[GiveWnd].Open}) /notify GiveWnd GVW_Give_Button leftmouseup

Line one targets an npc whose name contains experience, so unless you are in the crafer's hall you won't acquire a target.

Line two uses a conditional to see if your target has a name that contains experience using the Find function for string objects.  This does a search match and returns the starting index of the string that's found, otherwise it returns NULL.  So unless you have the specific npc targeted it won't open the give window to try to hand it in. If the frog is close enough to click, it left clicks him and opens up the give window.  The give window is the window that opens up when you try to hand something to an NPC.

Line three uses another conditional that checks to see that the give window has been opened, if yes it clicks the give button and the mask gets handed back to you, either upgraded and AA's for the upgrade are spent or not upgraded and you get a message telling you how many AA's you need to get the next upgrade. If the give window isnt open, it does nothing.  This line of code is prepended with a /timed delay of .2 seconds to account for lag and give time for the give window to open up before processing this line.



« Last Edit: September 22, 2018, 03:41:14 pm by Dimur » Logged
Sarthin
Administrator
Legend
*****
Posts: 1036

Common sense is not so common


View Profile
« Reply #39 on: November 26, 2018, 06:31:39 am »

Hi-jacking thread for a small quality of life command. Not exactly a macro, but just a .bat command to insta-kill all EQ clients.
Open notepad and add this text in it.

taskkill /f /im eqgame.exe


Save file and change extension to .bat (may have to uncheck "hide extensions for known file types" first)

Right click and run as admin, and it should kill all clients you got up. Handy if they freeze.
Logged

Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #40 on: December 03, 2018, 04:20:19 pm »

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


Wouldn't target crystal guys also would hand in a crystal but not always give it over.
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

Logged

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


View Profile
« Reply #41 on: December 03, 2018, 06:56:04 pm »

Was there an issue you were having with the post you quoted?  You never really say, just a quote of a reply a few posts above yours.
Logged
Raygan
Legend
*******
Posts: 1156



View Profile
« Reply #42 on: December 05, 2018, 03:42:07 pm »

Hi-jacking thread for a small quality of life command. Not exactly a macro, but just a .bat command to insta-kill all EQ clients.
Open notepad and add this text in it.

taskkill /f /im eqgame.exe


Save file and change extension to .bat (may have to uncheck "hide extensions for known file types" first)

Right click and run as admin, and it should kill all clients you got up. Handy if they freeze.


I find just restarting the computer works too  Wink
Logged

Hate's Most Hateful Hater
Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #43 on: December 05, 2018, 04:43:17 pm »

Was there an issue you were having with the post you quoted?  You never really say, just a quote of a reply a few posts above yours.
oh wierd i actually commented but it didnt go through sorry. Yea it doesnt target the npc if i target the npc and use the macro it hands in a crystal but doesnt give it to him
Logged

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


View Profile
« Reply #44 on: December 05, 2018, 05:55:53 pm »

Hit me up in game on Dimurwar, we'll get it figured out bud.
Logged
Pages: 1 2 [3] 4
Print
Jump to:  

Recent

Stats

Members
  • Total Members: 6156
  • Latest: Rin1
Stats
  • Total Posts: 65127
  • Total Topics: 5066
  • Online Today: 333
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 0
Guests: 224
Total: 224
TinyPortal v1.0 beta 4 © Bloc