Universal Crafting Script
To check Mouse Coordinates and Colours use my Check.au3
here.
Script is written for
AutoIt.
I don't offer any Support at all!
Update 22.12.04:
- Event Triggering included
- Mana Check included
- Multiple Recipe Crafting included
- Quitting EQ2 when Job is done included
- Shutting down the Computer when Job is done included
Update 07.12.04:
- Minor Bugs corrected
Update 05.12.04:
- For 'stop earlier' you now only need to set one variable
- Stop Earlier Function now makes sure you don't accidentially produce a worthless (Shaped) Item.
- Colors now can be set in the Header.
- a lot of other Tweaks
Code: Select all
#comments-start
Event trigger Crafting Script by Nuad, Version Date: 22.12.04
This Version includes Event Triggering, Buffs no longer will spammed, they will only be pressed when
a negative Event occurs.
This Script includes a Mana Check (pause begins when mana is below 50% and ends when char is FM again)
which makes it possible to let the script run unattended.
Also now working with multiple recipes.
I don't give any Support at all!
#comments-end
; User needs to update these values accordingly
;
$eq = "EverQuest II"
$mX = 1020 ; Mouse X coordinate for the Begin/Repeat button
$mY = 801 ; Mouse Y coordinate for the Begin/Repeat button
$mA = 1008 ; Mouse X for Stop Earlier Check Part 1
$mB = 589 ; Mouse Y for Stop Earlier Check Part 1
$mC = 1180 ; Mouse X for Stop Button
$mD = 805 ; Mouse Y for Stop Button
$mE = 119 ; Mouse X for Mana full
$mF = 55 ; Mouse Y for Mana full
$mG = 69 ; Mouse X for Mana 50%
$mH = 55 ; Mouse Y for Mana 50%
$mI = 950 ; Mouse X for Eventcheck
$mJ = 760 ; Mouse Y for Eventcheck
$mK = 1006 ; Mouse X for Stop Earlier Check Part 2
$mL = 650 ; Mouse Y for Stop Earlier Check Part 2
$mBegin = 7687442 ; Begin Button Color
$mEarlier = 4869013 ; Stop earlier Color Part 1
$mEarly = 5781504 ; Stop earlier Color Part 2
$mFM = 6182614 ; Full Mana Color
$mOOM = 6182614 ; 50% Mana Color
$mEvent = 2302496 ; Event Check Color
$mOOMA = 6182614 ; Farbe für Mana 10%
$mEvent = 2302496 ; Event Check Color
$mAlarm = 7668992
$mT = 225
$mU = 170
$mV = 127
$mW = 934
$mTriggered = 0
$StopEarlier = 0 ; Set to 1 if you wan't to let the prodiction stop earlier.
$QuitSession = 0 ; Set to 1 if you wan't to quit EQ2 when the Job is done.
$ShutDown = 0 ; Set to 1 if you wan't to shut down your computer after quitting EQ2.
$stacks = 0
$rezepte = 1 ; Number of Recipes (1-6 )
$prod1 = 0 ; Amount to produce with Recipe 1
$prod2 = 0 ; Amount to produce with Recipe 2 ... and so on
$prod3 = 0
$prod4 = 0
$prod5 = 0
$prod6 = 0
; Make EQ2 Window Active
WinActivate($eq)
For $Count1 = 1 to $rezepte
If ($Count1 = 1) Then
Send("6")
$stacks = $prod1
EndIf
If ($Count1 = 2) Then
Send("7")
$stacks = $prod2
EndIf
If ($Count1 = 3) Then
Send("8")
$stacks = $prod3
EndIf
If ($Count1 = 4) Then
Send("9")
$stacks = $prod4
EndIf
If ($Count1 = 5) Then
Send("0")
$stacks = $prod5
EndIf
If ($Count1 = 6) Then
Send("-")
$stacks = $prod6
EndIf
Sleep(3000 + Random(500))
If ($Stacks > 0) Then Call("Craft")
$Stacks = 0
Next
If ($QuitSession = 1) Then Call("Quit")
MsgBox(0, "Fertig!", "Alle Arbeiten wurden erledigt!")
Func Craft()
For $count = 1 to $stacks
MouseClick("left", $mX, $mY)
Sleep(750 + Random(25))
MouseClick("left", $mX, $mY)
Sleep(750 + Random(500))
While (Call("crafted") = 0)
$mTriggered = 0
If (Call("Event") = 1) Then Call("Trigger")
; Call("Alarm")
If ($mTriggered = 0) Then Call("Spam")
Sleep(3000 + Random(500))
WEnd
If ($Count < $stacks) Then MouseClick("left", $mX, $mY)
Sleep(750 + Random(25))
If ($Count < $stacks) Then MouseClick("left", $mX, $mY)
Sleep(750 + Random(25))
Next
EndFunc
Func crafted()
$done = 0
$donea = 0
$color = PixelGetColor($mX, $mY)
If ($color = $mBegin) Then $done = 1
If ($StopEarlier = 1) Then Call("Earlier")
If ($donea = 1) Then $done = 1
If ($done = 1) and (Call("Mana") = 0) Then Call("Medden")
Return $done
EndFunc
; Meditate
Func Medden()
$MedCallzwo = 0
While (Call("ManaZwo") = 0)
$MedCallzwo = 1
Sleep(2000)
WEnd
EndFunc
; Manacheck
Func Mana()
$FM = 0
$color = PixelGetColor($mG, $mH)
If ($color = $mOOM) Then $FM = 1
Return $FM
EndFunc
Func ManaZwo()
$FMa = 0
$color = PixelGetColor($mE, $mF)
If ($color = $mFM) Then $FMa = 1
Return $FMa
EndFunc
Func Earlier()
$donea = 0
$color = PixelGetColor($mA, $mB)
$colorb = PixelGetColor($mK, $mL)
If ($color = $mEarlier) And ($colorb = $mEarly) Then
$donea = 1
MouseClick("left", $mC, $mD) ; Klick Stop
MouseMove($mX, $mY, 5)
EndIf
Return $donea
EndFunc
Func Event()
$event = 0
$color = PixelGetColor($mI, $mJ)
If ($color <> $mEvent) Then $event = 1
Return $event
EndFunc
Func Trigger()
If ($StopEarlier = 1) Then Call("Earlier")
Send("1") ; Ability 1
Sleep(250 + Random(25))
If ($StopEarlier = 1) Then Call("Earlier")
Send("2") ; Ability 2
Sleep(250 + Random(25))
If ($StopEarlier = 1) Then Call("Earlier")
Send("3") ; Ability 3
Sleep(250 + Random(25))
$mTriggered = 1
EndFunc
Func Alarm()
$color = PixelGetColor($mT, $mU)
If ($color = $mAlarm) Then
MouseClick("left", $mV, $mW)
MsgBox(0, "Alarm Exit!", "Server probably down!")
EndIf
EndFunc
Func Spam()
If ($StopEarlier = 1) Then Call("Earlier")
Send("1") ; Ability 1
Sleep(250 + Random(25))
If ($StopEarlier = 1) Then Call("Earlier")
Send("2") ; Ability 2
Sleep(250 + Random(25))
EndFunc
Func Quit()
MouseClick("left", 550, 970)
Sleep(30000)
If ($ShutDown = 1) Then
MouseClick("left", 30, 1006)
Sleep(5000)
MouseClick("left", 43, 982)
Sleep(10000)
Send("{ENTER}")
EndIf
EndFunc