Page 1 of 1

help me macro Addition and subtraction

Posted: 03 Apr 2019, 12:20
by rjl1989
反外挂验证人员#2: 12 - 6 〓 ( ? )
反外挂验证人员#2: 输入 'talk num <nomer #>' 指定对话内容.
NPC 反外挂验证人员#2 (0): 输入 'talk num <nomer #>' 指定对话内容.
talk num 12
反外挂验证人员#2: - 对不起,您验证出错.
NPC 反外挂验证人员#2 (0): 输入 'talk cont' 继续对话
反外挂验证人员#2: [ 反外挂剩余 2 次验证机会]
反外挂验证人员#2: - 您还剩余 1分15秒验证时间。
反外挂验证人员#2: 防止挂机,请用数字完成验证.
反外挂验证人员#2: 5 + 2 〓 ( ? )
反外挂验证人员#2: 输入 'talk num <nomer #>'

********************************************************************************************************************************
automacro {
console /What is the sum of (\d+) (?:\+) (\d+)/
call {
$num1 = $.lastMatch1
$num2 = $.lastMatch2
$num3= $.lastMatch3
$result = @eval($num1 $num2 $num2)

do num $result
}
}

Re: help me macro Addition and subtraction

Posted: 03 Apr 2019, 15:19
by fadreus

Re: help me macro Addition and subtraction

Posted: 03 Apr 2019, 15:54
by rjl1989
automacro haha {
console /反外挂验证人员#2: (.*) (.*) (.*)/
call {

do c @eval($.lastMatch1$.lastMatch2$.lastMatch3)
}
}

Re: help me macro Addition and subtraction

Posted: 03 Apr 2019, 15:54
by rjl1989



How do I write this grammar?

Re: help me macro Addition and subtraction

Posted: 04 Apr 2019, 03:13
by fadreus
Could you do some favor?
Stick to 1 thread, would you?

Do you chat with someone using 2 phones with the same person on the same topic?
If no, then don't use 2 thread asking for the same thing.