Openkore.com

OpenKore Forums
It is currently 11 Dec 2018, 07:18

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
Author Message
 Post subject: Re: reactOnNPC v.2.0.2 by hakore
PostPosted: 20 Nov 2018, 14:30 
Offline
Noob
Noob
User avatar

Joined: 08 Oct 2018, 15:54
Posts: 16
Location: Kuala Lumpur,Malaysia
c4c1n6kr3m1 wrote:
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 ?/
}


Hi,thanks for the god's work u doing here answering question.

here is the debug code after i tested it.

Quote:
You are now: state: Frozen
Options changed.
You are now immune to attacks.
You are now: Endure
You are now: Berserk (Duration: 1000000s)
Unknown #110014448: [ Anti BOT System ]
[reactOnNPC] NPC message saved (0): "[ Anti BOT System ]".
Unknown #110014448: If A = 67 B = 5
[reactOnNPC] NPC message saved (1): "If A = 67 B = 5".
Unknown #110014448: 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)] "[ Anti BOT System ]" to "/\[ Anti BOT System \]/" ... regexp ok.
[reactOnNPC] Matching [msg (1)] "If A = 67 B = 5" 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 "eval {my $number1 = "67";my $number2 = "67";my $opsign = "-";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");Commands::run("talk num $anwser")}" after 5 seconds.
: Type 'talk num <number #>' to input a number.
Allowed other player invite to Party
Other players are not allowed to view your Equipment.
[reactOnNPC] Reacting to NPC. Executing command "eval {my $number1 = "67";my $number2 = "67";my $opsign = "-";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");Commands::run("talk num $anwser")}".
The answer is 0
Syntax Error in function 'talk' (Talk to NPC)
Usage: talk <NPC # | "NPC name" | cont | resp | num | text > [<response #>|<number #>]



this work very well but only for addition question. The anti bot system ask addition and subtraction question.


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

Joined: 24 Mar 2012, 04:13
Posts: 129
headlesscarmen wrote:
c4c1n6kr3m1 wrote:
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 ?/
}


Hi,thanks for the god's work u doing here answering question.

here is the debug code after i tested it.

Quote:
You are now: state: Frozen
Options changed.
You are now immune to attacks.
You are now: Endure
You are now: Berserk (Duration: 1000000s)
Unknown #110014448: [ Anti BOT System ]
[reactOnNPC] NPC message saved (0): "[ Anti BOT System ]".
Unknown #110014448: If A = 67 B = 5
[reactOnNPC] NPC message saved (1): "If A = 67 B = 5".
Unknown #110014448: 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)] "[ Anti BOT System ]" to "/\[ Anti BOT System \]/" ... regexp ok.
[reactOnNPC] Matching [msg (1)] "If A = 67 B = 5" 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 "eval {my $number1 = "67";my $number2 = "67";my $opsign = "-";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");Commands::run("talk num $anwser")}" after 5 seconds.
: Type 'talk num <number #>' to input a number.
Allowed other player invite to Party
Other players are not allowed to view your Equipment.
[reactOnNPC] Reacting to NPC. Executing command "eval {my $number1 = "67";my $number2 = "67";my $opsign = "-";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");Commands::run("talk num $anwser")}".
The answer is 0
Syntax Error in function 'talk' (Talk to NPC)
Usage: talk <NPC # | "NPC name" | cont | resp | num | text > [<response #>|<number #>]



this work very well but only for addition question. The anti bot system ask addition and subtraction question.


ah sorry i made mistake, it's because 67 - 67 = 0

$number2 should "#1~2"
try this
Code:
reactOnNPC eval {my $number1 = "#1~1";my $number2 = "#1~2";my $opsign = "#2~1";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");Commands::run("talk num $answer")} {




or this, change Commands::run("talk num $answer") with $messageSender->sendTalkNumber($talk{'ID'}, $answer)

Code:
reactOnNPC eval {my $number1 = "#1~1";my $number2 = "#1~2";my $opsign = "#2~1";my $answer = eval("$number1 $opsign $number2");message("The answer is $answer\n","info");$messageSender->sendTalkNumber($talk{'ID'}, $answer)} {


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

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