skip navigation

Welcome, Guest [log in · register]
Cwn Annwn
Search
Page 1 of 1 1
Siege
Avatar
I don’t quite remember if this is my own code, partly my own or if i wrote it all. Got asked to post this, so I will. I don’t take credit for this, even it if it is my own, which I’m not sure if it is… So yeah.

I have 4 trunks total, I used 2 for reagents only and I also use 4 silks.
3.trunk is my sunstone trunk, 4.trunk is my runstone trunk.

What this does is the following: I type "reagcheck". It checks all my bags and buy the reagents it needs to fill them to 250 from a STANDARD reagent store. Like rune or something, please note that this isn’t a wtf awesome script that works in any reagent shop.

Another note: You must at least have one of each reagent in each location or this will not work. If you run out of feathers (like i do) you have to buy one and put it in your yellow silk bag.

Last note: If you restrung your silks, I probably can’t help you. You need to edit the aliases yourself and replace the ‘a black silk bag’ with whatever you have it as. Also if you don’t use a trunk for each, you need to go in and find the values and change it so that, also the name. I explained what I used for this reason, so you know why it doesn’t work if you have something different than my character.

If you can’t get it to work, you can try posting here and I will try to help you. I can’t always do it, so please take that with a pinch of salt. Make sure in your zmud settings you have "a=b syntax" checked.

This code turns on trigger folders that contain the reagent "math" triggers with the initial alias. It then looks into all the reagent containers (the 4 silks and 2 trunks in my case) and calculates how many are needed. It then buys 20 of that reagent, puts in in the bag/container, and buys more till full. It does do less than 20 if less than 20 are needed, so it will fill to 250. It then disables the folders in which the reagent triggers are stored. THIS IS NOT THE MOST EFFICIENT SCRIPT BUT IT DOES WORK (for me), please don’t complain that this sucks/doesn’t work unless you are paying me cold hard cash irl. :D

You can also use the individual aliases (ie "sulfcheck") that are included to do each bag separately in case your connection is slow and boots when inputting massive list of commands.

Ok, here the code. Put in text file, go to zmud, settings->import etc.


#CLASS {reagent buyer}
#ALIAS airreag {#t+ airreagcheck;l 'a yellow silk bag'}
#ALIAS mandrakecheck {#t+ mandrakecheck;l 'a black silk bag'}
#ALIAS sulfcheck {#t+ sulfcheck;l 'a red silk bag'}
#ALIAS scalecheck {#t+ waterreagcheck;l 'a blue silk bag'}
#ALIAS reagcheck {airreag;mandrakecheck;sulfcheck;scalecheck;trunkthree;trunkfour}
#ALIAS trunkthree {#t+ trunkthree;l 3.trunk}
#ALIAS trunkfour {#t+ trunkfour;l 4.trunk}
#VAR waterreagneed {0}
#VAR waterreagbuyfull {0}
#VAR waterreagneednotfull {0}
#VAR waterreagtotal {250}
#VAR sulfneed {67}
#VAR sulfbuyfull {3}
#VAR sulfneednotfull {7}
#VAR sulftotal {183}
#VAR airreagneed {103}
#VAR airreagbuyfull {5}
#VAR airreagneednotfull {3}
#VAR airreagtotal {147}
#VAR mandrakeneed {99}
#VAR mandrakebuyfull {4}
#VAR mandrakeneednotfull {19}
#VAR mandraketotal {151}
#VAR sunstoneneed {86}
#VAR sunstonebuyfull {4}
#VAR sunstoneneednotfull {6}
#VAR sunstonetotal {164}
#VAR runestoneneed {64}
#VAR runestonebuyfull {3}
#VAR runestoneneednotfull {4}
#VAR runestonetotal {186}
#CLASS 0
#CLASS {reagent buyer|sulfcheck} {disable}
#TRIGGER {~((%d)~) a pinch of sulfur} {#var sulfneed 0;#var sulfbuyfull 0;#var sulfneednotfull 0;#var sulftotal 0;#var sulftotal %1;#if (sulftotal = 250) {#abort} {#math sulfneed (250-@sulftotal);#math sulfbuyfull (@sulfneed/20);#var sulfneednotfull %mod( @sulfneed, 20);#repeat @sulfbuyfull {shop buy 20 sulfur;put all.sulfur 4.silk};shop buy @sulfneednotfull sulfur;put all.sulfur 4.silk;#t- sulfcheck}}
#TRIGGER {~((%s)(%d)~) a pinch of sulfur} {#var sulfneed 0;#var sulfbuyfull 0;#var sulfneednotfull 0;#var sulftotal 0;#var sulftotal %2;#if (sulftotal = 250) {#abort} {#math sulfneed (250-@sulftotal);#math sulfbuyfull (@sulfneed/20);#var sulfneednotfull %mod( @sulfneed, 20);#repeat @sulfbuyfull {shop buy 20 sulfur;put all.sulfur 4.silk};shop buy @sulfneednotfull sulfur;put all.sulfur 4.silk;#t- sulfcheck}}
#CLASS 0
#CLASS {reagent buyer|mandrakecheck} {disable}
#TRIGGER {~((%d)~) a browning mandrake leaf} {#var mandrakeneed 0;#var mandrakebuyfull 0;#var mandrakeneednotfull 0;#var mandraketotal 0;#var mandraketotal %1;#if (mandraketotal = 250) {#abort} {#math mandrakeneed (250-@mandraketotal);#math mandrakebuyfull (@mandrakeneed/20);#var mandrakeneednotfull %mod( @mandrakeneed, 20);#repeat @mandrakebuyfull {shop buy 20 leaf;put all.leaf 3.silk};shop buy @mandrakeneednotfull leaf;put all.leaf 3.silk;#t- mandrakecheck}}
#TRIGGER {~((%s)(%d)~) a browning mandrake leaf} {#var mandrakeneed 0;#var mandrakebuyfull 0;#var mandrakeneednotfull 0;#var mandraketotal 0;#var mandraketotal %2;#if (mandraketotal = 250) {#abort} {#math mandrakeneed (250-@mandraketotal);#math mandrakebuyfull (@mandrakeneed/20);#var mandrakeneednotfull %mod( @mandrakeneed, 20);#repeat @mandrakebuyfull {shop buy 20 leaf;put all.leaf 3.silk};shop buy @mandrakeneednotfull leaf;put all.leaf 3.silk;#t- mandrakecheck}}
#CLASS 0
#CLASS {reagent buyer|waterreagcheck} {disable}
#TRIGGER {~((%d)~) a shimmering white fish scale} {#var waterreagneed 0;#var waterreagbuyfull 0;#var waterreagneednotfull 0;#var waterreagtotal 0;#var waterreagtotal %1;#if (waterreagtotal = 250) {#abort} {#math waterreagneed (250-@waterreagtotal);#math waterreagbuyfull (@waterreagneed/20);#var waterreagneednotfull %mod( @waterreagneed, 20);#repeat @waterreagbuyfull {shop buy 20 scale;put all.scale silk};shop buy @waterreagneednotfull scale;put all.scale silk;#t- waterreagcheck}}
#TRIGGER {~((%s)(%d)~) a shimmering white fish scale} {#var waterreagneed 0;#var waterreagbuyfull 0;#var waterreagneednotfull 0;#var waterreagtotal 0;#var waterreagtotal %2;#if (waterreagtotal = 250) {#abort} {#math waterreagneed (250-@waterreagtotal);#math waterreagbuyfull (@waterreagneed/20);#var waterreagneednotfull %mod( @waterreagneed, 20);#repeat @waterreagbuyfull {shop buy 20 scale;put all.scale silk};shop buy @waterreagneednotfull scale;put all.scale silk;#t- waterreagcheck}}
#CLASS 0
#CLASS {reagent buyer|airreagcheck} {disable}
#TRIGGER {~((%d)~) a feather from a roc} {#var airreagneed 0;#var airreagbuyfull 0;#var airreagneednotfull 0;#var airreagtotal 0;#var airreagtotal %1;#if (airreagtotal = 250) {#abort} {#math airreagneed (250-@airreagtotal);#math airreagbuyfull (@airreagneed/20);#var airreagneednotfull %mod( @airreagneed, 20);#repeat @airreagbuyfull {shop buy 20 roc;put all.roc 2.silk};shop buy @airreagneednotfull roc;put all.roc 2.silk;#t- airreagcheck}}
#TRIGGER {~((%s)(%d)~) a feather from a roc} {#var airreagneed 0;#var airreagbuyfull 0;#var airreagneednotfull 0;#var airreagtotal 0;#var airreagtotal %2;#if (airreagtotal = 250) {#abort} {#math airreagneed (250-@airreagtotal);#math airreagbuyfull (@airreagneed/20);#var airreagneednotfull %mod( @airreagneed, 20);#repeat @airreagbuyfull {shop buy 20 roc;put all.roc 2.silk};shop buy @airreagneednotfull roc;put all.roc 2.silk;#t- airreagcheck}}
#CLASS 0
#CLASS {reagent buyer|trunkthree} {disable}
#TRIGGER {~((%d)~) a silver runestone} {#var runestoneneed 0;#var runestonebuyfull 0;#var runestoneneednotfull 0;#var runestonetotal 0;#var runestonetotal %1;#if (runestonetotal = 250) {#abort} {#math runestoneneed (250-@runestonetotal);#math runestonebuyfull (@runestoneneed/20);#var runestoneneednotfull %mod( @runestoneneed, 20);#repeat @runestonebuyfull {shop buy 20 runestone;put all.runes 4.trunk};shop buy @runestoneneednotfull runestone;put all.runestone 4.trunk}}
#TRIGGER {~((%s)(%d)~) a silver runestone} {#var runestoneneed 0;#var runestonebuyfull 0;#var runestoneneednotfull 0;#var runestonetotal 0;#var runestonetotal %2;#if (runestonetotal = 250) {#abort} {#math runestoneneed (250-@runestonetotal);#math runestonebuyfull (@runestoneneed/20);#var runestoneneednotfull %mod( @runestoneneed, 20);#repeat @runestonebuyfull {shop buy 20 runestone;put all.runes 4.trunk};shop buy @runestoneneednotfull runestone;put all.runestone 3.trunk}}
#CLASS 0
#CLASS {reagent buyer|trunkfour} {disable}
#TRIGGER {~((%d)~) a sunstone} {#var sunstoneneed 0;#var sunstonebuyfull 0;#var sunstoneneednotfull 0;#var sunstonetotal 0;#var sunstonetotal %1;#if (sunstonetotal = 250) {#abort} {#math sunstoneneed (250-@sunstonetotal);#math sunstonebuyfull (@sunstoneneed/20);#var sunstoneneednotfull %mod( @sunstoneneed, 20);#repeat @sunstonebuyfull {shop buy 20 sunstone;put all.suns 3.trunk};shop buy @sunstoneneednotfull sunstone;put all.sunstone 3.trunk}}
#TRIGGER {^Vandemaar's Trunk is an enchanted piece of furniture,} {#wait 1000;#t- trunkthree;#t- trunkfour}
#TRIGGER {~((%s)(%d)~) a sunstone} {#var sunstoneneed 0;#var sunstonebuyfull 0;#var sunstoneneednotfull 0;#var sunstonetotal 0;#var sunstonetotal %2;#if (sunstonetotal = 250) {#abort} {#math sunstoneneed (250-@sunstonetotal);#math sunstonebuyfull (@sunstoneneed/20);#var sunstoneneednotfull %mod( @sunstoneneed, 20);#repeat @sunstonebuyfull {shop buy 20 sunstone;put all.suns 3.trunk};shop buy @sunstoneneednotfull sunstone;put all.sunstone 3.trunk}}
#CLASS 0


If you copy this and it doesn’t word wrap on its own, you’ll have to go in and edit it yourself. Nothing I can do.

Enjoy,
-Siege.

Last edited on November 23, 2009 08:20pm.
Page 1 of 1 1