turn in bone chips wine whatever updated

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

Moderator: MacroQuest Developers

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

turn in bone chips wine whatever updated

Post by Zazoot » Fri Apr 30, 2004 1:01 am

Code: Select all

| By zazoot !
| just open all your packs with the stuff in it , stand facing the npc
| target the npc and have fun!

Sub Main 
/declare wine int local 

:Loop 
/if (!${FindItem[=Red Wine].InvSlot}) { 
  /echo backpacks empty go get more stuff 
  /endmacro 
} 

/say hail 
/for wine 1 to 4 
   /ctrlkey /itemnotify ${FindItem[=Red Wine].InvSlot} leftmouseup 
   /if (!${FindItem[=Red Wine].InvSlot}) /goto :Done 
      /delay 4 
   /if (${wine}==1) { 
      /click left target 
      /click left target 
      /delay 4
     }
   /if (${wine}==2) {
      /notify GiveWnd GVW_MyItemSlot1 leftmouseup
      /delay 4
     }
   /if (${wine}==3) {
      /delay 4
      /notify GiveWnd GVW_MyItemSlot2 leftmouseup
     }
   /if (${wine}==4) {
      /delay 4
      /notify GiveWnd GVW_MyItemSlot3 leftmouseup
     }
/next wine 
/delay 4
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 4

:cursorclear 
/delay 4
/if (${Cursor.ID}) /goto :cursorclear 
/goto :Loop 

:Done 
  /delay 4
  /notify GiveWnd GVW_Give_Button leftmouseup 
  /endmacro

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

Post by Zazoot » Fri Apr 30, 2004 1:04 am

yes i know thers two click left targets.
it doesnt work otherwise
haehehe

amml
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Apr 22, 2004 4:55 pm

Post by amml » Sat May 01, 2004 11:43 am

thx, just lvld my char a bit lol :)

amml
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Apr 22, 2004 4:55 pm

Post by amml » Sat May 01, 2004 12:34 pm

Hm i changed one little thing:

Code: Select all

:cursorclear 
/delay 4 
[color=cyan]/destroy[/color]
/if (${Cursor.ID}) /goto :cursorclear 
/goto :Loop 
Like that the macro doesnt always stop :)

Yeormom
orc pawn
orc pawn
Posts: 22
Joined: Tue Apr 12, 2005 3:09 pm

Post by Yeormom » Wed Jun 01, 2005 10:09 pm

Confirmed still working June 1, 2005
~Yeormom for teh win!!!!!!111one

notadruid
a ghoul
a ghoul
Posts: 143
Joined: Mon Dec 08, 2003 6:02 pm

Post by notadruid » Tue Jun 07, 2005 7:46 am

/destroy? That's REALLY dangerous in this kind of macro, pick up anything while running it and poof it's gone.

I'd use /autoinventory in its place.
I am not a druid.

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Post by Grumpy » Tue Jun 07, 2005 12:25 pm

Many moons ago, someone posted a macro called handin.mac to do this job, I've used it and tweaked it, and now it's about perfect. Here's my current version:

Code: Select all

| handin.mac
|
| Author(s):
| - Kagonis
| - Corrections and suggestions by various people..
|   SukMage
|   DKAA
|   Wassup
|   WaBBiT
|   Grumpy
|
| 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.
|
| - for items, it will handle partial names of exact matches, for a partial name match, do:
| - /macro handin.mac "Batwin" 4 80
|   Will hand in 4 items containing the string "batwin", keep the resulting items, and wait 8 seconds between sets of handins.
|
| - for exact match, do:
|  /mac handin "=bone chips" 4
|  will hand in 4 bone chips at a time until you run out of bone chips, and will ignore warbone chips, barbed bone chips, etc.

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

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

            /delay 50 ${Cursor.ID}
            /if (!${Cursor.ID}) {
                /goto :Done
            }

            /if (${Loopcount} == 1 || ${Itemtype.Equal[coin]}) {
            	/delay 3
                /click left Target
                /delay 30 !${Cursor.ID}
            } else {
                /if (${Itemtype.Equal[item]}) {
                    /notify GiveWnd GVW_MyItemSlot${Int[${Math.Calc[${Loopcount} - 1]}]} leftmouseup
                    /delay 30 !${Cursor.ID}
                }
            }

            /delay 50 !${Cursor.ID}
            /if (${Cursor.ID}) {
                /goto :Done
            }

        /next Loopcount
        /notify GiveWnd GVW_Give_Button leftmouseup
        /delay 5

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

        /delay ${ForceDelay}

        /varset Itemsleft ${FindItemCount[${TheItem}]}
        /if (${Itemsleft} < ${TheAmount} && ${Itemtype.Equal[Item]}) {
           /goto :Done
        }

    /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
This version has performed flawlessly for months now (since they made it impossible to hand in stacks of items). Without a delay, it's very fast, so beware of spamming nearby PCs at impossible (without MQ2) speed. Range on voice is 100.00, so slow it down if any PCs are within that range.

FearTheJourney
orc pawn
orc pawn
Posts: 20
Joined: Sun Jun 19, 2005 6:02 pm
Contact:

Post by FearTheJourney » Mon Jun 20, 2005 1:43 am

This says can not send notifacation to 321 left mouse up. any ideas?

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Tue Jun 21, 2005 11:56 am

FearTheJourney wrote:This says can not send notifacation to 321 left mouse up. any ideas?
i assume you refer to Grumpy's version?
wild guess, you misspelled item name

Code: Select all

                /nomodkey /ctrl /itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup 
there's no code verifying if item actually exists before this is being called

FearTheJourney
orc pawn
orc pawn
Posts: 20
Joined: Sun Jun 19, 2005 6:02 pm
Contact:

Post by FearTheJourney » Tue Jun 21, 2005 12:28 pm

sorry yeah Grumpy's version. and also if I try to do coin turn in all it does is pick up one coin and then end

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 Jun 28, 2005 2:05 pm

I rewrote the Handin.mac from scratch for no reason(It works better for me now):

Code: Select all

|------------------------------------------------------------
| Name: Handin.mac
|------------------------------------------------------------
| Author: TheWarden (helped by DKAA)
|------------------------------------------------------------
| Example Uses:
|    /macro handin.mac "gp" 2 destroy
|       - Hands in 2 gold and destroys items you get.
|
|    /macro handin.mac "Batwings" 3
|       - Hands in 3 Batwings and keeps the items you get.
|------------------------------------------------------------

#Event TooFar "#*#You are too far away from #*#"
#Event NotWanted "#*#I have no need for this #*#"
#Event NoItems "#*#Invalid item slot #*#"
#Event NoItems "#*#Could not send notification to #*#"


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

|------------------------------------------------------------
| Declaring some stuff.
|------------------------------------------------------------
     /declare Loopcount int local
     /declare Timeout timer local


|------------------------------------------------------------
| A bunch of /if statements to start us out.
|------------------------------------------------------------
     /if (!${Defined[TheItem]} || !${Defined[TheAmount]}) {
        /call Syntax
     }
     /if (${TheAmount} == 0) {
        /echo Rethink the amount, buddy. Ending macro.
        /endmacro
     }

 :Start
     /if (!${Target.ID}) {
        /echo You have no target. Ending macro.
        /endmacro
     }
     /if (!${Window[InventoryWindow]}) {
        /keypress inventory
        /delay 5
     }
     /if (${Cursor.ID}) {
        /autoinv
        /delay 5
     }

|------------------------------------------------------------
| Determining the item.
|------------------------------------------------------------
   /for Loopcount 1 to ${TheAmount}
     /if (${TheItem.Equal[pp]}) {
        /if (${Me.Platinum} < ${TheAmount}) {
           /echo Not enough plat. Ending macro.
           /keypress esc
           /keypress esc
           /endmacro
        }
        /ctrl /notify InventoryWindow IW_Money0 leftmouseup
     } else /if (${TheItem.Equal[gp]}) {
        /if (${Me.Gold} < ${TheAmount}) {
           /echo Not enough gold. Ending macro.
           /keypress esc
           /keypress esc
           /endmacro
        }
        /ctrl /notify InventoryWindow IW_Money1 leftmouseup
     } else /if (${TheItem.Equal[sp]}) {
        /if (${Me.Silver} < ${TheAmount}) {
           /echo Not enough silver. Ending macro.
           /keypress esc
           /keypress esc
           /endmacro
        }
        /ctrl /notify InventoryWindow IW_Money2 leftmouseup
     } else /if (${TheItem.Equal[cp]}) {
        /if (${Me.Copper} < ${TheAmount}) {
           /echo Not enough copper. Ending macro.
           /keypress esc
           /keypress esc
           /endmacro
        }
        /ctrl /notify InventoryWindow IW_Money3 leftmouseup
     } else {
        /ctrl /itemnotify ${FindItem[${TheItem}].InvSlot} leftmouseup
     }
     /doevents
     /delay 5
     /click left target
     /doevents

:GiveWnd
     /if (!${Window[GiveWnd].Open}) {
        /goto :GiveWnd
     }
     /next Loopcount
     /notify GiveWnd GVW_Give_Button leftmouseup
     /doevents
     /delay 5

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

 :Lag
     /echo Macro lagged out. Ending macro.
     /endmacro


|------------------------------------------------------------
| Sub: Syntax
|------------------------------------------------------------
Sub Syntax
     /echo You fucked up! Check the macro instructions. Ending macro.
     /endmacro

|------------------------------------------------------------
| Event: NotWanted
|------------------------------------------------------------
Sub Event_TooFar
     /echo NPC is too far away, get closer. Ending macro.
     /autoinv
     /autoinv
     /keypress esc
     /endmacro

|------------------------------------------------------------
| Event: NotWanted
|------------------------------------------------------------
Sub Event_NotWanted
     /echo NPC doesn't want this item. Ending macro.
     /autoinv
     /autoinv
     /keypress esc
     /endmacro

|------------------------------------------------------------
| Event: NoItems
|------------------------------------------------------------
Sub Event_NoItems
     /echo Ran out of items. Ending macro.
     /keypress esc
     /endmacro
[img]http://img.photobucket.com/albums/v629/Deevious/SigPics/KristinKreukSig01.jpg[/img]

bignhairry
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Jan 05, 2006 11:24 am

Casino macro

Post by bignhairry » Fri Jan 06, 2006 1:33 pm

Thewarden your macro rocks for all purpos's thanks, 100% flawless!!!

WizeOne
a hill giant
a hill giant
Posts: 207
Joined: Tue Jul 12, 2005 12:36 pm

Post by WizeOne » Fri Dec 01, 2006 2:35 am

the coin part of this and the other handin mac's are not working.. any pointers?


the update from thewarden will only give 2 coins no matter how many you want to give

Jago668
orc pawn
orc pawn
Posts: 22
Joined: Mon Apr 14, 2003 11:19 am

Re: turn in bone chips wine whatever updated

Post by Jago668 » Fri Mar 22, 2013 4:00 pm

Is there a way to make these hand in stacks? You can now turn in stacks of items again. Would make things a little more handy.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: turn in bone chips wine whatever updated

Post by dewey2461 » Fri Mar 22, 2013 4:57 pm

Jago668 wrote:Is there a way to make these hand in stacks? You can now turn in stacks of items again. Would make things a little more handy.


You can certainly modify the code to do stacks. You just change the item notify line.

You will have to add some logic to determine how big a stack is if you want to keep track of how many items you've turned in.