Author |
Message |
Topic: Guage problems |
shalimar
Replies: 5
Views: 117
|
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: 5
Views: 117
|
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: 712
|
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: 712
|
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: 712
|
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: 712
|
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: 712
|
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 ... |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 712
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 1:28 pm Subject: Words to numbers building a function or db? |
Nope, %replace ignores word boundaries, so it's just a matter of replacing things in the right order.
For instance, i don't strip out the spaces in my example until after all the cases that require a ... |
Topic: Words to numbers building a function or db? |
shalimar
Replies: 9
Views: 712
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 12:19 pm Subject: Words to numbers building a function or db? |
There is no current function built that I know of, but we could build one.
$numStr = "four hundred thousand four hundred twenty four"
$numStr = %replace($numStr, "twenty", 20)
$numStr = %replac ... |
Topic: How does #MATH works? |
shalimar
Replies: 20
Views: 4384
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 2:05 am Subject: How does #MATH works? |
Not a problem!
It makes sense if you think about it.
Commas aren't actually a part of the number, it's just grammatical indexing to make it easier for humans to read. |
Topic: How does #MATH works? |
shalimar
Replies: 20
Views: 4384
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 12:19 am Subject: How does #MATH works? |
#SAY %int("72,316")
0
#SAY %int(72,316)
72
It's an issue of garbage in, garbage out.
I suppose it should know how to handle commas, but it sees those as a separator between parameters. |
Topic: How does #MATH works? |
shalimar
Replies: 20
Views: 4384
|
Forum: CMUD General Discussion Posted: Sun Dec 29, 2024 12:16 am Subject: How does #MATH works? |
It should be returning the integer value of x, if you are getting 0 its because your variable evaluates to 0
Try:
bladesinger.tgxp=%int(%replace(%1, ",")) |
Topic: #add is acting weird |
shalimar
Replies: 2
Views: 328
|
Forum: CMUD General Discussion Posted: Sat Dec 28, 2024 5:15 pm Subject: #add is acting weird |
#MATH is defunct, as mentioned in the other thread.
All of its associated commands are only retained for backwards compatibility.
For best results, make use of direct declarations with formulae
... |
Topic: How does #MATH works? |
shalimar
Replies: 20
Views: 4384
|
Forum: CMUD General Discussion Posted: Sat Dec 28, 2024 4:39 pm Subject: How does #MATH works? |
$total=%int(%db(@bladesinger, tgxp))
$current=%int(%db(@bladesinger, gxplr))
$total=($total+$current)
#ADDKEY bladesinger tgxp %int($total)
The third %int there is likely unnecessary, but code d ... |
Topic: How does #MATH works? |
shalimar
Replies: 20
Views: 4384
|
Forum: CMUD General Discussion Posted: Sat Dec 28, 2024 4:32 pm Subject: How does #MATH works? |
You are showing me the raw prompt, I assume you are having trouble constructing the pattern?
You need to quote out the literal parenthesis with a tilde, and then use parenthesis and wildcards to ca ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Tue Dec 24, 2024 7:57 pm Subject: Help with a capture |
if you only really care about two of the damage types, i would just only store data on thoses two $names, then the existing syntax still applies
rather than the exclude method (a blacklist) lets tr ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 9:28 pm Subject: Help with a capture |
$low=%item(%sort(%dbkeys(@mobDefenses)),1)
//gets the lowest value key
$list=%db(@mobDefenses, $low)
//gets the list associated with that key
$excludeList="this|that|the other"
#FORALL $excludeLi ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 8:31 pm Subject: Help with a capture |
You are quite alright, just part of the process.
However, if mine isn't working, i don't need to see mine again, I need to see how you edited yours to get good results.
Remove as many of the #SHOW ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 8:08 pm Subject: Help with a capture |
I didn't see you post any other full triggers
But the output you show is more than a single line worth of capture.
So im not sure what you are currently working with that is giving you effective ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 7:56 pm Subject: Help with a capture |
Oh so you are looking for the lowest of either bars or dots?
That requires a different structuring to track both stats instead of just the disparity. |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 7:47 pm Subject: Help with a capture |
it might be the ~ in front of the :, not sure why that got in there
its also possible that all the #SHOWs and #PRINTs from your trigger are throwing mine off, im not using loop lines, but resetting ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 7:04 pm Subject: Help with a capture |
I swapped things up a bit with the dbVar orginization and updated your trigger with all three states:
<trigger name="moo" priority="36" regex="true" id="52677& ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 6:29 pm Subject: Help with a capture |
If $name are the potential damage types, you would want to construct a variable database
#ADDKEY mobDefenses $name $diff
(this variable should be reset in the first state (0) to a null value)
m ... |
Topic: Help with a capture |
shalimar
Replies: 17
Views: 1231
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 5:57 pm Subject: Help with a capture |
I would try changing your pattern to be more explicit
<trigger priority="526790" repeat="true" id="52679">
<pattern>(%w):%s~[([| ... |
Topic: [BUG] v3.34 Error Opening pcre810.dll library |
shalimar
Replies: 10
Views: 29112
|
Forum: CMUD General Discussion Posted: Sun Dec 22, 2024 12:28 pm Subject: [BUG] v3.34 Error Opening pcre810.dll library |
There really isn't anything else to do.
It's a local issue with your Windows.
You could try reinstalling CMUD and hope a fresh copy of the dll loads better.
If you do, make sure to run it as an a ... |
|