Hello everyone!
I have two questions that I need some tips on and can't wait to see what you all throw at me. Thank you in advance, to those who respond.
1.)I need help formulating a simple trigger. I have trouble fully using the power of regular expressions, and need help with this line.
A Ghast's claw decimates Name!
This text will always appear in the color Cyan, and I have made other triggers to catch lines like the following:
match="^(.*?)\*\*\* (.*?) \*\*\* (\w+)\!$"
match_text_colour="y"
regexp="y"
text_colour="14"
....res %3
(I cut this short just to show the match line)
That line would look like this from the mud:
A Ghast's claw *** DECIMATES *** Name!
I am just looking for a clean way to catch this in one trigger instead of three + triggers, and I know reg exps can do this.
2.)I intend to make a small game that will be played through the channels on my mud. TRIVIA! I need help understand ways that I can take a notepad file that (for example) contains the questions on every Odd number (1,3,5,.etc) and the matching answer will be on the Even line following it (1=2, 3=4, 5=6). Now, this is only how i imagine it to work, so i could easily edit the text files to add/amend the trivia files. I do not have much to work with, as I am trying to understand how to build this part of the script/triggers/etc....
Basically, What are the major hurtles to making a trivia script that would pull questions and check answers from a file of some sort.
Thank you all for you efforts (Nick Gammon and others!)
Bummer
I have two questions that I need some tips on and can't wait to see what you all throw at me. Thank you in advance, to those who respond.
1.)I need help formulating a simple trigger. I have trouble fully using the power of regular expressions, and need help with this line.
A Ghast's claw decimates Name!
This text will always appear in the color Cyan, and I have made other triggers to catch lines like the following:
match="^(.*?)\*\*\* (.*?) \*\*\* (\w+)\!$"
match_text_colour="y"
regexp="y"
text_colour="14"
....res %3
(I cut this short just to show the match line)
That line would look like this from the mud:
A Ghast's claw *** DECIMATES *** Name!
I am just looking for a clean way to catch this in one trigger instead of three + triggers, and I know reg exps can do this.
2.)I intend to make a small game that will be played through the channels on my mud. TRIVIA! I need help understand ways that I can take a notepad file that (for example) contains the questions on every Odd number (1,3,5,.etc) and the matching answer will be on the Even line following it (1=2, 3=4, 5=6). Now, this is only how i imagine it to work, so i could easily edit the text files to add/amend the trivia files. I do not have much to work with, as I am trying to understand how to build this part of the script/triggers/etc....
Basically, What are the major hurtles to making a trivia script that would pull questions and check answers from a file of some sort.
Thank you all for you efforts (Nick Gammon and others!)
Bummer