help me . No work, no calculation

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

Moderator: Moderators

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

help me . No work, no calculation

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

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

Re: help me . No work, no calculation

#2 Post by rjl1989 »

How to convert numbers to calculate?

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

Re: help me . No work, no calculation

#3 Post 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

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

Post Reply