Here is an script ready for testing and customization. Feel free to contribute your own advice for further development. If you plan on releasing your own version, please release it to the general public at no cost at all so that others can make use of it.
If you have any issues, try tweaking the card location coordinates.
You can download AutoIt on its main website. Click
Here is the code:
Code:
#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
;Globals
HotKeySet("{ESC}", "Terminate")
Global $oIE = _IECreateEmbedded()
Global $URL = "http://www.urban-rivals.com/game/flash/"
Global $botname = "Ikariam UR Bot"
#Region ### START Koda GUI section ### Form=
GUICreate($botname, 1206, 712, -1, -1)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 50, 1186, 612)
GUISetState(@SW_SHOW)
$settings = GUICreate("Settings", 300, 200, "", "", -1, -1, $botname)
GUISetState(@SW_SHOW)
$card11 = GUICtrlCreateCombo("4", 10, 35, 100, 20) ; input COMBO boxes
GUICtrlSetData(-1, "1|2|3|4")
$card22 = GUICtrlCreateCombo("1", 10, 70, 100, 20)
GUICtrlSetData(-1, "1|2|3|4")
$card33 = GUICtrlCreateCombo("2", 10, 105, 100, 20)
GUICtrlSetData(-1, "1|2|3|4")
$card44 = GUICtrlCreateCombo("3", 10, 140, 100, 20)
GUICtrlSetData(-1, "1|2|3|4")
$pillz11 = GUICtrlCreateCombo("0", 120, 35, 100, 20) ; input COMBO boxes
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12")
$pillz22 = GUICtrlCreateCombo("6", 120, 70, 100, 20)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12")
$pillz33 = GUICtrlCreateCombo("6", 120, 105, 100, 20)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12")
$pillz44 = GUICtrlCreateCombo("6", 120, 140, 100, 20)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12")
#EndRegion ### END Koda GUI section ###
_IENavigate ($oIE, $URL)
_IELoadWait ($oIE)
$oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight/6)
Local $card1[2] = ["411", "626"] ; card location
Local $card2[2] = ["581", "626"]
Local $card3[2] = ["751", "626"]
Local $card4[2] = ["921", "626"]
Local $var = 0
Local $x = 0
Local $y = 0
Local $z = 0
Local $pos
GUISetState(@SW_SHOW)
While 1
Select ; REFRESH WORKING ULTIMATE FAILSAFE!!!!!!!!!!!!!!
Case $var >= 25
_IEAction($oIE,"refresh")
$var = $var - $var ; $var countdown REFRESH!!! COUNTDOWN RESTART
$oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight/6)
EndSelect
Select ; REFRESH WORKING ULTIMATE FAILSAFE!!!!!!!!!!!!!!
Case $x >= 25
_IEAction($oIE,"refresh")
$x = $x - $x ; $var countdown REFRESH!!! COUNTDOWN RESTART
$oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight/6)
EndSelect
Select ; REFRESH WORKING ULTIMATE FAILSAFE!!!!!!!!!!!!!!
Case $y >= 25
_IEAction($oIE,"refresh")
$y = $y - $y ; $var countdown REFRESH!!! COUNTDOWN RESTART
$oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight/6)
EndSelect
Select ; REFRESH WORKING ULTIMATE FAILSAFE!!!!!!!!!!!!!!
Case $z >= 25
_IEAction($oIE,"refresh")
$z = $z - $z ; $var countdown REFRESH!!! COUNTDOWN RESTART
$oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight/6)
EndSelect
$coord = PixelSearch(478, 376, 942, 622, 0x595451 ) ; back to room button
If Not @error Then
MouseClick ("left", $coord[0], $coord[1], 1, 1)
EndIf
MouseClick("Left", 671, 521, 1)
Sleep(100)
$input1 = GUICtrlRead($card11) ; reads the input number e.g. 1 = 1st card
$input2 = GUICtrlRead($card22)
$input3 = GUICtrlRead($card33)
$input4 = GUICtrlRead($card44)
$pinput1 = GUICtrlRead($pillz11) ; reads the input number e.g. 1 = 1st pillz
$pinput2 = GUICtrlRead($pillz22)
$pinput3 = GUICtrlRead($pillz33)
$pinput4 = GUICtrlRead($pillz44)
Select ; CARD SELECTION PROCESS STARTS ; #1 2nd card CARD CHECK BEGINS!!!!
Case $input1 = 1
Local $pos[2] = ["411", "626"]
Case $input1 = 2
Dim $pos[2] = ["581", "626"]
Case $input1 = 3
Local $pos[2] = ["751", "626"]
Case $input1 = 4
Local $pos[2] = ["921", "626"]
EndSelect ; CARD SELECTION PROCESS ENDS
MouseClick("Left", $pos[0], $pos[1], 1, 1)
$pos = MouseGetPos()
MouseClick("Left", $pos[0]+31, $pos[1]+31, 1, 1) ; #1 2nd card
Sleep(500)
$coord = PixelSearch(776, 536, 913, 541, 0x0F7499 ) ; TESTS if previous is used by detect plus button - true means not used
If Not @error Then ; if statement is true
Select
Case $pinput1 > 0
MouseClick("Left", 943, 483, $pinput1, 1) ; + PLUS BUTTON
EndSelect
MouseClick("Left", 840, 542, 6, 1) ; FIGHT BUTTON
$var = $var - $var ; $var countdown REFRESH!!! COUNTDOWN RESTART
$x = $x + 1 ; $x countdown begins!!!!!!! to REFRESH!!!
$y = $y - $y ; $y countdown REFRESH!!! COUNTDOWN RESTART
$z = $z - $z ; $z countdown REFRESH!!! COUNTDOWN RESTART
Else ; move to next card
Select
Case $input2 = 1
Local $pos[2] = ["411", "626"]
Case $input2 = 2
Dim $pos[2] = ["581", "626"]
Case $input2 = 3
Local $pos[2] = ["751", "626"]
Case $input2 = 4
Local $pos[2] = ["921", "626"]
EndSelect
MouseClick("Left", $pos[0], $pos[1], 1, 1) ; #2 4th card no pillz
$pos = MouseGetPos()
MouseClick("Left", $pos[0]-27, $pos[1]-4, 1, 1) ; #2 4th card no pillz
$var = $var + 1 ; $var countdown begins!!!!!!! to REFRESH!!!
$coord = PixelSearch(776, 536, 913, 541, 0x0F7499 ) ; TESTS if previous is used by detect plus button - true means not used
If Not @error Then ; if statement is true
Select
Case $pinput2 > 0
MouseClick("Left", 943, 483, $pinput2, 1) ; + PLUS BUTTON
EndSelect
MouseClick("Left", 840, 542, 6, 1) ; FIGHT BUTTON
$var = $var - $var ; $var countdown REFRESH!!! COUNTDOWN RESTART
$y = $y + 1 ; $y countdown begins!!!!!!! to REFRESH!!!
$x = $x - $x ; $x countdown REFRESH!!! COUNTDOWN RESTART
$z = $z - $z ; $z countdown REFRESH!!! COUNTDOWN RESTART
Else
Select
Case $input3 = 1
Local $pos[2] = ["411", "626"]
Case $input3 = 2
Dim $pos[2] = ["581", "626"]
Case $input3 = 3
Local $pos[2] = ["751", "626"]
Case $input3 = 4
Local $pos[2] = ["921", "626"]
EndSelect
MouseClick("Left", $pos[0], $pos[1], 1, 1) ; #3 3rd card no pillz
$pos = MouseGetPos()
MouseClick("Left", $pos[0]+5, $pos[1]-10, 1, 1) ; #3 3rd card no pillz
$coord = PixelSearch(776, 536, 913, 541, 0x0F7499 ) ; TESTS if previous is used by detect plus button - true means not used
If Not @error Then ; if statement is true
Select
Case $pinput3 > 0
MouseClick("Left", 943, 483, $pinput3, 1) ; + PLUS BUTTON
EndSelect
MouseClick("Left", 840, 542, 6, 1) ; FIGHT BUTTON
$var = $var - $var ; $var countdown REFRESH!!! COUNTDOWN RESTART
$z = $z + 1 ; $z countdown begins!!!!!!! to REFRESH!!!
$x = $x - $x ; $x countdown REFRESH!!! COUNTDOWN RESTART
$y = $y - $y ; $y countdown REFRESH!!! COUNTDOWN RESTART
Else
Select
Case $input4 = 1
Local $pos[2] = ["411", "626"]
Case $input4 = 2
Dim $pos[2] = ["581", "626"]
Case $input4 = 3
Local $pos[2] = ["751", "626"]
Case $input4 = 4
Local $pos[2] = ["921", "626"]
EndSelect
MouseClick("Left", $pos[0], $pos[1], 6, 1) ; #4 MOVE DIRECTLY TO 1st card no pillz
$pos = MouseGetPos()
MouseClick("Left", $pos[0]+31, $pos[1]-3, 6, 1) ; 1st card
Select
Case $pinput4 > 0
MouseClick("Left", 943, 483, $pinput4, 1) ; + PLUS BUTTON
EndSelect
MouseClick("Left", 840, 542, 6, 1) ; FIGHT BUTTON
EndIf
EndIf
EndIf ; END OF CARDS CHECK
MouseClick("Left", 703, 454, 6) ; CANCEL CARD!!!
Sleep(500)
WEnd
Func Terminate()
Exit 0
EndFunc ;==>Terminate
Feel free to post your suggestions and comments ! Cheers!
hi, try use controlclick not mouseclick if you can.
for what resolution you do this script ?, ps this is not trial but alpha ^^ else autoit is great to make small bots try use contolclick (in your program window) and make simply pause func and exit in other key (for other people who can't change)
and make instruction what coord is for what click (1 for 2 for 3 for etc...)
For instructions:
-the Escape button exits the app
-You can modify the coordinates at "CARD SELECTION PROCESS STARTS" position where $pos contains the coordinates
This needs some little bit of adjustment for example the missions and fight buttons. If you could make these adjustments maybe others can make better use of the bot.
Hopefully this New Year, more folks will want to use this bot.
The controlclick option is underway and should be ready soon
its better to create a fight window then do all the x and y calculations on it. because not all users have the same resolution as you have. and its very troublesome to make non programmer users to set the coordinates themselves.
i dont mean reading the fight from flash. like what you had in your bot. it uses x and y coordinates to click. just create a program where UR loads then use it as your bots basis. So that you dont have to worry about the users resolution.
Or go more advanced, and stop reading colors and pressing cords, but just read the protocol and act upon that, not sure if you saw my short time post, that was later removed.
With a new version of my bot ?
No more need for focus etc, able to read cards, all there stats including opponent etc.
Or go more advanced, and stop reading colors and pressing cords, but just read the protocol and act upon that, not sure if you saw my short time post, that was later removed.
With a new version of my bot ?
No more need for focus etc, able to read cards, all there stats including opponent etc.
Exactly, how did you read the cards from the game, thats like impossible in so many ways ! Did you use pointers or something ?
Also, just for clarification, what does ' read the protocol ' mean ? Am i supposed to decode with incoming requests or what is it ?
It is not impossible to read cards, simply read the data that the server sends and parse it.
And with server data, i mean protocol what is simply json though.
Using the data the server sends, you can make out what state the bot is in,
Like is it in battle if so is it his turn, if so make a choice etc.
Urban Rivals 10/03/2012 - Browsergames Trading - 5 Replies Hi Guys,
I am looking to purchase an urban rivals card game account.
I am also interested in buying any cr cards. I am happy to pay through Paypal, please contact me if you are interested in selling and we can work out a price.
Please no scammers, I don't have time for that rubbish.
Thanks
Anyone?
Selling card urban rivals/ Ich verkaufe Briefe von Urban Rivals, 08/16/2012 - Trading - 2 Replies Good morning gentlemen,
have 6 million cards in anyone who is interested we can send mail to negotiate payment is made via pay pal
thank you
good morning everyone
Guten Morgen, meine Herren,
haben 6 Millionen Karten in alle Interessierten können wir Mail zu senden, die Zahlung zu verhandeln ist, wird per Pay Pal gemacht
danke
Guten Morgen allerseits
Urban Rivals 05/02/2012 - Browsergames - 2 Replies Hallo ich spiele seit mehreren monaten das Spiel UrbanRivals
wollte mir für 1,99€ dort etwas kaufen,wenn ich dann eine sms los schicke der mir den Bestätigungcode senden soll kommt nichts!?
Habe den Handyanbieter Simply and friends ! kann man dort etwas umstellen Das es Funkt? bei meinem alten anbieter Simply und gut ! ging das noch mit dem Internet shopping :D
Urban Rivals 09/25/2010 - General Gaming Discussion - 0 Replies Gibt es noch irgend ein MarktManager für das Spiel?
L€xx€r scheint ja nicht mehr Aktiv zu sein.