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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
GeneralKenobi_2
Newbie


Joined: 10 Nov 2013
Posts: 2
Location: United States

PostPosted: Sun Nov 10, 2013 2:12 am   

Help with self creating triggers
 
I'm trying to get a feature of the game to become automated because it's pretty tedious and can be a bother.

what happens is it will present you with a prompt of two choices, you have to select the one without grammar mistakes to recharge certain energies.

I will list an example below.

-------

[To pick the pure stream, subvocalize the option corresponding to it. To end the process, concentrate on your own stream of thoughts.]

Two symbolic streams flow into your thoughts and present themselves before your mind's eye:

[1] Okay, you primitive screwheads, listen up! You see this? This... is my Boomstick! The 12-gauge double-barreled Remington, S-Mart's top of the line. You can find this in the sporting goods department. That's right, this sweet baby was made in Grand Rapids, Michigan. Retails for about $109.95. It's got a walnut stock, cobalt blue steel, and a hair trigger. That's right: Shop smart, shop S-Mart. You got that?

[2] She is haunting me with a screwdriver as she lay there dozing next to defend it burn my lungs about health, about the colour Green potato or an alien thing that looks best in chiaroscuro, a desperate man will avoid you LIKE the appearance, of success, Londo, is our lack of partner, if they can't handle drugs terror and manipulation of reckoning!!!

-------

I currently have about 50 set up but i'd imagine there are around a thousand possible statements.

What i'd like it to do is to first trigger when it sees the [1] or the [2] then scan afterwards, this isn't the issue, i have a trigger set for that.

?(%d)? Okay, you primitive screwheads, listen up

and it returns sub %1

this would work fine for it, but i want it to auto make itself each time it encounters one it hasn't already.

so is there any way i can get it to do something like...

#trigger {Two symbolic streams flow} then have it capture each option [1] and [2] to memory, check to see #if it's an existing variable, if it != a variable then wait for input from me (i would type sub 1 or sub 2) and then it would make a trigger that would copy the string from the choice i made and add it to the list of available triggers, and if it gets to a string it already has in the variable list, terminate and allow the other trigger to activate normally.

thanks for any help you can offer.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4686
Location: Pensacola, FL, USA

PostPosted: Sun Nov 10, 2013 3:49 pm   
 
You would want to capture both options into a variables.
@one and @two

then you need two stringlists, one for good grammar and one for bad
@goodGrammar and @badGrammar

#ALIAS testGrammar {
#IF (%ismember(@one, @goodGrammar)) {sub 1;#ADDITEM badGrammer @two;#EXIT}
#IF (%ismember(@two, @goodGrammar)) {sub 2;#ADDITEM badGrammer @one;#EXIT}
#IF (%ismember(@one, @badGrammar)) {sub 2;#ADDITEM goodGrammer @two;#EXIT}
#IF (%ismember(@two, @badGrammar)) {sub 1;#ADDITEM goodGrammer @one;#EXIT}
#PRINT {Neither example given is known}
}
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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