 |
Rashgar Newbie
Joined: 17 Mar 2008 Posts: 4
|
Posted: Mon Mar 17, 2008 2:27 am
Visible Local Echo count down timer. |
I am trying to make a Countdown timer that is Client side. That works from a game condition.
The skill is called Cutthroat, if you are hidden you are able to activate the skill and a 10 second wait counts down.
then the attack goes through.
I made an Alias of cc to hide;cutthroat and it goes off fine and tells me if I am hidden by the responce to the skill parameters.
You begin to lay in wait. ( on successful hide)
At this point I want a Visible count down from 10 to 1 that does not send information or keystrokes to the mud breaking hide.
Any help would be appreciated. |
|
|
 |
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Mon Mar 17, 2008 3:09 am |
Use an alarm.
Code: |
#trigger {You begin to lay in wait.} {#t+ CutthroatAlarm}
#alarm "CutthroatAlarm" {*10} {attack;#t- CutthroatAlarm}
|
The successful hide message triggers the Alarm to enable. Then it will hit at 10th second and do your attack and turn itself back off again.
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
 |
Rashgar Newbie
Joined: 17 Mar 2008 Posts: 4
|
Posted: Mon Mar 17, 2008 3:22 am |
The attack goes off automatically at 10 seconds regardless. What I am looking for is a local Echo countdown. so I know how long before I attack.
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Mar 17, 2008 3:57 am |
#trig {You begin to lay in wait.} {#t+ CutthroatAlarm;cutthroatimer=10}
#alarm "CutthroatAlarm" {*1} {#say Cutthroat in: @cutthroattimer;#add cutthroattimer -1;#if (!@cutthroattimer) {#t- CutthroatAlarm}}
Also, report that typo, it's horrible :( |
|
|
 |
Rashgar Newbie
Joined: 17 Mar 2008 Posts: 4
|
Posted: Mon Mar 17, 2008 4:01 am |
While Hidden You cannot have any input into the mud. The countdown timer has to be done OUTSIDE the game. Any input to the MUD, breaks hide, and thus breaks the skill. Every thing that is done has to be done on the surface only. No actual Keystrokes or Trigger info can be sent to the mud after you Hide and Cutthroat
Sorry if there was any confusion |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Mar 17, 2008 6:41 am |
What do you want done with the commands? Assuming you just want them ignored:
#trig {You begin to lay in wait.} {#t+ CutthroatAlarm;#t+ CutthroatTrig;cutthroatimer=10}
#alarm "CutthroatAlarm" {*1} {#say Cutthroat in: @cutthroattimer;#add cutthroattimer -1;#if (!@cutthroattimer) {#t- CutthroatAlarm}} "" {disable}
#oninput "CutthroatTrig" {*} {#say Sorry, can't do that now. Try again in @cutthroattimer.;#gag} "" {disable}
Note that this script will work differently in CMUD. |
|
|
 |
JQuilici Adept
Joined: 21 Sep 2005 Posts: 250 Location: Austin, TX
|
Posted: Mon Mar 17, 2008 2:47 pm |
To be clear, Fang's first version does not send anything to the MUD (the #say command is client-side display only). His second version actually PREVENTS you from sending anything during the 10 sec wait, by capturing all input using the #oninput trigger and gagging it (and you'll want to 'add #t- CutthroatTrig' to the cleanup commands in the alarm, or you'll never get to type anything ). You could instead modify the second one to store up all the commands and issue them after the cutthroat attack happens.
Also, the use of the #alarm {*1} will be close, but not exact, in timing your 10-sec delay, because it will fire at the top of each second rather than exactly 1 sec after the 'lay in wait' message is received, so don't be surprised if that last 'second' is a bit longer than the others. Should be accurate to within about 1 second, though, barring any exceptional lag. |
|
_________________ Come visit Mozart Mud...and tell an imm that Aerith sent you! |
|
|
 |
Rashgar Newbie
Joined: 17 Mar 2008 Posts: 4
|
Posted: Tue Mar 18, 2008 1:57 am |
I loaded Fang's first one in. It just starts Counting down. after I hit enter, never stops. Heck it even remembers where it was on the countdown if I enable or disable it. and keeps going. It is exactly what I wanted though, I just need it to stop at -10 No matter what
Thanks for all the help BTW, its very much appreciated. |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Mar 19, 2008 5:59 am |
I typoed. Add another t to the cutthroatimer=10 in the first line.
|
|
|
 |
|
|