Page 1 of 1

help me . No work, no calculation

Posted: 03 Apr 2019, 21:42
by rjl1989
No work, no calculation

反外挂验证人员#2: 5 + 2 〓 ( ? )
反外挂验证人员#2: 5 + 2 〓 ( ? )
反外挂验证人员#2: 12 - 6 〓 ( ? )
反外挂验证人员#2: 12 - 6 〓 ( ? )


It's not a number, it's not computational.



automacro haha {
console /反外挂验证人员#2: (\d+) (\D) (\d+)/
call {
do p $.lastMatch1
do p $.lastMatch2
do p $.lastMatch3
$num1 = $.lastMatch1
$num2 = $.lastMatch2
$num3 = $.lastMatch3
do p @eval($num1$num2$num3).
}
}

Re: help me . No work, no calculation

Posted: 03 Apr 2019, 21:43
by rjl1989
How to convert numbers to calculate?

Re: help me . No work, no calculation

Posted: 04 Apr 2019, 03:15
by fadreus
http://forums.openkore.com/viewtopic.ph ... 40#p281640
c4c1n6kr3m1 wrote: ex:

console /Red Flame Compass.*: (\d+) + (\d+)/
or
console /Red Flame Compass.*: (\d+) (?:\+) (\d+)/

catch with ()
if start with this (?:) , will not catch

in macro, result for both is @eval($.lastMatch1+$.lastMatch2)

\d is number
\. is single dot
. is any single character
.* is hmmm try read somewhere else
try read perl regex
http://jkorpela.fi/perl/regexp.html
or google
c4c1n6kr3m1 wrote:try edit this

Code: Select all

console /110002250: .*?(\d+)/
or this

Code: Select all

console /\[npc\] Unknown #110002250: .*?(\d+)/
you need to escape special metacharacters with \
but i forget the list :D
just google it, i don't know why i got redirected to ip4.google , that F* chaptcha