My Ad maker

by Faethan

Back to Mechanic's Corner.

Faethan2005-05-02 04:13:48
This parses your rift, finds out how many of each herb you have, and then updates your ad with the new amounts.
CODE

#ALIAS desc2 {ad %1 describe Arnica: @arn@arnp 8 gold per Calamus: @cal@calp 10 gold per Chervil: @che@chep 8 gold per Colewort: @col@colp 8 gold per Coltsfoot: @colt@coltp 8 gold per Flax: @fla@flap 6 gold per Horehound: @hor@horp 15 gold per Galingale: @gal@galp 8 gold per Juniper: @jun@junp 8 gold per Kafe: @kaf@kafp 8 gold per Kombu: @kom@komp 8 gold per Faeleaf: @fae@faep 8 gold per Marjoram: @mar@marp 8 gold per Merbloom: @mer@merp 8 gold per Mistletoe: @mis@misp 8 gold per Myrtle: @myr@myrp 15 gold per Pennyroyal: @pen@penp 10 gold per Reishi: @rei@reip 12 gold per Rosehips: @ros@rosp 8 gold per Sage: @sag@sagp 8 gold per Sargassum: @sar@sarp 8 gold per Sparkleberry: @spa@spap 25 gold per Weed: @wee@weep 6 gold per Wormwood: @wor@worp 9 gold per Yarrow: @yar@yarp 8 gold per} "riftparse"
#TRIGGER {(%d)~] arnica} {arn = %1;arnp = "..........................................";#if (@arn > 9) {arnp = "........................................."};#if (@arn > 99) {arnp = "........................................"}} "riftparse"
#TRIGGER {(%d)~] calamus} {cal = %1;calp = "........................................";#if (@cal > 9) {calp = "......................................."};#if (@cal > 99) {calp = "......................................"}} "riftparse"
#TRIGGER {(%d)~] chervil} {che = %1;chep = ".........................................";#if (@che > 9) {chep = "........................................"};#if (@che > 99) {chep = "......................................."}} "riftparse"
#TRIGGER {(%d)~] colewort} {col = %1;colp = "........................................";#if (@col > 9) {colp = "......................................."};#if (@col > 99) {colp = "......................................"}} "riftparse"
#TRIGGER {(%d)~] coltsfoot} {colt = %1;coltp = ".......................................";#if (@colt > 9) {coltp = "......................................"};#if (@colt > 99) {coltp = "....................................."}} "riftparse"
#TRIGGER {(%d)~] flax} {fla = %1;flap = "............................................";#if (@fla > 9) {flap = "..........................................."};#if (@fla > 99) {flap = ".........................................."}} "riftparse"
#TRIGGER {(%d)~] horehound} {hor = %1;horp = "......................................";#if (@hor > 9) {horp = "....................................."};#if (@hor > 99) {horp = "...................................."}} "riftparse"
#TRIGGER {(%d)~] galingale} {gal = %1;galp = ".......................................";#if (@gal > 9) {galp = "......................................"};#if (@gal > 99) {galp = "....................................."}} "riftparse"
#TRIGGER {(%d)~] kafe} {kaf = %1;kafp = "............................................";#if (@kaf > 9) {kafp = "..........................................."};#if (@kaf > 99) {kafp = ".........................................."}} "riftparse"
#TRIGGER {(%d)~] kombu} {kom = %1;komp = "...........................................";#if (@kom > 9) {komp = ".........................................."};#if (@kom > 99) {komp = "........................................."}} "riftparse"
#TRIGGER {(%d)~] faeleaf} {fae = %1;faep = ".........................................";#if (@fae > 9) {faep = "........................................"};#if (@fae > 99) {faep = "......................................."}} "riftparse"
#TRIGGER {(%d)~] marjoram} {mar = %1;marp = "........................................";#if (@mar > 9) {marp = "......................................."};#if (@mar > 99) {marp = "......................................"}} "riftparse"
#TRIGGER {(%d)~] merbloom} {mer = %1;merp = "........................................";#if (@mer > 9) {merp = "......................................."};#if (@mer > 99) {merp = "......................................"}} "riftparse"
#TRIGGER {(%d)~] mistletoe} {mis = %1;misp = ".......................................";#if (@mis > 9) {misp = "......................................"};#if (@mis > 99) {misp = "....................................."}} "riftparse"
#TRIGGER {(%d)~] myrtle} {myr = %1;myrp = ".........................................";#if (@myr > 9) {myrp = "........................................"};#if (@myr > 99) {myrp = "......................................."}} "riftparse"
#TRIGGER {(%d)~] pennyroyal} {pen = %1;penp = ".....................................";#if (@pen > 9) {penp = "...................................."};#if (@pen > 99) {penp = "..................................."}} "riftparse"
#TRIGGER {(%d)~] reishi} {rei = %1;reip = ".........................................";#if (@rei > 9) {reip = "........................................"};#if (@rei > 99) {reip = "......................................."}} "riftparse"
#TRIGGER {(%d)~] rosehips} {ros = %1;rosp = "........................................";#if (@ros > 9) {rosp = "......................................."};#if (@ros > 99) {rosp = "......................................"}} "riftparse"
#TRIGGER {(%d)~] sage} {sag = %1;sagp = "............................................";#if (@sag > 9) {sagp = "..........................................."};#if (@sag > 99) {sagp = ".........................................."}} "riftparse"
#TRIGGER {(%d)~] sargassum} {sar = %1;sarp = ".......................................";#if (@sar > 9) {sarp = "......................................"};#if (@sar > 99) {sarp = "....................................."}} "riftparse"
#TRIGGER {(%d)~] juniper} {jun = %1;junp = ".........................................";#if (@jun > 9) {junp = "........................................"};#if (@jun > 99) {junp = "......................................."}} "riftparse"
#TRIGGER {(%d)~] sparkleberry} {spa = %1;spap = "...................................";#if (@spa > 9) {spap = ".................................."};#if (@spa > 99) {spap = "................................."}} "riftparse"
#TRIGGER {(%d)~] weed} {wee = %1;weep = "............................................";#if (@wee > 9) {weep = "..........................................."};#if (@wee > 99) {weep = ".........................................."}} "riftparse"
#TRIGGER {(%d)~] wormwood} {wor = %1;worp = "........................................";#if (@wor > 9) {worp = "......................................."};#if (@wor > 99) {worp = "......................................"}} "riftparse"
#TRIGGER {(%d)~] yarrow} {yar = %1;yarp = "..........................................";#if (@yar > 9) {yarp = "........................................."};#if (@yar > 99) {yarp = "........................................"}} "riftparse"

to make the ad update, do desc2 ## where ## is your ad number. At the moment this doesn't work for 4 digit numbers, because I was lazy.
in order o make the ad, you have to do DESC2 ## where ## is your ad number.