About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
aldisn75
Newbie


Joined: 06 Jun 2008
Posts: 3

PostPosted: Fri Jun 06, 2008 11:33 pm   

PSUB problem
 
Im having following problem. Output from MUD is as follows:

Quote:
The mumbling male gibberer thrusts at your body with his long sharp dagger, but your food stained apron protects you.


Desired output is:
Quote:
The mumbling male gibberer thrusts at your body with his long sharp dagger(5), but your food stained apron(2) protects you.


Real output(inlcuding triggers) is:
Quote:
The mumbling male gibberer thrusts at your body with his long sharp dagger(5), but yofood stained apron(2)ron protects you.


As you probably have guessed Im trying to add some number(1-10) within bracers to end of matching pattern.

To do that Im using following triggers:
Trigger 1: ({@TopWpnList}) - #cw gold
#PSUB {%1"("%ismember(%1,@TopWpnList)")"} %x1

and

Trigger 2:
({@TopCloakList})- #cw gold
#PSUB {%1"("%ismember(%1,@TopCloakList)")"} %x1

They seem to be working fine while alone, but starts to mess up when both active.
Also, as you can notice, Im trying to color matching pattern. This function also is working fine unless I add PSUB part.

Any idea how I can fix that? What if there will be more than two matching patterns from different lists?
Reply with quote
aldisn75
Newbie


Joined: 06 Jun 2008
Posts: 3

PostPosted: Fri Jun 06, 2008 11:34 pm   
 
Oh, yes - Im using Zmud 7.21.
Reply with quote
aldisn75
Newbie


Joined: 06 Jun 2008
Posts: 3

PostPosted: Sat Jun 14, 2008 12:07 am   
 
So Gurus have nothing to tell? :(
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Jun 14, 2008 1:20 am   
 
#psub works by counting the number of characters in the line. Obviously using it twice in a line is screwing up that counting.

Your solution will be to build them both into a single trigger.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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