Author |
Message |
Topic: Gagging double spam in Cmud |
shalimar
Replies: 2
Views: 116
|
Forum: CMUD General Discussion Posted: Tue Apr 01, 2025 2:39 pm Subject: Gagging double spam in Cmud |
#TR {^>> } {#CAPTURE Familiar;#GAG}
That should redirect the familiar content to another window. |
Topic: Help upgrading 1997 zMud maps |
shalimar
Replies: 1
Views: 188
|
Forum: CMUD General Discussion Posted: Wed Mar 19, 2025 11:19 am Subject: Help upgrading 1997 zMud maps |
there is a map conversion tool for this very purpose [url="http://forums.zuggsoft.com/forums/viewtopic.php?p=153634#153634"]pinned in the CMUD beta section |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 5:20 pm Subject: time formatting not working? |
No, i had left another typo in |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 10:57 am Subject: time formatting not working? |
Yea, I was half asleep, i made a few errors
#LOCAL $time
$tot=(%2/@gxprd)
$cur=$tot
#while $cur {#SWITCH ($cur>86400) {
$days=($cur/86400)
$cur=%mo ... |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 2:40 am Subject: time formatting not working? |
This is a better version that prevents erroneous displays, the original is not properly error checking:
#LOCAL $time
$tot=$cur=(%2/@gxprd)
#while $cur {#SWITCH ($cur)
( ... |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 2:07 am Subject: time formatting not working? |
#LOCAL $time
$tot=(%2/@gxprd)
$days=($tot/86400)
#IF ($days) {
$tot=%mod($tot, 86400)
$time=%concat($days, "d")
}
$hours=($ ... |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 1:46 am Subject: time formatting not working? |
Instead of defining gpxtime as 0 at the start, use the #LOCAL command to declare it with a null value
#LOCAL $gpxTime
this is the preferred method when you just need the variable to exist before ... |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 12:40 am Subject: time formatting not working? |
Instead of cycling things through %string perhaps just use %concat?
$gxptime=%concat($gxpdays, "d ", $gxphours, "h ", "etc", "etc")
and what's with all the 0+ before the function call?
Unneces ... |
Topic: time formatting not working? |
shalimar
Replies: 11
Views: 537
|
Forum: CMUD General Discussion Posted: Mon Mar 17, 2025 12:35 am Subject: time formatting not working? |
pattern might help |
Topic: creating a new database part7 XD |
shalimar
Replies: 6
Views: 375
|
Forum: CMUD General Discussion Posted: Sun Mar 16, 2025 7:57 pm Subject: creating a new database part7 XD |
as for how to best phrase the break points:
#SWITCH ($count<50) {this}
($count<100) {that}
($count<200) {hey now}
{someo ... |
Topic: creating a new database part7 XD |
shalimar
Replies: 6
Views: 375
|
Forum: CMUD General Discussion Posted: Sun Mar 16, 2025 7:32 pm Subject: creating a new database part7 XD |
Though depending on how much info you plan on keeping about people, you might wanna nest it better:
$name=%1
$this=%db(@charData, $name)
$count=%db($this, "timesTapped")
$count=($count+1)
#ADDK ... |
Topic: creating a new database part7 XD |
shalimar
Replies: 6
Views: 375
|
Forum: CMUD General Discussion Posted: Sun Mar 16, 2025 7:14 pm Subject: creating a new database part7 XD |
If you are looking to only allow certain names to work, you can whitelist it via the pattern instead of checking after the fact
#TR {({name1|name2|name3}) taps you on the shoulder.} {stuff}
#TR {( ... |
Topic: creating a new database part7 XD |
shalimar
Replies: 6
Views: 375
|
Forum: CMUD General Discussion Posted: Sun Mar 16, 2025 6:46 pm Subject: creating a new database part7 XD |
$name=%1
$count=%db(timeTaps, $name)
$count=($count+1)
#ADDKEY timeTaps $name $count
then you can reference any given person with @timeTaps.name |
Topic: MXP Breaks causes permanent underscores |
shalimar
Replies: 6
Views: 447
|
Forum: CMUD General Discussion Posted: Thu Mar 13, 2025 6:20 pm Subject: MXP Breaks causes permanent underscores |
I'm not sure.
But if the MUD is sending bad tags you are likely gonna have a lot more issues. |
Topic: MXP Breaks causes permanent underscores |
shalimar
Replies: 6
Views: 447
|
Forum: CMUD General Discussion Posted: Mon Mar 10, 2025 8:02 pm Subject: MXP Breaks causes permanent underscores |
you have your closing tags in the wrong order, any nested tags need to be fully inside the parent tags
you can use the #CLR command to blank out the window
also, restarting CMUD is a common fix to ... |
Topic: MXP Breaks causes permanent underscores |
shalimar
Replies: 6
Views: 447
|
Forum: CMUD General Discussion Posted: Mon Mar 10, 2025 3:43 pm Subject: MXP Breaks causes permanent underscores |
I suspect part of this might be that the command seems incomplete. The lack of a closing tag implies that this rule is for all further text.
Might be some incorrect variable references too if I can p ... |
Topic: command-line editing of advanced window properties |
shalimar
Replies: 1
Views: 207
|
Forum: CMUD General Discussion Posted: Sat Mar 08, 2025 2:42 pm Subject: command-line editing of advanced window properties |
Some things were never intended to be done from the command line in CMUD.
However, you could manage that via an XML import, but it would still have to be initiated by the end user. |
Topic: Gauges |
shalimar
Replies: 3
Views: 2387
|
Forum: CMUD General Discussion Posted: Sat Feb 22, 2025 12:49 pm Subject: Gauges |
No, it can distinguish from a prompt and a standard line by the lack of crlf (carriage return, line feed)
Well, i presume thats how it knows, could be another way |
Topic: Guage problems |
shalimar
Replies: 6
Views: 914
|
Forum: CMUD General Discussion Posted: Sat Feb 08, 2025 12:35 pm Subject: Guage problems |
Right, I understand what you mean.
I use the same setup for one of my gauge packages, only I don't include the /max in my caption.
Given that the caption does get evaluated, this might be the sourc ... |
Topic: Guage problems |
shalimar
Replies: 6
Views: 914
|
Forum: CMUD General Discussion Posted: Fri Feb 07, 2025 12:08 pm Subject: Guage problems |
I have never had lock up issues over a gauge in a shared package having variables in the default package.
I just make sure that any triggers that populate the variables are also in the shared package ... |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 1634
|
Forum: CMUD General Discussion Posted: Mon Dec 30, 2024 12:41 am Subject: Words to numbers building a function or db? |
You can assign the value to another variable just like always.
var=@w2n(string)
P.S. #SUB is supposed to substitute the text |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 1634
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 8:34 pm Subject: Words to numbers building a function or db? |
I made it even smaller and turned it into a package in the library, fun little thought experiment.
String to Number
under Utility |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 1634
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 7:23 pm Subject: Words to numbers building a function or db? |
I just had to keep going over my own code...
Good luck finding a valid positive integer in string form from actual gameplay that breaks it.
<func name="w2n" id="52692">
... |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 1634
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 5:21 pm Subject: Words to numbers building a function or db? |
#TR {are ([%w -]) runes invoking} {#SUB {are @w2n(%1) runes invoking}} |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 1634
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 1:47 pm Subject: Words to numbers building a function or db? |
I went through the trouble of making it into a fully fledged function
<func name="w2n" id="52692">
<value>#LOCAL $total
$numStr = %replace( $numStr, " t ... |
|