Page 1 of 2

turn in bone chips wine whatever updated

Posted: Fri Apr 30, 2004 1:01 am
by Zazoot

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

Posted: Fri Apr 30, 2004 1:04 am
by Zazoot
yes i know thers two click left targets.
it doesnt work otherwise
haehehe

Posted: Sat May 01, 2004 11:43 am
by amml
thx, just lvld my char a bit lol :)

Posted: Sat May 01, 2004 12:34 pm
by amml
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 :)

Posted: Wed Jun 01, 2005 10:09 pm
by Yeormom
Confirmed still working June 1, 2005

Posted: Tue Jun 07, 2005 7:46 am
by notadruid
/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.

Posted: Tue Jun 07, 2005 12:25 pm
by Grumpy
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.

Posted: Mon Jun 20, 2005 1:43 am
by FearTheJourney
This says can not send notifacation to 321 left mouse up. any ideas?

Posted: Tue Jun 21, 2005 11:56 am
by gimp
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

Posted: Tue Jun 21, 2005 12:28 pm
by FearTheJourney
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

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

Casino macro

Posted: Fri Jan 06, 2006 1:33 pm
by bignhairry
Thewarden your macro rocks for all purpos's thanks, 100% flawless!!!

Posted: Fri Dec 01, 2006 2:35 am
by WizeOne
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

Re: turn in bone chips wine whatever updated

Posted: Fri Mar 22, 2013 4:00 pm
by Jago668
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.

Re: turn in bone chips wine whatever updated

Posted: Fri Mar 22, 2013 4:57 pm
by dewey2461
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.