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


Joined: 03 Mar 2005
Posts: 31

PostPosted: Thu Mar 03, 2005 4:35 pm   

help with crafting script
 
Im trying to create a script that when ran, will create 8 items. It will work like this, i start the script, and then it will send:
makearmor legs layer1
makearmor arms layer1
makearmor hands layer1
ect. I was playing around with forall and a variable like
#VAR layer1 {hands|legs|arms|body|feet|about|over|waist}
that would work, but the problem is they are not created right away, it takes a bit for the items to be made. so when using FORALL it sends the commands right after each other and that doesnt work. What i need is a way to have the script run, but send the next command only after the mud recieves a line of text that is something like "You hold up your newly created armor." so instead of the above, it will be
makearmor legs layer1
waiting.....then when its done and recieves the line you hold up your armor
it does makearmor arms layer1 and then waits....and repeats until it has done all 8 wear locations. Sorry if this seems confusing but really its really simple, i just cant figure out how to go about doing it. Thanks
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Thu Mar 03, 2005 5:39 pm   
 
This should work with little or no fuss...

#ALIAS makeall {#VA layers {hands|legs|arms|body|feet|about|over|waist};#SEND {makearmor %pop( layers) layer1}}
#TRIGGER {^You hold up your newly created armor~.$} {#IF %numitems(@layers) {#SEND {makearmor %pop( layers) layer1}}} {case|notrig}


Last edited by Maelstrom on Thu Mar 03, 2005 5:56 pm; edited 1 time in total
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Thu Mar 03, 2005 5:46 pm   
 
#CLASS {Test}
#ALIAS startsmith {#var order {head|shoulder|knees|toes};#T+ Smith;makearmor %pop(order)}
#VAR order {}
#TRIGGER "Smith" {You hold up your newly created armor.} {#if %numitems(@order) {makearmor '%pop(order)'} {#T- Smith}} "" {disable}
#CLASS 0
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
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