|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Mon Sep 29, 2003 10:10 am
A little counter problem |
I used to have timer based on mana increase on ticks, but now ticks have been changed so need help setting up my whiner
There's a part in my whiner saying glow : x, where x is countdown from gtime [alias] but right now, i can't get these working.. please check my codings.
The trigger itself
=====================
Code: |
A - Alias
T - Trigger
C - Commands
******************
A:
gtime
C:
#math glow_length_variable %1*60
******************
T:
^The radiant sphere around your body fades.
C:
#var glow_clock_variable 0
#var glow_variable 0
******************
T:
^You are surrounded by a radiant light.
C:
#math glow_clock_variable (%number(%time("h"))*60*60+%number(%time("nn"))*60+%number(%time("ss")))
******************
note: Place these lines in the whiner code at the beginning
#if (@glow_clock_variable > 0) {#math glow_variable ((@glow_length_variable)-(%number(%time("h"))*60*60+%number(%time("nn"))*60+%number(%time("ss")))-(@glow_clock_variable))}
#if (@glow_variable < 0) {#var glow_variable 0}
note: Then place @glow_variable into grouptells, it will count down from @glow_length_variable to 0
|
The Whiner
==============
Code: |
Trigger : ^~<(%1)hp (%2)ma (%3)mv
Command : #if (@glow_clock_variable > 0) {#math glow_variable ((@glow_length_variable)-(%number( %time( "h"))*60*60+%number( %time( "nn"))*60+%number( %time( "ss")))-(@glow_clock_variable))}
#if (@glow_variable < 0) {#var glow_variable 0}
#var mana_variable %2
#var mv_variable %3
#math need_hp @maximum_hp-%1
#math need_mana @maximum_mana-%2
#if (@whiner_variable = 1) {
#if (%1 < @hp_variable) {
#math delta %1-@hp_variable
#math whiner_hp @maximum_hp-%1
#if (@delta < -5) {grouptell c17@delta c17Ouch! c11d04Hp: %1 c02/c15 @maximum_hp c02Need:c17~(@whiner_hp~)c02 c17Glow:c11@glow_variable}
}
#if (%1 > @hp_variable) {
#math delta %1-@hp_variable
#math whiner_hp @maximum_hp-%1
#if (@delta > 15) {grouptell c15~+@delta Ahhh! c11d04Hp: %1 c02/c15 @maximum_hp c02Need:c17~(@whiner_hp~)c02 c17Glow:@glow_variable}
}
}
#var hp_variable %1
|
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 29, 2003 6:13 pm |
The way you grouped your formula virtually ensures a negative number
for @glow_variable, which is then changed to 0. Here's a corrected
formula.
Pattern:
^~<(%n)hp (%n)ma (%n)mv
Value:
#if (@glow_clock_variable > 0) {#math glow_variable (@glow_length_variable - ((%number( %time( "h")) * 60 * 60 + %number( %time( "nn")) * 60 + %number( %time( "ss"))) - @glow_clock_variable))}
#if (@glow_variable < 0) {#var glow_variable 0}
#var mana_variable %2
#var mv_variable %3
#math need_hp @maximum_hp-%1
#math need_mana @maximum_mana-%2
#if (@whiner_variable = 1) {
#if (%1 < @hp_variable) {
#math delta %1-@hp_variable
#math whiner_hp @maximum_hp-%1
#if (@delta < -5) {grouptell c17@delta c17Ouch! c11d04Hp: %1 c02/c15 @maximum_hp c02Need:c17~(@whiner_hp~)c02 c17Glow:c11@glow_variable}
}
#if (%1 > @hp_variable) {
#math delta %1-@hp_variable
#math whiner_hp @maximum_hp-%1
#if (@delta > 15) {grouptell c15~+@delta Ahhh! c11d04Hp: %1 c02/c15 @maximum_hp c02Need:c17~(@whiner_hp~)c02 c17Glow:@glow_variable}
}
}
#var hp_variable %1 |
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Mon Sep 29, 2003 7:31 pm |
Thank you :) works now
|
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Mon Sep 29, 2003 7:48 pm |
Lightbulb I can't quite get a pinger working..
I mean technically here's how it is, same as whiner as mud ticks have changed
For example
A
pingadd lightbulb
pingadd zeus
<Add's lightbulb to pinglist>
*There should be unlimited numbers of pingadd's that can be done
Then, based on my machine's time, every 61 seconds, is it possible to make it go
tell lightbulb pingtarget 1
tell zeus pingtarget 2
If it's first time pinging it sets repop time to 0, now after you kill, you get a message like this, when you try to ping "No-one by that name here.." so it resets counter, and then when it mob repop, and it catches it, it starts calculating time, this time lets say is @mob_ttr_time, and when mob dies, it changes @mob_Status dead/down, and when it repops again it sets @mob_ttr_Time = x, and then compiles something like this :
grouptell Mob # TTR Repop Time
grouptell ========= ===== ===== ============
grouptell Lightbulb:[UP] 1 30 54
grouptell Zeus : [Down] 4 45 60
mob = pingtarget
# = number of time killed
TTR = Tick to repop [in this case total time from 61 minutes / 60]
Repop time = total repop time [in this case total time from 61 minutes / 60]
Is this possible? I can get a code worked out but I'm pretty sure it's broken, will post it here in a day or 2 when i get it done, feel free to give me a base to work out of. thanks. |
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Wed Oct 01, 2003 12:37 pm |
Anybody?
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Oct 01, 2003 5:12 pm |
quote: I can get a code worked out but I'm pretty sure it's broken, will post it here in a day or 2 when i get it done
Still waiting to see what you came up with.
Doing this for one mob is fairly simple. Doing it with an unlimited list will probably be extremely difficult. |
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Thu Oct 02, 2003 7:35 am |
Main problems
Instead of time being reset it goes to like 30 mins first repop, 60 mins second repop 90 mins third repop, get what i mean?
Once i get one to work perhaps i'll add more?
Code: |
CLOCK PINGER
---
Limitation:
I am only tracking time with ping_target_1.
Also, you will need to change %time() to %number(%time()) in the #math lines.
---
Command Usage:
ping - pings all mobs
ping1 xorn - sets ping_target_1 to xorn
ping1 - sets ping_target_1 to None
etc.. with ping2 to ping5
pingoffset 5 - adds 5 to ping_clock
ping0 - resets
---
How to use:
1. kill xorn
2. type 'ping1 xorn'
3. turn ping button on
you will see the following every 60 seconds:
>tell xorn 'Ping Target -- Time: 0 min'
>tell xorn 'Ping Target -- Time: 0 min'
>tell xorn 'Ping Target -- Time: 0 min'
4. xorn is up
>tell xorn 'Ping Target -- Time: 0 min'
>*** PING TARGET < xorn > IS UP *** Time: 4:50 PM
one min passes
>tell xorn 'Ping Target -- Time: 1 min'
>*** PING TARGET < xorn > IS UP *** Time: 4:51 PM
you can turn pinger off if you want, doesn't matter
5. kill mob
>tell xorn 'Ping Target -- Time: 29 min'
>tell xorn 'Ping Target -- Time: 30 min'
>tell xorn 'Ping Target -- Time: 31 min'
6. xorn is up
>tell xorn 'Ping Target -- Time: 32 min'
>*** PING TARGET < xorn > IS UP *** Time: 5:22 PM
note: I don't save the area repop time - you will need to remember it
7. kill mob again
ok, you know now that the area time is 32 min.
the area should repop when 'Time: 64 min', then next repop 'Time: 96 min', etc...
---
if you dont like this and rather the pinger recount from 1 to 32 again
then you can change clock variable by typing
pingoffset 32
then the area should repop at 'Time: 32 min'
---
also, use pingoffset as a correction to early or late area repops
if on the 5th run the area repops at 'Time: 30 min' instead of
normal 32 min, i.e. 2 minutes early.
if you don't use pingoffset then the next repop should be 'Time: 62 min'
if you typed
pingoffset 30
then area repops should be at 'Time: 32 min'
note that
if you typed
pingoffset -2
then the next repops should be 'Time: 64 min'
-----------------------------------------------------
Alias: ping
Commands:
#if !(@ping_target_1 = "None") {tell @ping_target_1 Ping Mob}
#if !(@ping_target_2 = "None") {tell @ping_target_2 Ping Mob}
#if !(@ping_target_3 = "None") {tell @ping_target_3 Ping Mob}
#if !(@ping_target_4 = "None") {tell @ping_target_4 Ping Mob}
#if !(@ping_target_5 = "None") {tell @ping_target_5 Ping Mob}
#no
#if (@spell_inv_variable = 0) {#echo <%e[31m>WARNING: <%e[33m>The spell 'Detect Invisibility' is down.}
#if (@spell_inf_variable = 0) {#echo <%e[31m>WARNING: <%e[33m>The spell 'Infravision' is down.}
********
Alias: ping?
Commands:
#show
#show {#1 <%e[33m>Mob: <%e[37m>@ping_target_1}
#show {#2 <%e[33m>Mob: <%e[37m>@ping_target_2}
#show {#3 <%e[33m>Mob: <%e[37m>@ping_target_3}
#show {#4 <%e[33m>Mob: <%e[37m>@ping_target_4}
#show {#5 <%e[33m>Mob: <%e[37m>@ping_target_5}
note: does the color commands <%e[33m> still work in new zmud version?
********
Alias: ping0
Commands:
#show
#show Ping Targets Reset
#no
#var ping_target_1 None
#var ping_target_2 None
#var ping_target_3 None
#var ping_target_4 None
#var ping_target_5 None
#no
#var ping_clock 0
#var ping_time 0
********
Alias: ping1
Commands:
#if (%1 = %null) {#var ping_target_1 None} {#var ping_target_1 %1}
note: similar aliases for ping2 through ping5
********
Alias: pingoffset
Commands:
#if (%1 = %null) {#show Error: no clock offset given} {#math ping_clock %1+@ping_clock}
********
Trigger Class Name: Ping_Alarm
Pattern: -00
Commands:
#if (@ping_clock > 0) {#math ping_time ((%time("h")*60+%time("nn"))-(@ping_clock))}
#no
#if !(@ping_target_1 = "None") {tell @ping_target_1 Ping Target -- Time: @ping_time min}
#if !(@ping_target_2 = "None") {tell @ping_target_2 Ping Mob}
#if !(@ping_target_3 = "None") {tell @ping_target_3 Ping Mob}
#if !(@ping_target_4 = "None") {tell @ping_target_4 Ping Mob}
#if !(@ping_target_5 = "None") {tell @ping_target_5 Ping Mob}
#no
#if (@spell_inv_variable = 0) {#echo <%e[31m>WARNING: <%e[33m>The spell 'Detect Invisibility' is down.}
#if (@spell_inf_variable = 0) {#echo <%e[31m>WARNING: <%e[33m>The spell 'Infravision' is down.}
#no
#if ((@spell_inv_variable = 0) or (@spell_inf_variable = 0)) {#play alert.wav}
note: a sound file to tell me when my mob is up, so I can stop watching Malaysian porn
and go kill my mob.
note: the trigger class name MUST be Ping_Alarm, because I turn this class on/off with
ping button
********
Trigger Class Name: Ping_Scripts
Pattern: ^You tell %1 'Ping Mob
Commands:
#echo <%e[36m>*** PING MOB ~< %1 ~> IS UP *** <%e[31m> Time: %time(hh:nn AM/PM)
***
Pattern: ^You tell %1 'Ping Target --
#echo <%e[36m>*** PING TARGET ~< %1 ~> IS UP *** <%e[31m> Time: %time(hh:nn AM/PM)
#if ((@ping_clock = 0) and (@ping_time = 0)) {#math ping_clock %time("h")*60+%time("nn")}
note: this is where I set the clock
********
Ping Button
note: the script should be the same as it always was, I didn't change it
Caption: Ping (purple color)
Commands:
#var ping_variable 1
#T+ Ping_Alarm
Caption: Ping (red color)
Commands:
#var ping_variable 0
#T- Ping_Alarm
********
Done! THAT IS IT.
-------------------------------------------------
Ok, improvement for the future:
variables:
ping_area - area repop time
ping_pop - minutes until repop, counting down
ping_run - the nth run or the number of times u kill the mob
I could manually set the ping_area then calcalute the ping_pop time like so:
#math ping_pop @ping_area-(@ping_time@ping_area)
= modules math function, not divide
example:
ping_area = 32
ping_time = 60
ping_pop = 32-(6032) = 4 minutes :)
and
#math ping_run @ping_time/@ping_area
example:
ping_area = 32
ping_time = 70
ping_run = 70/32 = 2 (integer divide, it drops any fractions)
and
Alias: ping
could look like
#1 Mob: xorn Area Time: 32 min Pop Time: 4 min Run: 2
PROBLEM:
I want to find a way to auto set the area time.
Hmm I haven't found a good way to do this yet.
|
|
|
|
|
l33tsupah4x0r Beginner
Joined: 16 Sep 2003 Posts: 15 Location: Malaysia
|
Posted: Sat Oct 04, 2003 10:43 am |
Oh one more thing.....
How do i make a random title change.
For example
When i log into mud
in 2 minutes, i want it to use %random(1,10), "First option", 2nd option, ... }
And continuesly changes title every 2 minutes?
To change title, it's title %1. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Oct 04, 2003 9:57 pm |
I wish you wouldn't use those [ code ] things. They disable the forum's word wrap, which ends up making the post as wide as your longest line. This is currently over twice the width of my screen which makes it a real chore to read. Please edit your posts to remove these nuisances.
This doesn't appear to be your own work. Instead, it looks like the kind of script that is posted for others to use, with instructions on how to use it. It's usually best to consult the actual author.
It's designed to go from 30 to 60 to 90. The author explained that and also told you what to do if you didn't want it that way.
quote: ok, you know now that the area time is 32 min.
the area should repop when 'Time: 64 min', then next repop 'Time: 96 min', etc...
---
if you dont like this and rather the pinger recount from 1 to 32 again
then you can change clock variable by typing
pingoffset 32
then the area should repop at 'Time: 32 min'
The title change is a totally unrelated subject.
Use #CASE or %case and an alarm.
#ALARM -2:00 {#CASE %random {title first option} {title second option} {title third option}} |
|
|
|
|
|
|
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
|
|