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
Aly
Newbie


Joined: 12 Mar 2004
Posts: 2
Location: New Zealand

PostPosted: Fri Mar 12, 2004 2:54 am   

A simple script gone haywire
 
First off, yes I am zmudd challenged, so your patience is appreciated.

Trying to create what I thought would be a simple script to tell me how many bonds I have on a wax. Below is a sample of the text I am trying to capture and the script I wrote. The waxlist is usually a lot larger than this, hence in the middle of a fight it can be hard to spot the actual number I have on any one wax.

1320h, 1020m bcdei-
"wax752" Image: Jane Bloggs, Freedom fighter(18 bondings).
"wax10090" Image: Boytoy John Doe(42 bondings).
1320h, 1020m bcdei-

#CLASS {Waxes}
#CLASS 0

#CLASS {Waxes} {enable}
#VAR twax {}
#VAR bondstwax{}
#ALIAS wl {clearwax;#t+ "Waxes|wax_details";#gagon;waxlist}
#ALIAS clearwax {#VAR twax "";#VAR bondstwax 0}
#CLASS 0

#CLASS {Waxes|wax_details} {disable}
#TRIGGER {"wax(%d)" Image: (%a)((%d) bondings).} {#if twax=%1{#ADDITEM bondstwax %3} "" {prompt}
#TRIGGER {^%dh, %dm} {#gagoff;#e "";#e "";#e Bonds:;#e %numitems( @bondstwax);#t- "Waxes|wax_details";""}}
#CLASS 0

My problem is it just doesn't seem to want to pick up on the waxlist. Any help, ideas, etc would be apprecitated.

Cheers
Aly
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Fri Mar 12, 2004 6:48 am   
 
There are a few typos and such in your wax(%d) trigger and (%d)h, (%d)m trigger. Also you need to put a ~ infront the ( ) that are in the patern so zMUD knows to match those literally, since zMUD uses those for special purposes in trigger paterns. There should be a space between twax=%1 and the { in the #if. You were also missing a } at the end. I doubt that is a prompt trigger so the {prompt} is not needed in the first trigger, but the second trigger looks like a prompt so it is needed for it.

#TRIGGER {"wax(%d)" Image: (*)~((%d) bondings~).} {#if twax=%1 {#ADDITEM bondstwax %3}} note there is no {prompt} here

#TRIGGER {^%dh, %dm} {#gagoff;#e "";#e "";#e Bonds:;#e %numitems( @bondstwax);#t- "Waxes|wax_details";""} {nocr|prompt}

EDIT:Fixed a typo of my own in the trigger
Reply with quote
Aly
Newbie


Joined: 12 Mar 2004
Posts: 2
Location: New Zealand

PostPosted: Fri Mar 12, 2004 2:57 pm   
 
Thanks Serentus, problem solved. I knew it would be something basic but I had been staring and abusing it for so long I just couldn't see it.

Aly
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