Openkore.com

OpenKore Forums
It is currently 11 Dec 2018, 08:21

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 432 posts ]  Go to page Previous  1 ... 40, 41, 42, 43, 44  Next
Author Message
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 16 Nov 2018, 04:54 
Offline
Human
Human

Joined: 02 Aug 2009, 13:00
Posts: 22
is there a way to make openkore console show the color code without using the plugin?
I tried to modify the receivie.pm and disabled remove color code link and still not working.


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 17 Nov 2018, 00:06 
Offline
Been there done that!
Been there done that!

Joined: 24 Mar 2012, 04:13
Posts: 129
useColors 1 inside your config block

https://github.com/OpenKore/openkore/bl ... README.txt


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 18 Nov 2018, 04:11 
Offline
Noob
Noob
User avatar

Joined: 08 Oct 2018, 15:54
Posts: 16
Location: Kuala Lumpur,Malaysia
headlesscarmen wrote:
Hi, i seems to having problem determining addition and subtraction for my code.

Console log
Quote:
Code:
You are now: state: Frozen
Welcome to Rise Ragnarok! Enjoy! Please report any bugs you find.
Map Change: morocc.gat (157, 92)
You have new unread rodex mails.
Packet Parser: Unknown switch: 097B
Unknown #110065841: [ Anti BOT System ]
[reactOnNPC] NPC message saved (0): "[ Anti BOT System ]".
Unknown #110065841: If A = 87   B = 3
[reactOnNPC] NPC message saved (1): "If A = 87   B = 3".
Unknown #110065841: How many is A + B ?
[reactOnNPC] NPC message saved (2): "How many is A + B ?".
[reactOnNPC] onNPCAction type is: number.
[reactOnNPC] Conditions for reactOnNPC_0 (npc:number , rect:number) is met.
[reactOnNPC] Matching [msg (0)] [color=#0000FF]"[ Anti BOT System ]" to "/[ Anti BOT System ]/" ... regexp ok.
[reactOnNPC] Matching [msg (1)] "If A = 87   B = 3" to "/If A = (\d+)\s+B = (\d+)/" ... regexp ok.
[reactOnNPC] Matching [msg (2)] "How many is A + B ?" to "/How many is A (.) B ?/" ... regexp ok.
[reactOnNPC] React to NPC with delay. Execute command "talk num 87" after 5 seconds.[/color]
itself: Type 'talk num <number #>' to input a number.
[reactOnNPC] Reacting to NPC. Executing command "talk num 87".
Unknown #110065841: ------------------------
[reactOnNPC] NPC message saved (0): "------------------------".
Unknown #110065841: Wrong
[reactOnNPC] NPC message saved (1): "Wrong".
Incoming data left in the buffer:


my reactOnNPC code
Code:
reactOnNPC_debug 1
reactOnNPC talk num @eval(#0~1 #1~1 #0~2) {
type number
useColors 1
delay 5
msg_0 /[ Anti BOT System ]/
msg_1 /If A = (\d+)\s+B = (\d+)/
msg_2 /How many is A (.) B ?/
}


it register/matching well but it seems i failed at the most important step, the math it self.Any help is much appericiated.


anyone has a solution, for 3 days im dreading this.haha


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 18 Nov 2018, 23:48 
Offline
Human
Human

Joined: 02 Aug 2009, 13:00
Posts: 22
Someone please help with this debug

screenshot
https://gyazo.com/00073060b69516e3939e85271925e7e1

Code:
debug info

[Nov 19 01:03:09 2018.16] [reactOnNPC] NPC message saved (0): "[ 验证提示 ] : ".
[Nov 19 01:03:09 2018.19] [reactOnNPC] NPC message saved (1): "你已经累积打怪数量达到[5000]只,根据规定现在开始进行验证!!".
[Nov 19 01:03:09 2018.23] [reactOnNPC] NPC message saved (2): "总共有[^0000FF3^000000]次机会进行验证,现在进行第[^FF00001^000000]次验证!!".
[Nov 19 01:03:09 2018.25] [reactOnNPC] onNPCAction type is: continue.
[Nov 19 01:03:09 2018.27] [reactOnNPC] Conditions for reactOnNPC_0 (npc:continue, rect:number) 'type' not met.
[Nov 19 01:03:09 2018.28] : 输入 'talk cont' 继续对话
[Nov 19 01:03:09 2018.91] You are no longer: Action Delay
[Nov 19 01:03:10 2018.65] [reactOnNPC] NPC message saved (0): "请输入^0000FF此颜色^000000的一组验证码!!".
[Nov 19 01:03:10 2018.77] [reactOnNPC] NPC message saved (1): "^FF0000验证码:[ 5766 ]^000000".
[Nov 19 01:03:10 2018.83] [reactOnNPC] NPC message saved (2): "^0000FF验证码:[ 9964 ]^000000".
[Nov 19 01:03:10 2018.87] [reactOnNPC] NPC message saved (3): "^00FF00验证码:[ 1131 ]^000000".
[Nov 19 01:03:10 2018.92] [reactOnNPC] NPC message saved (4): "^D02090验证码:[ 8367 ]^000000".
[Nov 19 01:03:10 2018.94] [reactOnNPC] onNPCAction type is: number.
[Nov 19 01:03:10 2018.97] [reactOnNPC] Conditions for reactOnNPC_0 (npc:number , rect:number) is met.
[Nov 19 01:03:10 2018.99] [reactOnNPC] Matching [msg (0)] "请输入^0000FF此颜色^000000的一组验证码!!" to "/请输入(\^[0-9a-fA-F]{6})此颜色/" ... regexp ok.
[Nov 19 01:03:11 2018.15] [reactOnNPC] Matching [msg (1)] "^FF0000验证码:[ 5766 ]^000000" to "/(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/" ... regexp ok.
[Nov 19 01:03:11 2018.38] [reactOnNPC] Matching [msg (2)] "^0000FF验证码:[ 9964 ]^000000" to "/(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/" ... regexp ok.
[Nov 19 01:03:11 2018.61] [reactOnNPC] Matching [msg (3)] "^00FF00验证码:[ 1131 ]^000000" to "/(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/" ... regexp ok.
[Nov 19 01:03:11 2018.85] [reactOnNPC] Matching [msg (4)] "^D02090验证码:[ 8367 ]^000000" to "/(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/" ... regexp ok.
[Nov 19 01:03:11 2018.12] [reactOnNPC] React to NPC with delay. Execute command "talk num 0" after 5 seconds.
[Nov 19 01:03:11 2018.14] itself: 输入 'talk num <nomer #>' 指定对话内容.
[Nov 19 01:03:16 2018.37] [reactOnNPC] Reacting to NPC. Executing command "talk num 0".
[Nov 19 01:03:16 2018.16] Unknown #110025506: 你输入的验证码为[ 1000 ]!!
[Nov 19 01:03:16 2018.23] [reactOnNPC] NPC message saved (0): "你输入的验证码为[ 1000 ]!!".
[Nov 19 01:03:16 2018.30] Unknown #110025506: 对不起,验证码输入错误!!
[Nov 19 01:03:16 2018.34] [reactOnNPC] NPC message saved (1): "^FF0000对不起,验证码输入错误!!^000000".



My Script
reactOnNPC talk num @eval(my $color1 = #1~1;my $color2 = #2~1;my $color3 = #3~1;my $color4 = #4~1;my $num1 = #1~2;my $num2 = #2~2;my $num3 = #3~2;my $num4 = #4~2;my $output = 0;if ($color1 eq '#0-1'@) {$output = $num1;}if ($color2 eq '#0-1'@) {$output = $num2;}if ($color3 eq '#0-1'@) {$output = $num3;}if ($color4 eq '#0-1'@) {$output = $num4;}return $output;) {
   type number
   useColors 1
   delay 5
   msg_0 /请输入(\^[0-9a-fA-F]{6})此颜色/
   msg_1 /(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_2 /(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_3 /(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_4 /(\^[0-9a-fA-F]{6})验证码:\[ (\d+) \]/
}


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 18 Nov 2018, 23:50 
Offline
Human
Human

Joined: 02 Aug 2009, 13:00
Posts: 22
try put \ before +

Code:
reactOnNPC_debug 1
reactOnNPC talk num @eval(#0~1 #1~1 #0~2) {
type number
useColors 1
delay 5
msg_0 /[ Anti BOT System ]/
msg_1 /If A = (\d+)\s\+B = (\d+)/
msg_2 /How many is A (.) B ?/
}


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 19 Nov 2018, 01:49 
Offline
Been there done that!
Been there done that!

Joined: 24 Mar 2012, 04:13
Posts: 129
i never play ps
:heh

headlesscarmen wrote:

Code:
reactOnNPC_debug 1
reactOnNPC talk num @eval(my $number1 = '#1~1';my $number2 = '#1~2';return $number1 + $number2) {
type number
useColors 1
delay 5
msg_0 /\[ Anti BOT System \]/
msg_1 /If A = (\d+)\s+B = (\d+)/
msg_2 /How many is A \+ B ?/
}


or reactOnNPC talk num @eval(#1~1 + #1~2) {




or read the readme.txt inside your plugin
there is an example similar with yours


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 19 Nov 2018, 09:57 
Offline
Human
Human

Joined: 02 Aug 2009, 13:00
Posts: 22
problem soloved
here is the fix

Code:
reactOnNPC talk num @eval(my $color1 = '#1~1';my $color2 = '#2~1';my $color3 = '#3~1';my $color4 = '#4~1';my $number1 = #1~2;my $number2 = #2~2;my $number3 = #3~2;my $number4 = #4~2;my $anwser = 0;if ($color1 eq '#0~1'@) {$anwser = $number1;}if ($color2 eq '#0~1'@) {$anwser = $number2;}if ($color3 eq '#0~1'@) {$anwser = $number3;}if ($color4 eq '#0~1'@) {$anwser = $number4;} return $anwser) {
   type number
   useColors 1
   delay 5
   msg_0 /请输入\^([0-9a-fA-F]{6})/
   msg_1 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_2 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_3 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_4 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
}


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 19 Nov 2018, 13:09 
Offline
Been there done that!
Been there done that!

Joined: 24 Mar 2012, 04:13
Posts: 129
luocongo wrote:
problem soloved
here is the fix

Code:
reactOnNPC talk num @eval(my $color1 = '#1~1';my $color2 = '#2~1';my $color3 = '#3~1';my $color4 = '#4~1';my $number1 = #1~2;my $number2 = #2~2;my $number3 = #3~2;my $number4 = #4~2;my $anwser = 0;if ($color1 eq '#0~1'@) {$anwser = $number1;}if ($color2 eq '#0~1'@) {$anwser = $number2;}if ($color3 eq '#0~1'@) {$anwser = $number3;}if ($color4 eq '#0~1'@) {$anwser = $number4;} return $anwser) {
   type number
   useColors 1
   delay 5
   msg_0 /请输入\^([0-9a-fA-F]{6})/
   msg_1 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_2 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_3 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
   msg_4 /\^([0-9a-fA-F]{6})验证码:\[ (\d+) \]/
}


hi
i know you solved yours , but can u test this one, the difference on reactOnNPC command , others are same
replace your reactOnNPC command with this

Code:
reactOnNPC eval {my $color0 = "#0~1";my $color1 = "#1~1";my $color2 = "#2~1";my $color3 = "#3~1";my $color4 = "#4~1";my $number1 = "#1~2";my $number2 = "#2~2";my $number3 = "#3~2";my $number4 = "#4~2";my $anwser = 0;if ($color1 eq $color0) {$anwser = $number1;}if ($color2 eq $color0) {$anwser = $number2;}if ($color3 eq $color0) {$anwser = $number3;}if ($color4 eq $color0) {$anwser = $number4;} Commands::run("talk num $anwser")} {



because i don't like the "@)"


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 20 Nov 2018, 04:07 
Offline
Been there done that!
Been there done that!

Joined: 24 Mar 2012, 04:13
Posts: 129
headlesscarmen wrote:
anyone has a solution, for 3 days im dreading this.haha


can you test this style? this one accept plus minus sign or others math operator
Code:
reactOnNPC_debug 1
reactOnNPC eval {my $number1 = "#1~1";my $number2 = "#1~1";my $opsign = "#2~1";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");Commands::run("talk num $anwser")} {
type number
useColors 1
delay 5
msg_0 /\[ Anti BOT System \]/
msg_1 /If A = (\d+)\s+B = (\d+)/
msg_2 /How many is A (.) B ?/
}


Top
 Profile  
 
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 20 Nov 2018, 14:15 
Offline
Noob
Noob
User avatar

Joined: 08 Oct 2018, 15:54
Posts: 16
Location: Kuala Lumpur,Malaysia
c4c1n6kr3m1 wrote:
i never play ps
:heh

headlesscarmen wrote:

Code:
reactOnNPC_debug 1
reactOnNPC talk num @eval(my $number1 = '#1~1';my $number2 = '#1~2';return $number1 + $number2) {
type number
useColors 1
delay 5
msg_0 /\[ Anti BOT System \]/
msg_1 /If A = (\d+)\s+B = (\d+)/
msg_2 /How many is A \+ B ?/
}




or reactOnNPC talk num @eval(#1~1 + #1~2) {




or read the readme.txt inside your plugin
there is an example similar with yours


thanks it is working for addition question :D
what are the reg exp math symbol for either + or - ,the anti bot system only have addition and subtraction question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 432 posts ]  Go to page Previous  1 ... 40, 41, 42, 43, 44  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group