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
hkduck
Newbie


Joined: 09 Feb 2009
Posts: 5

PostPosted: Mon Feb 09, 2009 4:52 am   

Can anybody teach me how to read and answer code like this?
 
The mud I am playing have a code like this

It requires us to answer 7 to continue playing, how to read this code using zmud?
Reply with quote
hkduck
Newbie


Joined: 09 Feb 2009
Posts: 5

PostPosted: Mon Feb 09, 2009 5:00 am   
 

The pattern is composed of 4 digits, we need to answer the number which color is different from other 3.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Feb 09, 2009 5:10 am   
 
I haven't got the time to write code for this now, but your first port of call is going to be an ANSI trigger. I would use a #debug log to find out the character number of that box they're sending - I can't remember it - and have the trigger look for lines that contain only that box and spaces.

What you need to do next depends on whether or not they vary the amount of padding between the numbers. I suspect the simplest method in either case will probably involve capturing all four lines and comparing the number of characters on the line until you reach a white box. The number of the leftmost white box across all four lines is the cutoff point where you'll trim all the lines to. You do a similar thing from the rightmost box, trimming off the end of all the strings.

Now you have just the white number in your strings. Luckily there're only 9 possible numbers, so it should be easy to compare the number of boxes on each line and work out which number is being displayed - in the unlikely event that a number has the same number of boxes on each line, you can compare their locations as well.

Of course, a much easier method would simply be to move to a MUD that isn't so anal about anti-bot code.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
hkduck
Newbie


Joined: 09 Feb 2009
Posts: 5

PostPosted: Tue Feb 10, 2009 1:55 am   
 
Thank for you help, fang. But I just found that the code is more complicate that I imagine
It looks like this

but when I try to copy it, it look like this

I really don't know how to figure it out....
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Feb 10, 2009 3:32 am   
 
Interesting. I suggest you use the #debug command to log it like I suggested above, so we can take a closer look at what exactly it's sending.

But remember the much easier option I suggested above. There're hundreds of MUDs, and most of them aren't this bot-frenzied.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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