Help - Search - Members - Calendar
Full Version: Harvesting Script
Achaea's Forums > Off-Topic > Tech Support > Client Help
aethele
I'm a complete scripting idiot and I am hoping somebody can help me figure out how to do this. I'll even give you a credit biggrin.gif.

What I currently have for a forest harvesting alias is....

Name - forhar
Value-
harvest elm
#wa 4000
harvest ginseng
#wa 4000
harvest lobelia
#wa 4000
(etc. for the rest of the plants)

...And I'm quite proud of myself for even figuring out how to do that. After playing this game and using zmud for six years. Sad, I know.

Anyway, what I would LIKE is a way so that if I get the "That plant has been fully harvested" message, instead of waiting 4 seconds, it would automatically go on to the next plant to harvest. Can this be done without having multiple aliases and classes that turn on and off and other complicated things?

shalishaska
I haven't scripted in zmud in awhile, so I can't tell you the syntax. But what you want to do is have a table of plants to harvest, and each time you get the 'That plant has been...." message you'll move to the next plant in the table. I can write this out in LUA if you want and you can try to translate it to Zscript.
shalishaska
I've thought of a better way.

CODE
#alias {forhar} {plants}

#trigger {some *} {#setvariable {plant} {%1}; #setvariable {harvesting} {1}; harvest @plant}

#trigger {You have recovered balance.} {#if @harvesting = 1 then harvest @plant}

#trigger {That plant has been fully harvested.} {forhar}

#alias {forharoff} {#setvariable {harvesting} {0}}


I don't know if the syntax is 100% correct but it's something along these lines.
Pharue
Might be old, but I don't really care too much.... If you want, I can give you a copy of my old harvesting script, and you can modify it to fit your needs... I'm not a huge fan of #wait, myself.
Trendor
Harvest script
Jonathin
Here's my old one:

Worked for everything:

CODE
#CLASS {Class Skills|Concoctions|Harvesting}
#ALIAS harvesting {#IF (@harvesting=1) {#if (@autoharvesting=1) {autohv};#VA harvesting {0};#echo {%ansi( white)Harvesting Disabled};#noop %btncol( hvbtn, magenta, black)} {#VA harvesting {1};#echo {%ansi( white)Harvesting Enabled};#noop %btncol( hvbtn, magenta, white)}}
#ALIAS autohv {#if (@harvesting=1) {#IF (@autoharvesting=1) {#VA autoharvesting {0};#echo {%ansi( white)Autoharvesting Disabled};#noop %btncol( autohvbtn, magenta, black)} {#VA autoharvesting {1};#echo {%ansi( white)Autoharvesting Enabled-%ansi( high, yellow)CAUTION-Do not use when in the forest};#noop %btncol( autohvbtn, magenta, white)}}}
#BUTTON 46 {Harvesting} {harvesting} {} {} {} {} {} {} {} {} {Pos} {0} {140} {95} {} {} {} "" {} {} {hvbtn}
#BUTTON 47 {Autoharvest} {autohv} {} {} {} {} {} {} {} {} {} {} {} {95} {} {} {} "" {} {} {autohvbtn}
#CLASS 0
#CLASS {Class Skills|Concoctions|Harvesting|Hvstscrpt}
#ALIAS hv {#if (@harvesting=1) {harvest %pop( plantlist)}}
#ALIAS pts {#if (@harvesting=1) {plants;~ };#if (@harvesting=0) {~pt %1}}
#VAR plantcheck {0}
#VAR plantlist {}
#VAR longnames
#addk longnames {red elm=elm|wild ginger=ginger|myrrh bush=myrrh|echinacea=echinacea|ginseng=ginseng|lobelia=lobelia|Irid moss=moss|bloodroot=bloodroot|kelp=kelp|lady's slipper=slipper|goldenseal=goldenseal|hawthorn=hawthorn|bayberry tree=bayberry|valerian=valerian|pear=pear|cactus weed=weed|sileris=sileris|kola tree=kola|skullcap=skullcap|kuzu vine=kuzu|black cohosh=cohsoh|bellwort=bellwort|Prickly ash tree=ash}
#VAR harvesting {0}
#VAR autoharvesting {0}
#REGEX {^The following plants are growing in this room\:$} {#var plantcheck 1}
#REGEX {^(\d+)h\, (\d+)m\, (\d+)e\, (\d+)w (?pflags:[cexkdb@]*)\-} {#if (@plantcheck=1) {#var plantcheck 0;hv}}
#REGEX {^(.+)\((([A-Za-z\s]+|lady\'s slipper))\)(\s+)(\w+)$} {#if (@plantcheck=1) {#if %iskey( @longnames, %2) {#forall %db( @longnames, %2) {#addi plantlist {%i}}}}}
#REGEX {^You reach out and carefully harvest (.*)\.$} {inr %1}
#REGEX {^You have recovered balance on all limbs\.$} {#if (@harvesting=1) {#if (@autoharvesting=1) {hv}}}
#REGEX {^That plant has been fully harvested\.$} {#if (@harvesting=1) {#if (@autoharvesting=1) {hv}}}
#REGEX {^You have already harvested from this plant recently\.$} {#if (@harvesting=1) {#if (@autoharvesting=1) {hv}}}
#CLASS 0


you can use the buttons to turn it on and off, PTS to check plants and then HV to harvest them.

If autoharvesting is disabled, you have to use HV after every balance recovery.

Edit: If you don't want to use the buttons, you can use HARVESTING to turn it on and off, and then AUTOHV to turn on the harvesting on balance recovery.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.