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


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Mon Feb 24, 2003 10:46 pm   

Quest Bot
 
I'm trying to make a bot to automate questing. I have 6 variables set up, area, room, mob, item, astral, and weapon. What would the pattern be to set a variable's value to something off a trigger, for example:

Pattern:
The fiendish demon says 'An enemy of mine, the Training Master, is making vile threats against the city.'

Value:
??
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Mon Feb 24, 2003 11:12 pm   
 
To clarify a little better. I want to take

The fiendish demon says 'An enemy of mine, the Training Master, is making vile threats against the city.'


and make it set the variable @questmob 's value to the number that coresponds with the mob name, which is already predefined
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Feb 24, 2003 11:30 pm   
 
You can get the name with
#TR {The fiendish demon says 'An enemy of mine, (*), is making vile threats against the city} {#VAR questmob {%1}}

To get a number instead, you'll have to compare %1 with your predefined mobnames.

LightBulb
Advanced Member
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Tue Feb 25, 2003 12:13 am   
 
could I do something like have a variable for each mob and use this

Pattern:
The fiendish demon says 'An enemy of mine, (*), is making vile threats against the city'

Value:
#IF %1=@afrostgiant {#var @questmob 1}
#IF %1=@anelitefrostgiantguard {#var @questmob 2}
#If %1=@aduringuard {#var @questmob 3}
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Tue Feb 25, 2003 12:40 am   
 
or ...

Pattern:
The fiendish demon says 'An enemy of mine, (*), is making vile threats against the city'

Value:
#IF (%1 = "a frost giant") {#VAR @questmob giant-frost}
#IF (%1 = "a durin guard") {#VAR @questmob guard-durin}

and would the "a durin guard" be case sensitive?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Feb 25, 2003 12:50 am   
 
Yes, you can do that. The comparison would be case-sensitive, but you ca take care of that by passing %1 to %lower. Example:
#IF (%lower(%1) = "a frost giant") {#VAR @questmob giant-frost}

Kjata
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Wed Feb 26, 2003 7:36 pm   
 
How could I make it automatically track? I can't get it to work using

#trig {You sense a trail (%d) from here...} {%1;!}
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Feb 26, 2003 7:56 pm   
 
What happens when you do that? What is wrong with it?

Have you tried using:
#EXEC %1

instead?

Kjata
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Wed Feb 26, 2003 8:04 pm   
 
Nothing at all happens. It's as if I didn't make the trigger. I put it in a class named track, and it is enabled. #exec didn't make any difference
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Feb 26, 2003 8:10 pm   
 
Is the trigger firing? Add a #SHOW to it to display a message when it fires and see if the message ever comes up.

Kjata
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Feb 26, 2003 8:34 pm   
 
quote:

#trig {You sense a trail (%d) from here...} {%1;!}



You are trying to "pattern match" a word or direction

quote:

Pattern Matching
Patterns can contain several special character for wild-card matching.

..
%w match any number of alpha characters (a-z) (a word)
..
%t match a direction command



So you want to use a (%w) or a (%t). Not being sure what kind
of directions that might show up in your triggers, I suggest:

#TRIGGER {^You sense a trail (%w) from here...} {%1;!}


Ton Diening
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Wed Feb 26, 2003 9:14 pm   
 
Ok, well, it finally goes the direction its suppose to, but how can I make it repeat the track command?

#trig {^You sense a trail (%w) from here...} {#exec %1}
Reply with quote
LPMala
Beginner


Joined: 24 Feb 2003
Posts: 13
Location: USA

PostPosted: Wed Feb 26, 2003 9:33 pm   
 
I think I got it to working well enough.

#trig {^You sense a trail (%w) from here...} {#exec %1;#wa 5000;track @questmob}

#trig {^You're already in the same room!} {#class track 0}
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