Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Upow
Newbie


Joined: 07 Feb 2016
Posts: 3

PostPosted: 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
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4550
Location: Pensacola, FL, USA

PostPosted: 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: Shalimar#3679
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net