Autobuy Reagents

This script automatically figures out how many of each reagent except bloodmoss you need and buys them.

First make the following variables:

blackpearls
ginseng
goldenrod
mandrake
nightshade
pineneedles
spiderweb
buyblackpearls
buyginseng
buygoldenrod
buynightshade
buypineneedles
buyspiderweb

create the following events:

ginseng:*   black pearls:*   spider web:*   goldenrod:*  |

variables to be populated by *:
@ginseng, @blackpearls, @spiderweb, @goldenrod

script:

;process @ginseng = cls(@ginseng)
;process @blackpearls = cls(@blackpearls)
;process @spiderweb = cls(@spiderweb)
;process @goldenrod = cls(@goldenrod)
;process @buyginseng=math(999-@ginseng)
;process @buyblackpearls=math(999-@blackpearls)
;process @buyspiderweb=math(999-@spiderweb)
;process @buygoldenrod=math(999-@goldenrod)

and:
mandrake:*   pine needles:*   nightshade:* bloodmoss:*

variables to be populated by *:
@mandrake, @pineneedles, @nightshade, dummy variable

script:

;process @mandrake = cls(@mandrake)
;process @pineneedles = cls(@pineneedles)
;process @nightshade = cls(@nightshade)
;process @buymandrake=math(999-@mandrake)
;process @buypineneedles=math(999-@pineneedles)
;process @buynightshade=math(999-@nightshade)

then make a buyall alias with script:

gs
;wait 4
buy @buyblackpearls black pearls
buy @buyginseng ginseng
buy @buygoldenrod goldenrod
buy @buymandrake mandrake
buy @buynightshade nightshade
buy @buypineneedles pine needles
buy @buyspiderweb spider web

You can individually make aliases to buy only a specific reagent:
alias buy(reagent name)

gs
;wait 4
buy @buy(reagent name-no space) (reagent name)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License