I am starting to build my own trigger set, but I am struck with the first trigger.
I use to log my status , i.e hp or mp, as variables and it is kind of core to my trigger set
And in my mud the HP status look something like this. (some chinese characters ahead)
Code: Select all
氣 : 8540/ 8540 (100%) 內力: 15000 / 15000 (+0)
**you can consider 氣 as hp, 內力 as mp
Code: Select all
氣%s:%s(%d)%s/%s(%d)%s~((%d)~%~)%s內力%s:%s(%d)%s/%s(%d)%s~(~+(%d)~)
I couldn't do that in Mudlet tho, I have already read the wiki and manual. From there I learnt I can use Perl Regex to log variables
So I convert my trigger pattern like this:
Code: Select all
氣(.*):(.*)(\d+)(.*)/(.*)(\d+)(.*)((\d+)%)(.*)內力(.*):(.*)(\d+)(.*)/(.*)(\d+)(.*)([+](\d+)(.*))
Code: Select all
"氣 : 8540/ 8540 (100%) 內力: 15000 / 15000 (+0)",
" ",
" 854",
"0",
"",
" 8540 (1",
"0",
"",
"0%",
"0",
") ",
"",
" 1500",
"0",
" ",
" 1500",
"0",
" (",
"+0)",
"0",
")"
How should I log my status properly?
Many thanks.