 |
chris123zugg Adept
Joined: 23 Aug 2013 Posts: 222
|
Posted: Sun Apr 27, 2025 7:16 pm
New data capture, line item changes, need help please |
| Code: |
<+>========================================================================<+>
| Form Lvl Next Pt | Form Lvl Next Pt |
|------------------------------------+-------------------------------------|
| Anaconda 30+ | Loon 27 84.65% |
| Ant 0 102.00% | Recluse 30+ |
| Asp Caterpillar 7+ 14.23% | Slime 7+ 69.12% |
| Bombardier Beetle 4 79.20% | Toad 26+ 91.81% |
| Carcharodontosaurus 2 17.60% | Tortoise 22+ 7.70% |
| Decollate Snail 4 2.40% | Trap Door 4 99.60% |
| Firefly 0+ 12.12% | Trilobite 13+ 53.37% |
| Flying Squirrel 4 6.00% | Tyrannosaurus Rex 30+ |
| Human 3 59.20% | Vampire Bat 6 37.42% |
| Kitten 4+ 33.45% | Wandering 30+ |
<+>======================== Available Points: 2 ===========================<+>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="2314" repeat="true" copy="yes">
<pattern>%sForm%sLvl%sNext%sPt</pattern>
<value>//Form Lvl Next Pt
#print works for form hook</value>
<trigger type="Loop Pattern" param="20" repeat="true">
<pattern>%s(%w)%s([0-9+])%s([0-9.])~%</pattern>
<value>//Loon 27 84.65%
#print %1 %2 %3
changeling.form=%1
changeling.forml=%3
#IF (%2 = "+") {#IF (@changeling.forms=%1) {changeling.forml = %2}}
</value>
</trigger>
</trigger>
</cmud>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="2314" repeat="true" copy="yes">
<pattern>%sForm%sLvl%sNext%sPt</pattern>
<value>//Form Lvl Next Pt
#print works for form hook</value>
<trigger type="Loop Pattern" param="20" repeat="true">
<pattern>%s(%w)%s([0-9+])</pattern>
<value>//Loon 27 84.65%
#print %1 %2
changeling.form=%1
#IF (%2 = "30+") {#print form %1 maxed;changeling.forml=%2}
</value>
</trigger>
</trigger>
</cmud>
|
sooo yeah, im attempting to change a button when i set the name to match one of the above patterns, ie: formset loon would then change changeling.form to loon, then when i
look at the capture it should change the name/form% and if it matches the name and has a + should change it to that instead of the "number" to the "number+" one.
i believe its just rewriting the changeling.form per each capture it finds, but the formp is also changed..
secondary problem is i am unsure the best way to capture the 2 word lines and also have 1 or 2 digits to catch.
i need a way to basically cpature all this into a database then set the form name, and it show the correct form number for it, but if it has a + to change it to that number instead on the button ive created :)
shalimar i think you helped me with a similar creation before but not with these settings, so whomever wants to i'd appreciate any help!
'thanks again.:P |
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4801 Location: Pensacola, FL, USA
|
Posted: Mon Apr 28, 2025 1:16 am |
Unless you have a table with a similar output, you might be able to simplify to a single trigger state
| Code: |
<trigger priority="544960" repeat="true" id="54496">
<pattern>([%w%s])%s(%d{|+})%s({|%d.%d})</pattern>
<value>$form=%trim(%1)
$lvl=%2
$nxt=%3</value>
</trigger> |
|
|
|
|
 |
chris123zugg Adept
Joined: 23 Aug 2013 Posts: 222
|
Posted: Wed Apr 30, 2025 9:15 pm |
that worked but is too ghreedy and goes after any combination of that pattern, i need it to work within the original hook to stop there.
|
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4801 Location: Pensacola, FL, USA
|
Posted: Thu May 01, 2025 3:15 am |
Could just toss the pipes back in as literal characters, might need to escape them out ~|
|
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4801 Location: Pensacola, FL, USA
|
Posted: Thu May 01, 2025 4:05 am |
or give it an ID and toggle it on and off as needed with
#T+ ID
#T- ID |
|
|
|
 |
chris123zugg Adept
Joined: 23 Aug 2013 Posts: 222
|
Posted: Sat Jul 11, 2026 4:36 pm |
Trying to revisit this a sec:
What about a way to count how many there and then add that all to a dbvar?
then the list is populated with % etc and i can then use that dbvar to spit out a name/%/etc? |
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4801 Location: Pensacola, FL, USA
|
Posted: Mon Jul 13, 2026 12:47 pm |
Well, you need a pattern to capture the whats before you can start counting them, and the range delimiter wildcard will be handy here.
| Code: |
#TR {~|([%w%s])([%d+])([*~|])~|} {
$name=%trim(%1)
$lvl=%2
$perc=%trim(%3)
#PRINT $name at $lvl needs $perc
} |
If this starts spitting things out, then you need to check the repeat within line option so it gets each column
Then we can get rid of the print line and have it start working the dbVar |
|
|
|
 |
|
|
|