Okay so, ive spent 2 days updating and making my uw skele looking and working neat. Now i've comed to a conclusion where i want to have 3 buttons on it.
1st being the normal start for doing the underworld loop
2nd being going la to turn in quests
3rd being opening tots.
i've been messing around with the eventhandler and the while 1 loop for a day, and i havnt really had much knowledge about the eventhandler functions, since i've always copied somebody elses loop and just put my functions in there.
So what i want is basically to be able to run underworld, then press pause, and once paused i can then press button 2 to go LA and turn in quests, and open tots with button 3. Everything without having to close down the bot at all.
Is that possible? any info would be very much appreciated!
LEADER SCRIPT
Code:
Global Const $btnStart = GUICtrlCreateButton("Start", 8, 200, 154, 25)
Global Const $btnAcceptor = GUICtrlCreateButton("Grab ToT", 8, 230, 154, 25)
Global Const $btnOpenToT = GUICtrlCreateButton("Open ToT", 8, 260, 154, 25)
GUICtrlSetOnEvent($cbxHideGW, "EventHandler")
GUICtrlSetOnEvent($btnStart, "EventHandler")
GUICtrlSetOnEvent($btnAcceptor, "EventHandler")
GUICtrlSetOnEvent($btnOpenToT, "EventHandler")
GUISetOnEvent($GUI_EVENT_CLOSE, "EventHandler")
GUISetState(@SW_SHOW)
#include "Shared.au3"
Out("Ready")
Do
Sleep(500)
Until $yeetInitialized Or $boolInitialized Or $dabInitialized
SetMaxMemory()
While 1
If $boolRunning Then ;UW SKELE
Main()
Else
Out("Bot Paused")
GUICtrlSetState($btnStart, $GUI_ENABLE)
GUICtrlSetData($btnStart, "Start")
GUICtrlSetState($btnAcceptor, $GUI_ENABLE)
GUICtrlSetData($btnAcceptor, "ToT Time")
If Not $boolRunning Then
Do
Sleep(500)
Until $boolRunning Or $yeetrunning Or $dabrunning
EndIf
EndIf
If $yeetrunning Then ;LA QUEST
GoQuests()
Else
out("Bot Paused")
GUICtrlSetState($btnStart, $GUI_ENABLE)
GUICtrlSetData($btnStart, "Start")
GUICtrlSetState($btnAcceptor, $GUI_ENABLE)
GUICtrlSetData($btnAcceptor, "ToT Time")
If Not $yeetrunning Then
Do
Sleep(250)
Until $boolRunning Or $yeetrunning Or $dabrunning
EndIf
EndIf
If $dabrunning Then ;OPEN TOTS
GORAPESOMETOTS()
Else
Out("Bot Paused")
GUICtrlSetState($btnStart, $GUI_ENABLE)
GUICtrlSetData($btnStart, "Start")
GUICtrlSetState($btnAcceptor, $GUI_ENABLE)
GUICtrlSetData($btnAcceptor, "ToT Time")
If Not $dabrunning Then
Do
Sleep(500)
Until $boolRunning Or $yeetrunning Or $dabrunning
EndIf
EndIf
WEnd
SHARED SCRIPT.
Code:
Global $yeetrunning = False
Global $yeetInitialized = False
Global $dabrunning = False
Global $dabInitialized = False
Global $boolRunning = False
Global $boolInitialized = False
Global $Rendering = True
Global Const $USED_CITY = $TOA_ID
Global Const $POSITION_NEAR_AVATAR = $POSITION_NEAR_AVATAR_CHANTRY
Global Const $POSITION_AVATAR = $POSITION_AVATAR_CHANTRY
Global $runs = 0
Global $fails = 0
Global $GoldDrops = 0
Global $qcount = 0
Global $lastDistrict = -1
Func EventHandler()
Switch (@GUI_CtrlId)
Case $btnStart
If $boolRunning Then
GUICtrlSetData($btnStart, "Will pause after this run")
GUICtrlSetState($btnStart, $GUI_DISABLE)
$boolRunning = False
ElseIf $boolInitialized Then
GUICtrlSetData($btnStart, "Pause")
$boolRunning = True
Else
$boolRunning = True
GUICtrlSetData($btnStart, "Initializing...")
GUICtrlSetState($btnStart, $GUI_DISABLE)
GUICtrlSetState($inputCharName, $GUI_DISABLE)
WinSetTitle($MainGui, "", GUICtrlRead($inputCharName))
If GUICtrlRead($inputCharName) = "" Then
If Initialize(ProcessExists("gw.exe"), True, False, False) = False Then ; don't need string logs or event system
MsgBox(0, "Error", "Guild Wars it not running.")
Exit
EndIf
Else
If Initialize(GUICtrlRead($inputCharName), True, False, False) = False Then ; don't need string logs or event system
MsgBox(0, "Error", "Can't find a Guild Wars client with that character name.")
Exit
EndIf
EndIf
GUICtrlSetData($btnStart, "Pause")
GUICtrlSetState($btnStart, $GUI_ENABLE)
$boolInitialized = True
EndIf
Case $btnAcceptor
If $boolRunning Then
GUICtrlSetData($btnAcceptor, "Will pause after this run")
GUICtrlSetState($btnAcceptor, $GUI_DISABLE)
$boolRunning = False
ElseIf $boolInitialized Then
GUICtrlSetData($btnAcceptor, "Pause")
$boolRunning = True
Else
$boolRunning = True
GUICtrlSetData($btnAcceptor, "Initializing...")
GUICtrlSetState($btnAcceptor, $GUI_DISABLE)
GUICtrlSetState($inputCharName, $GUI_DISABLE)
WinSetTitle($MainGui, "", GUICtrlRead($inputCharName))
If GUICtrlRead($inputCharName) = "" Then
If Initialize(ProcessExists("gw.exe"), True, False, False) = False Then ; don't need string logs or event system
MsgBox(0, "Error", "Guild Wars it not running.")
Exit
EndIf
Else
If Initialize(GUICtrlRead($inputCharName), True, False, False) = False Then ; don't need string logs or event system
MsgBox(0, "Error", "Can't find a Guild Wars client with that character name.")
Exit
EndIf
EndIf
GUICtrlSetData($btnAcceptor, "Pause")
GUICtrlSetState($btnAcceptor, $GUI_ENABLE)
$boolInitialized = True
EndIf
Case $btnOpenToT
If $dabrunning Then
GUICtrlSetData($btnOpenToT, "Will pause after this run")
GUICtrlSetState($btnOpenToT, $GUI_DISABLE)
$dabrunning = False
ElseIf $dabInitialized Then
GUICtrlSetData($btnOpenToT, "Pause")
$dabrunning = True
Else
$dabrunning = True
GUICtrlSetData($btnOpenToT, "Initializing...")
GUICtrlSetState($btnOpenToT, $GUI_DISABLE)
GUICtrlSetState($inputCharName, $GUI_DISABLE)
WinSetTitle($MainGui, "", GUICtrlRead($inputCharName))
If GUICtrlRead($inputCharName) = "" Then
If Initialize(ProcessExists("gw.exe"), True, False, False) = False Then ; don't need string logs or event system
MsgBox(0, "Error", "Guild Wars it not running.")
Exit
EndIf
Else
If Initialize(GUICtrlRead($inputCharName), True, False, False) = False Then ; don't need string logs or event system
MsgBox(0, "Error", "Can't find a Guild Wars client with that character name.")
Exit
EndIf
EndIf
GUICtrlSetData($btnOpenToT, "Pause")
GUICtrlSetState($btnOpenToT, $GUI_ENABLE)
$dabInitialized = True
EndIf
Case $cbxHideGW
ClearMemory()
ToggleRendering()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
EndFunc ;==>EventHandler
Take a peek at how I did something similar. Ignore the tabs part, because I like tabs.
Code:
While 1
Sleep(1000)
If $BoolRun Then
Switch $CurrentTab
Case 0
If GUICtrlRead($Glint, "") == "Cast and Chill" Then
CastBonds()
GoChill()
$BoolRun = False
GUICtrlSetData($btnStart, "Start")
ElseIf GUICtrlRead($Glint, "") == "Cast Spirits" Then
CastSpirits()
$BoolRun = False
GUICtrlSetData($btnStart, "Start")
EndIf
Take a peek at how I did something similar. Ignore the tabs part, because I like tabs.
Code:
While 1
Sleep(1000)
If $BoolRun Then
Switch $CurrentTab
Case 0
If GUICtrlRead($Glint, "") == "Cast and Chill" Then
CastBonds()
GoChill()
$BoolRun = False
GUICtrlSetData($btnStart, "Start")
ElseIf GUICtrlRead($Glint, "") == "Cast Spirits" Then
CastSpirits()
$BoolRun = False
GUICtrlSetData($btnStart, "Start")
EndIf
It looks very interesting, but i've never used any tabs, and also never created a switch, ive seen different of switches but im not near experienced in them. In this case since i have 3 different buttons, what should the Switch expression be? Should i have more than just $boolrun and $boolinitialize variables inside the eventhandler for different buttons? Like i have in my earlier post where $yeetrun and $dabrunning would be False for a specific button. Wouldnt wanna do tabs and other stuff, just wanna keep it simple sorry im tired, and its fine if u dont have the time <3
My buttons:
Code:
Global Const $btnStart = GUICtrlCreateButton("Start", 8, 200, 154, 25)
Global Const $btnAcceptor = GUICtrlCreateButton("Grab ToT", 8, 230, 154, 25)
Global Const $btnOpenToT = GUICtrlCreateButton("Open ToT", 8, 260, 154, 25)
Example from your while loop, and i just popped in the buttons i guess.
While 1
Sleep(1000)
If $BoolRun Then
Switch <<<<<<<
Case 0
If *button 1
UnderworldSKELETING()
$BoolRun = False
GUICtrlSetData($btnStart, "Start")
ElseIf *Button 2
GRABQUESTREWARD()
$BoolRun = False
GUICtrlSetData($btnAcceptor , "Start")
ElseIf *Button 3
OPENTOTS()
$BoolRun = False ;
GUICtrlSetData($btnOpenToT , "Start")
EndIf
endswitch
endif
wend
Sorry just ignore my recent post, atm im making a gui with tab, everything will look smoother, ill tell you if i succeed or not , and also the link to your pauls helper doesnt initialize, would like to have a look at your gui to get the understanding throughout.
I got it working perfect, but instead of tabs and switch, i ended up using
Code:
Func GetChecked($GUICtrl)
Return (GUICtrlRead($GUICtrl) == $GUI_Checked)
EndFunc ;==>GetChecked
out("Ready")
Do
Sleep(100)
Until GetChecked($CboxQUESTANDTOT) Or GetChecked($CboxUNDERWORLDSKELE)
If GetChecked($CboxUNDERWORLDSKELE) Then
out("Underworld Selected")
ElseIf GetChecked($CboxQUESTANDTOT) Then
out("Quest + Tot's Selected")
EndIf
Do
Sleep(100)
Until $BoolInitialized
SetMaxMemory()
While 1
If $BoolRun Then
If GetChecked($CboxUNDERWORLDSKELE) Then
SkelefarmFollower()
EndIf
If GetChecked($CboxQUESTANDTOT) Then
GrabAndOpenToTs()
EndIf
Else
out("Bot Paused")
GUICtrlSetState($btnStart, $GUI_ENABLE)
GUICtrlSetData($btnStart, "Start")
While Not $BoolRun
Sleep(100)
WEnd
EndIf
WEnd
[B] Push Button [S] 10 e*gold/Button; 25 e*g/psd+Button 09/20/2013 - elite*gold Trading - 4 Replies Moin,
Hier könnt ihr folgenden Push Button kaufen:
http://i.epvpimg.com/YlrYe.jpg
Pro Button wären das 10e*g, pro Button mit .psd dazu 25e*g.
Wenn ihr einen Button kaufen wollt, schreibt mir eine PN, damit ich den Namen ändern kann, alles hochladen kann und euch dann per Treasure schicken kann. ;)
Schrift kann auch geändert werden. Dazu einfach in der PN schreiben, welche Schrift ihr haben wollt^^
co Then Co2 then Co3 >>>Rofl 01/25/2013 - Conquer Online 2 - 3 Replies co Then Co2 then Co3 >>>Rofl
Classic Co Was Good enough to let me continue in this game But when they Bring Ninja i think the game being Cartoon mode What is that i said to my self no matter i will continue but hen they bring monk Lol i said to my self The same words I will continue i am a mad man but when they say that they will bring pirates Loooooool i said to my self The same thing But To Be 3d Game what i know conquer main thing is the jumping if they upgrade the jumping No i will make...
WarRock statt KOREANISCHE BUTTON --> Englische BUTTON 02/26/2010 - WarRock - 6 Replies Bin mir nicht sicher ob es diesen Thread schon gibt
aber hab bis jetzt nichts gesehen hier.
Funktionen
Für WarRock Korea
Koreanische Schriften (Button) weg und englische Schriften (Button) hin
Anleitung