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


Joined: 30 Jan 2002
Posts: 7

PostPosted: Mon Feb 18, 2002 5:34 pm   

capture problem
 
I made a bot that works fine.
The problem is that normaly I get from the mud something like this

Meridas tells you 'fly'

I can grab that but sometimes I get

< 774Hp 1509Mn 410Mv > Meridas tells you 'fly'

How could I responce to that?

IceSoft
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Feb 18, 2002 9:24 pm   
 
I can think of two things to help you:

1) configuration setting in the mud so that
it puts prompts on a newline

2) On your prompt trigger, #SH all the stuff
that comes after the < blah blah >


#TRIGGER {^~< (%d)Hp (%d)Mn (%d)Mv ~> (%*)$} {#SH %1} "" {prompt}
#TRIGGER {^~< (%d)Hp (%d)Mn (%d)Mv ~> $} {} "" {prompt}

Or similarily as Kjata posted with #SUB:
#TRIGGER {{^~< (%d)Hp (%d)Mn (%d)Mv ~> (*)} {#SUB ~<%1Hp %2Mn %3Mv ~>%cr%4} "" {prompt}

TonDiening
Beta Upgrading to 6.26
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Sun Feb 24, 2002 1:01 am   
 
Try

#trigger {^(%*) tells you '(%*)'$} {#if ("%1" =~ "^~< * ~> (%w) tells you '%*'$") {#say %%1 told me %2} {#say %1 told me %2}

 - Charbal
Reply with quote
heidi
Newbie


Joined: 04 May 2002
Posts: 1

PostPosted: Tue Apr 02, 2002 7:52 pm   
 
I ran across this problem in my mud also, but came up with a slightly different approach. The first trigger I have is:

#Trigger {^({o|*})%2>} {#nomap;#sub {%1%2>%cr}} "" {nocr|prompt}

[On MUME your prompt starts with either "o" or "*" and ends with ">". It varies depending on your current activities. In IceSoft's case you would use a trigger like:
{^~< (%d)Hp (%d)Mn (%d)Mv ~>}
]

At first glance this would seem to add a lot of white space, but in my experience it doesn't. What it does do is allow all of your other triggers to assume that the prompt isn't part of the trigger line. This has helped me because I can now more liberally use the "^" character and make my triggers more secure.

One thing to note. I tried doing this at first and had a ton of grief:

#Trigger {^({o|*})%2>%3} {#nomap;#sub {%1%2>%cr}%3} "" {nocr|prompt}

Notice the new "%3" to trigger only when there is information after the prompt. This didn't work at all. My guess is the %{cr} isn't recognized by following triggers as a newline so all the triggers with "^" fail.
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