Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
rhombur
Beginner


Joined: 13 Oct 2005
Posts: 24
Location: Illinois

PostPosted: Thu Mar 26, 2009 5:06 am   

stumped on how to make a simple trigger to track reagents
 
hello i want to be able to track my reagents via counters and guages.

heres my problem, the string that shows reagent consumption looks like this:

You have completed your casting.
A browning mandrake leaf, a shimmering white fish scale, a pinch of sulfur, a feather from a roc, a silver runestone, a silver runestone, and a large black pearl flare brightly and vanish!
You call upon the Powers for an intervention... <-- this line is the affect, it varies from spell to spell obviously


with of course, variances. there are 7 different kinds of reagents, the 7th, i don't track since it is a rare kind of reagent and those spells I don't cast often.

anyway, is there any way to make it so that i have a trigger for ALL the different variances of this line, instead of having individual lines for each one. there are a lot, and i know zmud can track these without having individual lines. I'm just not familiar with how to do this. another example of this line so there is something else to see,

You have completed your casting.
A browning mandrake leaf, and a silver runestone flare brightly and vanish!
The duration of 'stone skin' has been INCREASED

or

A pinch of sulfur, and a pinch of sulfur flare brightly and vanish!

A feather from a roc, a sunstone, a browning mandrake leaf, a browning mandrake leaf, and a browning mandrake leaf flare brightly and vanish!

each reagent has a variable that i use,

a feather from a roc = @feather
sunstone = @gem
a mandrake leaf = @leaf
a pinch of sulfur = @sulfur
a silver runestone = @eth
a shimmering fish scale = @scale



so the guages along the first row under the status bar are what i use to actually track my reagents. as you can see i'm very low on my @leaf reagent.

I currently keep an accurate tally of these with a config alias that looks through all my bags periodically.[/img]
_________________
Niax Rhasu
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Fri Mar 27, 2009 4:52 pm   
 
That's a pickle

You would need a multistate to span from 'You have completed your casting.' to 'brightly and vanish!'

I briefly tried to do the regex starting with ([\w+ ?]*)[\,]? ([\w+ ?]*)[\,]? but I am not that good.

In this post [url] http://forums.zuggsoft.com/forums/viewtopic.php?t=32707&start=0&postdays=0&postorder=asc&highlight=[/url] Fang Xianfu demonstrated how to get this or that element in a multistate with the not so simple code:

Code:
#trig {Glancing into the cache, you see:} {rift="";#t+ riftcap}
#cond {prompt} {#t- riftcap}

#regex "riftcap" {^\s+\[\s*(\d+)\] ([\w+ ']+?)(?:\s+\[\s*(\d+)\] ([\w+ ']+?))?(?:\s+\[\s*(\d+)\] ([\w+ ']+?))?$} {#addkey rift {%2} {%1};#if (%4) {#addkey rift {%4} {%3}};#if (%6) {#addkey rift {%6} {%5}}} "" {disable}


He did say that was simple.

If I were going to try that I would just process the thing. One of my processes would stall many milliseconds, so I wont elaborate when you could pursue the above link.
Reply with quote
daemoan.vermillious
Apprentice


Joined: 28 Feb 2009
Posts: 135
Location: Chico, Ca

PostPosted: Fri Mar 27, 2009 7:14 pm   
 
hey I would acctully like to see a copy of your scrpiting for that mud you have up there, Iam very intrested in the stuff you are using.
Ty Email Me daemoan.vermillious@gmail.com
Evil or Very Mad

In
Reply with quote
rhombur
Beginner


Joined: 13 Oct 2005
Posts: 24
Location: Illinois

PostPosted: Sat Mar 28, 2009 5:27 pm   
 
which post are you refering to daemoan.vermillious?
_________________
Niax Rhasu
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Apr 11, 2009 11:06 pm   
 
Actually this is quite easy.... if you're willing to make a unique trigger for all 6 reagents.

Code:

#TR {feather from a roc*brightly and vanish!} {#ADD feather -1}
#TR {sunstone*brightly and vanish!} {#ADD gem -1}
#TR {browning mandrake leaf*brightly and vanish!} {#ADD leaf -1}


Should work. Of course, its been a few months, and I don't remember offhand if it should be #ADD var or #ADD @var, so you may have to fix that.

Enjoy.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Thu Apr 23, 2009 12:40 am   
 
Very interested in you buttons for the reags in Materia Magica, would you be interested in sharing the coding for them?
Reply with quote
rhombur
Beginner


Joined: 13 Oct 2005
Posts: 24
Location: Illinois

PostPosted: Sun Jun 21, 2009 6:50 pm   
 
raglith, that is exactly what i was looking for. it seems to work. i knew there was a simple answer to this. and i thank you so much for figuring it out. :D i got it running on one character, if it works with him (as it seems to be) i'll be sure to use that in all my reagent utilites.


alexiel its very simple to make buttons like that.

1. click the button button on the floating file bar.
2. make a button.
3. to make it track something, and not be a toggle button, select the KIND: drop down menu and select GAUGE.
4. you'll want to caption it with whatever Reagent you're using. And you can change the background color. I use Red for fire, etc. gray for my gem/eth.
5. select the ADVANCED tab and the VALUE will be your variable for the reagent. @eth as an example.
6. select the GAUGE tab. Value will be your variable, and you can select your max/min for the gauge. on my lowbie its 25/10. on my hero with silks its 250/80.

Thats how you make the gauge itself. you'll need to have something that counts your reagents going in, and out. so when you pull it out of your reagent bag, or buy it at a vendor and put it into your bag. which is why i posted this topic. I have no problems counting them coming in, its just the massive amount of reagents being used in various strings that was driving me nuts. there should be around 150 to 200 different consume strings for all the different spells in the game.
_________________
Niax Rhasu
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net