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
l33tsupah4x0r
Beginner


Joined: 16 Sep 2003
Posts: 15
Location: Malaysia

PostPosted: Sun Oct 05, 2003 11:16 am   

New Pinger
 
I've got this new trigger from my friend, but i have no idea to edit this to how i need it working

Basically, In my mud, 60 seconds tick have been removed, so now i have to be dependant on seconds. This pinger is based on the old ticker, and im wondering if anyone can help me change this in using %timer value to change ttr {tick to repop} lastrepop and time up in seconds or in minutes seconds/60.

Here's the stuff

#CLASS {Pinger} {enable}
#ALIAS mobadd {#ADDKEY pin_mobs %1 %1;#ADDKEY pin_state %1 Up;#ADDKEY pin_uptime %1 0;#ADDKEY pin_lastrep %1 -1;#ADDKEY pin_reptime %1 -1;gt Pinger Report -> %1 added to pinglist.}
#ALIAS mobdel {#DELKEY pin_mobs %1;#DELKEY pin_state %1;#DELKEY pin_uptime %1;#DELKEY pin_lastrep %1;#DELKEY pin_reptime %1;gt Pinger Report -> %1 removed from pinglist.;}
#ALIAS showmobs {grouptell Mob Name State TtR LstRep ReppTm;grouptell -------------------------- --------- ------- -------- --------;#LOOPDB @pin_mobs {#IF (%db( @pin_lastrep, %val) != -1) {#VA pin_lastrepop %eval(-%db( @pin_lastrep, %val))} {#VA pin_lastrepop %null};#VA pin_ttr %eval(%db( @pin_reptime, %val) - %db( @pin_lastrep, %val));#VA pin_repop %db( @pin_reptime, %val);#IF (%db( @pin_reptime, %val) = -1) {#VA pin_repop %null;#VA pin_ttr %null};#IF (@pin_lastrepop != %null AND @pin_repop != %null) {grouptell %format("&25s &4s:&2.0n &4.0n &5.0n &4.0n", %val, %db( @pin_state, %val), %db( @pin_uptime, %val) , @pin_ttr, @pin_lastrepop, @pin_repop)};#IF (@pin_lastrepop != %null AND @pin_repop = %null) {grouptell %format("&25s &4s:&2.0n &5.0n ", %val, %db( @pin_state, %val), %db( @pin_uptime, %val) ,@pin_lastrepop)};#IF (@pin_lastrepop = %null AND @pin_repop = %null) {grouptell %format("&25s &4s:&2.0n ", %val, %db( @pin_state, %val), %db( @pin_uptime, %val) ,@pin_lastrepop)}}}
#ALIAS checkmobs2 {#VA pin_pinged 0;#IF (@pin_curmob) {#VA pin_check 0} {#VA pin_check 1};#LOOPDB @pin_mobs { #IF (@pin_check = 1) {tell %key ping;#VA pin_pinged 1;#VA pin_check 0;#VA pin_curmob %key} { #IF (@pin_curmob = %key) {#VA pin_check 1}}};#IF (@pin_pinged = 0) {#VA pin_curmob ""}}
#ALIAS checkmobs {#VA pin_curmob "";checkmobs2}
#ALIAS updatemobs {#LOOPDB @pin_mobs {#ADDKEY pin_uptime %val %eval(%db( @pin_uptime, %val)+1)};#LOOPDB @pin_mobs {#IF (%db( @pin_lastrep, %val) > -1) {#ADDKEY pin_lastrep %val %eval(%db( @pin_lastrep, %val)+1)}}}
#VAR pin_state {}
#VAR pin_enabled {0}
#VAR pin_reptime {}
#VAR pin_uptime {}
#VAR pin_lastrep {}
#VAR pin_mobs {}
#VAR pin_check {1} {0}
#VAR pin_curmob {}
#VAR pin_pinged {0} {0}
#VAR pin_ttr {2}
#VAR pin_repop {41}
#VAR pin_lastrepop {-39}
#TRIGGER {No-one by that name here..} {#IF (@pin_curmob) {#IF (%db( @pin_state, @pin_curmob) = "Up") {#ADDKEY pin_uptime @pin_curmob 0};#ADDKEY pin_state @pin_curmob Down};checkmobs2}
#TRIGGER {You tell * 'ping'} {#IF (@pin_curmob) {#IF (%db( @pin_state, @pin_curmob) = "Down") {#ADDKEY pin_uptime @pin_curmob 0;#IF (%db( @pin_lastrep, @pin_curmob) > -1) {#ADDKEY pin_reptime @pin_curmob %db( @pin_lastrep, @pin_curmob)};#ADDKEY pin_lastrep @pin_curmob 0;gt Pinger Report -> @pin_curmob is up.};#ADDKEY pin_state @pin_curmob Up};checkmobs2}
#CLASS 0
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 05, 2003 5:46 pm   
 
Just use an #ALARM to simulate the MUD's old tick.
#ALA -60 {#SHOW Tick}
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