|
Baltazar Newbie
Joined: 24 Sep 2002 Posts: 5 Location: Norway
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
|
|
|
Baltazar Newbie
Joined: 24 Sep 2002 Posts: 5 Location: Norway
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: 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 |
|
|
|
cingulli Wanderer
Joined: 30 Aug 2001 Posts: 53 Location: Finland
|
Posted: 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. |
|
|
|
Baltazar Newbie
Joined: 24 Sep 2002 Posts: 5 Location: Norway
|
Posted: Mon Sep 30, 2002 2:29 pm |
HI thanks for your replys but I still havent been able to make it work..
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
|
|