help me macro Addition and subtraction

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
rjl1989
Noob
Noob
Posts: 8
Joined: 03 Apr 2019, 11:40
Noob?: Yes

help me macro Addition and subtraction

#1 Post 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
}
}

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: help me macro Addition and subtraction

#2 Post by fadreus »


iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

rjl1989
Noob
Noob
Posts: 8
Joined: 03 Apr 2019, 11:40
Noob?: Yes

Re: help me macro Addition and subtraction

#3 Post by rjl1989 »

automacro haha {
console /反外挂验证人员#2: (.*) (.*) (.*)/
call {

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

rjl1989
Noob
Noob
Posts: 8
Joined: 03 Apr 2019, 11:40
Noob?: Yes

Re: help me macro Addition and subtraction

#4 Post by rjl1989 »




How do I write this grammar?

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: help me macro Addition and subtraction

#5 Post 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.

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

Post Reply