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
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sat Nov 27, 2010 5:25 pm   

2 Things Mapper Issue and help with a status window
 
Okay my mapper issue is that my mapper opens likes 3 to 4 windows each time and it doesn't take room names correctly in the couple times i've tried to mess around with it. If anyone has some suggestions on how to get it to not open 3 windows please say. Probably will have to reinstall, but would prefer not to.

Okay now on to my question of the day. I was wondering if I could move my entire group from my main window when i type group to my status window. Also if it could highlight for those that have taken the most dmg. Maybe at 75%, 50%, 25%, 10% dmg. I have a health check trigger that can capture to another window, is as simple as just changing it to #cap windowname to #stw? If not how would i move all this:

Your group consists of ( 5/30):
( Head) 1000/988 hit, 175/175 move joe
(Front) 1391/1391 hit, 148/148 move bob
(Front) 787/787 hit, 179/179 move jane
(Front) 1776/1776 hit, 210/210 move jill
(Front) 961/961 hit, 246/246 move mike

To the status window and have it highlighted for dmg?
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sat Nov 27, 2010 5:38 pm   
 
Okay actually got the extra map windows to go away. So just the status window thing now.
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sat Nov 27, 2010 5:47 pm   
 
Also is it possible to create a gauge in the status window for each group member, that changes color as they reach the set dmg%? I don't think its possible for multiple different %'s within a gauge but figured I'd ask.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Mon Nov 29, 2010 10:01 am   
 
Ggoss wrote:
I was wondering if I could move my entire group from my main window when i type group to my status window. Also if it could highlight for those that have taken the most dmg.

This is doable.

Ggoss wrote:
I have a health check trigger that can capture to another window, is as simple as just changing it to #cap windowname to #stw?

Unless there is a command i'm missing. Each time you use the #STW command, you create a new status window object. Unless you want to be responsible for manually removing all those objects that get created, you will need to specify a class when creating the status window. Then you will need to incorporate the #DELCLASS command in your script to delete that class before creating new status window objects. This will prevent the status window from being filled with information from all the old objects, and keep you package clean.

Ggoss wrote:
Also is it possible to create a gauge in the status window for each group member, that changes color as they reach the set dmg%? I don't think its possible for multiple different %'s within a gauge but figured I'd ask.

It is possible to create gauges in the status window that change color depending on conditions but they will be text gauges utilizing a combination of foreground and background colors and or characters that change color. It is also possible to to create gauges using buttons of the type gauge, that change color depending on what their values are. This can be done either directly with the #gauge command and %btncol function (needed to set the text color of the button), or using LUA and zscript objects.

You asked about the status window though so here is an example of how you could get part of the group display (their position, name, and a colored numeric percentage of their hp) into the status window. The hp percentage is colored based on the four values you gave above. 100% - 75% bright green, 74.99% - 50% yellow, 49.99% - 25% brown, 24.99% - 10% bright red, and 9.99% - 0 red.
Code:
<class name="Group_To_StatusWindow" id="784">
  <trigger name="Group2" priority="90" regex="true" id="93">
    <pattern>Your group consists of \(\s?(\d+)/\d+\):</pattern>
    <value>#delclass stw
</value>
    <trigger type="Within Lines" param="1" regex="true" prompt="true">
      <pattern>\(\s?(\a+)\) (\d+)\/(\d+) hit, (\d+)\/(\d+) move (\a+)</pattern>
      <value><![CDATA[#add group_count 1

$pos = %1
$name = %6

$hpp = %eval((%format("&0.2f",%2)/%3)*100)
$mv = %4
$mvm = %5

#if (%null(%1)) {#state Group 0} {
  #switch ($hpp >= 75.00) {$string = {($pos) $name%ansi(bright,green) %format("&0.2f",$hpp)%ansi(reset)};#call @toSTW($string)}
    ($hpp >= 50.00) {$string = {($pos) $name%ansi(yellow) %format("&0.2f",$hpp)%ansi(reset)};#call @toSTW($string)}
    ($hpp >= 25) {$string = {($pos) $name%ansi(brown) %format("&0.2f",$hpp)%ansi(reset)};#call @toSTW($string)}
    ($hpp >= 10) {$string = {($pos) $name%ansi(bright,red) %format("&0.2f",$hpp)%ansi(reset)};#call @toSTW($string)}
    ($hpp < 10) {$string = {($pos) $name%ansi(red) %format("&0.2f",$hpp)%ansi(reset)};#call @toSTW($string)}
  #state Group2 1}]]></value>
    </trigger>
  </trigger>
  <func name="toSTW" id="572">
    <value>#stw {$string} stw</value>
    <arglist>$string</arglist>
  </func>
</class>


When you create your own system, if you have any questions, I'm sure someone will be able to answer them. I think board activity was just off a bit due to the holiday weekend.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34

Last edited by Fizgar on Wed Dec 08, 2010 9:39 am; edited 1 time in total
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Nov 29, 2010 1:42 pm   
 
To have separate gauges for each member, all you need is separate variables for each one, with a status window object watching each variable.
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Wed Dec 08, 2010 7:21 am   
 
Hrmm it gives me a parsing error when i try to copy and paste that to my cmd line. Hrmm for the gauges i guess i could have it auto create a variable each time for new group members, but groups can get pretty big.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Wed Dec 08, 2010 10:03 am   
 
You are getting a parsing error because that is XML, not code you paste directly into the command line. To use, copy it to your clipboard, open the package editor, right click the window or module where you want it to go and select paste. I forgot to include the function for the example in the first post also. The code above has been edited to include the function too. What I posted was just a quick and dirty example of one way to do it. Using variables like Rahab suggested will give you more flexibility.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
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