|
trpstrife Novice
Joined: 26 Jul 2005 Posts: 34
|
Posted: 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. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Sep 17, 2005 5:08 pm |
Misspost sorry
|
|
|
|
|
|