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


Joined: 14 Oct 2003
Posts: 18
Location: Canada

PostPosted: Mon Jun 07, 2004 3:48 am   

Help please... Group breakdown script
 
Hi I need some help to start this script... i've tried but I'm not the expert on script so anyways..

What I want it to do, is when I use an alias, lets say "Breakdown".. it will pull up my group list (usualy we type "group" by itself and we see the members of the groups appear). Here's an example of what the grouplist looks like.
(hopefully the lines aren't broken... I've enlarged this message's window size)

---------cut here (start)

As a group leader, you can lead a group size of 10.
poploco's group:
-------------------------------------------------------------------------------
##| Level Name Pos HitPoints ManaPoints MovePoints TNL Align
-------------------------------------------------------------------------------
1| 20 Lord Poploco Sleep 5750/5750 20559/20559 7894/7894 368 1000
2|243 Lord Poppop Stand 40300/40300 2400/3022 10000/34382 1000 -1000
3|100 Hero Poploop Stand 467/700 2000/3004 4053/5403 20 -400

--------cut here (end)

So as the group list goes by, the script should be catching the name of each char, and for each of them do a command called "last"... so.... "last Poploco" From that information we need to store the name into a variable (to be able to stack all mage names together, all warrior together, etc) and also adding a count to all specific classes... That way it would return into a gtell (grouptell) that there is for example..

gtell (3)Mages <<>> Poploco - Poppop - Poploop
gtell (0)Warriors <<>>
gtell (0)Clerics <<>>

Here is an example for result of the "last" command... as in "last poploco")

------cut here (start)

poploco the Sprite is a 20th level Lord Mage

------cut here (end)


I hope that you can help. All I need is a starter script... you don't need to write the complete thing for each classes...

I'd apreciate any help from you guys,
Thanks,
Poploco
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jun 07, 2004 4:28 am   
 
#TR {^%w's group:} {#T+ GroupList;#VAR GroupMages {}}
#CLASS GroupList disable
#TR {%d~|%d %w (%w)} {last %1}
#TR {(%w) the %w is a %d%w level %w Mage} {#ADDI GroupMages %1}
#TR {some pattern that indicates the end of the grouplist has been reached} {#ALA +1 {#T- GroupList;gtell ~(%numitems( @GroupMages)~) Mages ~<~<~>~> %expandlist( @GroupMages, " - ")}}

The alarm is to allow time for the 'last' commands to be completed. You might need to give it additional time. You may need to include additional spaces or use %s for your patterns to match the MUD output.
Reply with quote
poploco
Beginner


Joined: 14 Oct 2003
Posts: 18
Location: Canada

PostPosted: Mon Jun 07, 2004 4:39 am   
 
something isn't working cause the "last" command doesn't activate I've tried adding a space after the second %d. But I still get empty names...

The mud i'm doing this on is AvatarMUD, if you want to check it out.


www.outland.org

avatar.outland.org 3000
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