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


Joined: 05 Feb 2002
Posts: 13
Location: United Kingdom

PostPosted: Tue Feb 05, 2002 1:39 am   

Changing targets
 
I'm using a target script that goes like #class {Targetted}
#var Target %null
#alias t {#var Target "%-1"}
#alias kt {k @Target}
#class 0

How would I be able to automatically change the target to the person, thing that enters the room and starts attacking me? How can I use triggers to capture and change the variable target?
any advice/info always welcome
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Feb 05, 2002 3:46 pm   
 
You need to capture the the line the mud
sends you when you are attacked.

With that line you can do something like:

A rat attacks you.
#TR {(%w) attacks you.$} {t %1;kt}

Hopefully anything that attacks you has
a significant keyword as the last word.

It depends on how the mobs are named:

Would work:
A bumbbling bumblebee attacks you.

Woulnd't work and you'd have to modify
the attack trigger:
An Orc dressed in red attacks you.

TonDiening
Uses 6.16
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