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: Wed Oct 15, 2003 8:26 am   

Calculating Total Group EXP.
 
Okay basically, i want to have an alias {gstats} and when i do that, it calculates group mana, and then grouptells it.

"grouptell @group_name group has x mana"

Here's how it looks like

Group 'exploring onyx and such' consists of:
Shyla [Lvl:40 656hp 443ma 238mv] (Fearless Leader)
Bard [Lvl:40 1109hp 266ma 230mv] ---
Corwin [Lvl:40 1031hp 209ma 205mv] something tankish
Elric [Lvl:40 955hp 178ma 194mv] gorbel
Firon [Lvl:40 835hp 103ma 203mv] ---
Templeton [Lvl:28 460hp 76ma 126mv] ---
Lyria [Lvl:28 550hp 174ma 156mv] ---
Lestat [Lvl:40 526hp 151ma 190mv] blood-diamond
Kikou [Lvl:30 655hp 80ma 130mv] cape


So how do i make this happen? Also is it possible for me to add another alias like removeplayer, so it doesn't calculate that players mana, incase he isn't running with group or has joined only for chat or safety.

Is this possible?
Reply with quote
l33tsupah4x0r
Beginner


Joined: 16 Sep 2003
Posts: 15
Location: Malaysia

PostPosted: Wed Oct 15, 2003 8:27 am   
 
Sorry Topic has a bad name, i meant calculate total group MANA and HP.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Oct 17, 2003 8:24 pm   
 
If you want to do this by name, it's quite easy.
Command Line
#AL {newgroup} {#VAR group ""}
#AL {addplayer} {#ADDI group}
#AL {removeplayer} {#DELI group}
#TR {^Group '(*)' consists of:} {#VAR group_name {%1};#VAR grouphp 0;#VAR groupmana 0}
#TR {^{@group} ~[Lvl:%d (%n)hp (%n)ma} {#ADD grouphp %1;#ADD groupmana %2}
#AL groupreport {grouptell @group_name group has @groupmana mana}

To use, at the command line type newgroup to clear the group list.
Type addplayer Shyla to add Shyla to the group list.
Type removeplayer Bard to remove Bard from the group list.
Type groupreport to grouptell how much mana the group has.

If you want more automation, you'll have to figure out how to detect the end of the list. There's too many possibilities for me to waste time speculating. This seems fairly pointless unless there's a way to actually tap the group's total.

EDIT: Corrected mismatched forum tags
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