• 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
Handin.mac - turn in items or plat/gold/silver/copper to an NPC macro

Release Handin.mac - turn in items or plat/gold/silver/copper to an NPC macro 2025-11-10

No permission to download

Redbot

💻❤️
Moderator
Joined
Oct 15, 2004
RedCents
104,068¢
Pronouns
He/Him
This is a macro to turn in bonechips to any NPC you please, however, you can modify this to turn in any item you like by changing the name "Bone Chips" in the lines:

Code:
/if (${FindItemCount[=Bone Chips]}<4) /goto :Done

and lower down

Code:
/if (!${FindItemCount[=Bone Chips]}) /goto :Done

to anything you want, such as Muffins for the kelethin faction quest, bandages for rivervale faction quest, gems or whatever.

Rich (BB code):
|turnin.mac - 20 DEC 2004
|Originally by kkmonte. Updated by Redbot for use on Redguides.com
|USAGE: /macro turnin45012.mac

Sub Main
/declare l0 int local

/target npc Gunlok

:Loop
/if (${FindItemCount[=Bone Chips]}<4) /goto :Done

/for l0 0 to 3
   /ctrlkey /itemnotify ${FindItem[=Bone Chips].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   /delay 1
   /if (${l0}==0) {
      /click left target
      /delay 20 ${Window[GiveWnd].Open}
      /delay 1
   } else {
      /notify GiveWnd GVW_MyItemSlot${l0} leftmouseup
      /delay 20 !${Cursor.ID}
      /delay 1
   }
/if (!${FindItemCount[=Bone Chips]}) /goto :Done
/next l0

/notify GiveWnd GVW_Give_Button leftmouseup
/delay 20 !${Window[GiveWnd].Open}
/delay 1

:cursorclear
/autoinv
/delay 1
/if (${Cursor.ID}) /goto :cursorclear

/goto :Loop

:Done
/delay 1
/notify GiveWnd GVW_Give_Button leftmouseup

/endmacro
 
Last edited:
You have to have the item in your inventory. This mac just turns them in for you and saves you from clicking over and over.
 
This is Iambigdaddy's son. I'm no good at this coding stuff and was wondering if you could edit this to hand in 3 pp so I can buy faction for my cleric epic. I'm sure it is most likely something simple and I thank you in advance.
 
Old old old old code I made a loong time ago. Don't know if it still works. I originally wrote it before the big variable change with MQ2, and rewrote it after that. Should handle in anything you specify.

Rich (BB code):
| HandIn.mac
|
| Usage:
| - /macro handin.mac <pp|gp|sp|cp|"Item Name"> <amount> <wait time> ["destroy"]
|    The you must type "destroy" for the macro to destroy items returned.
|
| Example:
| - /macro handin.mac "Batwing" 4 0 "destroy"
|    Will hand in 4 Batwing's and destroy the item(s) returned from the NPC. Will do handins without waiting between.
|
| - /macro handin.mac "Batwin" 4 80
|   Will hand in 4 batwings, keep the resulting items, and wait 8 seconds between sets of handins.


Sub Main(string TheItem, int TheAmount, int ForceDelay, string DoDestroy)

    /declare Loopcount int local
    /declare Timeout timer local
    /declare Itemtype string local
    /declare Itemsleft int local

    :GiveItem
        /varset Itemsleft ${FindItemCount[=${TheItem}]}
        /if (${Itemsleft} < ${TheAmount}) {
            /goto :Done
        }

        /if (!${Defined[TheItem]} || !${Defined[TheAmount]}) /call Syntax
        /for Loopcount 1 to ${TheAmount}
            /if (${TheItem.Equal[pp]}) {
                /ctrl /notify InventoryWindow IW_Money0 leftmouseup
                /varset Itemtype coin
            } else /if (${TheItem.Equal[gp]}) {
                /ctrl /notify InventoryWindow IW_Money1 leftmouseup
                /varset Itemtype coin
            } else /if (${TheItem.Equal[sp]}) {
                /ctrl /notify InventoryWindow IW_Money2 leftmouseup
                /varset Itemtype coin
            } else /if (${TheItem.Equal[cp]}) {
                /ctrl /notify InventoryWindow IW_Money3 leftmouseup
                /varset Itemtype coin
            } else {
                /ctrl /itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup
                /varset Itemtype item
            }

            :WaitForItem
            /varset Timeout 5s
            /if (!${Cursor.ID}) {
                /if (!${Timeout.Value}) {
                    /goto :Done
                }
                /delay 0
                /goto :WaitForItem
            }

            /if (${Loopcount} == 1 || ${Itemtype.Equal[coin]}) {
                /click left target
            } else {
                /if (${Itemtype.Equal[item]}) {
                    /notify GiveWnd GVW_MyItemSlot${Int[${Math.Calc[${Loopcount}-1]}]} leftmouseup
                }
            }

            :Wait
            /varset Timeout 10s
            /if (${Cursor.ID}) {
                /if (!${Timeout.Value}) {
                    /goto :Done
                }
                /delay 0
                /goto :Wait
            }
        /next Loopcount
        /notify GiveWnd GVW_Give_Button leftmouseup
        /delay 5

        :ClearCursor
        /if (${Cursor.ID}) {
            /if (${Defined[DoDestroy]} && ${DoDestroy.Equal[destroy]}) {
                /destroy
            } else {
                /autoinv
            }
            /delay 0
            /goto :ClearCursor
        }

        /delay ${ForceDelay}

    /goto :GiveItem
    :Done
    /endmacro
/return

Sub Syntax
    /echo Syntax: /macro handin <pp|gp|sp|cp|"Item Name"> <#> <#> [destroy]
    /echo ..
    /echo Example: /macro handin gp 2 0 destroy
    /echo Will hand in 2 pieces of gold to the targeted NPC, waiting 0 seconds between gives, and then click give, and will destroy anything you get back on your cursor.
    /echo ..
    /echo Example: /macro handin "Batwing" 4 0
    /echo Will hand in 4 batwings to the targeted NPC, waiting 0 seconds between gives, and then click give, and will keep anything you get back on your cursor.
    /echo
    /echo Example: /macro handin "Batwing" 3 80
    /echo Will hand in 3 batwings at a time, and wait 8 seconds between handins
    /echo
    /echo WARNING!! Be carefull with "destroy", if you pick up an item from your inventory it will be destroyed.
    /endmacro
/return
 
I tried this macro but when I do i get the error

Subroutine Main wasn't found.
The current macro has ended

Any help would be appriciated
 
bdail said:
I tried this macro but when I do i get the error

Subroutine Main wasn't found.
The current macro has ended

Any help would be appriciated


Are you starting the macro using these parameters ..... make sure you open and read the header of the macro so you start it right.... if you are someone better needs to respond but I would also wait for the compiles and patches to settle down .... so if your using this can't help ya otherwise start the macro this way .............

Rich (BB code):
| Example:
| - /macro handin.mac "Batwing" 4 0 "destroy"
|    Will hand in 4 Batwing's and destroy the item(s) returned from the NPC. Will do handins without waiting between.
|
| - /macro handin.mac "Batwin" 4 80
|   Will hand in 4 batwings, keep the resulting items, and wait 8 seconds between sets of handins.
 
Figured that one out, was cause i used word to create the textfile instead of notepad.

Problem i'm getting now is this:

Cannot send notification to 312 leftmouseup

macro starts to run but gets that error
 
The one that EvenLessSpam wrote still works for turning in items that are not in a bag. Anyway to make it go through bags to find items?
 
Any way to modify this to turn in to a mob you're waiting on respawn?
 
I'm getting the error

INI:
[/itemnotify] Invalid item slot '$(finditem{rat})'

I'm typing this command in to invoke the above respond:

INI:
/mac handin.mac "Rat Ears" 4000 0 destroy

I'm attempting to turn in Rat Ears in stacks of 4000. Any suggestions?

I have eight bags full of 1000 stacks of rat ears. What am I doing wrong?
 
Old old old old code I made a loong time ago. Don't know if it still works. I originally wrote it before the big variable change with MQ2, and rewrote it after that. Should handle in anything you specify.

Rich (BB code):
| HandIn.mac
|
| Usage:
| - /macro handin.mac <pp|gp|sp|cp|"Item Name"> <amount> <wait time> ["destroy"]
|    The you must type "destroy" for the macro to destroy items returned.
|
| Example:
| - /macro handin.mac "Batwing" 4 0 "destroy"
|    Will hand in 4 Batwing's and destroy the item(s) returned from the NPC. Will do handins without waiting between.
|
| - /macro handin.mac "Batwin" 4 80
|   Will hand in 4 batwings, keep the resulting items, and wait 8 seconds between sets of handins.


Sub Main(string TheItem, int TheAmount, int ForceDelay, string DoDestroy)

    /declare Loopcount int local
    /declare Timeout timer local
    /declare Itemtype string local
    /declare Itemsleft int local

    :GiveItem
        /varset Itemsleft ${FindItemCount[=${TheItem}]}
        /if (${Itemsleft} < ${TheAmount}) {
            /goto :Done
        }

        /if (!${Defined[TheItem]} || !${Defined[TheAmount]}) /call Syntax
        /for Loopcount 1 to ${TheAmount}
            /if (${TheItem.Equal[pp]}) {
                /ctrl /notify InventoryWindow IW_Money0 leftmouseup
                /varset Itemtype coin
            } else /if (${TheItem.Equal[gp]}) {
                /ctrl /notify InventoryWindow IW_Money1 leftmouseup
                /varset Itemtype coin
            } else /if (${TheItem.Equal[sp]}) {
                /ctrl /notify InventoryWindow IW_Money2 leftmouseup
                /varset Itemtype coin
            } else /if (${TheItem.Equal[cp]}) {
                /ctrl /notify InventoryWindow IW_Money3 leftmouseup
                /varset Itemtype coin
            } else {
                /ctrl /itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup
                /varset Itemtype item
            }

            :WaitForItem
            /varset Timeout 5s
            /if (!${Cursor.ID}) {
                /if (!${Timeout.Value}) {
                    /goto :Done
                }
                /delay 0
                /goto :WaitForItem
            }

            /if (${Loopcount} == 1 || ${Itemtype.Equal[coin]}) {
                /click left target
            } else {
                /if (${Itemtype.Equal[item]}) {
                    /notify GiveWnd GVW_MyItemSlot${Int[${Math.Calc[${Loopcount}-1]}]} leftmouseup
                }
            }

            :Wait
            /varset Timeout 10s
            /if (${Cursor.ID}) {
                /if (!${Timeout.Value}) {
                    /goto :Done
                }
                /delay 0
                /goto :Wait
            }
        /next Loopcount
        /notify GiveWnd GVW_Give_Button leftmouseup
        /delay 5

        :ClearCursor
        /if (${Cursor.ID}) {
            /if (${Defined[DoDestroy]} && ${DoDestroy.Equal[destroy]}) {
                /destroy
            } else {
                /autoinv
            }
            /delay 0
            /goto :ClearCursor
        }

        /delay ${ForceDelay}

    /goto :GiveItem
    :Done
    /endmacro
/return

Sub Syntax
    /echo Syntax: /macro handin <pp|gp|sp|cp|"Item Name"> <#> <#> [destroy]
    /echo ..
    /echo Example: /macro handin gp 2 0 destroy
    /echo Will hand in 2 pieces of gold to the targeted NPC, waiting 0 seconds between gives, and then click give, and will destroy anything you get back on your cursor.
    /echo ..
    /echo Example: /macro handin "Batwing" 4 0
    /echo Will hand in 4 batwings to the targeted NPC, waiting 0 seconds between gives, and then click give, and will keep anything you get back on your cursor.
    /echo
    /echo Example: /macro handin "Batwing" 3 80
    /echo Will hand in 3 batwings at a time, and wait 8 seconds between handins
    /echo
    /echo WARNING!! Be carefull with "destroy", if you pick up an item from your inventory it will be destroyed.
    /endmacro
/return
thank u so much couldnt get the other to work, but this is working like a charm.
 
@wired420
Line 113 has a bracket wrong.

/itemnotify ${FindItem{
should be
/itemnotify ${FindItem[

Full lines for reference.
/itemnotify ${FindItem{${TheItem}].InvSlot} leftmouseup
to
/itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup
 
@wired420
Line 113 has a bracket wrong.

/itemnotify ${FindItem{
should be
/itemnotify ${FindItem[

Full lines for reference.
/itemnotify ${FindItem{${TheItem}].InvSlot} leftmouseup
to
/itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup


You know. I've actually fixed this one before. I don't remember who I let update it but I suspect they didn't update before applying their fix for the other bug. If anyone wants to update this have at it. It'll be at least tomorrow before I can reasonably get to it. Having major personal issues IRL this year. Already made red aware of my extended absence period.
 
Does this work for mq2next for quest item turn ins?
I have tried to use this for a few quests, and it does not work for me.

Specifically this does not seem to work, it can not seem to find the item

/ctrl /itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup
 
Does this work for mq2next for quest item turn ins?
I have tried to use this for a few quests, and it does not work for me.

Specifically this does not seem to work, it can not seem to find the item

/ctrl /itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup
since you know what the item is you can just /ctrl /itemnotify "${TheItem}" leftmouseup
 
since you know what the item is you can just /ctrl /itemnotify "${TheItem}" leftmouseup
This works
/ctrl /itemnotify "Attuned Piece of Pure Velium" leftmouseup

This gives
Invalid Item slot 'null'
/ctrl /itemnotify ${FindItem["Attuned Piece of Pure Velium"].InvSlot} leftmouseup
 
This works
/ctrl /itemnotify "Attuned Piece of Pure Velium" leftmouseup

This gives
Invalid Item slot 'null'
/ctrl /itemnotify ${FindItem["Attuned Piece of Pure Velium"].InvSlot} leftmouseup
yes

change the code to /ctrl /itemnotify "${TheItem}" leftmouseup like i said.

since your macro knows ahead of time the name of the item since it is in a variable ${TheItem}... use it like: /ctrl /itemnotify "${TheItem}" leftmouseup
 
Release Handin.mac - turn in items or plat/gold/silver/copper to an NPC macro

Users who are viewing this thread

Back
Top
Cart