|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Jul 15, 2008 1:11 pm
More than one line in send? |
Is sending more than one line in Send possible?
Here's what I have:
Code: |
#10 #send {get 5 'white stone' green;put 5 'white stone' vault}
|
As you can see, I have two lines I want sent, divided by a ;. However, as a result of the command, the semicolon isn't parsed and is just sent to the MUD. If I try doing...
Code: |
#10 #send {get 5 'white stone' green
put 5 'white stone' vault}
|
I get an unmatched bracer error. I need a little help here.
Edit:
Also, just in case you really want to help....
Code: |
#trigger fifty {@warp>=50} {#IF (vault) {w;s;s;s;w;w;w;w;s;e;e;n;w;#wait 6000;#10 #send {get 5 'white stone' green;put 5 'white stone' vault};warp=0;#wait 6000;e;s;w;w;n;e;e;e;e;n;n;n;e;#wait 6000;get 'jewel stopper' green;c 'enchant gem' jewel stopper} {w;w;#10 #send {get 5 'white stone' green;put 5 'white stone' box};#wait 6000;e;e;get 'jewel stopper' green;c 'enchant gem' jewel stopper} } {General Triggers|Warpstones} {exp}
|
Doesn't fire properly when the variable hits 50, and suffers from the same problems with the send command. |
|
|
|
Nicodareus Wanderer
Joined: 24 Jun 2008 Posts: 68 Location: Texas
|
Posted: Tue Jul 15, 2008 3:03 pm |
Using #exec instead of #send makes the first work for me...
Code: |
#10 {
#exec {
get 5 'white stone' green;put 5 'white stone' vault
}
}
OR if you don't like my method of spacing...
#10 #exec {get 5 'white stone' green;put 5 'white stone' vault}
|
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Jul 15, 2008 3:15 pm |
Thanks, I think that will work. I can make a separate thread about the expression trigger, which seems to want to fire when I copy and paste it in, and then doesnt after that.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jul 15, 2008 3:38 pm |
Just do two sends.
#send {get 5 'white stone' green}
#send {put 5 'white stone' vault}
#exec works slightly differently to #send, but will probably be fine for this, too. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Jul 15, 2008 5:10 pm |
I figured out the trigger problem too
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jul 15, 2008 5:14 pm |
The %crlf can also be used to send a newline to the MUD. So:
#send {get 5 'white stone' green%{crlf}put 5 'white stone' vault}
would work. But it's more readable code to just split it into two #send statements as Fang suggested. Using #EXEC is a lot slower because then CMUD is going to compile your text as a script, which might also cause problems if you ever had other special characters in the text. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Jul 15, 2008 5:55 pm |
Oh...
so...
#10 {#send { }
#send { } } |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jul 15, 2008 6:23 pm |
or just:
#10 {#send { };#send { }} |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Jul 15, 2008 6:53 pm |
Will that send them interchangeable or the first send 10 times and then the second one 10 times?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jul 15, 2008 8:25 pm |
The #10 executes whatever is in {} 10 times. So it's going to do exactly what you want and send them "interchangeable"
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Tue Jul 15, 2008 9:10 pm |
yea, interchangeable wasn't the best word. I have a headache. I meant that it would send one, then the other, then the first one again, then the other. Alternating between the two... there we go, alternating is the word I was looking for.
|
|
|
|
|
|