I modified it to only destroy specific items and keep everything else instead of vice versa because I can be a royal clutz and was terrified I'd loose track and pick up something important, only to have it eaten because it wasn't on the list
The destroy list is (of course) modifiable, with instructions at the top. Just need to update the DestroyArray and the DestArraySize.
Umm.. think that's about it, hope you all find this helpful
Code: Select all
|ForageDestroy.mac
|Based off of Grimjack's forage.mac - Thank you =)
|edit the /varset DestroyArray to reflect what you want to destroy.
|If you add more update DestArraySize to reflect the change.
|The next value in the array would be like this.
|/varset DestroyArray(20) "what you want"
|And you would update DestArraySize like this.
|/varset DestArraySize 21
sub Main
/cleanup
/declare DestArraySize global
/declare LoopCount global
/declare DestroyArray array
/varset DestroyArray(0) "Pod of Water"
/varset DestroyArray(1) "Vineclinger Berries"
/varset DestroyArray(2) "Rabbit Meat"
/varset DestroyArray(3) "Fishing Grubs"
/varset DestroyArray(4) "Speckled Molded Mushroom"
/varset DestroyArray(5) "Sweetened Mudroot"
/varset DestroyArray(6) "Ripened Heart Fruit"
/varset DestroyArray(7) "Bookworm"
/varset DestroyArray(8) "Dew of the Hatchling"
/varset DestroyArray(9) "Jaggedpine Needles"
/varset DestroyArray(10) "Jaggedpine Sap"
/varset DestroyArray(11) "Shadowjade Fern Leaves"
/varset DestroyArray(12) "Shadowjade Fern Seeds"
/varset DestroyArray(13) "Wild Radish"
/varset DestroyArray(14) "Small Chunk of Velium"
/varset DestroyArray(15) "Glob of Slush Water"
/varset DestroyArray(16) "Bark Binding"
/varset DestroyArray(17) "Fresh Tree Sap"
/varset DestroyArray(18) "Ripened Mango"
/varset DestroyArray(19) "Dragon Claw Sliver"
/varset DestArraySize 20
/varset LoopCount 0
:Forage
/delay 1s
/if "$cursor()"!="NULL" /call ItemSort
/if "$cursor()"=="NULL" /if n $char(ability,"Forage")>0 /doability forage
/if "$cursor()"!="NULL" /call ItemSort
/goto :Forage
:loop
/return
sub ItemSort
:itemchecker
/if "$cursor()"!="NULL" {
/if "$cursor(name)"~~"@DestroyArray(@LoopCount)" {
/echo Destroying $cursor(name)
/click left destroy
/delay 2s
}
/varadd LoopCount 1
/if "$cursor()"!="NULL" /if n @LoopCount<@DestArraySize /goto :itemchecker
}
/if "$cursor()"!="NULL" {
/echo Keeping $cursor(name)
/autoinventory
/delay 1s
}
/doevents
/varset LoopCount 0
/return
