|
darkfenix Wanderer
Joined: 02 Feb 2002 Posts: 58
|
Posted: Mon May 12, 2003 4:24 pm
autogetting |
A goldenseal flower (goldenseal) 24 left.
A lady's slipper plant (lady's slipper) 60 left.
okies well is it possible to make it auto harvest that it will just check to see like the goldenseal is 24 the limit is 15 so thats uh........*grabs calculater* 24-15=9 to harvest.....I saw something in here but it was old and didnt really work the way I want it to.
so it will check to see then be ready to harvest 9 but I want to be able to choose what i want to harvest first, in this case the goldenseal....then the command is HARVEST GOLDENSEAL....waith for You have recovered equilibrium.
then again 9 times. when its done I can target the slipper and so on.......
im guessing I have to use seperate triggers for each plant since they have their own spaces before the number...hope you all get it what im trying to say lol |
|
|
|
darkfenix Wanderer
Joined: 02 Feb 2002 Posts: 58
|
Posted: Tue May 13, 2003 4:43 am |
pattern:A goldenseal flower (goldenseal) 24 left.
command: #ad goldenseal %1
trigger:
pattern: you have recoverd equilibrium
command: #if (@goldenseal>= 15) {#t- goldenseal} {.harvgoldenseal}
alias: .harvgoldenseal = harvest goldenseal; plants
thats what I got from the older posts. but it seems that I will have to make a new class folder for every herb, is there another way? targeting perhaps? |
|
|
|
Lain Novice
Joined: 26 Oct 2001 Posts: 38
|
Posted: Tue May 13, 2003 5:24 am |
You could use one trigger to capture all plants listed into one variable data record.
#TR {{A|An} (*) {flower|plant} ~((*)~) (%d) left.} {#ADDKEY plants {%2=%3}}
That will capture the short name found between the brackets (goldenseal) as the key and the number left as the value of that key.
You'd need to make a calculation for how many 15's in 24 and what is left over. Maybe you could have the alias remove 15 from the value each time it is triggered until the number becomes less than 15 at which point it would replace - harvest 15 goldenseal - with the number left.
The math part is beyond me but maybe this will give you some ideas.
Lain |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue May 13, 2003 5:31 am |
This should do it for any plant that has a limit of 15. The second alias is so you can shut it off early if you need to.
#AL harv1 {#VAR Harvesting %1;#T+ AutoHarvest1;look}
#CLASS AutoHarvest1 disable
#TR {~(@Harvesting~)%s(%d) left} {#IF (%1 > 15) {harvest @Harvesting} {#SAY Limit reached;#T- AutoHarvest1}}
#TR {You have recovered equilibrium} {look}
#CLASS 0
#AL harv0 {#T- AutoHarvest1}
LightBulb
Advanced Member |
|
|
|
darkfenix Wanderer
Joined: 02 Feb 2002 Posts: 58
|
Posted: Tue May 13, 2003 9:50 am |
hmmm whats the LOOK thing? I assume thats the command you think its to see the plants? well the command is PLANTS sorry forgot to mention.
I replaced look with PLANTS and did
harv1 goldenseal
pretty good safety measure if thats what you did. making it look after every harvest
the problem is that it slows the whole process down.....is there a way to skip that and just go directly to harvesting whatever is left? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue May 13, 2003 5:29 pm |
Here you go.
#AL harv1 {#VAR Harvesting %1;#VAR HarvestAmount -1;#T+ AutoHarvest1;plants}
#CLASS AutoHarvest1 disable
#TR {~(@Harvesting~)%s(%d) left} {#IF (%1 > 15) {#MATH HarvestAmount (%1 - 16);harvest @Harvesting} {#SAY Limit reached;#T- AutoHarvest1}}
#TR {You have recovered equilibrium} {#IF (@HarvestAmount = -1) {} {#IF (@HarvestAmount > 0) {#ADD HarvestAmount -1;harvest @Harvesting} {#SAY Limit reached;#T- AutoHarvest1}}}
#CLASS 0
#AL harv0 {#T- AutoHarvest1}
I doubt that checking the actual number before each harvest slows you down anywhere near as much as waiting to recover balance. Sooner or later, someone else will come into the room while you're harvesting and harvest one (or more) plant. When that happens, don't complain about the overharvesting fine.
LightBulb
Advanced Member |
|
|
|
darkfenix Wanderer
Joined: 02 Feb 2002 Posts: 58
|
Posted: Thu May 15, 2003 3:48 am |
*laugh* thanks! I guess you played the or are still playing it! thanks a ton!
|
|
|
|
darkfenix Wanderer
Joined: 02 Feb 2002 Posts: 58
|
Posted: Sun May 18, 2003 4:02 pm |
ran into a little snag and havent been able to be get back on lately anyway sometimes it works sometimes it dont. reason was pretty clear since the number of spaces between the name and the number left various from plant to plant. example
A red elm tree (red elm) (23 spaces) 50 left.
A lobelia wildflower (lobelia) (14 spaces) 60 left.
and so on and this ofcourse causes a problemt whit the %s in the trigger line. hows is this fixed? separate trigger for each plant maybe? *shrugs* help again pleaes Lightbulb hehe |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun May 18, 2003 5:29 pm |
%s matches any amount of white space (spaces, tabs). It's not the problem.
The actual problem is that the pattern doesn't always match. Some plants have more than one word between the parentheses (red elm). Change the pattern.
#TR {@Harvesting* (%d) left} {#IF (%1 > 15) {harvest @Harvesting} {#SAY Limit reached;#T- AutoHarvest1}}
You may need special triggers in some cases, if the plant's name doesn't match its description.
LightBulb
Advanced Member |
|
|
|
darkfenix Wanderer
Joined: 02 Feb 2002 Posts: 58
|
Posted: Mon May 19, 2003 3:06 am |
Aha! thanks Lightbulb!
|
|
|
|
moriaquinn Newbie
Joined: 01 Apr 2006 Posts: 1
|
Posted: Sat Apr 01, 2006 8:07 am harvesting |
Alright, I'm wondering if you could adapt that a bit for my lightbulb.
All I'm looking for it to do differently is the calculation.
I can't harvest past 10 of the herbs but I want it to harvest only half of the herbs present, can that be worked out? |
|
|
|
|
|