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
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Tue May 09, 2006 3:10 pm   

Multi-line cleanup help
 
I have a couple triggers i'm trying to either make into one or at least make them better so here's the guts....

some different mud output:

A sissy frost wyvern, a flamboyant gauth, a frost wyvern, a cryowarrior, a
happy ice giant, an ice djinn, a happy ice djinn and a swift ice djinn are
here.

---OR---

A flamboyant ice troll, a creepy cryowarlord and a creepy cryohydra are
here.

---OR---

A sneaky frost wyvern, a frost wyvern and a smelly terraform are here.

I have 2 triggers for single line and multiline the multiline fires on my singleline and haven't quite figured out how to get 3 lines of mobs to fire.

my trigger:
^{A|An} (*) {are|is} here.
---OR---
^{A|An} (*)$(*)here.

with the following values:

#VARIABLE killlist {%1}
#VARIABLE killlist {%replace( @killlist, " and a ", "|")}
#VARIABLE killlist {%replace( @killlist, " and an ", "|")}
#VARIABLE killlist {%replace( @killlist, " an ", " ")}
#VARIABLE killlist {%replace( @killlist, " a ", " ")}
#VARIABLE killlist {%replace( @killlist, ", ", "|")}
#VARIABLE shortlist {}
#FORALL @killlist {#VARIABLE shortlist {%additem( %word( %i, 1), @shortlist)}}
#ECHO singleline
#IF (%ismember( @shortlist.1, @moblist)) {k @shortlist.1} {}

it all works pretty much, the multiline one fires on single line.

tried to figure out how to get the period that is always at the end into the works but my head overheated reading the forum posts.

any help or suggestions appreciated :) if theres any more info ya need lemme know
_________________
Spin
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue May 09, 2006 9:15 pm   
 
This looks like a word-wrapping issue. If you can set this in the game to a really high number, it's going to save you lots of headache.
_________________
EDIT: I didn't like my old signature
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Tue May 09, 2006 11:23 pm   
 
Yea i wish there was... would make things easier hehe owell...it works sorta, just thought maybe i could take "A|An" then take everything until the period"." and do some replacing etc but my attempts at that put everything outta whack.
_________________
Spin
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed May 10, 2006 3:49 am   
 
If you create a multi-state trigger that matches room output surrounding your critter line (the idea here is to use as much plain text as possible to make this multi-state trigger as fast as possible), you should be able to use a trigger with the pattern of (*) to quickly capture and concatenate your critter line(s) to the KillList variable. The first state of the multi-state trigger will turn on your (*) trigger, the second state will turn off that trigger and do any %replace() and other string functions you need to do.
_________________
EDIT: I didn't like my old signature
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