Code: Select all
|MyForage.mac By: Chaos12010
|Version History: 0.5 Creation of MyForage.
| 1.0 Modfications and adjustments to the code.
| 1.5 Some More Modifications based off of YAFM and Forage Macros were added to the macro.
| 2.0 Added the inate cammo to the code...
| 2.1 A little bit of tweaking.
|Feature Realse: Would like to add the ability to section the MyForage.ini adding zones so it will become
neater for the user to read.
| I would also love to put in the Exoduse option and the ability to auto exit and end macro
after Max is compleated.
|Purpose of this macro: The purpose of this macro is to auto forage any item based on the MyForage.ini file.
This macro will also protect
|the user by casting Innate Cammo. Added the ability to turn on or of the cammo option. Modified and added new
Timers that will slow down the macro
|a bit so it won't delete or inventory items wanted or items you don't want. This macro also sets your toon in
afk mode. This can be
|changed or modified by the user as well. I hope everyone enjoys it. Also enhanced the output messages so that
you actualy know clearly
|what's going on.
sub Main
|Delares the statment that will be used to define true or false for cammo (This Can Be Changed By The User.)
/declare set_MyCammo bool outer TRUE
|MyForage Welcome.
/echo Welcome to MyForage 2.1.
|This if statement will only activate once per run in the macro. (If The User Expresses True.)
/if ((${set_MyCammo}) && (!${Me.Buff[Camouflage].ID})) /alt activate 80
|This can be commented out if the user would like. It the sets the afk mode on or off.
/afk Be Back Soon..... I Hope!
/delay 5
|Begins the cleanup befor the actual forage loop begins. The user can again comment this out if they wish to
|see there bags always open on the screen.
/cleanup
|This is where the actual codeing takes place for the forage loop. It steps throw etch line of code; then does
the coresponding calls
|(ItemSort, Cammo). This Code Does Not Need To Be Changed.
:Forage
/delay 2
/if (${Me.State.NotEqual[STAND]}) {
/stand
/delay 5
}
/delay 1s
/if (${Me.Skill[Forage]} > 0) /doability forage
}
/if (${Cursor.ID}) /call ItemSort
/call Cammo
/goto :Forage
:loop
/return
|This is where the Items Get sorted if you want the item it gets put in inventory. If Not it destroys it. -1
was added so it will never delete
|Items in inventory on accsedent. Normaly I have seen people set this to 1. YOu can set this at your own risk.
sub ItemSort
/delay 5
/if (!${Ini[MyForage.ini,ForageList,${Cursor.Name}].Length}) {
/ini "MyForage.ini" "ForageList" "${Cursor.Name}" "-1"
} else {
/if (${Ini[MyForage.ini,ForageList,${Cursor.Name}]}) {
/if (${FindItemCount["=${Cursor.Name}"]}>=${Ini[MyForage.ini,ForageList,${Cursor.Name}]} &&
${Ini[MyForage.ini,ForageList,${Cursor.Name}]}!=-1) /goto :Destroy
} else {
:Destroy
/echo Deleteing this item: (${Cursor.Name})
/destroy
/return
}
}
:LootIt
/echo Keeping this item: (${Cursor.Name})
/autoinventory
/delay 5
/if (${Cursor.ID}) /goto :LootIt
/return
|This section gets calld from within the Forage loop. Now your probably wondering why I placed the code for
calling it at
|the bottom of the forage loop. If I put it at the top of the forage loop there will be timer issues that will
kik the macro off.
|I tried to solve this problom by moveing the call code to the ending of the loop so it will not bother the
forage code.
sub Cammo
/if ((${set_MyCammo}) && (!${Me.Buff[Camouflage].ID})) {
/echo Enableing (Cammo AA)...
/alt activate 80
/delay 10
}
/return
Please post what you think.....

