• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Request - Turn in / Delete on Cursor / Gather items / Trade pc 2 pc MACRO HELP

RoaringLion

Member
Joined
Apr 21, 2020
RedCents
21¢
I'm trying to automate the process of turning in Rat Ears in Qeynos Hills to Rephas. Essentially an ALT gets XP for performing this turn in similar to the red wine quest. For context, I must clarify that I have two toons involved in this process. An alt and a Druid. I'll provide a step by step overview what I have each of the two toons doing.

Druid:
  1. If backpacks are empty;
  2. Ports to Commonlands (automated)
  3. Runs to Katha Firespinner (automated)
  4. Buys 64000 Rat Ears (automated)
  5. Gates to bind point (set at Rephas in Qeynos Hills)
  6. Trades 8 backpacks full of rat ears to ALT.
  7. Loop to Step One.
ALT:
  1. If invetory is full of Rat Eats, target Rephas.
  2. Give Rephas 1000 stacks (four times) of Rat Ears.
  3. Delete the items Rephas occasionally hands back to ALT (semi-automated.)
  4. Continuing giving Rephas 1000 stacks of Rat Ears until there are zero items in inventory.
  5. Trade Druid eight empty backpacks for eight backpacks full of Rat Ears.
  6. Loop to Step One.
Problem #1: Handing in the Rat Ears

Once I have in my inventory 64x stacks of 1000 Rat Ears. I run the following code. This code technically works concerning handing in the Rat Ears. The problem is there are five items that are randomly handed back to me. Some of these returned items are placed on the cursor and I'm having problems deleting/destroying them before I perform the next turn in. These items are: Grilled Rat Ears, Spell: Lull, Spell: True North, Spell: Weaken, Tattered Cloth Sandal.


INI:
Sub Main

/target Rephas
/delay 1s
:loop
    /itemnotify "Rat Ears" leftmouseup
    /delay 4
    /invoke ${Target.LeftClick}
    /delay 4
    /itemnotify "Rat Ears" leftmouseup
    /delay 4
    /invoke ${Target.LeftClick}
    /delay 4
    /itemnotify "Rat Ears" leftmouseup
    /delay 4
    /invoke ${Target.LeftClick}
    /delay 4
    /itemnotify "Rat Ears" leftmouseup
    /delay 4
    /invoke ${Target.LeftClick}
    /delay 4
    /notify givewnd GVW_Give_Button leftmouseup
    /delay 48s
    /goto :loop

/return


I'm able to sort've delete Grilled Rat Ears. Although the code I'm using doesn't work 1000% with the items on the cursor and I'm only able to target one item at a time.

INI:
/keypress shift+b
/delay 2s
/mac deleteitem "grilled rat ears"
/delay s
/keypress shift+b

Problem #2: Druid won't gate after running to merchant and buying the Rat Ears

This code stops working at 'mac buystuff "Rat Ears" 66000. The macro just ends. I have to manually hit macro: " /mac buystuff "Rat Ears" 66000" then it works, but won't automatically gate after. I assume I need to automatically close window?

INI:
Sub Main

    /cast Ring of Commons
    /say Porting to the Commonlands
    /delay 35s
    /tar Katha Firespinner
    /delay 1s
    /nav target
    /delay 80s
    /end
    /delay 1s
    /tar Katha Firespinner
    /delay 1s
    /mac buystuff "Rat Ears" 66000
    /multiline ; delay 13m ; /cast Gate
    /delay 40s
    /say I have returned with rat eats friend!
    /delay 5s
    /say this is the end!



/return

Problem #3: No Idea how to automate player to player trading.

So far this is all I got. It opens a trade and puts 8 backpacks up in trade window, but only from the Druid sending the trade, and zero checks are being performed to determine whether bags are full or empty from either ALT or Druid.

INI:
Sub Main

    /itemnotify pack1 leftmouseup
    /multiline ; /target Psalms ; /delay 1s ; /nomodkey /click left target
    /multiline ; /itemnotify pack2 leftmouseup ; /nomodkey /click left target
    /multiline ; /itemnotify pack3 leftmouseup ; /nomodkey /click left target
    /multiline ; /itemnotify pack4 leftmouseup ; /nomodkey /click left target
    /multiline ; /itemnotify pack5 leftmouseup ; /nomodkey /click left target
    /multiline ; /itemnotify pack6 leftmouseup ; /nomodkey /click left target
    /multiline ; /itemnotify pack7 leftmouseup ; /nomodkey /click left target
    /multiline ; /itemnotify pack8 leftmouseup ; /nomodkey /click left target
    /multiline ; /say trade ACCEPT!

/return

I just started actually learning how to create macros a few days ago so I understand my coding is extremely amateur. Please help! If this is not allowed please correct me. But the first person to provide me a fully working macro I'll tip $5 via paypal. I'm just extremely curious how to automate this process at this point. I must know!
 
Last edited:
Check the fishing macros for deleting items on cursor.

Also some bits from other macros could take apart for the trade. Something to the effect of (in programming language of course) if trade offered, respond with trading your bags. If 8 bags offered and you offered 8, then accept. There are autotrades in a lot of macros but they're usually one way.
 
Last edited:
Just some quick tips without doing the whole macro. Might or might not help you out.
/end
in your macro pretty much will end the macro. looks like you attempt to call another macro, (
/mac buystuff "Rat Ears" 66000)
without seeing what you have going on there not sure how to handle that coming back to the main macro.

For player to player trade, if you have autaccept on you could pickup bag /target player /usetarget and /notify TradeWnd TRDW_Trade_Button LeftMouseUp

/multiline ; delay 13m ; /cast Gate
I would try breaking this down to multiple lines after the buy



INI:
Sub Main

    /cast Ring of Commons
    /say Porting to the Commonlands
    /delay 35s
   /call ClearCursor
    /target Katha Firespinner
    /if (${Target.Distance}>15) {
        /delay 1
            /nav spawn Katha Firespinner
            /delay 1
    /while (${Navigation.Active}) {
        /delay 1
        }
    /target Katha Firespinner
    }
    /click right target
    /delay 5s
    /call Buy "Rat Ears" 66000
    /delay 60s
     /cast Gate
    /delay 40s
    /say I have returned with rat eats friend!
    /delay 5s
    /say this is the end!
/return


/shiftkey /itemnotify "Rat Ears" leftmouseup (will grab the whole stack)


/if (${Cursor.Name.Equal[Grilled Rat Ears]} || ${Cursor.Name.Equal[Spell: Lull]} || ${Cursor.Name.Equal[Spell: Weaken]} || ${Cursor.Name.Equal[Spell: True North]} || ${Cursor.Name.Equal[Tattered Cloth Sandals]}) {

            /destroy

            /delay 1s

        }
 
If you want to post the file.mac someone will probably look at it and have it running in no time. :) Also, if you are doing this for faction, you could give him back the Grilled Rat Ears.
 
Last edited:
If you want to post the file.mac someone will probably look at it and have it running in no time. :) Also, if you are doing this for faction, you could give him back the Grilled Rat Ears.

First off thank you for your response. I'm able to pull knowledge from it and fill in a few blank spots I have.

I don't have a single file with the macro in it. It's spread out between 3 or 4 files that Ive been manually activating. If I organize this code into such a manner that it is in a single file I'll post it for sure.

I have a question for you cannon. In the following code you shared.

INI:
/if (${Cursor.Name.Equal[Grilled Rat Ears]} || ${Cursor.Name.Equal[Spell: Lull]} || ${Cursor.Name.Equal[Spell: Weaken]} || ${Cursor.Name.Equal[Spell: True North]} || ${Cursor.Name.Equal[Tattered Cloth Sandals]}) {

            /destroy

            /delay 1s

How do I also have it check my inventory for these items? FYI, using an If statement only deletes 1 item from cursor each time this code is ran. I changed it to a while statement, and all items are deleted from cursor.
 
Last edited:
This works perfectly for turning in the Rat Ears. Thats a huge hurdle out of the way!

INI:
/target Rephas
/delay 1s
:loop
    /itemnotify "Rat Ears" leftmouseup
    /delay 8
    /invoke ${Target.LeftClick}
    /delay 8
    /itemnotify "Rat Ears" leftmouseup
    /delay 8
    /invoke ${Target.LeftClick}
    /delay 8
    /itemnotify "Rat Ears" leftmouseup
    /delay 8
    /invoke ${Target.LeftClick}
    /delay 8
    /itemnotify "Rat Ears" leftmouseup
    /delay 8
    /invoke ${Target.LeftClick}
    /delay 8
    /notify givewnd GVW_Give_Button leftmouseup
    /delay 48s

    /while (${Cursor.Name.Equal[Grilled Rat Ears]} || ${Cursor.Name.Equal[Spell: Lull]} || ${Cursor.Name.Equal[Spell: Weaken]} || ${Cursor.Name.Equal[Spell: True North]} || ${Cursor.Name.Equal[Tattered Cloth Sandals]}) {
         /destroy
         /delay 1
}   

    /goto :loop

When I try to use it simply doesn't work. Any suggestions regarding how I can have my druids automatically buystuff when arriving at the merchant much appreciated!

INI:
    /call Buy "Rat Ears" 66000
 
/call Buy "Rat Ears" 66000
That line alone is the buy line, You would need have the vendor targeted or open for this to work.

Add this to the top part of your macro file #include buy.inc
 
This code works on its own. I need to integrate it into the larger file

INI:
#include ninjadvloot.inc
Sub Main

    /tar Katha Firespinner
    /delay 1s
    /call Buy "Rat Ears" 66000

/return
 
Question:

This code works if I run the threee scripts separately. However when I put them together only the first two run. How do I solve this problem? Having similar issues with other scripts.

INI:
/if (${FindItemCount[=Rat Ears]}>0) {


[B]1[/B] 
/target Rephas
/declare Q int local
     /delay 1s
    :loop 
    /for Q 1 to 4
        /delay 1s
        /itemnotify "Rat Ears" leftmouseup
        /delay 1s
        /invoke ${Target.LeftClick}
        /delay 5
    /next Q  
    /notify givewnd GVW_Give_Button leftmouseup
    /delay 35s
/call DeleteCursor 
    /goto :loop 


[B]2[/B]    /while (${Cursor.Name.Equal[Grilled Rat Ears]} || ${Cursor.Name.Equal[Spell: Lull]} || ${Cursor.Name.Equal[Spell: Weaken]} || ${Cursor.Name.Equal[Spell: True North]} || ${Cursor.Name.Equal[Tattered Cloth Sandals]}) {
         /destroy
         /delay 2
}  

    /goto :loop


}

[B]3[/B] /while (${FindItemCount[=Grilled Rat Ears]}>0 && ${FindItemCount[=Rat Ears]}==0) {
    /itemnotify "Grilled Rat Ears" leftmouseup
    /destroy
    /delay 2
 
Last edited:
Bumping because the same general issue is preventing me from finishing my macros.

When I use multiple If Statements I'm unable to get them to run in a sequence. I'm sure I'm a bonehead and its a simple error however I can't find it.

For example, the bottom code works if I hit the macro to initiate each If Statement once its conditions are met. When I initialize the macro, if my druid is in Qeynos Hills she will port to The Commonlands. However, once in Commonlands she will just stand there and do nothing until I hit the macro again, despite both of the conditions being met. The same scenario is true for the If Statements below it. Once my druid is within range of her target, she will not execute the commands within that if statement until I re-activate the macro.

I've been reading through the MQ2 documentation but so far have not found the answer I need.

INI:
#include ninjadvloot.inc

Sub Main

 
/if (${FindItemCount[=Rat Ears]}==0 && ${Zone.Name.Equal[Qeynos Hills]}) {
    /cast Ring of Commons
}


/if (${FindItemCount[=Rat Ears]}==0 && ${Zone.Name.Equal[The Commonlands]}) {
    /tar Katha Firespinner
    /delay 1s
    /nav target
   
/if (${Target.Distance}<15) {
    /delay 2s
    /invoke ${Target.RightClick}
    /delay 1s
    /call Buy "Rat Ears" 64000
    }

/if (${FindItemCount[=Rat Ears]}==64000 && ${Zone.Name.Equal[The Commonlands]}) {
    /delay 1s
    /keypress esc
    /delay 2s
    /cast Gate
    }
}

/if (${FindItemCount[=Rat Ears]}==64000 && ${Zone.Name.Equal[Qeynos Hills]}) {
    /say I would perform trade here.
    }

/return
 
Instead of
/nav target
use /nav spawn Katha Firespinner

you may have to target the vendor again after the navigation /tar Katha Firespinner
 
Last edited:
FYI the code worked when I was using /delays but that seems like shoddy code and it was extending the execution time significantly because there was alot of downtime.
 
I do a lot of shotty code haha, but if it works on the user end you will never see it. :)

/nav spawn Katha Firespinner
/while (${Navigation.Active}) {
/delay 1
}
 
What about If "you have now entered qeuynos hills"(whatever the exact message is) then tar and nav etc. Creat event you have now entered qeuy os hills, etc. Sorry I misread which zone she was in, but you get the picture. If ratears=0 AND you are in qeynos hills, start event commonlands. Commonlands even if "you have entered commonlands" then tar, nav, but, them zone back. Create another event(so it cycles) if you have now entered qeynos hills, tar alt nav, trade.
 
What about If "you have now entered qeuynos hills"(whatever the exact message is) then tar and nav etc. Creat event you have now entered qeuy os hills, etc. Sorry I misread which zone she was in, but you get the picture. If ratears=0 AND you are in qeynos hills, start event commonlands. Commonlands even if "you have entered commonlands" then tar, nav, but, them zone back. Create another event(so it cycles) if you have now entered qeynos hills, tar alt nav, trade.

I figured out a solution, although to me it seems to be a strange one. In my case, MQ2 is only attempting to run my if statements when I initially execute the macro. So what I did, was I wrapped all of my if statements within a while loop. Created with a condition that is always true. I then added a delay of 5 seconds at the start of each iteration. Essentially this attempts to run all of my if statements on a 5 second ticker repeatedly. The code below works properly now.

[CODE lang="ini" title="My solution"]/while (${Me.Name.Equal[ToonNameHere]}) {

/delay 5s

/if (${FindItemCount[=Rat Ears]}==0 && ${Zone.Name.Equal[Qeynos Hills]}) {
/cast Ring of Commons
}

/if (${FindItemCount[=Rat Ears]}==0 && ${Zone.Name.Equal[The Commonlands]}) {
/tar Katha Firespinner
/delay 1s
/nav spawn Katha Firespinner
}

/if (${Target.Distance}<15) {
/delay 2s
/invoke ${Target.RightClick}
/delay 1s
/call Buy "Rat Ears" 64000
}

/if (${FindItemCount[=Rat Ears]}==64000 && ${Zone.Name.Equal[The Commonlands]}) {
/delay 1s
/keypress esc
/delay 2s
/cast Gate
}

/if (${FindItemCount[=Rat Ears]}==64000 && ${Zone.Name.Equal[Qeynos Hills]}) {
/say I would perform trade here.
}

}[/CODE]
 
EQ also has a new command once you select a target you can /usetarget this will open a vendor or a trade window with another toon.

How do I also have it check my inventory for these items?

can also use ${FindItem[Rat Ears].ID}
 
Last edited:
Did you ever get this to fully functioning? Would you mind sharing the end result?
 
Request - Turn in / Delete on Cursor / Gather items / Trade pc 2 pc MACRO HELP

Users who are viewing this thread

Back
Top
Cart