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 Goto page 1, 2, 3  Next
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Sun Oct 01, 2006 6:31 pm   

need trigger help
 
i'm gonna try to explain this as simply as i can what i'm looking to do.

On the mud i play on there are portal stones that can transfer a person from one area to the next. You have to press 3 symbols in the correct order to activate the stone to transfer you. The trick is figuring out which 3 symbols to press in the right order.

I know using #1 {%item( @symbols, %random( 1, 16))} this trigger will randomly select a symbol from a list in a variable list with all 16 symbols listed. What i cannot figure out is how to have it go through all 16 symbols in a sequential order so one can keep track of what order has been used. so say you trigger it by saying osay portal run, that causes the trigger to go off sending [press <symbol name>;press <symbol name>; press <symbol name>], so for 15 combinations the first symbol stays the same, the second symbol stays the same while the last one varies until all combinations have run their course and then once its gone through the first symbol remains, the second moves onto the next symbol in line and the third once again cycles the list. there are 3600 possible combinations if one repeats a symbol twice each time, 15 combinations per pair with 15 pairs total and 16 symbols in all. I've been trying to figure out how to get this all to work without spamming myself off the mud with overlapping etc. Any ideas would be appreciated.
Reply with quote
shalimar
GURU


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

PostPosted: Sun Oct 01, 2006 7:23 pm   
 
Order all the symbols in the proper order in the variable array, then just 'press %item(@symbols, 5)' to get the fifth in the lineup
_________________
Discord: Shalimarwildcat
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Sun Oct 01, 2006 7:42 pm   
 
not sure just how that would have it go in proper order as i'd have to make numerous triggers for each symbol instead of one or two that would work together. this is sort of what i've figured out so far, haven't tested it or anything.

variable list named symbols, 16 slots with press <symbol name>
trigger: tells the group 'portal run'.
runs: #1 {%item( @symbols, %random( 1, 16))}
#2 {%item( @symbols, %random( 1, 16))}
#3 {%item( @symbols, %random( 1, 16))}

its just the %random command that needs to be changed i guess but not sure what command is required to go in order from 1 to 16, then 2 to 1, 3 to 2, etc etc
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Sun Oct 01, 2006 7:51 pm   
 
ok so just did a test run. it runs it twice, which is ok i suppose, and it is random choosing.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Oct 01, 2006 10:00 pm   
 
Do you get special messages for each symbol pressed that tell you if it was correct or not? If not, your only option is to brute force test each combination from a REALLY long list of combinations. Might just be easier to show us a complete snippet of actual MUD output.
_________________
EDIT: I didn't like my old signature
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Sun Oct 01, 2006 10:37 pm   
 
well each symbol 'lights up' when all 3 are correct the stone becomes active and a special message is shown to that extent. You don't know if their right until all 3 have been pressed.

You press the sun-and-horizon symbol and it lights up with with a reddish glow.
Currently, the sun-and-horizon, none and none lights are lit up.
You press the circle-and-arrow symbol and it lights up with with a greenish glow.
Currently, the sun-and-horizon, circle-and-arrow and none lights are lit up.
You press the flame-and-mountain symbol and it lights up with with a white glow.

All the lights on the portalstone fade.
A strange sensation fills you as if you are moving but are you? Is this parkandfarm?

this is a sample of what happens when the combo is right, when its wrong the stone just turns off basically.

i'm trying to get around having to manually enter them all, chuckles.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Sun Oct 01, 2006 10:55 pm   
 
so once you press the correct squence (sp?) you are transported.
But are you transported to a room that has one of those transporters?
So this way you can just go back and forth?
Or do you need to walk until you find one?

Also, do you need to see the msgs that show for pressing?
or like if you did
1;2;3
it would press all of them and thats it?
or do you need to press 1
and wait for the msg before the code will allow the next press?

Just wondering if a trigger for pressing is needed or not. (tho a trigger would slow it down and you wouldnt press 30K buttons in one shot....)
_________________
http://www.Aardwolf.com
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Sun Oct 01, 2006 11:18 pm   
 
you go into a room with a portal stone, have to find it. then press 1, press 2, press 3 and then enter activate portal (don't care about this part), it transfers you at that point to the room corresponding with the symbols you pressed. each portal stone in each area has a set of symbols that transfer you to its stone, i'm trying to find those symbol sets. i don't need to trigger off the message of the pressing of the button, i just need to figure out how to make it go in order counting down after each group of 15 tries per symbol trying to find combos that activate the stone.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Sun Oct 01, 2006 11:55 pm   
 
so, it makes for this testing to be a lot harder because once you hit the right pattern your teleported to a room and then have to figure out where that room is, walk to that area's portal room and go thru the whole thing again?
_________________
http://www.Aardwolf.com
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Mon Oct 02, 2006 12:04 am   
 
no, unless you type activate portal after entering the correct sequence you don't go anywhere so you can sit at the one portal stone and just keep pressing until you get it right
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Oct 02, 2006 12:53 am   
 
ah, got ya.
So you know it works without pressing activate?
_________________
http://www.Aardwolf.com
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Mon Oct 02, 2006 2:21 am   
 
yup, A strange sensation fills you as if you are moving but are you? Is this blah?, is the message you get when its right. I got the trigger i put above to work but i wanna take the complete randomization out of it and get it to run in order without having a ton of triggers and such just for it to work.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Oct 02, 2006 12:13 pm   
 
hrmm..
Well, the best that I can come up with is a few #if's
#alias startcombo {#var first_button {1};#var second_button {1};#var third_button {1};press @first_button;press @second_button;press @third_button}
#trigger {A strange sensation fills you as if you are moving but are you~? Is this (%w)~?} {#var %1 {@first_button_@second_button_@third_button;#add first_button 1;#add second_button 1;#add third_button 1;#if (@third_button>15) {#add second_button 1;#var third_button 0;press @first_button;press @second_button;press @third_button} {#if (@second_button>15) {#add first_button 1;#var third_button 0;#var second_button 0;press @first_button;press @second_button;press @third_button}
#trigger {what ever the failed msg is since you never supplied it} {#add first_button 1;#add second_button 1;#add third_button 1;#if (@third_button>15) {#add second_button 1;#var third_button 0;press @first_button;press @second_button;press @third_button} {#if (@second_button>15) {#add first_button 1;#var third_button 0;#var second_button 0;press @first_button;press @second_button;press @third_button}}

This isn't exact by a long shot cause I know that you want to press symbols not numbers, but there's a way to draw our the symbol that is represented by the # i think...don't have zmud nor enuf coffee around me right now.
I don't think the #if's work exactly right either. Might have mixed something up. Also, got confused with there being 16 symbols and 15 combinations so, dunno if it should roll over at 16 or 15, but you can figure that part out i think.

Like I said, this may or may not work. Thinking that I need to install zmud here at work....like i need THAT distraction ;-)

I also might be missing a } or something somewhere...

Also, I put in a #var for the zones and the buttons that were needed to access it.
this might screw up if you have #vars for zones already in the main folder and will over write them....that is if that part even works...
(sound really confident in my own codes don't I ;-)
_________________
http://www.Aardwolf.com
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Mon Oct 02, 2006 1:52 pm   
 
teach me to try and read triggers after just waking up. i kinda see what you are trying to do with it. i was never good at understanding if triggers much, not certain how i would alter the first_button thing to work as i couldn't name them first_button to sixteenth_button. was also thinking that if it gets a correct combo could have it stop running the trigger so i can see what it was that worked and if it doesn't work can just keep going with the testing
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Mon Oct 02, 2006 3:01 pm   
 
copy paste for what you have set up doesn't work as zmud takes the ; and has it as a start a new line
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Oct 02, 2006 3:14 pm   
 
well, i DID say that it might be screwed up. But congrats, ya made me install zmud at work :-P
Code:
#CLASS {Stones}
#ALIAS startup {
  #var first_button {1}
  #var second_button {1}
  #var third_button {1}
  press @first_button
  press @second_button
  press @third_button
  }
#VAR first_button {1}
#VAR second_button {1}
#VAR third_button {1}
#TRIGGER {A strange sensation fills you as if you are moving but are you~? Is this (%w)~?} {
  #var %1 {@first_button_@second_button_@third_button}
  #add first_button 1
  #add second_button 1
  #add third_button 1
  #if (@third_button>15) {
    #add second_button 1
    #var third_button 0
    press @first_button
    press @second_button
    press @third_button
    } {
    #if (@second_button>15) {
      #add first_button 1
      #var third_button 0
      #var second_button 0
      press @first_button
      press @second_button
      press @third_button
      }
    }
  }
#TRIGGER {what ever the failed msg is since you never supplied it} {
  #add first_button 1
  #add second_button 1
  #add third_button 1
  #if (@third_button>15) {
    #add second_button 1
    #var third_button 0
    press @first_button
    press @second_button
    press @third_button
    } {
    #if (@second_button>15) {
      #add first_button 1
      #var third_button 0
      #var second_button 0
      press @first_button
      press @second_button
      press @third_button
      }
    }
  }
#CLASS 0
This is the way that I meant for it to look, but at this point I still dont know if it works as you want.
_________________
http://www.Aardwolf.com
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Oct 02, 2006 3:51 pm   
 
press 1
press 1
press 1
A strange sensation fills you as if you are moving but are you? Is this stonetest?
press 1
press 1
press 2
A strange sensation fills you as if you are moving but are you? Is this stonetestt?
press 1
press 1
press 3
A strange sensation fills you as if you are moving but are you? Is this stonetesttt?
press 1
press 1
press 4
A strange sensation fills you as if you are moving but are you? Is this stonetestttt?
press 1
press 1
press 5
A strange sensation fills you as if you are moving but are you? Is this stonetesttttt?
press 1
press 1
press 6
A strange sensation fills you as if you are moving but are you? Is this stonetestttttt?
press 1
press 1
press 7
A strange sensation fills you as if you are moving but are you? Is this stonetesttttttt?
press 1
press 1
press 8
A strange sensation fills you as if you are moving but are you? Is this stonetestttttttt?
press 1
press 1
press 9
A strange sensation fills you as if you are moving but are you? Is this stonetesttttttttt?
press 1
press 1
press 10
A strange sensation fills you as if you are moving but are you? Is this stonetestttttttttt?
press 1
press 1
press 11
A strange sensation fills you as if you are moving but are you? Is this stonetesttttttttttt?
press 1
press 1
press 12
A strange sensation fills you as if you are moving but are you? Is this stonetestttttttttttt?
press 1
press 1
press 13
A strange sensation fills you as if you are moving but are you? Is this stonetesttttttttttttt?
press 1
press 1
press 14
A strange sensation fills you as if you are moving but are you? Is this stonetestttttttttttttt?
press 1
press 1
press 15
A strange sensation fills you as if you are moving but are you? Is this stonetesttttttttttttttt?
press 1
press 1
press 16
press 1
press 2
press 1
A strange sensation fills you as if you are moving but are you? Is this stonetestttttttttttttttt?

Code:
#CLASS {Stones}
#ALIAS startup {
  #var first_button {1}
  #var second_button {1}
  #var third_button {1}
  press @first_button
  press @second_button
  press @third_button
  }
#VAR first_button {1}
#VAR second_button {2}
#VAR third_button {2}
#VAR stonetest {1_1_1}
#VAR stonetestt {1_1_2}
#VAR stonetesttt {1_1_3}
#VAR stonetestttt {1_1_4}
#VAR stonetesttttt {1_1_5}
#VAR stonetestttttt {1_1_6}
#VAR stonetesttttttt {1_1_7}
#VAR stonetestttttttt {1_1_8}
#VAR stonetesttttttttt {1_1_9}
#VAR stonetestttttttttt {1_1_10}
#VAR stonetesttttttttttt {1_1_11}
#VAR stonetestttttttttttt {1_1_12}
#VAR stonetesttttttttttttt {1_1_13}
#VAR stonetestttttttttttttt {1_1_14}
#VAR stonetesttttttttttttttt {1_1_15}
#VAR stonetestttttttttttttttt {1_2_1}
#TRIGGER {A strange sensation fills you as if you are moving but are you~? Is this (%w)~?} {
  #var %1 {@{first_button}_@{second_button}_@{third_button}}
  #if (@third_button<16) {
    #add third_button 1
    press @first_button
    press @second_button
    press @third_button
    }
  #if (@third_button=16) {
    #var third_button 1
    #add second_button 1
    press @first_button
    press @second_button
    press @third_button
    }
  #if (@second_button=16) {
    #var third_button 1
    #var second_button 1
    #add first_button 1
    press @first_button
    press @second_button
    press @third_button
    }
  }
#TRIGGER {what ever the failed msg is since you never supplied it} {
  #if (@third_button<16) {
    #add third_button 1
    press @first_button
    press @second_button
    press @third_button
    }
  #if (@third_button=16) {
    #var third_button 1
    #add second_button 1
    press @first_button
    press @second_button
    press @third_button
    }
  #if (@second_button=16) {
    #var third_button 1
    #var second_button 1
    #add first_button 1
    press @first_button
    press @second_button
    press @third_button
    }
  }
#CLASS 0
Somethings outta order since this happens:
press 1
press 1
press 16
press 1
press 2
press 1

But play with it. see what happens. Still need to know how to extract the #'s to indicate the variables...

So, what should happen is that, i hope, that for lets take the parkandfarm example:

Quote:
You press the sun-and-horizon symbol and it lights up with with a reddish glow.
Currently, the sun-and-horizon, none and none lights are lit up.
You press the circle-and-arrow symbol and it lights up with with a greenish glow.
Currently, the sun-and-horizon, circle-and-arrow and none lights are lit up.
You press the flame-and-mountain symbol and it lights up with with a white glow.

All the lights on the portalstone fade.
A strange sensation fills you as if you are moving but are you? Is this parkandfarm?

You should come up with this:
#var parkandfarm {sun-and-horizon_circle-and-arrow_flame-and-mountain}
_________________
http://www.Aardwolf.com
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Tue Oct 03, 2006 3:42 am   
 
another day without much luck figuring it out, shall try again tomorrow.
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Tue Oct 03, 2006 3:44 am   
 
teach me to check for another page lol, oh man i think my brain just exploded, lol
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Tue Oct 03, 2006 3:48 am   
 
the stonetest etc being labelled as the name of the stone itself? sorry you installed it at work, hehehe and thank you
Reply with quote
getirdros@
Novice


Joined: 10 Jul 2006
Posts: 43

PostPosted: Tue Oct 03, 2006 3:55 am   
 
think for me a big part of what is confusing is the first_button second_button third_button. not sure how to rework it so it attached to the symbols. the names of the 16 symbols are, sun circle flame crescent lightning talon rish rose triangle clenched two-wavy interlinked leaf three two-stars and ship. shoulda supplied those earlier
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Oct 03, 2006 10:01 am   
 
no the stonetest is the name of the area that it leads to. the data in the vars is the buttons pushed in order.
I don't know how to extract the data from the names of the vars to get it to increment by one.
I'll have to see...I'm almost sure it's done cause you aren't the 1st that has asked about combos.
I know I asked and it wasn't doable....wait...MY script....hrmmm...do a seach for me please. I need to get to work.
go to search (the drop down box from "SITE") scroll to search and then search forums.
type rope in the search box, and my name in the author.
there might be only a few hits.
I had needed to combine ropes and flints and stuff for a script, but was never able to get it to work. but it might provide some help now that there's this frame work here.
_________________
http://www.Aardwolf.com
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue Oct 03, 2006 2:53 pm   
 
Code:
#var stone1 {sun|circle|flame|crescent|lightning|talon|rish|rose|triangle|clenched|two-wavy|interlinked|leaf|three|two-stars|ship}
#forall @stone1 {#forall @stone1 {#forall @stone1 {press %i;press %j;press %k}}}

That has no way of stopping at the moment but it won't take much to put in an if check and issue an abort based on your trigger. Also bear in mind that this brute force checking is sending a maximum of 12288 (16 x 16 x 16) x 3 press commands to the mud, without putting in some kind of pause you are likely to get thrown off.
_________________
Taz :)
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Oct 03, 2006 6:51 pm   
 
*grovel Taz*
_________________
http://www.Aardwolf.com
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Oct 03, 2006 7:00 pm   
 
Maybe something with an #alarm?
Like every 5 seconds issue the next one?

Also, would the logging for it be with

#TRIGGER {A strange sensation fills you as if you are moving but are you~? Is this (%w)~?} {
#var %1 {%{i}_%{j}_%{k}}

?
_________________
http://www.Aardwolf.com
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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