|
coolbriguy Beginner
Joined: 29 Oct 2000 Posts: 26 Location: USA
|
Posted: Sat Dec 14, 2002 6:31 am
Trigger Help with Prompts |
<1287/1287hp 260/505m 650m [H]{1000}> (112,242 Gold) {day - New Darkhaven} -S- <424/500w>
#IF (%trigger =~ "~<%d/%dhp %d/%dm %dm ~[%w~]~{%d~}~> ~(* Gold~) ~{*~} -%w- ~<%d/%dw~> (*) tells you '(*)'$") {#speak {%%1 tells you %%2}} {#speak {%1 tells you %2}}
That is my prompt (first line) and the trigger I'm trying to get to work (line 2). Simple triggers work with the #speak however I have run into the problem of the prompt sometimes being in the way and then having to listen to the entire prompt. Many times I have a character such as Mad Old Bob trying to tell me something so it will be: "Mad Old Bob tells you 'hello!'" With the triggers i've built or read into to fix the prompt problem all I can get it to do is say Bob tells you blah blah not Mad Old Bob. Can anyone tweak my trigger so that it works or give me a trigger to ensure that my prompt will always end with a newline character.
CoolBriguy@excite.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Dec 14, 2002 12:34 pm |
Can't get it to fail. Here is the trigger I used (I used #SH instead of #SPEAK since I don't have MudReader):
#TRIGGER {(*) tells you '(*)'$} {#IF (%trigger =~ "~<%d/%dhp %d/%dm %dm ~[%w~]~{%d~}~> ~(* Gold~) ~{*~} -%w- ~<%d/%dw~> (*) tells you '(*)'$") {#SHOW {%%1 tells you %%2}} {#SHOW {%1 tells you %2}}}
Then I tested with:
#sh Mad Old Bob tells you 'hello!'
#sh ~<1287/1287hp 260/505m 650m ~[H~]~{1000~}~> ~(112,242 Gold~) ~{day - New Darkhaven~} -S- ~<424/500w~> Mad Old Bob tells you 'hello!'
Both of these lines produced the correct output of:
Mad Old Bob tells you hello!
Kjata |
|
|
|
|
|