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
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Tue Dec 31, 2002 5:56 am   

MXP
 
Hi, I'm having trouble with some simple MXP triggers.

I would like to create a trigger that will add a MXP tag when I see certain animals.

The link should enable me to kill the animal by just mouse clicking on the underlined animals name.

I'll be using a variable string list of animals. So I might have wolf|tiger|bear|bobcat in this variable.

one of the problems I am getting is an infinit loop when I try to create this.

Mud output looks something like...

This is a large open plain. Dust blows in the wind and you can see for miles. This area of the plains is wild.
a lean, intelligent-looking wolf.
a powerful, intelligent-looking wolf.
a lean, rabid-looking wolf.

In the above example, I would want the 3 wolves underlined (just the word wolf, not the entire sentence) so when I click on it, it will kill the wolf.

any suggestions?

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.40
Zmapper Version 1.14
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Dec 31, 2002 6:32 am   
 
quote:

Hi, I'm having trouble with some simple MXP triggers.

I would like to create a trigger that will add a MXP tag when I see certain animals.

The link should enable me to kill the animal by just mouse clicking on the underlined animals name.

I'll be using a variable string list of animals. So I might have wolf|tiger|bear|bobcat in this variable.

one of the problems I am getting is an infinit loop when I try to create this.

Mud output looks something like...

This is a large open plain. Dust blows in the wind and you can see for miles. This area of the plains is wild.
a lean, intelligent-looking wolf.
a powerful, intelligent-looking wolf.
a lean, rabid-looking wolf.

In the above example, I would want the 3 wolves underlined (just the word wolf, not the entire sentence) so when I click on it, it will kill the wolf.

any suggestions?

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.40
Zmapper Version 1.14



#trigger {({bear|cat|dog|etc}).$} {#sub {"<send href='kill %1'>"%1"</send>"~.}}

How about that? The only problem should be if your critter name you want to hyperlink doesn't appear at the end.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Hiryuu
Newbie


Joined: 27 Dec 2002
Posts: 9

PostPosted: Tue Dec 31, 2002 10:06 am   
 
There is sort of a problem.. if there are multiple animals of the same type its going to be 2.wolf, 3.wolf, whatever.. So the hyperlinks for wolf in the example would all kill the top wolf.. I wouldnt know how to solve the problem though.

~Hiryuu
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Tue Dec 31, 2002 7:03 pm   
 
I'm not worried about the number of animals in the room. since I will kill them all one at a time.

Thanks for the help, I'll test it out in a bit.

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.40
Zmapper Version 1.14
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Tue Dec 31, 2002 7:12 pm   
 
works like a charm, thanks MattLofton

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.40
Zmapper Version 1.14
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