Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
khierani
Newbie


Joined: 24 Feb 2008
Posts: 4

PostPosted: Sun Feb 24, 2008 7:16 am   

Lusternia Trigger Issue
 
I'm trying to put together a "custom" prompt in Lusternia. The basic prompt is:
300h, 300m, 300e, 300p, 300en, 300w ex-

I made a trigger, with the following:
Pattern: (%d)h, (%d)m, (%d)e, (%d)p, (%d)en, (%d)w (*)-
Value:
#ADDKEY stats curr_hp %1
#ADDKEY stats curr_mp %2
#ADDKEY stats curr_ego %3
#ADDKEY stats curr_power %4
#ADDKEY stats curr_end %5
#ADDKEY stats curr_wp %6

#IF (%pos( "e", %7)) {#ADDKEY balances mental 1} {#ADDKEY balances mental 0}

#IF (%pos( "x", %7)) {#ADDKEY balances physical 1} {#ADDKEY balances physical 0}

#IF (%db( @flags, score)) {
#ADDKEY flags score 0
#T- score4
#T- score3
#T- score2
#T- score1
#UNGAG
#GAGOFF
}

What I want to do is use PSUB to make the trigger look like this:
300(100%)h, 300(100%)m, 300(100%)e, 300p, 300(100%)en, 300(100%)w ex (2 61.82%)-

Now, I added in the appropriate PSUBs, in the form of
#PSUB {%1~(100~%~)} %x1

It worked whenever I typed in a command, and was given back information from the server. However... if I was just given information, for example, someone walked by me, then it gave something like this:
300h, 300m, 300e, 300p, 300en, 300w ex- 300(100%) 300(100%) 300(100%) 300(100%) 300 300(100%) 300(100%) ex (2 61.82%)

Why does this happen, and how do I stop this?
Reply with quote
khierani
Newbie


Joined: 24 Feb 2008
Posts: 4

PostPosted: Mon Feb 25, 2008 8:03 pm   
 
No one has any ideas why this is happening?
Reply with quote
khierani
Newbie


Joined: 24 Feb 2008
Posts: 4

PostPosted: Mon Feb 25, 2008 8:45 pm   
 
Update: seems to only happen when there is more than one #PSUB in the trigger. As I want to replace every bracketed wild-card in the trigger... this is insanely frustrating.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Feb 25, 2008 9:06 pm   
 
I'm wondering why you are using psub and not simply sub? also why don't you build the string that you want to sub or psub instead of using two?
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
khierani
Newbie


Joined: 24 Feb 2008
Posts: 4

PostPosted: Mon Feb 25, 2008 9:24 pm   
 
Mostly because of colours. I wasn't too keen on having to recalculate all the colours in the prompt. The PSUB, if working correctly, would use the colours already given in the prompt by the mud. I'm thinking I;m going to have to resort to that, though.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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