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
Rainstorm
Newbie


Joined: 05 May 2002
Posts: 9

PostPosted: Sun May 05, 2002 2:26 am   

Trigger Help
 
I need a trigger that I can turn on and off.

It needs to issue the commands 60 seconds after this : Htot-og calls Bad Mother Crusher to a halt.

Thanks in Advance
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun May 05, 2002 5:30 am   
 
#VARIABLE V_BMC {0} {0}
#TRIGGER {Htot-og calls Bad Mother Crusher to a halt.} {#IF (@V_BMC) {#ALARM +60 {#ECHO 60s after BMC halt do something here}}}
#ALIAS BMC {#VAR @V_BMC [!@V_BMC];#ECHO BMC Status is %case(@V_BMC+1,"off","on")}

Typing in BMC will toggle it on and off now.

TonDiening
Beta Upgrading to 6.26

Edited as per Lightbulb's catch below in green.
Reply with quote
Rainstorm
Newbie


Joined: 05 May 2002
Posts: 9

PostPosted: Sun May 05, 2002 5:37 am   
 
But all it does is display the status when I use BMC. It doesn't say its on it says its off.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun May 05, 2002 7:08 am   
 
Yes, that's all it's supposed to do: Turn the trigger on or off and tell you which. If you think the message is backward, switch the two messages.

The trigger is where you would put the commands, and naturally it's not going to do anything until "Htot-og calls Bad Mother Crusher to a halt."

LightBulb
Vague questions get vague answers
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun May 05, 2002 10:52 am   
 
Just occurred to me that if you enter that
through the command line it will be parsed.

Verify with the settings editor that it
looks the same.

TonDiening
Beta Upgrading to 6.26
Reply with quote
Rainstorm
Newbie


Joined: 05 May 2002
Posts: 9

PostPosted: Sun May 05, 2002 5:47 pm   
 
It does this when I try to use it:

[Htot-og calls Bad Mother Crusher to a halt.-> {#IF]
{#IF
[Htot-og calls Bad Mother Crusher to a halt.-> {#IF]
{#IF
> BMC
> BMC Status is off

Please help me make this work
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun May 05, 2002 6:10 pm   
 
Add a } at the end of the trigger.
#TRIGGER {Htot-og calls Bad Mother Crusher to a halt.} {#IF (@V_BMC) {#ALARM +60 {#ECHO 60s after BMC halt do something here}}}

LightBulb
Vague questions get vague answers
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon May 06, 2002 12:08 pm   
 
Settings Editor should look like:

VARIABLE: V_BMC
Default Value:0
Value:0

TRIGGER: Htot-og calls Bad Mother Crusher to a halt.
Value:
#IF (@V_BMC) {#ALARM +60 {#ECHO 60s after BMC halt do something here}}

ALIAS: BMC
Value:
#VAR @V_BMC [!@V_BMC]
#ECHO BMC Status is %case(@V_BMC+1,"off","on")

You might have an extra { at the beginning
in your trigger what your output shows.

TonDiening
Beta Upgrading to 6.26
Reply with quote
bryan myhr
Newbie


Joined: 06 May 2002
Posts: 8
Location: USA

PostPosted: Mon May 06, 2002 9:00 pm   
 
I am havin a really hard time making a trigger that can choose numbers
in
order.

I need it to choose 3 numbers between 0-25 in a command going from 0 0
0
to 25 25 25 in order. and i also need it to be able to do it on many
different objects at the same time. I don't know if this is the right
forum for this kind of question, but it would be helpful if you could
tell
me what needs to be done. or just point me to a link that could show me
what to do. thanks.

I also need to be able to start the counting in the middle of it so that i can start and stop it if i log off.
This is commonly known as a safe crack, and if anybody has one, and can help me with mine it would be of great help. thanks
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon May 06, 2002 11:58 pm   
 
Off the cuff, but here is an idea

The idea is to track the 3 safe numbers and
remember for which object it belongs. This
assumes all things cracked are unique. The
code will create things like:

#VAR V_SafeNumber_1_Chest {0} {_nodef}
#VAR V_SafeNumber_2_Chest {0} {_nodef}
#VAR V_SafeNumber_3_Chest {0} {_nodef}

A variable to toggle on/off for when your
safe cracker code is going to run.

#VAR V_DoCrack {0} {0}

And perhaps a button that will toggle it:
#BUTTON DoCrack {DoCrack} {#IF @V_DoCrack {#VAR V_DoCrack 0} {#VAR V_DoCrack 1}}

An alias which you call to specify which
object your are cracking.. so to start the process you would always do ie: Crack safe
ALIAS: Crack


#IF (%numparams() > 0) {
#VAR V_Cracking %1

#IF (%defined(V_SafeNumber_1_%1)) {#NOOP We will use @V_SafeNumber_1_%1} {#VAR V_SafeNumber_1_%1 0}
#IF (%defined(V_SafeNumber_2_%1)) {#NOOP We will use @V_SafeNumber_2_%1} {#VAR V_SafeNumber_2_%1 0}
#IF (%defined(V_SafeNumber_3_%1)) {#NOOP We will use @V_SafeNumber_3_%1} {#VAR V_SafeNumber_3_%1 0}
#IF @V_DoCrack {DoCrack}
} {#Echo Crack What?}


ALIAS: DoCrack


#IF (@V_DoCrack) {
crack_command_here @V_Cracking @{V_SafeNumber_1_@V_Cracking} @{V_SafeNumber_2_@V_Cracking} @{V_SafeNumber_3_@V_Cracking}
#IF (@{V_SafeNumber_3_@V_Cracking} < 25) {
#ADD V_SafeNumber_3_@V_Cracking 1
} {
#VAR V_SafeNumber_3_@V_Cracking 1
#IF (@{V_SafeNumber_2_@V_Cracking} < 25) {
#ADD V_SafeNumber_2_@V_Cracking 1
} {
#IF (@{V_SafeNumber_1_@V_Cracking} < 25) {
#ADD V_SafeNumber_1_@V_Cracking 1
#VAR V_SafeNumber_2_@V_Cracking 0
} {
#ECHO Done;#VAR V_DoCrack 0
}
}
} {
#ECHO DoCrack called but cracking turned off so an attempt to kill the *5 alarm trigger will be made
#UNTRIGGER {*5}
}
}


Then you can tie alias DoCrack to an alarm trigger of sorts depending on how fast you
can attempt the code. If you can attempt every 5 seconds then something like:

#ALARM *5 {DoCrack}


Completely untested. If it doesn't work I'll jam it through zMud when I get home.

TonDiening
Beta Upgrading to 6.26
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue May 07, 2002 12:14 am   
 
Probably best use the answer in As it is tested

TonDiening
Beta Upgrading to 6.26
Reply with quote
Rainstorm
Newbie


Joined: 05 May 2002
Posts: 9

PostPosted: Wed May 08, 2002 4:48 am   
 
It doesn't work Ton. I try activating it it won't work. And even when The mud sends me the line Bad mother cruser yadda yadda yadda to a halt comes through it won't start
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 08, 2002 5:08 am   
 
1. Verify the spelling of the trigger phrase matches the MUD -- Htot-og calls Bad Mother Crusher to a halt.
2. Verify that every { has a matching }, every [ has a matching ], and that every ( has a matching ) -- count them. This applies to both the trigger and the alias.
3. Verify the spelling on your trigger command (I don't think this echo is what you want, but you've never said so it's the best Ton could come up with) -- #IF (@V_BMC) {#ALARM +60 {#ECHO 60s after BMC halt do something here}}
4. If you didn't use cut-and-paste, then verify that your alias matches what Ton provided.
5. If everything checks and it still doesn't work, then take a look at your Preferences, especially the Special Characters section. All our scripts are based on default special characters, so if you've changed or disabled any of them problems are likely.

LightBulb
Vague questions get vague answers
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