Register to post in forums, or Log in to your existing account
 
:
Search found 19 matches for:
Page 1 of 1
Author Message
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Thu Aug 25, 2016 1:00 pm   Subject: Multi-Line Triggers
You need to use ^*$ not just ^* to force it to grab the whole line

^ is the start of line anchor
$ is the end of line anchor

I was getting odd results without using both.
Try disabling your tr ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Thu Aug 25, 2016 4:06 am   Subject: Multi-Line Triggers
I have the fix posted right after the code.... remove the space after the 1.
Did you delete your trigger, or are both still active?
I am guessing yours is giving the single results, and mine isnt fi ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Wed Aug 24, 2016 1:29 pm   Subject: Multi-Line Triggers
If you don't have an alternative, I may try gagging it all and making a list(s) then sorting/printing.

Boggling me why this isn't working.
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Wed Aug 24, 2016 1:28 pm   Subject: Multi-Line Triggers

You scan north.
You scan south.
***** Range 1 *****
(1 south) A cloaked woman with dark, shifty eyes beckons you to examine her wares.
ERROR: Trigger "^*$" fired but did not compile

***** Ran ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Tue Aug 23, 2016 3:18 pm   Subject: Multi-Line Triggers
Tried your recommendation and got a parsing error.

The above code works but I suspect it's getting turned off prematurely somehow.
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Mon Aug 22, 2016 9:39 pm   Subject: Multi-Line Triggers
I'll give it a shot when I get a chance. Also thought of a custom function with a #switch and #default.
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Mon Aug 22, 2016 12:48 pm   Subject: Multi-Line Triggers
More tinkering gets me this:

You scan north.
You scan south.
***** Range 1 *****
(1 south) Jorgen the jeweler is here inspecting some jewelry.

You scan east.
***** Range 1 *****
(1 east) A ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Mon Aug 22, 2016 12:14 pm   Subject: Multi-Line Triggers

#TRIG {^~*~*~*~*~* Range (%d) ~*~*~*~*~*} {
#var range %1
#COND {^*$} {
#if (!%match(%line, "You scan")) {
#SUB ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Sun Aug 21, 2016 1:35 pm   Subject: Multi-Line Triggers
#TRIG {^~*~*~*~*~* Range (%d) ~*~*~*~*~*} {#var range %1}
#COND {^*$} {
#if (!%match(%line, "You scan") ) {
#SUB {(@range @scanDir) %line}
#STATE 1
}
#IF (%line=%null) {#STATE 0}
}

Got y ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Sun Aug 21, 2016 1:33 pm   Subject: Multi-Line Triggers
I feel like it will help with me keeping it fire on every single line. I need I way to turn it off once I'm done with it.
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Sun Aug 21, 2016 1:28 pm   Subject: Multi-Line Triggers
Thanks, Ill give it a shot.

I was just looking into #STATE. The helpfile is a bit ambiguous on it's use.
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Sun Aug 21, 2016 1:19 pm   Subject: Multi-Line Triggers
It might be better to build the match components directly into the pattern of the second state. Depending on the complexity you might need to use a regex. Also you will probably want to limit the seco ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Sun Aug 21, 2016 12:47 pm   Subject: Multi-Line Triggers

#TRIG {^***** Range (%d) *****} {
#var range %1
#CON {*} {
#if (%match(%line,You scan {*}) {

#UNCON {*}
} ...
  Topic: Multi-Line Triggers
ryan0_o

Replies: 25
Views: 34367

PostForum: CMUD General Discussion   Posted: Sat Aug 20, 2016 12:42 pm   Subject: Multi-Line Triggers
I was looking for a way to do something like this:

#trigger {Trigger on this line that is known}
if the next like doesn't contain (this or this) do some formatting to the line with #sub.

I skim ...
  Topic: Simple Travel Script Porting
ryan0_o

Replies: 7
Views: 9839

PostForum: CMUD General Discussion   Posted: Fri Aug 19, 2016 9:37 pm   Subject: Simple Travel Script Porting
Yes, that fixes it.

Everything works as anticipated.

Thank you sir!
  Topic: Simple Travel Script Porting
ryan0_o

Replies: 7
Views: 9839

PostForum: CMUD General Discussion   Posted: Fri Aug 19, 2016 12:22 pm   Subject: Simple Travel Script Porting

#TR {~[Exits: (*)~]}
{
#if (@traveling)
{
$exits = %replace(%replace(%replace(%1,"[",""),"& ...
  Topic: Simple Travel Script Porting
ryan0_o

Replies: 7
Views: 9839

PostForum: CMUD General Discussion   Posted: Thu Aug 18, 2016 9:48 pm   Subject: Simple Travel Script Porting

#TR {~[Exits: (*)~]}
{
#if {$traveling}
{
$exits = %replace(%replace(%replace(%1,"[",""),"] ...
  Topic: Simple Travel Script Porting
ryan0_o

Replies: 7
Views: 9839

PostForum: CMUD General Discussion   Posted: Thu Aug 18, 2016 11:03 am   Subject: Simple Travel Script Porting
Ah sorry. It's basically a traveling script for two-way roads (rooms with only two exits)

You use alias travel (direction) and it continues until it reaches an intersection.

It basically works ...
  Topic: Simple Travel Script Porting
ryan0_o

Replies: 7
Views: 9839

PostForum: CMUD General Discussion   Posted: Wed Aug 17, 2016 9:03 am   Subject: Simple Travel Script Porting

#class {travel} {kill}
#class {travel} {open}

#var travel 0

#function {revdir}
{
#switch {"%1"}
{ ...
 
Page 1 of 1
All times are GMT
© 2009 Zugg Software. Hosted on Wolfpaw.net