Playing roulette in a browser Topic is solved

Ask gaming related questions
JoeHawk
Posts: 5
Joined: 06 Jan 2017, 15:19

Playing roulette in a browser

20 Nov 2017, 12:48

*sorry for my bad english*
*i'm a newbie in AHK*
Hi!
I wanna play roulette in a browser using a simple set of rules:
1. I bet only on black
2. If I win I stick to the amount
3. If I lose I double the amount

(NO NEED TO HELP ME WITH "SLEEP", I WILL DEAL WITH THE SYNCHRONISATION STUFF)
This is how it should work:
1. It clears the amount by pressing a button
2. It introduces the BASIC amount by pressing another button
3. It bets on black
HERE (for later)
4. It moves the mouse in the right side of the result
5. Left click goes down
6. Drags to left
7. Releases the left click
(now the result - red/black/green wins - is selected)
8. Sends Ctrl + C (a.k.a. ^c)
9. Transforms the clipboard into a value
10. Decides if the result is black or not
IF BLACK - retrun to the start (here I have a major problem, it says return is not a command)
IF else than BLACK - doubles the bet and retruns to HERE

THIS IS MY SUPER-NEWBIE, SUPER-MESSY SCRIPT. It works fine until it needs to decide wether it's black or someting else.
The main broblem I guess it's the fact that %here% doesn't work. I dunno how to tell the script to return in a certain place.
https://image.prntscr.com/image/llmGjgFsT7u7cnChHi-orw.png

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



NOTE: Numpad0 for emergency

Pleeeease help :)
Last edited by JoeHawk on 20 Nov 2017, 12:58, edited 1 time in total.
JoeHawk
Posts: 5
Joined: 06 Jan 2017, 15:19

Re: Playing roulette in a browser

20 Nov 2017, 12:55

I played a little bit more with it. Seems like the major problem it's the fact that i dunno how to tell the script to return at a certain location.
Image
User avatar
masheen
Posts: 265
Joined: 06 Dec 2016, 14:10

Re: Playing roulette in a browser

21 Nov 2017, 05:57

Code: [Select all] [Download] GeSHi © Codebox Plus

MsgBox 1

label1:
MsgBox 2
goto label1 ;if willnot work change it on gosub label1

MsgBox 3
JoeHawk
Posts: 5
Joined: 06 Jan 2017, 15:19

Re: Playing roulette in a browser

21 Nov 2017, 10:15

New code, new problems:

Image

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

JoeHawk
Posts: 5
Joined: 06 Jan 2017, 15:19

Re: Playing roulette in a browser

21 Nov 2017, 10:21

Tried like this... Same thing... :/ (I went on the wiki and saw that the condition is between "(" and ")"...)
Image
User avatar
masheen
Posts: 265
Joined: 06 Dec 2016, 14:10

Re: Playing roulette in a browser  Topic is solved

22 Nov 2017, 06:27

JoeHawk wrote:Tried like this... Same thing... :/ (I went on the wiki and saw that the condition is between "(" and ")"...)
Image


first, this is superfluous in your code. You can safely remove it.


then,

Code: [Select all] [Download] GeSHi © Codebox Plus

if (clipboard = "WINNER: BLACK"){
sleep, 4000
goto, label0
}else if (clipboard = "WINNER: RED"){
goto, label5
}else if (clipboard = "WINNER: GREEN"){
goto, label5
}


or

Code: [Select all] [Download] GeSHi © Codebox Plus

if ( clipboard = "WINNER: BLACK" ) {
sleep, 4000
goto, label0
} else {
goto, label5
}
User avatar
masheen
Posts: 265
Joined: 06 Dec 2016, 14:10

Re: Playing roulette in a browser

22 Nov 2017, 06:44

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



or

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



I think it will be work
_
Sorry for my English
JoeHawk
Posts: 5
Joined: 06 Jan 2017, 15:19

Re: Playing roulette in a browser

23 Nov 2017, 19:25

Thanks masheen... Thank you very much. If I become millionaire on CS:GO betting I'll buy you something.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 9 guests