empty.mac

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

empty.mac

Post by Jon100 » Wed Oct 29, 2003 7:36 am

Nice and simple.. a general purpose macro to clean out containers such as forges and jewelry bags. Handy when your combine macros fail, for instance.

example : /macro empty
/macro empty enviro
/macro empty "pack 7"

Defaults to 'enviro'.

All items are auto-equipped to inventory, so ensure you have space and that any 'pack' you are emptying is not going to get refilled.

I use this so much i have it aliased. ("/alias /empty /macro empty")

Enjoy.

Code: Select all

| usage /macro empty <container>
| defaults to enviro


#turbo

Sub Main()

/declare pickuptimer timer
/declare loop local
/declare container local


  /if "$defined(Param0)"!="TRUE" {
     /varset container "enviro"
  } else {
     /varset container "@Param0"
  }


  /for loop 0 to 9
    /click left @container @loop

    /varset pickuptimer 0.1s

    :WaitforPickup
       /if n @pickuptimer==0 /goto :Skip
    /if $cursor()==NULL /goto :WaitForPickup


     :WaitforDrop
     /autoinv
     /if $cursor()!=NULL /goto :WaitForDrop

     :Skip

  /next loop

/endmacro keep keys