Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames
You last visited: Today at 15:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[TRIAL] Urban Rivals Bot

Discussion on [TRIAL] Urban Rivals Bot within the Browsergames forum part of the Other Online Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2013
Posts: 5
Received Thanks: 0
Talking [TRIAL] Urban Rivals Bot

Hey guys,

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!
mahdin_dvf is offline  
Old 12/29/2013, 23:29   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 32
Received Thanks: 3
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...)
kurpiq is offline  
Old 12/30/2013, 09:02   #3
 
elite*gold: 0
Join Date: Dec 2013
Posts: 5
Received Thanks: 0
Thank you very much !

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
mahdin_dvf is offline  
Old 01/04/2014, 17:10   #4
 
elite*gold: 0
Join Date: Dec 2013
Posts: 5
Received Thanks: 0
any luck yet folks?
mahdin_dvf is offline  
Old 01/10/2014, 12:26   #5
 
elite*gold: 0
Join Date: Sep 2012
Posts: 158
Received Thanks: 37
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.
malakiangtiyan is offline  
Old 01/12/2014, 17:44   #6
 
elite*gold: 0
Join Date: Dec 2013
Posts: 5
Received Thanks: 0
hello malakiangtiyan,

Could you tell me how I can do this and how you can read the game data from the flash player ?
mahdin_dvf is offline  
Old 01/13/2014, 01:54   #7
 
elite*gold: 0
Join Date: Sep 2012
Posts: 158
Received Thanks: 37
hi,

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.
malakiangtiyan is offline  
Old 01/14/2014, 00:20   #8
 
elite*gold: 0
Join Date: Sep 2011
Posts: 149
Received Thanks: 145
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.
MaouKami is offline  
Old 01/14/2014, 09:44   #9
 
elite*gold: 0
Join Date: Dec 2013
Posts: 5
Received Thanks: 0
Quote:
Originally Posted by MaouKami View Post
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 ?

Cheers for the advice and your comments !
mahdin_dvf is offline  
Old 01/14/2014, 14:00   #10
 
elite*gold: 0
Join Date: Sep 2011
Posts: 149
Received Thanks: 145
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.
MaouKami is offline  
Reply


Similar Threads Similar Threads
Selling [Urban Rivals cards 500k =$100 + Free Urban Rivals Gangnam Sytle Bot]
07/08/2017 - Browsergames Trading - 1 Replies
Selling = € 100 See the abundant features of my bot Gangnam Style Urban Rivals Bot
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.



All times are GMT +1. The time now is 15:11.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.