|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Mar 22, 2007 10:32 pm
psubs |
My psubs have all been screwing up pretty badly, i converted these patterns over from zmud to what is a cmud format, does anyone know why this would results in lines looking like this:
. o O ( HP:788/788 SP:86/938 Con:Wavering(9/19) En:None ) Wavering(9/19)
. o O (Gxp:Exemplaproficient(8/18623.00 )icient Fort:769/769 Bl 0.00 (Off) Br:0) O o .
or sometimes
. o O ( HP:788/788 SP:895/938 Con:Mediocre(10/19) En:A Very(Hurt) ) O o .. o O (Gxp:Very Hproficient(8/20281.00)ficient Fort:766/769 Bl 0.00 (Off) Br:9) O o .
You get hit
You get hit
Psionic prevention: You deftly dodge the attack! Mediocre(10/19)
Mob misses you
as compared to what i want:
. o O ( HP:788/788 SP:82/938 Con:Wavering(9/19) En:Young (Tortured) ) O o .
. o O (Gxp:Exemplary Cl:proficient(8/18668.00 )766/769 Bl 0.00 (Off) Br:0) O o .
the patterns for the first line look like:
~. ~o ~O ~( HP~:&hpcur~/&hpmax SP~:&spcur~/&spmax Con~:&control En~:(&ename)~(&ehealth~)(*)~) ~O ~o ~.
with psubs of
#psub {%5~(@controllvl~/%numitems( @controllist)~)} %x5
and the second:
~. ~o ~O ~(Gxp~:&gxprate Cl~:&clvl Fort~:&fortitude/&fortmax ®enrate &overload ~(&ostatus~) Br~:&broodcount~) ~O ~o ~.
with psubs of
#if (@receptive = 1) {#psub {@clvl~(%ismember(@clvl,@clvllist)~/%ansi(cyan,high)@dgxp %ansi(green)~)} %x2}
#if (@receptive = 0) {#psub {@clvl~(%ismember(@clvl,@clvllist)~/%ansi(red)@dgxp %ansi(green)~)} %x2}
another thing i will just throw in here as well, i had a gxp counter to see what was getting me the best gxp, my old pattern was
#var drate %replace(@gxprate,"")
#add rate.@{drate} 1
i tried making it
#add rate.@drate 1 but no luck, i want it to increment like rate.great 1, rate.good 1, so when i type #var rate i see great476good43, ect |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Mar 23, 2007 1:24 am |
#PSUB has a bug in it (or if not that is being royally hammered by whatever code has that bug) where you are basically limited to just one #PSUB in the entire code of the setting in question (one per #TRIGGER, one per #CONDITION, etc). You will have to go with #SUBSTITUTE instead.
Quote: |
#add rate.@{drate} 1
|
CMud (nor ZMud, actually) doesn't support variable key fields in the format like you attempt above (which is probably either a minor bug or me not being as familiar with CMud, since @variable.%gsl() does work). To do what you want you can use #ADDKEY, but since #ADDKEY is not a math command you will need to use %eval() and %db() to handle the math:
#ADDKEY rate @drate %eval(%db(@rate,@drate) + 1) |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Fri Mar 23, 2007 1:41 am |
nothing makes me happier than seeing matt respond to one of my questions :). thanks, i think that psub bug has been around for ages, however now i can't even quote out my old psubs with it still working or use a #if {} {} format to try and preserve them. oh yeah i just did a #var rate.@drate %eval(@rate.@drate+1) to solve it
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri Mar 23, 2007 2:59 am |
Quote: |
#add rate.@{drate} 1 |
I am not sure if this would work correctly but cmud currently has a bug with #ADD db.var syntax
There are also bugs currently with PSUB, Also in Zmud it was possible to have 3+ PSUBS per line |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Mar 23, 2007 5:46 pm |
MattLofton wrote: |
...either a minor bug or me not being as familiar with CMud, since @variable.%gsl() does work |
It's likely that the @{} syntax will work there. So @{var.%gsl()} will work fine. Doesn't work with commands, only with variable references, but work it should. |
|
|
|
|
|