![](templates/Classic/images/spacer.gif) |
jallen0 Beginner
Joined: 10 May 2007 Posts: 11
|
Posted: Tue Jan 07, 2020 12:34 am
Room script help |
I have a room script that works but I was looking for a way to expand it and got lost with the #if statements. Here is the script that works:
#TRIGGER {A green-leafed herb grows here.} {
#sub {A green-leafed bundle of five-finger herb grows here. (1 copper) %10}
#CW Springgreen
}
This script looks at the text in the room and works from that.
What I am looking to add is a way to tell me that if "A green-leafed herb grows here." is not written (which tells me that someone else already took it) the return text will not be "A green-leafed bundle of five-finger herb grows here. (1 copper)" but instead will be "Opps, looks like someone else beat you to this".
Thanks in advance for any help you can give me. |
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4685 Location: Pensacola, FL, USA
|
Posted: Tue Jan 07, 2020 4:16 am |
You can't really sub out what isn't there.
You might be able to rig something up with '#EVENT onRoomEnter {}' and a #WAITFOR with a timeout clause to #SAYADD the extra info. |
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
jallen0 Beginner
Joined: 10 May 2007 Posts: 11
|
Posted: Tue Jan 07, 2020 5:43 pm |
Ah, that's why I could not make it work. Let me look at your suggestions. Thanks.
|
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4685 Location: Pensacola, FL, USA
|
Posted: Tue Jan 07, 2020 8:09 pm |
Those are CMUD suggestions, many of those features don't exist in zMUD.
|
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
jallen0 Beginner
Joined: 10 May 2007 Posts: 11
|
Posted: Thu Jan 09, 2020 8:20 pm |
Well...that creates an issue then. Again it's a room script so I thought I could just compare what is there and if it is there I use the script in my initial thread. If the text is not there...well that's whee I got bogged down in looking at the #IF statements.
|
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4685 Location: Pensacola, FL, USA
|
Posted: Fri Jan 10, 2020 1:31 am |
Yea, I'm tryingt to think of a way that would work in zMUD.
Room script is good. Add this to it and see if it works:
#TEMP "herbFinder" {A green-leafed herb grows here.} {}
#ALARM "herbCheck" +5 {#IF (%trigger(herbFinder) {#SAY {Opps, looks like someone else beat you to this.}} |
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
kumarip Newbie
Joined: 05 Feb 2020 Posts: 1
|
Posted: Wed Feb 05, 2020 7:56 am |
Good information.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|