|
Leea Newbie
Joined: 11 Dec 2005 Posts: 4
|
Posted: Mon Aug 21, 2006 6:35 am
Acahea harvesting Counter- for status window |
I'm not sure if or how to even use other windows, so i was attempting to use this with the status window, any and all suggestions welcomed.
Alright, i'm trying to make a counter that would be docked in my normal screen, that counts up how many herbs i harvested that day. I figured i would use me rifting them to add them, instead of the actual harvesting which seemed like it would be more work. it'd look something like this
You store 40 kola nut, bringing the total to 1671.
only taking the first number and keeping a steady math add and perhaps looking somewhat like this on my status window
Kola: #
there are like currently 18 different herbs, i thought I could just use a trigger to make it add, but i got lost somewhere in my crappy code and well, it didn't work.
it could possibly run off of my auto-harvest, which goes like
har # plant -- har 10 kola
i tried working with this also, i clearly just dont know enough about zmud to get this to fuction correctly:C
any ideas? |
|
|
|
Qiz Novice
Joined: 14 Aug 2006 Posts: 34 Location: Sweden
|
Posted: Mon Aug 21, 2006 7:37 am Re: Acahea harvesting Counter- for status window |
Leea wrote: |
You store 40 kola nut, bringing the total to 1671.
only taking the first number and keeping a steady math add and perhaps looking somewhat like this on my status window
Kola: #
there are like currently 18 different herbs, i thought I could just use a trigger to make it add, but i got lost somewhere in my crappy code and well, it didn't work.
|
I take it the first line in the quote is mud output. Also, I'm assuming the first word describing the herb is unique, that is that there are never two herbs with the same first herb such as "kola nut" and "kola seed" (yeah, somewhat silly example, but it's just to clarify). If there is, you'd have to do some more work.
Thus for output: You store 40 kola nut, bringing the total to 1671.
trigger pattern: ^"You store (%d) (%w),"
#ADD %2 %1 // becomes the same as #ADD kola 40
#SHOW Accumulated %2: @%2 //shows Accumulated kola: <total>
To put what you want in the status window:
#STWIN {HERBS: %cr Kola Nut: @kola %cr Herb2: @herb2} and so on with one entry for each herb. Skip the '%cr' if you don't want a new line for each herb. |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Mon Aug 21, 2006 11:53 am |
Though for Achaea, I wouldn't necessarily use 'You store'... as the trigger pattern because it will add any herbs you buy, one you put back in after removing, etc. If you just want to know what you harvest it would be preferable to trigger off harvesting messages. I haven't been a forestal myself so I don't know if it tells you upon completion how many you harvested, or if harvesting is always sucessful, but you would account for those.
As for working off 'har # plant' asa trigger message I find that triggering commands is a pain because it always fires from the pattern on the command line and then again when you command is echoed to the mud. Still possible to do, but that sort of thing would mess up your counter. |
|
|
|
Leea Newbie
Joined: 11 Dec 2005 Posts: 4
|
Posted: Mon Aug 21, 2006 2:08 pm |
Okay, I'm pretty sure I got this to work decently! Thank you both!
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|