|
Upow Newbie
Joined: 07 Feb 2016 Posts: 5
|
Posted: Sat Jul 09, 2022 6:29 pm
New to scripting with zmud/cmud and I cant figure out how to grab a variable |
like I said I'm new to this and it's all pretty complicated for me sadly. I'm trying to figure out how to grab a number in this example.
(2) The corpse of a commoner lies here rotting.
I want to grab the 2 inside () so I can add the counter to a corpse checker
I figured it would work with %d but I'm not sure what the line would look like |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sat Jul 09, 2022 10:25 pm |
There is a helper for this very thing built into CMUD.
If you make a new trigger via the settings editor, switch to the pattern tab and enter the raw text into the line marked Text.
But in this example it would be:
#TR {~((%d)~) The corpse of a (*) lies here rotting.} {do something} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|