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
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Thu Dec 04, 2003 2:34 am   

Trigger Trouble
 
Ok, this is the jiff, on our mud ( nodeka ) we have a thing called bot checks which look like this :

###############################################################################
BOT CHECK - use the 'answer' command to store your answer.
Answers will be checked once per consecutive minute.

Answer usage: answer <string>
###############################################################################
Pick the 'weapon' from the following list:

2 b l b 1 5
3 l i r 3
2 a g o p ,
9 c h w e 2
k t n n 0
m n 5
i d p p y
n a u a
u g k n
t g e t
e e s
s r g
r
e
e
n

Just to let you know there are 5 spaces at the beginning, and 9 spaces after each letter in the lines.

and i have this script thats supposed to auto answer these pop ups and tell the group the answers like this :
[ Group: You ]: '::BOT CHECK!'
[ Group: You ]: ':: Bot Check Possible answers:'
[ Group: You ]: ':: 2329 minutes'
[ Group: You ]: ':: black dagger'
[ Group: You ]: ':: light puke green'
[ Group: You ]: ':: brown pants'
[ Group: You ]: ':: 1 penny'
[ Group: You ]: ':: 53,205'
[ Group: You ]: '::Bot Check Successful'

and give an answer if found in library... BUT!! heres the big thing. BUT!! it comes out like this :

[ Group: You ]: '::BOT CHECK!'
[ Group: You ]: ':: Bot Check Possible answers:'
[ Group: You ]: ':: 2329 minutes'
[ Group: You ]: ':: biack duke green'
[ Group: You ]: ':: lrght pants'
[ Group: You ]: ':: b own p'
[ Group: You ]: ':: 1 penny'
[ Group: You ]: ':: 53,205'
[ Group: You ]: '::Bot Check Successful'

The trigger which catches these bot checks has a pattern like this :
" %1 %2 %3 %4 %5 %6 "

i put the quotes to show you. Theres another that looks like this also:
" %1 %2 %3 %4 %5 %6 "
(trigger matches the pattern above)

and when i test the trigger out with this line:
" 3 l i r 3 "
(5 spaces before the 3, and 9 spaces after each character)

it shows the variables like this when tested:
%1 :3 l
%2 :i
%3 :r
%4 :
%5 :
%6 :3

How can i correct this problem?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Dec 04, 2003 3:55 am   
 
Use the zScript wildcards, as shown in the Help topic Pattern Matching, instead of the %1, %2, etc. that you learned elsewhere, and which are equivalent to zScript's *. In this case, you'll probably want to use the &nn (fixed width) and ? (single character) wildcards.

Pattern: ^&05(?)&09(?)&09(?)&09(?)&09(?)&09(?)&05

By the way, the ###### lines don't have any spaces, so they override the forum's wordwrap feature. Reducing them to about half their current length would help readablity immensely for those of us using smaller screensizes. It may be a direct copy from your MUD, but they aren't important to the problem and they are too long for my screen.
Reply with quote
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Thu Dec 04, 2003 8:51 pm   
 
Sorry, that was a copy and paste off of the game. I will do that next time
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