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


Joined: 08 Oct 2005
Posts: 19

PostPosted: Mon Mar 05, 2007 1:31 am   

Prompt capturing
 
I'm having a slight problem. I can't seem to get my prompt trigger to work properly on a couple of my characters.

This is my standard prompt:
[Nkei] [1262/1262] [217/217] [468/500] [3,140,220] [1000] [] [A] [a heart of gold]

This is what I've put into the trigger to capture that:
Pattern: ^~[Nkei~] ~[(%d)~/(%d)~] ~[(%d)~/(%d)~] ~[(%d)~/(%d)~] ~[(*)~] ~[(*)~] ~[(%w)~] ~[(?)~] ~[(*)~]
Command: #VAR curhp %1;#VAR maxhp %2;#VAR curmv %3;#VAR maxmv %4;#VAR curwgt %5;#VAR maxwgt %6;#VAR gold %replace( "%7", ",");#VAR align %8;#VAR vis %9;#VAR style %10;#VAR aucitem (%11);#VAR fighting 0

I've got newline and prompt boxes checked in the options tab for the trigger.
I've got the %replace for %7 to take out the commas as we can have up to 10,000,000 coins and the () around %11 because the item on auction can be multiple words like above and it doesn't capture right without them

I know that it doesn't capture right because I have another character with a prompt somewhat like this and it works perfectly. I don't understand what the differences are :( I will post the one that works too.

[Nkeitwo] [1314/1314] [1113/1483] [655/655] [323/1200] [3,719,337] [-43] [HT] [E] []

^~[Nkeitwo~] ~[(%d)~/(%d)~] ~[(%d)~/(%d)~] ~[(%d)~/(%d)~] ~[(%d)~/(%d)~] ~[(*)~] ~[(*)~] ~[(%w)~] ~[(?)~] ~[(*)~]

#VAR curhp %1;#VAR maxhp %2;#VAR curmp %3;#VAR maxmp %4;#VAR curmv %5;#VAR maxmv %6;#VAR curwgt %7;#VAR maxwgt %8;#VAR gold %replace( "%9", ",");#VAR align %10;#VAR vis %11;#VAR style %12;#VAR aucitem (%13);#VAR fighting 0

I'm almost certain I have these two set up exactly the same and the test trigger button shows them working but it just won't send all the stuff to the variables... Any help would be greatly appreciated!

Thanks!


Last edited by nkei0 on Mon Mar 05, 2007 2:17 am; edited 1 time in total
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 05, 2007 1:53 am   
 
EDIT: Post deleted - not relevant to the discussion and the topic creator wants to keep his secret identity safe.


Last edited by Fang Xianfu on Mon Mar 05, 2007 2:12 pm; edited 1 time in total
Reply with quote
nkei0
Beginner


Joined: 08 Oct 2005
Posts: 19

PostPosted: Mon Mar 05, 2007 2:19 am   
 
Lol, was just trying to conceal my identity. You know with me being a superhero and all...
Reply with quote
nkei0
Beginner


Joined: 08 Oct 2005
Posts: 19

PostPosted: Mon Mar 05, 2007 4:18 am   
 
Also, I've found that apparently, using ~[(*)~] to capture the gold value [3,140,220] is screwing up the capture... If anyone could think of a way to get around this it would be great. I would have to be able to capture anything from 0 to 1,000; 10,000; 100,000;1,000,000;10,000,000; all the way to 100,000,000 and then be able to cut the commas out of it. That would make everything else in the trigger work perfectly I believe.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Mar 05, 2007 5:12 am   
 
%n -- matches any comma-delimited number. If you use it, you can get rid of the %replace() that handles the removal of the commas.
_________________
EDIT: I didn't like my old signature
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