|
Ziah Novice
Joined: 11 Mar 2005 Posts: 40
|
Posted: 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? |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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 |
|
|
|
Ziah Novice
Joined: 11 Mar 2005 Posts: 40
|
Posted: Sun Jul 10, 2005 10:06 pm |
wow... thanks... see, id never have thought of that
|
|
|
|
Ziah Novice
Joined: 11 Mar 2005 Posts: 40
|
Posted: Sun Jul 10, 2005 10:09 pm |
thank you, very much!
|
|
|
|
|
|