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
trpstrife
Novice


Joined: 26 Jul 2005
Posts: 34

PostPosted: Sat Sep 17, 2005 2:17 pm   

trying to make shoping easier on merentha.
 
I'm having some trouble with my attempt to making shoping easier. This seems to be bugged. Quickshop looks like a very easy code but yet sometimes it doesn't seem to work at all.

Code:
^quickshop (%d) (&%w)

Thats the pattern.
(%d)being the number you type in and (&%w) being the word that follows. In other words...quickshop 15 firebreather

Here's the value
Code:
#CLASS quickshop
#VAR buynumber %1 0 quickshop
#VAR buyproduct %2 nothing quickshop
#repeat @buynumber {buy @buyproduct}


Ok what it is suppose to do is pretty simple. If you type quickshop 15 firebreather...15 is saved. firebreather is saved. it then repeats buy firebreather 15 times.

For some reason it doesn't seem to be saving the variables everytime it's used. Any suggestions on how to correct this problem as I just don't see whats wrong with this code.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Sat Sep 17, 2005 4:23 pm   
 
the ^ is only for triggers not alias'

#CLASS quickshop
#ALIAS quickshop {#VARIABLE buynumber %1;#VARIABLE buyproduct %2;#REPEAT @buynumber {buy @buyproduct}} "quickshop"
#VAR buynumber {0} {0} "quickshop"
#VAR buyproduct {nothing} {nothing} "quickshop"
#CLASS 0

quickshop 10 leather
buy leather
buy leather
buy leather
buy leather
buy leather
buy leather
buy leather
buy leather
buy leather
buy leather

Works for me.
_________________
http://www.Aardwolf.com
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Sep 17, 2005 5:08 pm   
 
Misspost sorry
_________________
Zmud Support Library
Zmud Knowledge Base
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