the_pillo The Magnificent
 Group: Verified Member Joined: 09 Jul 2009 Donor:  Posts: 1105 Gold: 0.00 Clan: Honor

Status: Warn:  Reputation: 32
|
#1 Posted: 01 Nov 2010 04:52 am Post subject: Adult Swim's Hemp Tycoon Bot Starter |
|
|
Ya, was gonna make it for a friend but got bored so i gave up. So i figured why not give what i already have done to someone else and see if they want to continue. the code is in autoit. um, i did it all on a virtual pc that has a screen like 600x800 or so, whereas my actual is much larger.
but anyways here it is, have fun:
| Code: |
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: Nathaniel Nugent
Script Function:
Adult Swim, Hemp Tycoon Automation Software.
#ce ----------------------------------------------------------------------------
;Including Assorted UDF's
#include <IE.au3>
; This next part is for whoever is editing the codes benefit
;Good luck, I want to see a finished product!
#cs
func InfoRet()
$attic_plot_x = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your X coordinate of the attic plot? (X,Y)")
$attic_plot_y = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the attic plot? (X,Y)")
$yard_bottom_x = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the bottom yard plot? (X,Y)")
$yard_bottom_y = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the bottom yard plot? (X,Y)")
$yard_left_x = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the left yard plot? (X,Y)")
$yard_left_y = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the left yard plot? (X,Y)")
$yard_right_x = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the right yard plot? (X,Y)")
$yard_right_y = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the right yard plot? (X,Y)")
$yard_top_x = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the top yard plot? (X,Y)")
$yard_top_y = inputbox("Pillo Productions Presents: Hemp Tycoon Automation","What is your Y coordinate of the top yard plot? (X,Y)")
endfunc
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Func Writeinfo()
Iniwrite(@scriptdir & "/Hemp.ini", "Coordinates", "Attic Plot=", $attic_plot_x & "," & $attic_plot_y)
Iniwrite(@scriptdir & "/Hemp.ini", "Coordinates", "Bottom Yard Plot=", $yard_bottom_x & "," & $yard_bottom_y))
Iniwrite(@scriptdir & "/Hemp.ini", "Coordinates", "Left Yard Plot=", $yard_left_x & "," & $yard_left_y)
Iniwrite(@scriptdir & "/Hemp.ini", "Coordinates", "Right Yard Plot=", $yard_right_x & "," & $yard_right_y)
Iniwrite(@scriptdir & "/Hemp.ini", "Coordinates", "Top Yard Plot=", $yard_top_x & "," & $yard_top_y)
Iniwrite(@scriptdir & "/Hemp.ini", "Coordinates", "HasStartedBefore", "1")
endfunc
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Func Readini()
$attic_coords = iniread(@scriptdir & "/Hemp.ini", "Coordinates", "Attic Plot","Not Found")
$yard_bottom_coords = iniread(@scriptdir & "/Hemp.ini", "Coordinates", "Bottom Yard Plot","Not Found")
$yard_left_coords = iniread(@scriptdir & "/Hemp.ini", "Coordinates", "Left Yard Plot","Not Found")
$yard_right_coords = iniread(@scriptdir & "/Hemp.ini", "Coordinates", "Right Yard Plot","Not Found")
$yard_top_coords = iniread(@scriptdir & "/Hemp.ini", "Coordinates", "Top Yard Plot","Not Found")
endfunc
#ce
;Well then, that just pissed me off, i realized after i did it that adding in a coordination system like this would be ghastly and that a gui with inputs would be much much better
;O well, there is a good way to do it :P. Or just customize it for yourself.
;Starting creation of singular functions
func start()
$Ieo = _IECreate ("games.adultswim.com/hemp-tycoon-puzzle-online-game.html", 0,1,1,1 )
_IELoadWait ($Ieo)
EndFunc
func position()
Sleep(30000)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{right}")
sleep(100)
send("{down}")
sleep(100)
send("{down}")
sleep(100)
send("{down}")
sleep(100)
send("{down}")
sleep(100)
send("{down}")
sleep(100)
MouseClick("left", 447,525)
sleep(100)
EndFunc
func actic()
winwaitactive("Free Online Game - Hemp Tycoon from Adult Swim - Windows Internet Explorer")
mouseclick("left" ,410,300)
sleep(500)
MouseClick("left",410,305)
sleep(10000)
$time = $timer + 1
EndFunc
func acticbuy()
mouseclick("left" ,410,300)
sleep(1000)
send("{Down}")
sleep(100)
send("{down}")
sleep(100)
mouseclick("left",180,503)
sleep(1000)
send("{up}")
send("{up}")
sleep(1000)
EndFunc
func acticsell()
mouseclick("left" ,410,300)
sleep(100)
mouseclick("left" ,410,310)
sleep(3000)
EndFunc
func yardswitch()
MouseClick("left", 760, 200)
sleep(1000)
EndFunc
func yardbuy()
mouseclick("left" ,410,300)
sleep(1000)
send("{Down}")
sleep(100)
send("{down}")
sleep(100)
mouseclick("left",90,503)
sleep(1000)
send("{up}")
send("{up}")
sleep(1000)
mouseclick("left", 344, 270)
sleep(1000)
send("{Down}")
sleep(100)
send("{down}")
sleep(100)
mouseclick("left",90,503)
sleep(1000)
send("{up}")
send("{up}")
sleep(1000)
mouseclick("left", 402, 236)
sleep(1000)
send("{Down}")
sleep(100)
send("{down}")
sleep(100)
mouseclick("left",90,503)
sleep(1000)
send("{up}")
send("{up}")
sleep(1000)
mouseclick("left", 451,268)
sleep(1000)
send("{Down}")
sleep(100)
send("{down}")
sleep(100)
mouseclick("left",90,503)
sleep(1000)
send("{up}")
send("{up}")
sleep(1000)
EndFunc
func yard_sell()
mouseclick("left", 410, 300)
sleep(750)
mouseclick("left", 410, 300)
sleep(750)
mouseclick("left",344,270)
sleep(750)
mouseclick("left",344,270)
sleep(750)
mouseclick("left",402, 236)
sleep(750)
mouseclick("left",402, 236)
sleep(750)
mouseclick("left", 451, 268)
sleep(750)
mouseclick("left", 451, 268)
sleep(750)
EndFunc
;Ending Creating Singular Functions
;Creating Combined Functions
func Action_actic()
acticsell
acticbuy()
actic()
acticsell()
actic()
$time = $timer + 1
EndFunc
func action_yard()
yard_sell()
yardswitch()
yardbuy()
sleep(6000)
yard_sell()
EndFunc
;Done Creating Combined Functions
Global $time, $timer, $Ieo, $attic_coords, $attic_plot_x, $attic_plot_y, $yard_bottom_coords,$yard_bottom_x, $yard_bottom_y, $yard_left_coords,$yard_left_x,$yard_left_y, $yard_right_coords, $yard_right_x, $yard_right_y, $yard_top_coords, $yard_top_x, $yard_top_y, $hasstarted, $time, $timer ,
$hasstarted = iniread(@scriptdir & "/Logd.ini", "Information", "HasStartedBefore","0")
if $hasstarted = 0 then
;inforet()
;writeinfo()
endif
;Starts Internet explorer and positions screen according to my small virtual pc
start()
sleep(1000)
position()
;Ending of IE and position
;Make a timer
$timer = 1
;end timer... for now, there are snippets to make it work elsewhere, find them :P
;Start the actual only piece of non functioned code, made entirely of functions XD
do
Action_actic()
action_yard()
action_yard()
until $time = 10
;I only made it do 10 because i didnt create a pause, and i didnt want my virtual pc being taken over lmao. Just put in a pause function tied to a hotkey and boom, you can make it infinite and farm pot forever!
|
download link for the .au3
http://rapidshare.com/files/428263175/hemp_Tycoon.au3
P.S. dont mess with me on the spelling of attic, i realize it is spelled actic in there a few times.
Last edited by the_pillo on 01 Nov 2010 04:54 am; edited 1 time in total _____________________
Happiness is a disease, and smiling is the cough that spreads it - pillo-
"When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." |
|