Code: Select all
| BGSellAny.mac
| Author: Bigguy70
|
| OPEN VENDOR WINDOW BEFORE STARTING.
| Usage: /macro BGSell.mac "Item Name"
|
| spelling does not have to be exact ie /macro bgsell.mac "rat"
| will sell any item with RAT in the name including "iron RATions"
|
| Only Items in an OPEN CONTAINER will be sold. This macro does not
| sell items equiped or those in main inventory.
|
| /keypress ctrl+b is personal setting for open all bags (in EQ under keys)
#include common.inc
#Event junk "#*#you absolutely nothing#*#"
Sub Main(string ItemToSell)
/declare container int local
/declare slot int local
/declare OldMoney int Outer
/declare NewMoney int Outer
/declare junk_item int outer 0
/keypress ctrl+b
/if (!${Window[MerchantWnd].Open}) /call EndMacro "You must open the merchant window before running this macro."
/for container 1 to 8
/echo Working Pack ${container}
/for slot 1 to ${InvSlot[pack${container}].Item.Container}
/if (${InvSlot[pack${container}].Item.Item[${slot}].ID}) {
/shiftkey /itemnotify in pack${container} ${slot} leftmouseup
/if (${ItemToSell.Equal[all]}) {
/call sell
} else {
/if (${SelectedItem.Name.Find[${ItemToSell}]}) {
/call Sell
}
}
}
/delay 1s
/next slot
/next container
/cleanup
/return
Sub Event_junk
/varset junk_item 1
/return
Sub Sell
/doevents
/if (${junk_item}==0) {
:Selling
/delay 1s
/varset OldMoney ${Me.Cash}
/nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup
:WaitSell
/varset NewMoney $(Me.Cash}
/if (${NewMoney}==${OldMoney}) /goto :WaitSell
}
/varset junk_item 0
/return
Code: Select all
| BGSell.mac
| Author: Bigguy70
|
| OPEN VENDOR WINDOW BEFORE STARTING.
| Usage: /macro BGSell.mac "Item Name"
|
| spelling must be exact ie /macro bgsell.mac "rat paw"
|
| Only Items in an OPEN CONTAINER will be sold. This macro does not
| sell items equiped or those in main inventory.
|
| /keypress ctrl+b is personal setting for open all bags (in EQ under keys)
#include common.inc
#Event junk "#*#you absolutely nothing#*#"
Sub Main(string ItemToSell)
/declare container int local
/declare slot int local
/declare OldMoney int Outer
/declare NewMoney int Outer
/declare junk_item int outer 0
/doevents
/keypress ctrl+b
/if (!${Window[MerchantWnd].Open}) /call EndMacro "You must open the merchant window before running this macro."
/for container 1 to 8
/if (!${Window[pack${container}].Open}) /next container
/for slot 1 to ${InvSlot[pack${container}].Item.Container}
/if (${InvSlot[pack${container}].Item.Item[${slot}].ID}) {
/shiftkey /itemnotify in pack${container} ${slot} leftmouseup
/doevents
/if (${ItemToSell.Equal[all]}) {
/call sell
} else {
/if (${SelectedItem.Name.Equal[${ItemToSell}]}) {
/call Sell
}
}
}
/delay 5
/next slot
/next container
/cleanup
/echo Done
/return
Sub Event_junk
/varset junk_item 1
| /echo junk
/return
Sub Sell
/doevents
/if (${junk_item}==0) {
:Selling
/delay 1s
/varset OldMoney ${Me.Cash}
/nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup
:WaitSell
/varset NewMoney $(Me.Cash}
/if (${NewMoney}==${OldMoney}) /goto :WaitSell
}
/varset junk_item 0
/return
Code: Select all
| common.inc Common Subroutines
| Converted 4/30/2004
| Last Update: 12/6/2004
| Wait for cursor to contain something.
Sub WaitForPickup
:waiting
/delay 1
/if (!${Cursor.ID}) /goto :waiting
/return
|Wait for cursor to become empty.
Sub WaitForDrop
:waiting
/delay 1
/if (${Cursor.ID}) /goto :waiting
/return
| Send everything on cursor to inventory.
Sub ClearCursor
:Loop
/if (${Cursor.ID}) {
/autoinv
/delay 5
}
/if (${Cursor.ID}) /goto :Loop
/return
|Pause while self is targeted.
Sub Pause
/if (!${String[${Target}].Equal[${Me}]}) /return
/echo Pausing!! To resume, type /target clear or target something else.
:HoldingPattern
/delay 20
/if (${String[${Target}].Equal[${Me}]}) /goto :HoldingPattern
/return
| Error reporting.
Sub EndMacro(Error)
/echo An error has occured..${Error} ending macro.
/beep
/endmacro
/return
Sub OpenDoor(string Dir)
/declare Angle int local
/if (${Dir.Equal[NORTH]}) {
/varset Angle 0
} else /If (${Dir.Equal[WEST]}) {
/varset Angle 90
} else /If (${Dir.Equal[SOUTH]}) {
/varset Angle 180
} else /If (${Dir.Equal[EAST]}) {
/varset Angle 270
} else {
/echo Error in OpenDoor - invalid parameter
/beep
/endmacro
}
/face Heading ${Angle}
/delay 10
/keypress USE
/delay 10
/return

