Basically I want my character to auto-gamble. There is a anti-cheat system where you have to type a string (colored in red) correctly to continue on gambling, but first things first. I also have issues with multiple line checking, can it be implemented here?
This is how I see things would go:
1. Automatically talk to npc at 187,107
Code: Select all
talknpc 187 107 c
2. Continue talking to it with the correct response, in this caseI imagine I will use a variable that specifies if I already talked to that npc or not
Code: Select all
talk resp 0
Here is the console printout:
Slot Machine#slot2-7: [Slot Machine]
Slot Machine#slot2-7: '-^-. What do you want? .-^-'
Slot Machine#slot2-7: Type 'talk cont' to continue talking
----------Responses-----------
# Response
0 Play
1 View Instruction
2 Exit
3 Cancel Chat
-------------------------------
Slot Machine#slot2-7: Type 'talk resp #' to choose a response.
notes:
Clearly, this would require multiple line regexp, which I'm really not familiar with since I'm new(actually just started because of openkore) to scripting and whatnots, I have experience programming in C, but totally nada in scripting. But I think I can settle with this regexp "Type 'talk resp #' to choose a response"
3. It will then prompt me to input amount, I want to input "2000000". Here's the prompt after the talk resp 0 from #2:Another issue with this is, as I understand, the console event triggers anything that can be seen from the console. There are times when some lines are inserted in between this multiline regexp, because of this, I really think a single line should do the trick HERE
4. At this point(it's 5:35am here, I haven't slept yet) I really want to sleep so I'm just posting the whole thing that I want to automate. As you can see, this go on and on with the initial exception that the first command (talknpc 187 107 c) is not repeated.Slot Machine#slot2-7: [Slot Machine]
Slot Machine#slot2-7: '-^-. Insert zeny to bet .-^-'
Slot Machine#slot2-7: (maximum bet: 2000000 )
Slot Machine#slot2-7: Type 'talk num <number #>' to input a number.
talknpc 187 107 c
Talking to NPC at (187, 107) using sequence: c
Slot Machine#slot2-7: [Slot Machine]
Slot Machine#slot2-7: '-^-. What do you want? .-^-'
Slot Machine#slot2-7: Type 'talk cont' to continue talking
Player ImBringiingSexyback (2) uses Greed on himself (Lv: 1)
----------Responses-----------
# Response
0 Play
1 View Instruction
2 Exit
3 Cancel Chat
-------------------------------
Slot Machine#slot2-7: Type 'talk resp #' to choose a response.
Player ImBringiingSexyback (2) uses Greed on himself (Lv: 1)
[dist=20.6] xX Capricorn Xx (5): tah ai?
Player ImBringiingSexyback (2) uses Greed on himself (Lv: 1)
Player ImBringiingSexyback (2) uses Greed on himself (Lv: 1)
talk resp 0
Player ImBringiingSexyback (2) uses Greed on himself (Lv: 1)
Slot Machine#slot2-7: [Slot Machine]
Slot Machine#slot2-7: '-^-. Insert zeny to bet .-^-'
Slot Machine#slot2-7: (maximum bet: 2000000 )
Slot Machine#slot2-7: Type 'talk num <number #>' to input a number.
[dist=17.7] ImBringiingSexyback (2): voltei
The NPC did not respond.
Slot Machine#slot2-7: Type 'talk cont' to continue talking
talk num 2000000
[dist=20.6] xX Capricorn Xx (5): XD
You lost 2,000,000 zeny.
Slot Machine#slot2-7: [Slot Machine]
Slot Machine#slot2-7: | | | |
Slot Machine#slot2-7: | K | Q | J |
Slot Machine#slot2-7: | | | |
Slot Machine#slot2-7: Type 'talk cont' to continue talking
[dist=17.7] ImBringiingSexyback (2): bom
[dist=20.6] xX Capricorn Xx (5): *Heh*
[dist=17.7] ImBringiingSexyback (2): peguei algo?^/
talk cont
Slot Machine#slot2-7: [Slot Machine]
Slot Machine#slot2-7: '-^-. What do you want? .-^-'
Slot Machine#slot2-7: Type 'talk cont' to continue talking
[dist=20.6] xX Capricorn Xx (5): como vc fez isso
[dist=20.6] xX Capricorn Xx (5): ?
talk cont
----------Responses-----------
# Response
0 Play
1 View Instruction
2 Exit
3 Cancel Chat
-------------------------------
Slot Machine#slot2-7: Type 'talk resp #' to choose a response.t2-7: Type 'talk resp #' to choose a response.------
Slot Machine#slot2-7: Type 'talk resp #' to choose a response.
NOTES:
BLUE color is what I typed on openkore(using svn, xkore 0)
GREEN texts are the other extra lines I'm talking about, (verbose 1)
RED text is warning(or whatever) from openkore. I think openkore is auto continuing talking eventhough my config says autoTalkCont 0. I really don't know.
I'm just starting to get hold of what I have to do, here are some things I typed:
I spent the night trying to understand what I can with openkore.. But I think this is my limit for this day, I really have to sleep >.<automacro gamble_0 {
console /Type 'talk resp #' to choose a response/
call {
do talk resp 0
}
}
automacro gamble_1 {
console /'-\^-\. Insert zeny to bet \.-\^-'/
call {
do talk num 2000000
}
}
Please help me here guys.. Thanks a lot in advance! =)