CMUD/ZMUD Script Samples
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Re: CMUD/ZMUD Script Samples
Love this. Solved the spam issues I had with in game chat.
Thanks!
-B
Thanks!
-B
Re: CMUD/ZMUD Script Samples
Some of the more common/important things missing in original Earth's post would be patterns for elemental and morgul ventriloquism. Why only include psuchae and PoT?
I fear no evil for I am fear incarnate.
Re: CMUD/ZMUD Script Samples
is there a way to capture more characters in the separate window?
-b
-b
Re: CMUD/ZMUD Script Samples
Did you try my way of doing it? (scroll down to the bottom)bromen wrote:is there a way to capture more characters in the separate window?
-b
http://www.genesismud.org/forums/viewto ... =14&t=2004
Re: CMUD/ZMUD Script Samples
Ok, questions (trying to get back some of the things I once had, and knew):
I'm using zMud, but most functions should be similar to cMud.
Question 1:
#TR "You slam * %w" {
???
}
Result I want:
You slam hideous nasty goblin weakly in the chest.
display:
You slam hideous nasty goblin weakly in the chest. (WEAKLY)
instead of the usual I manage:
You slam hideous nasty goblin weakly (WEAKLY) in the chest.
or
You slam hideous nasty goblin WEAKLY in the chest.
I want the first one, thus prefferably without SU'ing the whole line, I know this should be possible.
Question 2:
variable string or dbase (two column corresponding string)
var1 (or column1) var2 (or column2)
jack & jill fairytale
gene & paul kiss
john & ringo beatles
now; the usage:
#tr {@var1} {
#echo @var2 - corresponding value
}
Giving me "jack & jill" returning with "fairtytale", "gene & paul" returning with kiss, "john & ringo" returning with beatles..
I know this is possible, since I've had it before, but in 9 years or so since I made it, it's been... forgotten, and the files are long since lost in various disk crashes and computer replacements.
Ic, Crystalsword of Calia
I'm using zMud, but most functions should be similar to cMud.
Question 1:
#TR "You slam * %w" {
???
}
Result I want:
You slam hideous nasty goblin weakly in the chest.
display:
You slam hideous nasty goblin weakly in the chest. (WEAKLY)
instead of the usual I manage:
You slam hideous nasty goblin weakly (WEAKLY) in the chest.
or
You slam hideous nasty goblin WEAKLY in the chest.
I want the first one, thus prefferably without SU'ing the whole line, I know this should be possible.
Question 2:
variable string or dbase (two column corresponding string)
var1 (or column1) var2 (or column2)
jack & jill fairytale
gene & paul kiss
john & ringo beatles
now; the usage:
#tr {@var1} {
#echo @var2 - corresponding value
}
Giving me "jack & jill" returning with "fairtytale", "gene & paul" returning with kiss, "john & ringo" returning with beatles..
I know this is possible, since I've had it before, but in 9 years or so since I made it, it's been... forgotten, and the files are long since lost in various disk crashes and computer replacements.
Ic, Crystalsword of Calia
Re: CMUD/ZMUD Script Samples
Right, in Cmud answer for first question is very easy:Icarus wrote:Ok, questions (trying to get back some of the things I once had, and knew):
I'm using zMud, but most functions should be similar to cMud.
Question 1:
#TR "You slam * %w" {
???
}
Result I want:
You slam hideous nasty goblin weakly in the chest.
display:
You slam hideous nasty goblin weakly in the chest. (WEAKLY)
instead of the usual I manage:
You slam hideous nasty goblin weakly (WEAKLY) in the chest.
or
You slam hideous nasty goblin WEAKLY in the chest.
I want the first one, thus prefferably without SU'ing the whole line, I know this should be possible.
Question 2:
variable string or dbase (two column corresponding string)
var1 (or column1) var2 (or column2)
jack & jill fairytale
gene & paul kiss
john & ringo beatles
now; the usage:
#tr {@var1} {
#echo @var2 - corresponding value
}
Giving me "jack & jill" returning with "fairtytale", "gene & paul" returning with kiss, "john & ringo" returning with beatles..
I know this is possible, since I've had it before, but in 9 years or so since I made it, it's been... forgotten, and the files are long since lost in various disk crashes and computer replacements.
Ic, Crystalsword of Calia
#sayadd {(Weakly)}
Second one is more complicated but I've done my best:
If my assumption is wrong and you haven't migrated from zmud to cmud those answers will be useless for you as it won't work in zmud.<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="20770" regex="true">
<pattern>\b(%eval(%dbkeys(test)))\b</pattern>
<value>$t = {%1}
#print %db(@test,$t)</value>
</trigger>
<var name="test" type="Record">
<value>jack & jill=fairytale|john & ringo=beatles|gene & paul=kiss</value>
<json>{"gene & paul":"kiss","jack & jill":"fairytale","john & ringo":"beatles"}</json>
</var>
</cmud>
Re: CMUD/ZMUD Script Samples
Ow, well, the sayadd part whas what I was looking for, thanks a BUNCH Einar, second one I solved with Jooli to help me, a while back, and yes, I'm on CMud now ^^
Flee you fools!
Re: CMUD/ZMUD Script Samples
Is anyone around anymore with some Cmud knowledge they wouldn't mind sharing? I am just recently returned, and using a licensed copy of Cmud 3.34. I followed these, extremely simple I know, instructions and yet I can get nothing to work. I can create basic triggers, aliases etc, but this script is a bit beyond me. I also tried just doing the simple zmud version and nothing happened there as well. I would also love to know how to create health/mana/exhaustion bars.Earth wrote:To use the CMUD version in the initial post of the form, all you have to do do is to save the code into an .xml file. Then from inside the trigger settings, just import the file. Doing so will give you the full functionality of the code available in my library currently.bromen wrote:Earth,
Is it a trigger alias or something else? I have the latest version of Cmud and the only thing I really ever needed was some sort of chat filter so I'm really hoping this can solve a ton of problems for me.
Thanks,
Bromen
Re: CMUD/ZMUD Script Samples
Dread:
Health / Mana / Exhaust:
Health / Mana / Exhaust:
Code: Select all
<class name="Bars" id="9654">
<var name="my_fatigue" id="9655">
<value>extremely alert</value>
<json>extremely alert</json>
</var>
<var name="my_hp" id="9656">
<value>feeling very well</value>
<json>feeling very well</json>
</var>
<var name="value_of_my_hp" id="9657">11</var>
<button type="Gauge" autosize="false" width="240" height="20" autopos="false" left="627" top="-1" color="lime" gaugelowcol="red" gaugebackcol="white" priority="12869" id="9658">
<caption>%upper(@my_hp)</caption>
<expr>@value_of_my_hp</expr>
<gaugemax>11</gaugemax>
<gaugelow>5</gaugelow>
</button>
<trigger type="GMCP" priority="13410" id="9659">
<pattern>Char.Vitals</pattern>
<value>#Class Bars
my_fatigue = {%gmcp.Char.Vitals.Fatigue}
my_hp = {%gmcp.Char.Vitals.Health}
my_mana = {%gmcp.Char.Vitals.Mana}
#switch (@my_hp=="at death's door") {value_of_my_hp=1} (@my_hp=="barely alive") {value_of_my_hp=2} (@my_hp=="terribly hurt") {value_of_my_hp=3} (@my_hp=="in a very bad shape") {value_of_my_hp=4} (@my_hp=="in a bad shape") {value_of_my_hp=5} (@my_hp=="very hurt") {value_of_my_hp=6} (@my_hp=="feeling rather hurt") {value_of_my_hp=7} (@my_hp=="hurt") {value_of_my_hp=8} (@my_hp=="somewhat hurt") {value_of_my_hp=9} (@my_hp=="slightly hurt") {value_of_my_hp=10} (@my_hp=="feeling very well") {value_of_my_hp=11}
;my_hp = %replace(%1,"feeling","")
#switch (@my_mana=="in a vegetable state") {value_of_my_mana=0} (@my_mana=="exhausted") {value_of_my_mana=1} (@my_mana=="worn down") {value_of_my_mana=2} (@my_mana=="indisposed") {value_of_my_mana=3} (@my_mana=="in a bad shape") {value_of_my_mana=4} (@my_mana=="very degraded") {value_of_my_mana=5} (@my_mana=="rather degraded") {value_of_my_mana=6} (@my_mana=="degraded") {value_of_my_mana=7} (@my_mana=="somewhat degraded") {value_of_my_mana=8} (@my_mana=="slightly degraded") {value_of_my_mana=9} (@my_mana=="in full vigour") {value_of_my_mana=10}
;my_mana = %replace(%1,"in","")
#switch (@my_fatigue=="extremely alert") {value_of_my_fatigue=20} (@my_fatigue=="very alert") {value_of_my_fatigue=19} (@my_fatigue=="alert") {value_of_my_fatigue=18} (@my_fatigue=="somewhat alert") {value_of_my_fatigue=17} (@my_fatigue=="slightly alert") {value_of_my_fatigue=16} (@my_fatigue=="slightly weary") {value_of_my_fatigue=15} (@my_fatigue=="somewhat weary") {value_of_my_fatigue=14} (@my_fatigue=="weary") {value_of_my_fatigue=13} (@my_fatigue=="very weary") {value_of_my_fatigue=12} (@my_fatigue=="extremely weary") {value_of_my_fatigue=11} (@my_fatigue=="slightly tired") {value_of_my_fatigue=10} (@my_fatigue=="somewhat tired") {value_of_my_fatigue=9} (@my_fatigue=="tired") {value_of_my_fatigue=8} (@my_fatigue=="very tired") {value_of_my_fatigue=7} (@my_fatigue=="extremely tired") {value_of_my_fatigue=6} (@my_fatigue=="slightly exhausted") {value_of_my_fatigue=5} (@my_fatigue=="somewhat exhausted") {value_of_my_fatigue=4} (@my_fatigue=="exhausted") {value_of_my_fatigue=3} (@my_fatigue=="very exhausted") {value_of_my_fatigue=2} (@my_fatigue=="extremely exhausted") {value_of_my_fatigue=1}
#Class 0</value>
</trigger>
<button type="Gauge" autosize="false" width="240" height="20" autopos="false" left="1110" top="0" color="lime" gaugelowcol="red" gaugebackcol="white" priority="12866" id="9660">
<caption>%upper(@my_fatigue)</caption>
<expr>@value_of_my_fatigue</expr>
<gaugemax>20</gaugemax>
<gaugelow>6</gaugelow>
</button>
<var name="my_mana" id="9664">
<value>in a bad shape</value>
<json>in full vigour</json>
</var>
<var name="value_of_my_mana" id="9665">4</var>
<var name="value_of_my_fatigue" id="9666">20</var>
<button type="Gauge" autosize="false" width="242" height="20" color="aqua" gaugelowcol="red" gaugebackcol="#F0F0F0" priority="12872" id="9667">
<caption>%upper(@my_mana)</caption>
<expr>@value_of_my_mana</expr>
<gaugemax>10</gaugemax>
<gaugelow>4</gaugelow>
</button>
</class>
Flee you fools!
Re: CMUD/ZMUD Script Samples
Thank you very much Icarus!
I copied that code, pasted it into notepad++, saved it as xml and then imported it into Cmud. It worked great! I did the same thing with Earth's code and it does nothing
however. Is there another step I need to do there?
I copied that code, pasted it into notepad++, saved it as xml and then imported it into Cmud. It worked great! I did the same thing with Earth's code and it does nothing
however. Is there another step I need to do there?
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/