Group Project

07/01/2010 03:53 strikeraid#1
Anyone else bored? I come to this site everyday reading and learning about how all these talented programmers are making revolutionary programs for 12sky2. I really envy them and I wish I had the knowledge they have. Right now, I'm still reading this 800 page book on C++ (I'm on like pg 100) and after this I'm still not going to be ready to join the big leagues.

So I want to start an open source group project in this thread inviting anyone who develops in AutoIt to make a simple program. I'll add the initial features and everyone can contribute advice and/or criticism.

Here goes:

Code:
HotKeySet("{home}", "toggle")

Global $toggle = False

while 1
	sleep(100)
WEnd

Func toggle()
	$toggle = not $toggle
	If $toggle Then
		search()
	Else
		sleep(100)
	EndIf
EndFunc

Func search()
EndFunc
07/01/2010 14:25 strikeraid#2
Code:
HotKeySet("{home}", "toggle")
HotKeySet("{esc}", "quit")
HotKeySet("{insert}", "display")

opt("caretcoordmode", 2)
opt("mousecoordmode", 2)
opt("pixelcoordmode", 2)

Global $toggle = False
Global $baseX = "784", $baseY = "362", $dist = "26"
Global $count = "0", $count2 = "1"

while 1
	sleep(100)
WEnd

Func toggle()
	$toggle = not $toggle
	If $toggle = true Then
		search()
	Else
		while 1
			sleep(100)
		WEnd
	EndIf
EndFunc

Func quit()
	Exit
EndFunc

Func search()
	Do
		$count = $count + 1
		MouseMove($baseX + ($dist * $count2), $baseY + ($dist * $count), 5)
		If $count = "9" Then
			$count = 0
			$count2 = $count2 + 1
		EndIf
		sleep(10)
	Until $count2 = "9"
	$count = 0
	$count2 = 0
EndFunc

Func display()
	$color = hex(PixelGetColor($baseX - 121, $baseY + 44))
	MsgBox(0, "Color", "The color is:"&$color)
EndFunc
Would be nice to have people join in on the fun. :/
07/01/2010 21:50 Mega Byte#3
Grats on trying to learn C++
This code spams the ~ key to pickup items. Bewear it does not turn off if you press enter to chat :P somone can add this in ;) *put a hotkey for enter to turn it off then back on or something ;)
Code:
HotKeySet("{END}", "close") ;So that we can press "END" to stop the script in case something goes wrong. ALWAYS do this!
HotKeySet("{PAUSE}", "loot") ;So that we can press "END" to stop the script in case something goes wrong. ALWAYS do this!
$loot = false
MsgBox(4096, "TwelveSky2 AutoLooter by MegaByte", "To use this autolooter just hit the pause key. To disable it press the pause key again. To exit it just close the script in the system tray. This autolooter will only loot when the game window has focus.", 10)
Do
    ;Nothing
    if WinWaitActive("TwelveSky2") >0 Then
    if $loot=true Then
        Send("`")
        EndIf    
    EndIf
    Sleep(1);
    Until 1<>1;

Func close() ;This is a function and doesn't actually run unless you tell it to. For example
    Exit
EndFunc

Func loot()
if $loot=true Then
        $loot=False
        Beep ( 500, 100 )
    Else
        $loot=true
        Beep ( 600, 100 )
    EndIf
EndFunc