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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
healunter
Beginner


Joined: 07 Jan 2007
Posts: 17

PostPosted: Fri Jun 22, 2007 4:40 pm   

XML Dragonrealms-Stormfront cloning
 
I think i've almost got this fixed, but the gauges are giving me a beatdown.

Dragonrealms gives you a max of 100 for the health, mana and spirit, where GS gives you a variable max. To use the gemstone bars you have to start by setting the maxes at 100.

#var {maxhp} {100}
#var {maxmana} {100}
#var {maxspirit} {100}

Then you have to find the three minivital info for health spirit and mana. It's got a lot of code in it, telling the bar where and what it's suppose to do, make sure you ignore that bit.

<dialogData id='minivitals'><skin id='spiritSkin' name='spiritBar' controls='spirit' left='75%' top='0%' width='25%' height='100%'/><progressBar id='spirit' value='81' text='spirit 81%' left='75%' customText='t' top='0%' width='25%' height='100%'/></dialogData>

<dialogData id='minivitals'><skin id='manaSkin' name='manaBar' controls='mana' left='25%' top='0%' width='25%' height='100%'/><progressBar id='mana' value='85' text='mana 85%' left='25%' customText='t' top='0%' width='25%' height='100%'/></dialogData>

<dialogData id='minivitals'><skin id='staminaSkin' name='staminaBar' controls='stamina' left='50%' top='0%' width='25%' height='100%'/><progressBar id='stamina' value='100' text='fatigue 100%' left='50%' customText='t' top='0%' width='25%' height='100%'/></dialogData>

<dialogData id='minivitals'><skin id='healthSkin' name='healthBar' controls='health' left='25%' top='0%' width='25%' height='100%'/><progressBar id='health' value='100' text='health 100%' left='25%' customText='t' top='0%' width='25%' height='100%'/></dialogData>

Those are the labels, and I've not quite got it working.
Question
Reply with quote
healunter
Beginner


Joined: 07 Jan 2007
Posts: 17

PostPosted: Fri Jun 22, 2007 5:14 pm   
 
#CLASS {gauges}
#TRIGGER {~<progressBar id=~'spirit~' value~=~'(*)~'} {
#gag
#var spirit %1
#var spiritlabel spirit %1
}
#TRIGGER {~<progressBar id=~'health~' value~=~'(*)~'} {
#gag
#var hp %1
#var hplabel health %1
}
#TRIGGER {~<progressBar id~=~'mana~' value~=~'(*)~'} {
#gag
#var mana %1
#var manalabel mana %1
}
#TRIGGER {~<progressBar id~=~'stamina~' value~=~'(*)~'} {
#gag
#var stamina %1
#var staminalabel Fatigue %1
}
#TRIGGER {~<spell~>(*)~<~/spell~>} {
#sub >
#var spell %1
}
#TRIGGER {~<spell exist=~'spell~'~>(*)~<~/spell~>} {
#sub >
#var spell %1 %2
}
#BUTTON 1 {@righthand} {} {} {} {} {} {} {Size} {200} {22} {Pos} {1} {303} {14} {} {} {} "" {} {} {}
#BUTTON 2 {@lefthand} {} {} {} {} {} {} {Size} {200} {22} {Pos} {1} {103} {14} {} {} {} "" {} {} {}
#BUTTON 3 {RT} {} {} {} {@roundtime} {} {} {Size} {100} {23} {Pos} {1} {1} {32892} {} {Gauge||0|@gaugemax||7} {} "" {Explore} {} {}
#BUTTON 5 {@hplabel} {} {} {} {@hp} {} {} {Size} {100} {23} {Pos} {1} {1} {42} {} {Gauge||12|@hpmax||15} {-19} "" {Explore|Inset} {Hp: @hp/@maxhp} {hpgauge} {2}
#BUTTON 6 {@manalabel} {} {} {} {@mana} {} {} {Size} {100} {23} {Pos} {1} {102} {32795} {} {Gauge||1|@maxmana|@maxmana / 10|7} {-19} "" {Explore|Inset} {MA: @mana/@maxmana} {magauge} {2}
#BUTTON 7 {@spiritlabel} {} {} {} {@spirit} {} {} {Size} {100} {23} {Pos} {1} {204} {32864} {} {Gauge||12|@maxspirit|@maxspirit / 10|7} {} "" {Explore|Inset} {} {} {2}
#BUTTON 8 {@staminalabel} {} {} {} {@spirit} {} {} {Size} {100} {23} {Pos} {1} {304} {32891} {} {Gauge||12|@maxspirit|@maxspirit / 10|7} {} "" {Explore|Inset} {} {} {2}
#BUTTON 9 {@spell} {} {} {} {} {} {} {} {} {} {Pos} {1} {505} {} {} {Gauge||12|||7} {} "" {Explore|Inset} {} {}
#CLASS 0

This is what I have so far, but some fine tuning on how to aquire the percentages for the health, mana spirit fatigue and spell bars.

Anyone know if there's a menu capture that captures crits and pcs already posted?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jun 23, 2007 3:18 am   
 
Quote:

This is what I have so far, but some fine tuning on how to aquire the percentages for the health, mana spirit fatigue and spell bars.


They won't be any different than the value number you're already capturing, so in the spot you want to make the percentage visible just use @{variable name goes here}% (I assume you want to show that in the @whateverlabel variables?)
_________________
EDIT: I didn't like my old signature
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Sat Jul 05, 2014 2:07 am   
 
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="4893" repeat="true" regex="true" copy="yes">
<pattern>&lt;progressBar id='(.*?)' value='(.*?)' text='.*' left='.*?' customText='.*?' top='.*?' width='.*?' height='.*?'/&gt;</pattern>
<value>#sub {}
#if (%1 = concentration) {#var concentration %2}
#if (%1 = stamina) {#var stamina %2}
#if (%1 = health) {#var health %2}
#if (%1 = spirit) {#var spirit %2}
</value>
</trigger>
</cmud>

I did it with one trigger, and made progress bar buttons for each. The trigger is in regex (suppose to be faster). The bar is set to a max of 100. Put the buttons anywhere you like.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Jul 06, 2014 5:15 am   
 
That trigger's for CMUD though. These are the zMUD forums.
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Mon Jul 07, 2014 2:50 am   
 
my bad. But the principle will work in Zmud. Did a lot of trigger programming in Zmud before Cmud. Just don't make it a regex trigger. You can use (bartype:*) and (level:*). XML in dragonrealms is a pain. But <progressbar id= ... is the basic command for sending the information for the bars. All the other stuff in it is operating the size position, etc for the bar

try
#trig {~<progressBar id~=~'(bartype:*)~' value=~'(level:*)~' *~/~>} {all ifs to control the various button gauges }
One trigger to do all the triggers above.

Anyone working on XML on Cmud. I've got things working in a way. Somethings no working and it's my lack of knowledge at what is going on behind the scenes.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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