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


Joined: 26 Feb 2003
Posts: 14

PostPosted: Mon May 26, 2003 7:14 am   

need some help
 
I would like to start writing a script that monitoring my mana potions that is inside the bag. The capture of the screen is the following.
( 3) (Magical) (Humming) Stendarr's Quad Espresso

Anyone have any idea how can i start the coding?
Reply with quote
Mindman
Beginner


Joined: 26 Feb 2003
Posts: 14

PostPosted: Mon May 26, 2003 11:23 am   
 
#CLASS {Manaport Triggers} {enable}
#TRIGGER {You buy (%a) * Stendarr's Gift} {#add @manapots %1}
#TRIGGER {(%d) (Humming) Stendarr's Quad Espresso (with a shot of raspberry)} {#add @manapots %1} "" {notrig}
#TRIGGER {^You buy (%d) * Stendarr's Quad Espresso (with a shot of raspberry) for} {#add @manapots %1}
#CLASS 0
i also got a button that shows the number of available potions but the whole script is not working .. anyone got an idea?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon May 26, 2003 1:24 pm   
 
First, commands like #ADD or #VAR do not require the @ in front of the variable name. Using it, in fact, tells the command to change the variable that has the name stored in the variable that appears in the command.

Next, I'm guessing that the second trigger needs to set the amount of potions you have and not add to it. Finally, I don't see why you need %a in the first trigger since it is supposed to mactha number. The script would then be:
#CLASS {Manaport Triggers} {enable}
#TRIGGER {You buy (%d) * Stendarr's Gift} {#ADD manapots %1}
#TRIGGER {~( (%d)~) ~(Humming~) Stendarr's Quad Espresso ~(with a shot of raspberry~)} {#ADD manapots %1}
#TRIGGER {^You buy (%d) * Stendarr's Quad Espresso ~(with a shot of raspberry~) for} {#ADD manapots %1}
#CLASS 0

Kjata
Reply with quote
Mindman
Beginner


Joined: 26 Feb 2003
Posts: 14

PostPosted: Mon May 26, 2003 2:01 pm   
 
at the end of the script i use
#TRIGGER {You recite Stendarr's Quad Espresso} {%remove( 1, manapots)}

this is the right command to abstract a number?
Reply with quote
Bremen
Novice


Joined: 26 Dec 2002
Posts: 33
Location: USA

PostPosted: Tue May 27, 2003 6:08 am   
 
#AD manapots -1
quote:

at the end of the script i use
#TRIGGER {You recite Stendarr's Quad Espresso} {%remove( 1, manapots)}

this is the right command to abstract a number?





--Bremen, zMUD 6.16 on WinME.
Reply with quote
Mindman
Beginner


Joined: 26 Feb 2003
Posts: 14

PostPosted: Tue May 27, 2003 6:36 am   
 
ahh yes .. is working perfectly ..thank you soo much :)
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