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
Myrddraal
Beginner


Joined: 25 Jan 2003
Posts: 14
Location: Australia

PostPosted: Wed Sep 03, 2003 3:53 am   

Trigger Spacing
 
Hi,

Just wondering whether there was a command which will ingore multiple spaces in a trigger, or treat a long space as a single space etc.

The trigger pattern working with is:
Pattern:
A downy skullcap (skullcap) 16 left.

Value:
harvest skullcap 1

and i want to use the number 16, but for some reason it wont pick it up, mainly because i think of the spacing. I've tried using %s, but this doesn't work.

So i've also tried
A downy skullcap (skullcap)%s16 left.
as the pattern and that didn't work either
Reply with quote
Myrddraal
Beginner


Joined: 25 Jan 2003
Posts: 14
Location: Australia

PostPosted: Wed Sep 03, 2003 3:55 am   
 
oops, sorry, in the trigger text above there is about 10 spaces between the
A downy skullcap (skullcap)<insert 10 spaces here>16 left.
when i submitted it, it looks to have cleared the spacing.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Sep 03, 2003 4:48 am   
 
Code:

A downy skullcap (skullcap)                 16 left.


#TRIGGER {^(*) ~((%w)~)%s(%d) left.} {#SH 1~:%1;#SH 2~:%2;#SH 3~:%3}

Edit: changed SH to #SH and %3) to %3}
Test:

1:A downy skullcap
2:skullcap
3:16
Reply with quote
Myrddraal
Beginner


Joined: 25 Jan 2003
Posts: 14
Location: Australia

PostPosted: Wed Sep 03, 2003 5:13 am   
 
Thanks for that, i tried it just using the {^(*) ~((%w)~)%s(%d) left.} to try and trigger a trigger and it didn't work, i also tried {^(*) ~((skullcap)~)%s(16) left.} and that didn't work either
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Sep 03, 2003 9:30 am   
 
Pattern:
^A downy skullcap ~(skullcap~)%s16 left.
Value:
harvest skullcap 1

If you also want to allow numbers larger than 16,
Pattern:
^A downy skullcap ~(skullcap~)%s(%d) left.
Value:
#IF (%1 > 15) {harvest skullcap 1}


When converting from command-line syntax (#TRIGGER) to the settings editor, drop the outside set of brackets {} from each section (Pattern and Value). I made the pattern specific to skullcap because your command is specific to skullcap.
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