Sign in to follow this  
Followers 0
mrgman

swg auto crafting script not working

5 posts in this topic

ok first up im new to this, i have ground up 2 traders normaly and discovered i cant sell anything from low lvl so when i started on a third crafter a mate sent me a macro he found (the forum was dead but this remained in the google cache however it errors at line 17 with funtiin not terminated, any ideas how to fix?

im guessing google cache corrupted it or perhaps giving the site is dead maybe the script is for an older autoit

code/

CODE

;SWG AFK Grinding program v1.00

Global $Paused, $Showme

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("{F9}", "ShowMe")

Opt("MouseClickDragDelay", 130)

#include <Misc.au3>

#include <GuiConstants.au3>

Sleep ( 400 )

Send ("{F9}")

Sleep (3000)

While 1

If MsgBox( 4096 + 262144 + 1, "SWG WINDOWS WARNING","YOU MUST RUN SWG

IN BORDERLESS WINDOWS MODE." & @CRLF & "GO TO THE SWG LAUNCHPAD >>

GAME OPTIONS >> GRAPHICS." & @CRLF & "CHECK OFF THE FIRST TWO BOXES.")

= 2 Then Exit

ExitLoop

WEnd

While 1

If MsgBox( 4096 + 262144 + 1, "HOTKEYS","Defined Hotkeys" & @CRLF &

"ESC: Will cancel the program (you will start from the beginning

again)" & @CRLF & "PAUSE: Will pause the program (you will continue

from where you stopped)") = 2 Then Exit

ExitLoop

WEnd

MsgBox( 4096 + 262144 + 0, "AFK Grinding Setup", "This program

requires the user to:" & @CRLF & "1) Place crafting tools and macros

in toolbar slots 1 - 7" & @CRLF & "2) Choose the schematic required"

& @CRLF & "3) Click on each resource needed to make that item" &

@CRLF & "" & @CRLF & "It will then automate the grinding process until

the next schematic is needed at which point it will ask for more user

input")

MsgBox( 4096 + 262144 + 0, "AFK Grinding Setup", "This program assumes

the following:" & @CRLF & "" & @CRLF & "1) You have written the

following in-game SWG macros (if not do so now):" & @CRLF & " a)

CraftingStages" & @CRLF & " /nextCraftingStage;" & @CRLF & "

/nextCraftingStage;" & @CRLF & " /nextCraftingStage;" & @CRLF & "

/nextCraftingStage;" & @CRLF & " /createPrototype Practice

noitem;" & @CRLF & " /createPrototype Practice noitem;" & @CRLF &

"" & @CRLF & " :) Default" & @CRLF & " /ui action

defaultButton;" & @CRLF & "" & @CRLF & "2) That you will use the

following resources and amounts for your crafting:" & @CRLF & " a)

Mineral Survey Tools - 1,620 Steel" & @CRLF & " :) Wind Power

Generators - 6,650 Steel / 1,400 Ore / 1,050 Aluminum" & @CRLF & "

c) Weapon Crafting Stations - 69,750 Steel" & @CRLF & " d) Fountains

- 385,000 Ore / 115,500 Steel / 192,500 Water" & @CRLF & " e) Gungan

Heads - 110,000 Ore / 55,000 Gemstone" & @CRLF & "" & @CRLF &

"Totaling:" & @CRLF & "193,520 Steel / 496,400 Ore / 1,050 Aluminum /

192,500 Water / 55,000 Gemstone" & @CRLF & " f) I recommend you get

10% more of each resource than needed")

MsgBox( 4096 + 262144 + 0, "AFK Grinding Setup", "Settings and items

of note:" & @CRLF & "" & @CRLF & "1) Uncheck <Confirm Crafting

Actions> (Goto Options >> Misc)" & @CRLF & "2) Check <Actions Can Be

Fired From Toolbar> (Goto Options >> Keymap)" & @CRLF & "3) All

resources must be in your main inventory" & @CRLF & "4) It is best to

zoom all the way in to minimize any potential lag" & @CRLF & "5) Open

an empty backback up as the background" & @CRLF & "6) You should be

in, on, or next to a PRIVATE Structure Crafting Station" & @CRLF & "7)

Approximate time for each crafting phase is as follows:" & @CRLF & "

Phase 1: 7 minutes" & @CRLF & " Phase 2: 4 minutes"& @CRLF & "

Phase 3: 23 minutes" & @CRLF & " Phase 4: 42 minutes" & @CRLF & "

Phase 5: 7 minutes")

;Phase 1 - Survey Tools

MsgBox( 4096 + 262144 + 0, "AFK Grinding Setup", "To do:" & @CRLF &

"1) Place your Weapon Crafting Tools in slots 1 to 5" & @CRLF & "2)

Place your CraftingStages macro in slot 6" & @CRLF & "3) Place your

Default macro in slot 7" & @CRLF & "" & @CRLF & "Click OK after you

have placed your tools and macros")

MsgBox( 4096 + 262144 + 0, "SURVEY TOOLS", "To do:" & @CRLF & "1) Open

your 1st crafting tool and select the schematic for Mineral Survey

Tool" & @CRLF & "2) Click the NEXT button on the crafting window" &

@CRLF & "" & @CRLF & "Click OK after you have chosen your schematic

and clicked the NEXT button")

SplashTextOn("SURVEY TOOLS", "Click once on the STEEL for the Mineral

Survey Tool", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$steelx = $pos[0]

$steely = $pos[1]

Sleep ( 1000 )

SplashTextOn("SURVEY TOOLS", "Close the crafting window by clicking on

the X in the upper right corner", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$winclosex = $pos[0]

$winclosey = $pos[1]

Sleep ( 1000 )

SplashTextOn("SURVEY TOOLS", "Auto-crafting will start in 5 seconds",

400, 50, -1, -1, 0, "Courier", 12)

Sleep ( 5000 )

SplashOff()

$i = 0

Do

If WinActive( "Star Wars Galaxies", "" ) Then

Send ( "{1}" );fires crafting tool in slot 1

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{2}" );fires crafting tool in slot 2

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{3}" );fires crafting tool in slot 3

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{4}" );fires crafting tool in slot 4

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{5}" );fires crafting tool in slot 5

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

$i = $i + 1

EndIf

Until $i = 12

;Phase 2 - Wind Power Generators

MsgBox( 4096 + 262144 + 0, "AFK Grinding Setup", "To do:" & @CRLF &

"1) Place your Structure Crafting Tools in slots 1 to 5" & @CRLF &

"2) Place your CraftingStages macro in slot 6" & @CRLF & "3) Place

your Default macro in slot 7" & @CRLF & "" & @CRLF & "Click OK after

you have placed your tools and macros")

MsgBox( 4096 + 262144 + 0, "WIND POWER GENERATORS", "To do:" & @CRLF &

"1) Open your 1st crafting tool and select the schematic for Wind

Power Generator" & @CRLF & "2) Click the NEXT button on the crafting

window" & @CRLF & "" & @CRLF & "Click OK after you have chosen your

schematic and clicked the NEXT button")

SplashTextOn("WIND POWER GENERATORS", "Click once on the STEEL for the

Wind Power Generator", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$steelx = $pos[0]

$steely = $pos[1]

Sleep ( 1000 )

SplashTextOn("WIND POWER GENERATORS", "Click once on the ALUMINUM for

the Wind Power Generator", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$alumx = $pos[0]

$alumy = $pos[1]

Sleep ( 1000 )

SplashTextOn("WIND POWER GENERATORS", "Click once on the ORE for the

Wind Power Generator", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$orex = $pos[0]

$orey = $pos[1]

Sleep ( 1000 )

SplashTextOn("WIND POWER GENERATORS", "Close the crafting window by

clicking on the X in the upper right corner", 400, 50, -1, -1, 0,

"Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$winclosex = $pos[0]

$winclosey = $pos[1]

Sleep ( 1000 )

SplashTextOn("WIND POWER GENERATORS", "Auto-crafting will start in 5

seconds", 400, 50, -1, -1, 0, "Courier", 12)

Sleep ( 5000 )

SplashOff()

$i = 0

Do

If WinActive( "Star Wars Galaxies", "" ) Then

Send ( "{1}" );fires crafting tool in slot 1

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{2}" );fires crafting tool in slot 2

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{3}" );fires crafting tool in slot 3

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{4}" );fires crafting tool in slot 4

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{5}" );fires crafting tool in slot 5

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $alumx, $alumy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

$i = $i + 1

EndIf

Until $i = 7

;Phase 3 - Crafting Stations

MsgBox( 4096 + 262144 + 0, "WEAPON CRAFTING STATIONS", "To do:" &

@CRLF & "1) Open your 1st crafting tool and select the schematic for

Weapon, Droids, and General Item Crafting Station" & @CRLF & "2) Click

the NEXT button on the crafting window" & @CRLF & "" & @CRLF & "Click

OK after you have chosen your schematic and clicked the NEXT button")

SplashTextOn("WEAPON CRAFTING STATIONS", "Click once on the STEEL for

the Weapon Crafting Staion", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$steelx = $pos[0]

$steely = $pos[1]

Sleep ( 1000 )

SplashTextOn("WEAPON CRAFTING STATIONS", "Close the crafting window by

clicking on the X in the upper right corner", 400, 50, -1, -1, 0,

"Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$winclosex = $pos[0]

$winclosey = $pos[1]

Sleep ( 1000 )

SplashTextOn("WEAPON CRAFTING STATIONS", "Auto-crafting will start in

5 seconds", 400, 50, -1, -1, 0, "Courier", 12)

Sleep ( 5000 )

SplashOff()

$i = 0

Do

If WinActive( "Star Wars Galaxies", "" ) Then

Send ( "{1}" );fires crafting tool in slot 1

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{2}" );fires crafting tool in slot 2

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{3}" );fires crafting tool in slot 3

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{4}" );fires crafting tool in slot 4

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{5}" );fires crafting tool in slot 5

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 10000 )

$i = $i + 1

EndIf

Until $i = 31

;Phase 4 - Fountains

MsgBox( 4096 + 262144 + 0, "FOUNTAINS", "To do:" & @CRLF & "1) Open

your 1st crafting tool and select the schematic for Fountain" & @CRLF

& "2) Click the NEXT button on the crafting window" & @CRLF & "" &

@CRLF & "Click OK after you have chosen your schematic and clicked the

NEXT button")

SplashTextOn("FOUNTAINS", "Click once on the ORE for the Fountain",

400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$orex = $pos[0]

$orey = $pos[1]

Sleep ( 1000 )

SplashTextOn("FOUNTAINS", "Click once on the STEEL for the Fountain",

400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$steelx = $pos[0]

$steely = $pos[1]

Sleep ( 1000 )

SplashTextOn("FOUNTAINS", "Click once on the WATER for the Fountain",

400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$waterx = $pos[0]

$watery = $pos[1]

Sleep ( 1000 )

SplashTextOn("FOUNTAINS", "Close the crafting window by clicking on

the X in the upper right corner", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$winclosex = $pos[0]

$winclosey = $pos[1]

Sleep ( 1000 )

SplashTextOn("FOUNTAIN", "Auto-crafting will start in 5 seconds", 400,

50, -1, -1, 0, "Courier", 12)

Sleep ( 5000 )

SplashOff()

$i = 0

Do

If WinActive( "Star Wars Galaxies", "" ) Then

Send ( "{1}" );fires crafting tool in slot 1

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $waterx, $watery, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{2}" );fires crafting tool in slot 2

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $waterx, $watery, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{3}" );fires crafting tool in slot 3

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $waterx, $watery, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{4}" );fires crafting tool in slot 4

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $waterx, $watery, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{5}" );fires crafting tool in slot 5

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $steelx, $steely, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $waterx, $watery, 2, 10 );moves the

mouse and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

$i = $i + 1

EndIf

Until $i = 77

;Phase 5 - Gungan Heads

MsgBox( 4096 + 262144 + 0, "GUNGAN HEADS", "To do:" & @CRLF & "1) Open

your 1st crafting tool and select the schematic for Gungan Head

Statue" & @CRLF & "2) Click the NEXT button on the crafting window" &

@CRLF & "" & @CRLF & "Click OK after you have chosen your schematic

and clicked the NEXT button")

SplashTextOn("GUNGAN HEADS", "Click once on the ORE for the Gungan

Head Statue", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$orex = $pos[0]

$orey = $pos[1]

Sleep ( 1000 )

SplashTextOn("GUNGAN HEADS", "Click once on the GEMSTONE for the

Gungan Head Statue", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$gemx = $pos[0]

$gemy = $pos[1]

Sleep ( 1000 )

SplashTextOn("GUNGAN HEADS", "Close the crafting window by clicking on

the X in the upper right corner", 400, 50, -1, -1, 0, "Courier", 12)

While 1

Sleep ( 100 )

If _IsPressed("01") Then

$pos = MouseGetPos()

ExitLoop

EndIf

WEnd

SplashOff()

$winclosex = $pos[0]

$winclosey = $pos[1]

Sleep ( 1000 )

SplashTextOn("GUNGAN HEADS", "Auto-crafting will start in 5 seconds",

400, 50, -1, -1, 0, "Courier", 12)

Sleep ( 5000 )

SplashOff()

$i = 0

Do

If WinActive( "Star Wars Galaxies", "" ) Then

Send ( "{1}" );fires crafting tool in slot 1

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $gemx, $gemy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{2}" );fires crafting tool in slot 2

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $gemx, $gemy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{3}" );fires crafting tool in slot 3

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $gemx, $gemy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{4}" );fires crafting tool in slot 4

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $gemx, $gemy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

Send ( "{5}" );fires crafting tool in slot 5

Sleep ( 1500 )

Send ( "{7}" );fires the Default macro to "click" the NEXT button

Sleep ( 1500 )

MouseClick ( "left" , $orex, $orey, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 200 )

MouseClick ( "left" , $gemx, $gemy, 2, 10 );moves the mouse

and double clicks the resource

Sleep ( 2000 )

Send ( "{6}" );fires the CraftingStages macro to complete the craft

Sleep ( 1000 )

MouseClick ( "left" , $winclosex, $winclosey, 1, 10 );moves

the mouse and closes to crafting window if there is a lag issue

Sleep ( 1000 )

$i = $i + 1

EndIf

Until $i = 11

MsgBox( 4096 + 262144 + 0, "CONGRATULATIONS", "You have succesfully

completed the SWG AFK Grinding program. Congratulations on becoming a

level 90 Structures Trader!!")

Func TogglePause();Following script makes the "pause" option work correctly

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func ShowMe()

$ShowMe = Not $ShowMe

EndFunc;==>ShowMe

Func Terminate()

Exit 0

EndFunc

/code

Share this post


Link to post
Share on other sites



Global $Paused, $Showme
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F9}", "ShowMe")
Opt("MouseClickDragDelay", 130)

#include <Misc.au3>
#include <GuiConstants.au3>

Sleep(400)
Send("{F9}")
Sleep(3000)

While 1
    If MsgBox(4096 + 262144 + 1, "SWG WINDOWS WARNING", "YOU MUST RUN SWG" & _
            "IN BORDERLESS WINDOWS MODE." & @CRLF & "GO TO THE SWG LAUNCHPAD >>" & _
            "GAME OPTIONS >> GRAPHICS." & @CRLF & "CHECK OFF THE FIRST TWO BOXES.") = 2 Then Exit
    ExitLoop
WEnd

While 1
    If MsgBox(4096 + 262144 + 1, "HOTKEYS", "Defined Hotkeys" & @CRLF & _
            "ESC: Will cancel the program (you will start from the beginning" & _
            "again)" & @CRLF & "PAUSE: Will pause the program (you will continue" & _
            "from where you stopped)") = 2 Then Exit
    ExitLoop
WEnd

MsgBox(4096 + 262144, "AFK Grinding Setup", "This programrequires the user to:" & @CRLF & "1)" & _
        "Place crafting tools and macros in toolbar slots 1 - 7" & @CRLF & "2)" & _
        "Choose the schematic required" & @CRLF & "3) Click on each resource needed to make that item" & _
        @CRLF & "" & @CRLF & "It will then automate the grinding process until" & _
        "the next schematic is needed at which point it will ask for more user input")

MsgBox(4096 + 262144, "AFK Grinding Setup", "This program assumes the following:" & @CRLF & "" & @CRLF & "1)" & _
        "You have written the following in-game SWG macros (if not do so now):" & @CRLF & " a)" & _
        "CraftingStages" & @CRLF & " /nextCraftingStage;" & @CRLF & "/nextCraftingStage;" & @CRLF & _
        " /nextCraftingStage;" & @CRLF & "/nextCraftingStage;" & @CRLF & " /createPrototype Practice" & _
        "noitem;" & @CRLF & " /createPrototype Practice noitem;" & @CRLF & "" & @CRLF & " cool.gif Default" & _
        @CRLF & " /ui action defaultButton;" & @CRLF & "" & @CRLF & "2) That you will use the" & _
        "following resources and amounts for your crafting:" & @CRLF & " a) Mineral Survey Tools - 1,620 Steel" & _
        @CRLF & " cool.gif Wind Power Generators - 6,650 Steel / 1,400 Ore / 1,050 Aluminum" & @CRLF & _
        "c) Weapon Crafting Stations - 69,750 Steel" & @CRLF & " d) Fountains - 385,000 Ore / 115,500 Steel" & _
        "/ 192,500 Water" & @CRLF & " e) Gungan Heads - 110,000 Ore / 55,000 Gemstone" & @CRLF & "" & @CRLF & _
        "Totaling:" & @CRLF & "193,520 Steel / 496,400 Ore / 1,050 Aluminum / 192,500 Water / 55,000 Gemstone" & _
        @CRLF & " f) I recommend you get10% more of each resource than needed")

MsgBox(4096 + 262144 + 0, "AFK Grinding Setup", "Settings and items of note:" & @CRLF & "" & @CRLF & "1) Uncheck " & _
        "<Confirm Crafting Actions> (Goto Options >> Misc)" & @CRLF & "2) Check <Actions Can Be " & _
        "Fired From Toolbar> (Goto Options >> Keymap)" & @CRLF & "3) All resources must be in your main " & _
        "inventory" & @CRLF & "4) It is best to zoom all the way in to minimize any potential lag" & @CRLF & _
        "5) Open an empty backback up as the background" & @CRLF & "6) You should be in, on, or next to a " & _
        "PRIVATE Structure Crafting Station" & @CRLF & "7) Approximate time for each crafting phase is as " & _
        "follows:" & @CRLF & "Phase 1: 7 minutes" & @CRLF & " Phase 2: 4 minutes" & @CRLF & _
        "Phase 3: 23 minutes" & @CRLF & " Phase 4: 42 minutes" & @CRLF & "Phase 5: 7 minutes")

;Phase 1 - Survey Tools
MsgBox(4096 + 262144 + 0, "AFK Grinding Setup", "To do:" & @CRLF & "1) Place your Weapon Crafting Tools in slots 1 to 5" & _
        @CRLF & "2) Place your CraftingStages macro in slot 6" & @CRLF & "3) Place your " & _
        "Default macro in slot 7" & @CRLF & "" & @CRLF & "Click OK after you have placed your tools and macros")

MsgBox(4096 + 262144 + 0, "SURVEY TOOLS", "To do:" & @CRLF & "1) Open your 1st crafting tool and select the schematic for " & _
        "Mineral Survey Tool" & @CRLF & "2) Click the NEXT button on the crafting window" & _
        @CRLF & "" & @CRLF & "Click OK after you have chosen your schematic and clicked the NEXT button")

SplashTextOn("SURVEY TOOLS", "Click once on the STEEL for the Mineral Survey Tool", 400, 50, -1, -1, 0, "Courier", 12)

While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$steelx = $pos[0]
$steely = $pos[1]
Sleep(1000)

SplashTextOn("SURVEY TOOLS", "Close the crafting window by clicking on the X in the upper right corner", 400, 50, -1, -1, 0, "Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$winclosex = $pos[0]
$winclosey = $pos[1]
Sleep(1000)

SplashTextOn("SURVEY TOOLS", "Auto-crafting will start in 5 seconds", 400, 50, -1, -1, 0, "Courier", 12)
Sleep(5000)
SplashOff()

$i = 0
Do
    If WinActive("Star Wars Galaxies", "") Then
        Send("{1}");fires crafting tool in slot 1
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{2}");fires crafting tool in slot 2
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{3}");fires crafting tool in slot 3
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{4}");fires crafting tool in slot 4
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{5}");fires crafting tool in slot 5
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        $i = $i + 1
    EndIf
Until $i = 12

;Phase 2 - Wind Power Generators
MsgBox(4096 + 262144 + 0, "AFK Grinding Setup", "To do:" & @CRLF & _
        "1) Place your Structure Crafting Tools in slots 1 to 5" & @CRLF & _
        "2) Place your CraftingStages macro in slot 6" & @CRLF & "3) Place " & _
        "your Default macro In slot 7" & @CRLF & "" & @CRLF & " Click OK after " & _
        "you have placed your tools And macros")

MsgBox(4096 + 262144 + 0, "WIND POWER GENERATORS", "To do:" & @CRLF & _
        "1) Open your 1st crafting tool and select the schematic for Wind " & _
        "Power Generator" & @CRLF & " 2) Click the Next button on the crafting " & _
        "window" & @CRLF & "" & @CRLF & " Click OK after you have chosen your " & _
        "schematic And clicked the Next button")

SplashTextOn("WIND POWER GENERATORS", "Click once on the STEEL for the Wind Power Generator", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$steelx = $pos[0]
$steely = $pos[1]
Sleep(1000)

SplashTextOn("WIND POWER GENERATORS", "Click once on the ALUMINUM for the Wind Power Generator", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$alumx = $pos[0]
$alumy = $pos[1]
Sleep(1000)

SplashTextOn("WIND POWER GENERATORS", "Click once on the ORE for the Wind Power Generator", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$orex = $pos[0]
$orey = $pos[1]
Sleep(1000)

SplashTextOn("WIND POWER GENERATORS", "Close the crafting window by clicking on the X In the upper right corner", 400, 50, -1, -1, 0, "Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$winclosex = $pos[0]
$winclosey = $pos[1]
Sleep(1000)

SplashTextOn("WIND POWER GENERATORS", "Auto-crafting will start in 5 seconds", 400, 50, -1, -1, 0, " Courier", 12)
Sleep(5000)
SplashOff()

$i = 0
Do
    If WinActive("Star Wars Galaxies", "") Then
        Send("{1}");fires crafting tool in slot 1
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{2}");fires crafting tool in slot 2
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{3}");fires crafting tool in slot 3
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{4}");fires crafting tool in slot 4
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{5}");fires crafting tool in slot 5
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $alumx, $alumy, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        $i = $i + 1
    EndIf
Until $i = 7

;Phase 3 - Crafting Stations
MsgBox(4096 + 262144 + 0, "WEAPON CRAFTING STATIONS", "To do:" & _
        @CRLF & "1) Open your 1st crafting tool and select the schematic for " & _
        "Weapon, Droids, And General Item Crafting Station" & @CRLF & " 2) Click " & _
        "the Next button on the crafting window" & @CRLF & "" & @CRLF & " Click " & _
        "OK after you have chosen your schematic And clicked the Next button")

SplashTextOn("WEAPON CRAFTING STATIONS", "Click once on the STEEL for the Weapon Crafting Staion", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$steelx = $pos[0]
$steely = $pos[1]
Sleep(1000)

SplashTextOn("WEAPON CRAFTING STATIONS", "Close the crafting window by clicking on the X In the upper right corner", 400, 50, -1, -1, 0, "Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$winclosex = $pos[0]
$winclosey = $pos[1]
Sleep(1000)

SplashTextOn("WEAPON CRAFTING STATIONS", "Auto-crafting will start in 5 seconds", 400, 50, -1, -1, 0, " Courier", 12)
Sleep(5000)
SplashOff()

$i = 0
Do
    If WinActive("Star Wars Galaxies", "") Then
        Send("{1}");fires crafting tool in slot 1
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{2}");fires crafting tool in slot 2
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{3}");fires crafting tool in slot 3
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{4}");fires crafting tool in slot 4
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{5}");fires crafting tool in slot 5
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(10000)

        $i = $i + 1
    EndIf
Until $i = 31

;Phase 4 - Fountains
MsgBox(4096 + 262144 + 0, "FOUNTAINS", "To do:" & @CRLF & "1) Open " & _
        "your 1st crafting tool And Select the schematic For Fountain" & @CRLF & _
        "2) Click the NEXT button on the crafting window" & @CRLF & "" & _
        @CRLF & "Click OK after you have chosen your schematic and clicked the Next button")

SplashTextOn("FOUNTAINS", "Click once on the ORE for the Fountain", 400, 50, -1, -1, 0, "Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$orex = $pos[0]
$orey = $pos[1]
Sleep(1000)

SplashTextOn("FOUNTAINS", "Click once on the STEEL for the Fountain", 400, 50, -1, -1, 0, "Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$steelx = $pos[0]
$steely = $pos[1]
Sleep(1000)

SplashTextOn("FOUNTAINS", "Click once on the WATER for the Fountain", 400, 50, -1, -1, 0, "Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$waterx = $pos[0]
$watery = $pos[1]
Sleep(1000)

SplashTextOn("FOUNTAINS", "Close the crafting window by clicking on the X In the upper right corner", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$winclosex = $pos[0]
$winclosey = $pos[1]
Sleep(1000)

SplashTextOn("FOUNTAIN", "Auto-crafting will start in 5 seconds", 400, 50, -1, -1, 0, "Courier", 12)
Sleep(5000)
SplashOff()

$i = 0
Do
    If WinActive("Star Wars Galaxies", "") Then
        Send("{1}");fires crafting tool in slot 1
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $waterx, $watery, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{2}");fires crafting tool in slot 2
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $waterx, $watery, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{3}");fires crafting tool in slot 3
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $waterx, $watery, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{4}");fires crafting tool in slot 4
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $waterx, $watery, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{5}");fires crafting tool in slot 5
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $steelx, $steely, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $waterx, $watery, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        $i = $i + 1
    EndIf
Until $i = 77

;Phase 5 - Gungan Heads
MsgBox(4096 + 262144 + 0, "GUNGAN HEADS", "To do:" & @CRLF & "1) Open " & _
        "your 1st crafting tool And Select the schematic For Gungan Head " & _
        "Statue" & @CRLF & " 2) Click the Next button on the crafting window" & _
        @CRLF & "" & @CRLF & "Click OK after you have chosen your schematic " & _
        "And clicked the Next button")

SplashTextOn("GUNGAN HEADS", "Click once on the ORE for the Gungan Head Statue", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$orex = $pos[0]
$orey = $pos[1]
Sleep(1000)

SplashTextOn("GUNGAN HEADS", "Click once on the GEMSTONE for the Gungan Head Statue", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$gemx = $pos[0]
$gemy = $pos[1]
Sleep(1000)

SplashTextOn("GUNGAN HEADS", "Close the crafting window by clicking on the X In the upper right corner", 400, 50, -1, -1, 0, " Courier", 12)
While 1
    Sleep(100)
    If _IsPressed("01") Then
        $pos = MouseGetPos()
        ExitLoop
    EndIf
WEnd
SplashOff()
$winclosex = $pos[0]
$winclosey = $pos[1]
Sleep(1000)

SplashTextOn("GUNGAN HEADS", "Auto-crafting will start in 5 seconds", 400, 50, -1, -1, 0, "Courier", 12)
Sleep(5000)
SplashOff()

$i = 0
Do
    If WinActive("Star Wars Galaxies", "") Then
        Send("{1}");fires crafting tool in slot 1
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $gemx, $gemy, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{2}");fires crafting tool in slot 2
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $gemx, $gemy, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{3}");fires crafting tool in slot 3
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $gemx, $gemy, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{4}");fires crafting tool in slot 4
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $gemx, $gemy, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        Send("{5}");fires crafting tool in slot 5
        Sleep(1500)
        Send("{7}");fires the Default macro to "click" the NEXT button
        Sleep(1500)
        MouseClick("left", $orex, $orey, 2, 10);moves the mouse And double clicks the resource
        Sleep(200)
        MouseClick("left", $gemx, $gemy, 2, 10);moves the mouse And double clicks the resource
        Sleep(2000)
        Send("{6}");fires the CraftingStages macro to complete the craft
        Sleep(1000)
        MouseClick("left", $winclosex, $winclosey, 1, 10);moves the mouse And closes To crafting window If there is a lag issue
        Sleep(1000)

        $i = $i + 1
    EndIf
Until $i = 11

MsgBox(4096 + 262144 + 0, "CONGRATULATIONS", "You have succesfully " & _
        "completed the SWG AFK Grinding program. Congratulations on becoming a " & _
        "level 90 Structures Trader!!")

Func TogglePause();Following script makes the "pause" option work correctly
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   ;==>TogglePause

Func ShowMe()
    $Showme = Not $Showme
EndFunc   ;==>ShowMe

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Please next time put it in autoit tags.

Next time, also, run a "SyntaxCheck Proc" check to confirm no syntax error exists in the code.

Share this post


Link to post
Share on other sites

will give that a try when i get home, didnt know about autoit tags sorry. i shall try the script correction you posted ( i cant thankyou enough for that) is syntaxcheck part of the forum or a tool in autoit?

Share this post


Link to post
Share on other sites

It's part of SciTE editor. SciTE is available for download here

Share this post


Link to post
Share on other sites

It's part of SciTE editor. SciTE is available for download here

ah cool thank you ( i used the editor built into autoit v3 before, cut and paste lol)

im hoping to learn how to write my own scripts (might be beyond my capabilitie but theres a few around like this that are very well commented so learning shouldnt be hard :) )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0