Handin.mac

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

mdar
orc pawn
orc pawn
Posts: 23
Joined: Mon Aug 16, 2004 2:26 pm

Post by mdar » Tue Aug 31, 2004 1:33 pm

I did a few bug fixes, and a little additional feature, and here it is...

New feature: wait time between handins

Bug fixes: Itemslot wasn't being used correctly (item slots labeled 0-3, macro was trying to use 1-4. Itemtype was being set with " and checked without.

Code: Select all

| handin.mac
|
| Author(s):
| - Kagonis
| - Corrections and suggestions by various people..
|   SukMage
|   DKAA
|   Wassup
|   WaBBiT
|
| Description:
| - Used to make handins to NPCs, nifty for those who
|    doesn't feel like getting carpal tunnel syndrome to
|    complete a quest that requires a lot of hand ins.
|
| Added:
|   Wait time - this allows on the fly adjustment to how long the macro waits between handin sets - allows for use around other players
|
| 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 destroy
    /echo Will hand in 2 pieces of gold to the targeted NPC and then click give, and will destroy anything you get back on your cursor.
    /echo ..
    /echo Example: /macro handin "Batwing" 4
    /echo Will hand in 4 batwings to the targeted NPC 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
    /endmacro
/return
Last edited by mdar on Tue Aug 31, 2004 5:12 pm, edited 1 time in total.

TheWarden
a hill giant
a hill giant
Posts: 253
Joined: Sat Dec 27, 2003 3:51 pm
Location: In your bushes...

Post by TheWarden » Tue Aug 31, 2004 4:32 pm

Is there anyway to make the macro end and hit the trade button as soon as it gets the "Could not send notification to 260 leftmouseup" in the MQ2 window? BTW, this macro rocks :D
[img]http://img.photobucket.com/albums/v629/Deevious/SigPics/KristinKreukSig01.jpg[/img]

TheWarden
a hill giant
a hill giant
Posts: 253
Joined: Sat Dec 27, 2003 3:51 pm
Location: In your bushes...

Post by TheWarden » Tue Aug 31, 2004 4:33 pm

[Edit] Grrr... damn double post :(
Last edited by TheWarden on Tue Aug 31, 2004 4:56 pm, edited 1 time in total.
[img]http://img.photobucket.com/albums/v629/Deevious/SigPics/KristinKreukSig01.jpg[/img]

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Tue Aug 31, 2004 4:45 pm

Just noticed that this macro needs to be fixed, the BBCode monster bit this one. All greater-than and less-than signs are showing as html equivs.

Need to change all > to > and all < to <.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

mdar
orc pawn
orc pawn
Posts: 23
Joined: Mon Aug 16, 2004 2:26 pm

Post by mdar » Tue Aug 31, 2004 5:10 pm

In the one I posted, I think the only issues of the < > signs were from the original copy, which is just in the syntax area :) .... which I didn't go through :)

mdar
orc pawn
orc pawn
Posts: 23
Joined: Mon Aug 16, 2004 2:26 pm

Post by mdar » Tue Aug 31, 2004 5:14 pm

TheWarden wrote:Is there anyway to make the macro end and hit the trade button as soon as it gets the "Could not send notification to 260 leftmouseup" in the MQ2 window? BTW, this macro rocks :D
If I understand what you're asking, you're asking about when there are no more items to be handed in... in the one I posted, I used this section:

Code: Select all

    :GiveItem 
      /varset Itemsleft ${FindItemCount[=${TheItem}]} 
        /if (${Itemsleft} < ${TheAmount}) { 
           /goto :Done 
        } 
to check if there were any more items of the type we are handing in to continue (actually checks to make sure that there are enough to hand in, if you have 3, and are handing in 4, it stops).

mopysworld
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Sep 16, 2004 11:02 pm
Location: japan
Contact:

It dont work for me....

Post by mopysworld » Sun Oct 03, 2004 1:24 am

Now using the macro listed above to include the wait.... all i get now is macro has ended.

/macro handin.mac gp 5 80 "destroy"

before using the one on the first page all it would do is select 1 gp and sit there saying mac has ended.

any suggestions or advice thanks.

Dragon_collector
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Sep 30, 2004 4:57 pm

Post by Dragon_collector » Sat Oct 16, 2004 5:42 am

Any ideas/ fixes as to whether this still holds up w/ recent patches? Would be nice way to fix my druid's faction for epic instead of spending hours on that GFD muffin turnin.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Jan 13, 2005 7:03 am

When I try to run this, I get an error for leftmouse and slot 255, if I remember correctly. I'll give it another go just to see and be sure. This basically makes this macro non-functioning for me.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Jan 13, 2005 8:35 am

Ok, I must have missed something. I tried again and it didn't work, so then I opened up the bag with the items in it and bam, it worked fine. I don't remember seeing anything saying you had to have the packs open, but hey I figured it out.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Jan 13, 2005 8:42 am

Add a check to see if the pack's open. I have some code that does it in feedme.inc, and spell_routines has some too. feedme's a little less complicated though.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

FrankJScott
naggy
naggy
Posts: 2326
Joined: Sun Feb 19, 2023 7:11 am

Excellent Asian2bet Info

Post by FrankJScott » Fri Jan 09, 2026 8:22 am

In response to the person talking about situs judi togel, togel sg, ovo gopay, situs angka togel, bandar judi toto, slot situs, hasil sgp, bandar online terpercaya, judi slot online adalah, togel situs online, I highly recommend this read this post here on tajir4d info or n casino, situs idn play terpercaya, ion casino slot, kumpulan situs judi terpercaya, daftar situs resmi, togel slot casino, slot idn poker, togel 24 jam, togel yang, situs togel lengkap, which is worth considering with this learn more here on dvltoto forum which is worth considering with togel singapore hk, aplikasi judi slot, situs online togel terpercaya, pemain slot online, situs slot idnplay, link togel resmi, togel online terbesar, 10 bandar online togel terpercaya, slot idnplay, agen togel slot, and don't forget this more tips here for dvl toto link which is also great. Also, have a look at this more about the author on asian 2 bet tips on top of slot deposit pakai ovo, sgp hari ini, situs poker online terpercaya, situs togel terbesar dan terpercaya, agen judi casino online indonesia terpercaya, togel hk, situs slot judi terbaik, keluaran angka, situs judi online terpercaya, bandar togel dan slot terpercaya, not forgetting sites such as this recommended site for asian 2 bet url alongside all situs togel resmi di indonesia, web togel terpercaya, judi online terbaru, slot yang terbaik, game yg baru, full article about which is worth considering with deposit bonus slot, permainan slot dana, singapore slot online, daftar link slot terbaik, situs baru, and continue reading for for good measure. Check more @ Top Rated Asian2bet Site 9f252a1

FrankJScott
naggy
naggy
Posts: 2326
Joined: Sun Feb 19, 2023 7:11 am

Best Curtain Fabric Shops Guide

Post by FrankJScott » Tue Jan 20, 2026 8:26 pm

To the person talking about inside curtain, curtain fabric warehouse near me, diy fabric blinds, curtains and blinds shop, quality curtains uk, the range curtains, valance curtains, online curtain fabric store, fabric blind slats, basement curtains, I highly suggest this find out more about fabric by the metre site or made to measure curtain poles, in home curtains, fabric tie curtains, blinds made of fabric, curtain poles and tie backs, bespoke curtain tracks, curtain and upholstery fabric, blinds uk, curtains and blinds made to measure, curtain blinds suppliers, which is worth considering with this read this post here about made to measure curtain fabric forum as well as curtains and blinds made to measure, curtains made to measure uk, curtain poles and curtains, made to measure curtain tracks, curtain curtains curtains, curtain materials uk, curtain design blinds, blinds made, our curtain, custom curtain tracks, on top of this cool dress fabric details which is also great. Also, have a look at this advice on dress fabric url on top of window curtain, discount curtain fabrics, curtain shopping, smooth curtains, interior window blinds, uk made to measure curtains, hole in curtain, curtain design blinds, curtain fabric suppliers uk, curtains & home, not to mention this directory on fabric by the metre info on top of window covering fabric, curtains for curtains, curtains made online, curtains for home, venetian curtains, super fast reply on and don't forget over the blinds curtain, help with curtains, online curtain fabric store, blinds uk, curtain retailers online, and find on for good measure. Check more @ High Rated Free Casino Bet Toto Blog 2a1b86b