|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 6:54 am
Count Down Gauges |
I play Realms of Despair, and am currently puzzling over how to get some gauges to real time display my spells wearing off etc
My prmopt is :
Phyre <1619/1619hp 8,471 gold 792 align 288 ppl 328/999wgt>
But the spell wont show up in there... thinking prompt might be quite an important part to play, but anyway
A typical battle round will look something like this:
Phyre <1619/1419hp 8,471 gold || lag some cuts The guard 328/999wgt>
You _demolish_ the guard!
You MUTILATE the guard!
You dodge the guard's attack.
The guard's slash misses you.
You dodge the guard's attack.
You dodge the guard's attack.
Phyre <1619/1419hp 8,471 gold | lag almost dead The guard 328/999wgt>
But conversely I dont really want the countdown to only work in battle, it'd be nice for it do also count down the bit before battle..
The true sight activation is 'Your vision is elevated to the highest plane.'
And this stays on for 40 rounds
And it took 125 seconds as best as I can tell for those 40 rounds to pass
I'd also like for it to be updatable by checking my score
The relevant output part for my score is :
----------------------------------------------------------------------------
Guild: Guild of Warriors Guild Mkills: 275586 Guild MDeaths: 1514
Inducted on: Sat Sep 10 03:22:54 2005
----------------------------------------------------------------------------
AFFECT DATA: [fly ; 1306 rds]
[true sight ; 5 rds]
I've been puzzling on this for a couple months and I really cant work out where I need to take it... I mean, obviously I need to set the gauge to max when I quaff the true potion, but then, I cant work out how to activate the countdown for it? and to continue to refresh the countdown?
As best as I can see, I'd have to put the countdown in the quaff trigger itself and have a whole series of #wait 3200 or so miliseconds then #var truesight 39 etc
any feedback please?
Regards |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 6:55 am |
Note, there are alot more spaces than it seems in the Fly : bit
In reality, it should be..
Fly....................; |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 7:15 am |
I've since been informed I can do this
#tr {Truesight activatemessage } {#ALARM +119 {#SHOW %ansi( bold, blink, white, red)Truesight about to wear off!}}
I also gather that using the #alarm command, it's 3 x rounds = number to put into alarm
This trigger works alright, but i'd like it to be able to check against things like blind...
Regards |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 7:17 am |
Further to clarify
The only thing I'm really struggling with atm is the countdown
I suppose there I do have one.. but I'd like to be able to store the variables of @trueroundsleft and then whenever I get blinded store @blindroundsleft
I mean, I can do most of this. just not the crucial bit...
I'm thinking I can set it to trigger on my prompt to #say YOU WILL BE BLIND IN (@trueroundsleft) ROUNDS FOR (@blindroundsleft-@trueroundsleft) ROUNDS
and even that can easily be done, as an ifcheck on the prompt, and then using a simple on/off function stored in a variable to make sure we only trigger it every 3 seconds or so
Regards |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 7:35 am |
I've semi got something together
#CLASS {true gauge}
#TRIGGER {Your vision is elevated to the highest plane.} {
#var trueroundsleft 40
#math trueroundsleft (@trueroundsleft-1)
#Alarm +3 {#say True has @trueroundsleft rounds left.}
}
#TRIGGER {True has %1 rounds left.} {
#math trueroundsleft (@trueroundsleft-1)
#Alarm +3 {#say True has @trueroundsleft rounds left.}
}
#TRIGGER {True has 3 rounds left.} {#cw 1035}
#TRIGGER {True has 2 rounds left.} {#cw 1036}
#TRIGGER {You pass your hands around your body...} {#var trueroundsleft 0}
#TRIGGER {..Everything begins to fade to black} {#var trueroundsleft 0}
#CLASS 0
A couple things..
It's excessively spammy.. I need to work out a way to do hte countdown without using #say
and it counts down past 0 atm
but I can fix the last bit easily |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 7:42 am |
I've since put this together
#CLASS {true gauge}
#TRIGGER {Your vision is elevated to the highest plane.} {
#var trueroundsleft 40
#t+ countdown
countdown
}
#CLASS 0
#CLASS {true gauge|countdown}
#ALIAS countdown {
#Alarm +3 {#math trueroundsleft (@trueroundsleft-1)}
#if (@trueroundsleft<=5) {
#say True has @trueroundsleft rounds left
countdown
} {countdown}
}
#TRIGGER {True has 3 rounds left.} {#cw 1035}
#TRIGGER {True has 2 rounds left.} {#cw 1038}
#TRIGGER {True has 1 rounds left.} {#cw 1036}
#TRIGGER {You pass your hands around your body...} {
#var trueroundsleft 0
#t- countdown
}
#TRIGGER {..Everything begins to fade to black} {
#var trueroundsleft 0
#t- countdown
}
#TRIGGER {Your vision descends to the material plane.} {
#var trueroundsleft 0
#t- countdown
}
#CLASS 0
but this crashes/closes my Zmud when I quaff a true sight potion.
I think it might be to do with the infinite loop in the countdown..which I will try to fix now |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Mon Sep 12, 2005 7:45 am |
ok since the post above
i've refined it into..
#CLASS {true gauge}
#TRIGGER {Your vision is elevated to the highest plane.} {
#var trueroundsleft 40
#t+ countdown
countdown
}
#CLASS 0
#CLASS {true gauge|countdown}
#ALIAS countdown {
#Alarm +3 {#math trueroundsleft (@trueroundsleft-1)}
#if (@trueroundsleft<=5) {
#say True has @trueroundsleft rounds left
countdown
} {countdown}
}
#TRIGGER {True has 3 rounds left.} {#cw 1035}
#TRIGGER {True has 2 rounds left.} {#cw 1038}
#TRIGGER {True has 1 rounds left.} {#cw 1036}
#TRIGGER {You pass your hands around your body...} {
#var trueroundsleft 0
#t- countdown
}
#TRIGGER {..Everything begins to fade to black} {
#var trueroundsleft 0
#t- countdown
}
#TRIGGER {Your vision descends to the material plane.} {
#var trueroundsleft 0
#t- countdown
}
#CLASS 0
the only differnece being an if check on the countdown alias to ensure we cant go below 0
But it still fails to deliver! Crashes zMud instantly..
any help lpease? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Sep 12, 2005 8:15 pm |
You problem ins in this class
Code: |
#CLASS {true gauge|countdown}
#ALIAS countdown {
#Alarm +3 {#math trueroundsleft (@trueroundsleft-1)}
#if (@trueroundsleft<=5) {
#say True has @trueroundsleft rounds left
countdown
} {countdown}
#CLASS 0 |
As you have it now countdown preforms an infinite loop when round left is less then 5. The correction is pretty simple
Code: |
#CLASS {true gauge|countdown}
#ALIAS countdown {
#Alarm +3 {#math trueroundsleft (@trueroundsleft-1);countdown}
#if (@trueroundsleft<=5) {
#say True has @trueroundsleft rounds left
} {countdown}
#CLASS 0 |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Phyre Beginner
Joined: 12 Sep 2005 Posts: 10
|
Posted: Sat Sep 17, 2005 10:41 am |
Thanks, will test it when i get a chance to.
|
|
|
|
|
|