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


Joined: 23 Jul 2005
Posts: 26

PostPosted: Tue Aug 02, 2005 4:50 pm   

Line counter
 
is it possible to make a trigger count lines from one point to another ?
i want it to simply count the lines of players, and compare it to the # of player shown in the line below, if they don't match there is an invisible person online.

Player Title Guild Clan
-------------------------------------------------------------------------
Seneca Apprentice None
Gvrfour Bishop None
Haz Immaculate None
Tsingtao Thaumaturge None

: uptime
Uptime: 1 day 02:20:30 Players: 4 Event: None.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 02, 2005 11:10 pm   
 
#trigger {Player%sTitle%sGuild%sClan} {}
#cond {-------------------------------------------------------------------------} {#T+ tWHOPlayerInfo}

#trigger "tWHOPlayerInfo" {(*)} {#add PlayerCount 1} {disable}

#trigger {Uptime: * Players: (%d) Event: *} {#if (%1 = @PlayerCount) {#say "Everyone's accounted for (nobody hidden)"} {#say "Someone's missing (one or more are hidden)"}}
_________________
EDIT: I didn't like my old signature
Reply with quote
Rappy
Wanderer


Joined: 15 Jul 2005
Posts: 96

PostPosted: Fri Aug 05, 2005 12:31 pm   
 
Quote:

#trigger {Uptime: * Players: (%d) Event: *} {#if (%1 = @PlayerCount) {#say "Everyone's accounted for (nobody hidden)"} {#say "Someone's missing (one or more are hidden)"}}


I hate using #say's when dealing with postings from MUD output, I'd use a #PSUB here.

Code:

#TRIGGER {Uptime: * Players: (%d) Event: *} {#if (%1 > @PlayerCount) {#PSUB {%1[%eval(%1 - @playercount) hidden/invis]} %x1


I think that's right can't open zMUD to test it.

-Rappy
_________________
Windows 11 Pro,
cMUD 3.34
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