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


Joined: 11 Mar 2005
Posts: 40

PostPosted: Sun Jul 10, 2005 9:02 pm   

Mining Trigger for Dark-Legacy
 
Hi, I'm playing a MUD where you can mine and craft and stuff, and I'm trying to make a trigger to mine.
To mine an ore, you type "mine (dir)" and if you succeed in digging something up, you get the message "You dig up * and drop it on a stack!", and if you fail, you get "You didn't find any resources."

I'm really new to triggers, so I made a basic thing,
Code:
#TRIGGER {You didn't find any resources.} {mine %lastcom}
#TRIGGER {You dig up * and drop it on a stack!} {mine %lastcom}

But that only works for one mine, and I want this to be automated, so that simply won't work... And I'm totally confused as to how to make variables and refer to them in my script... Could someone help me?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Jul 10, 2005 9:45 pm   
 
Code:
#ALIAS startmine {
#T+ mine1
#T+ mine2
minedir="%1"
mine %1
}
#TRIGGER "mine1" {You didn't find any resources.} {mine @minedir}
#TRIGGER "mine2" {You dig up * and drop it on a stack!} {mine @minedir}
#ALIAS stopmine {
#T- mine1
#T- mine2
minedir=""
}


Select everything in the code block and paste it into Zmuds command bar (where you type commands for the mud!) and hit enter
To start use startmine <direction>
to stop use stopmine
_________________
Zmud Support Library
Zmud Knowledge Base

Last edited by nexela on Sun Jul 10, 2005 10:15 pm; edited 1 time in total
Reply with quote
Ziah
Novice


Joined: 11 Mar 2005
Posts: 40

PostPosted: Sun Jul 10, 2005 10:06 pm   
 
wow... thanks... see, id never have thought of that
Reply with quote
Ziah
Novice


Joined: 11 Mar 2005
Posts: 40

PostPosted: Sun Jul 10, 2005 10:09 pm   
 
thank you, very 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