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


Joined: 24 Sep 2002
Posts: 5
Location: Norway

PostPosted: Tue Sep 24, 2002 9:34 am   

handeling multiple lines
 
Hi all, I am new to Zmud and need your help.
I need to highlight the direction my PK target is.
I have a Variable @target, and players I want to pk useally get their names into it :D
When i do a "scan" i will receive info about who and whats in all connected rooms like this
************************************
Scanning South...
A Begger is here bla bla bla bla
Scanning West ...
A big black bear is here.
Scanning Up ...
A looking thug bla bla bla
A assassin bla bla bla
*************************************

if my %target is in the connected room UP i want "UP" highlighten, so i can rush up and
finnish him off ...

Thanks in advance
Baltazar
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Sep 24, 2002 10:39 am   
 
Quick search yeilds this post not long ago.
http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=8240&FORUM_ID=7&CAT_ID=1&Topic_Title=Help+with+a+tracking+script%2E&Forum_Title=zMUD+General+Discussion
Reply with quote
Baltazar
Newbie


Joined: 24 Sep 2002
Posts: 5
Location: Norway

PostPosted: Tue Sep 24, 2002 11:05 am   
 
Thanks, but Im still not able to adapt this solution into my case.
partly is this because I don't understand it :(, and partly beacause my scanning will only
reveal the connected room, so I want have the Range part, and I don't want my char to move on the script. I want to choose the movement... Thats why I only want an highlight on the direction where my enemy is.

But Thanks again
Baltazar
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 24, 2002 3:42 pm   
 
This will be difficult, if not impossible, to do. The triggering phrase (an enemy's name) will come at least one, and possibly several lines AFTER the word you want to highlight (the direction).

Since the word you want to highlight isn't on the same line as the word you want to trigger from, a single-line trigger won't work.

Since you can't predict how many mobs/characters will be in any particular direction, you can't predict how many lines will be needed either. That means a multi-line trigger won't be workable.

Sorry, I don't think this can be done. What you can do, quite easily, is highlight the enemy's name. Then YOU (being smarter than zMUD) can look up the screen however many lines are needed to find the direction to go. Highlighting the directions with a different color from the enemies might help you to pick out the direction lines.

#CW {{@target}} {71}
#CW {Scanning %w) {112}

LightBulb
Senior Member
Reply with quote
Tarn
GURU


Joined: 10 Oct 2000
Posts: 873
Location: USA

PostPosted: Tue Sep 24, 2002 6:35 pm   
 
quote:

Sorry, I don't think this can be done.



Solution: gag everything as you go, and show it once you've determined what you want do do with it.

Trigger on ^Scanning (%w)...$
#var dir %1
and start collecting the mobs there, setting a flag that we haven't seen anyone we want to PK.
#var mobs ""
#var pk 0
(We'll add one more action to this later...)

Collect the mobs as they go by with a trigger that scoops all lines - trigger on (*)
and collect the mobs in successive lines:
#var mobs %concat(@mobs,"%1",%char(13),%char(10))

trigger on the list of people you want to PK, and #var pk 1 when you see one.

Trigger on the final line of *'s or something else to end the set of mobs for a given direction.
Show %concat("Scanning ",@dir), in red if @pk is set.
Show what you've collected in @mobs
set pk back to 0 - #var pk 0

Now that you have the context, go back and add this final set of actions to the trigger on ^Scanning (%w), because that also ends a section.

-Tarn
Reply with quote
cingulli
Wanderer


Joined: 30 Aug 2001
Posts: 53
Location: Finland

PostPosted: Wed Sep 25, 2002 7:33 am   
 
#al sc {scan all;#t+ target_lighter}

#tr {^Scanning (%w) ...} {#var scanning_dir %1} "target_lighter"
#tr {@target is here.} {#sub {%ansi(white)@target _> @scanning_dir};#t- target_lighter} "target_lighter"

try something like this, aint sure if thats gonna work straight cos aint got zMUd at hand.
Reply with quote
Baltazar
Newbie


Joined: 24 Sep 2002
Posts: 5
Location: Norway

PostPosted: Mon Sep 30, 2002 2:29 pm   
 
HI thanks for your replys but I still havent been able to make it work..
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Sep 30, 2002 4:48 pm   
 
As I said before,

What you can do, quite easily, is highlight the enemy's name. Then YOU (being smarter than zMUD) can look up the screen however many lines are needed to find the direction to go. Highlighting the directions with a different color from the enemies might help you to pick out the direction lines.

#CW {{@target}} {gray,red}
#CW {Scanning %w) {bold,white,blue}

Choose whatever colors you want. If necessary, put an extra set of braces {} around @target.

LightBulb
Senior Member
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