Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
greekman123
Newbie


Joined: 07 Jun 2005
Posts: 6

PostPosted: Fri Jun 15, 2007 7:32 pm   

Problems with script
 
Hi,

I have one script I've never been able to get to work in correctly in cmud for MateriaMagica.

Normally when you do a who you get:

[6 :186 M H-Elf Wizrd Home ] Someplayer3 [-=(.A.)=-]
[26 :26 M Draco Wizrd Towne ] Someplayer2 (Quest)
[60 :240 M Hero Towne ] Someplayer1 [---,-->{@]

The zwho script i've used (not written by me), lets you do a: zwho 'Isle', for example and get list of only peole with a location of Isle (as opposed to Towne, Home).

Zmud code:
-----
#ALIAS zwho {#T+ ZWHO;#IF {%1 = "" OR %LOWER( %1) = "nada"} {#Variable WhoZone ""} {#Variable WhoZone %1};#IF {%LOWER( %1) = "sea"} {#Variable WhoZone "at sea"} {};#VARIABLE Num 0;#VARIABLE NumIm 0;#SEND who}
#CLASS {ZWHO} {disable}
#VAR WhoZone {towne}
#VAR Num {31} {0}
#VAR NumIm {0} {0}
#TRIGGER {~[(???):(???) (?) (&5) (&5) (&6)~] (%w)} {#SUBSTITUTE {~|%ANSI( 15, 0)%1%ANSI( 10, 0):%ANSI( 15, 0)%2 %ANSI( 10, 0)%3 %4 %5 %ANSI( 11, 0)%6%ANSI( 9, 0)~| %ANSI( 15, 0)%7};#IF (%LOWER( %TRIM( %6)) = %LOWER( %TRIM( @WhoZone))) {#ADD Num 1} {#GAG}}
#TRIGGER {You will be able to use the WHO command again in (%d) second.} {#T- ZWHO}
#TRIGGER {~[(???):(???) (?) (&11) (&6)~] (%w)} {#substitute {~|%ANSI( 15, 0)%1%ANSI( 10, 0):%ANSI( 15, 0)%2 %ANSI( 10, 0)%3 %ANSI( 7, 0)%4 %ANSI( 11, 0)%5%ANSI( 9, 0)~+ %ANSI( 15, 0)%6};#IF (%LOWER( %TRIM( %5)) = %LOWER( %TRIM( @WhoZone))) {#IF {%LOWER( %TRIM( %4)) = "immortal"} {#ADD NumIm 1} {#ADD Num 1}} {#GAG}}
#TRIGGER {Visible Immortals online: %d Visible Players Online: %d} {#substitute %1 {Visible Immortals online: @NumIm Visible Players Online: @Num};#T- ZWHO}
#TRIGGER {~[C~]ontinue ~[R~]edraw ~[B~]ack ~[E~]xit:} {#GAG;#CR} "" {nocr|prompt}
#CLASS 0
---

If anyone could help me come up with a cmud compatible version, it would be much apprections. Very Happy
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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