Sign in to follow this  
Followers 0
onestcoder

Pause In the middle of running Functions

3 posts in this topic

#1 ·  Posted (edited)

What I want to do is add 2 buttons that would pause the script and a Run button that would resume. What direction should I go in???

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; AutoIt V 3.1.1
; Laura's Synthesis Powerlever Bot
; Version V3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Gui start
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#include <GUIConstants.au3>
$gui = GUICreate("Laura's Synthesis Bot V3a", 274, 200, 0, 0, -1, $WS_EX_TOPMOST)
opt("GUICoordMode", 1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Combo Lists
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$combo1 = GUICtrlCreateCombo("Cooking", 4, 4, 120, 100)
GUICtrlSetData($combo1, "0-3 Carrot Broth|3-10 Orange Juice|10-14 Slice of Bluetail|14-20 Apple Juice|14-20 Selbina Butter|20-26 Meat Jerky|26-29 Insect Paste|26-29 Dhalmel Steak|26-30 Pineapple Juice|30-35 Meatball|35-38 Meat Mithkabob|35-38 Jack - o - Lantern|38-40 Melon Juice|40-42 Pie Dough|42-48 Apple Pie|48-50 Grape Juice|50-54 Carp Sushi|54-60 Yagudo Drink|60-62 Melon Pie|62-68 Colored Egg|68-70 Squid Sushi|68-70 San d'Orian Tea|70-72 Pear au Lait|72-77 Navarin|72-77 Tuna Sushi|77-81 Pamama au Lait|81-84 Sole Sushi|81-85 Pumpkin Pie|85-90 Rolanberry Pie", "Cooking")
$combo2 = GUICtrlCreateCombo("Woodworking", 4, 44, 120, 100)
GUICtrlSetData($combo2, "0-3 Arrowwood lumber|3-8 Ash lumber|8-12 Holly lumber|12-16 Bolts|16-21 Maple Sugar|21-27 Iron arrows|27-30 Silver Arrows|30-35 Oak Lumber|35-39 Beetle Arrows|39-42 Fang Arrows|42-45 Rosewood Lumber|45-49 Horn Arrows|49-52 Mahogany Lumber|52-59 Scorpion Arrows|59-62 Darksteel bolts|62-68 Bodkin Arrows|68-72 R. Hume Fishing Rod|72-74 Hume Fishing rod|74-77 Clothespole|77-83 Mithran Fishing Rod", "Woodworking")
$combo3 = GUICtrlCreateCombo("Goldsmith", 4, 84, 120, 100)
GUICtrlSetData($combo3, "0-3 Copper Ingot|3-7 Copper Hairpin|7-11 Brass Sheet|11-15 Brass Ring|15-17 Brass Hairpins|15-18 Silver Ingot|15-19 Brass Chain|19-27 Silver Hairpin|19-27 Silver Arrowheads|27-31 Hiraishin|31-35 Jeweled Silver Rings|35-38 Mythril Ingot|38-41 Mythril Sheet|41-47 Mythril Ring|47-51 Gold Ingots|51-55 Jeweled Mythril Rings|55-60 Gold Ring|60-61 Platinum Ingot|61-67 Hydro Patas|67-70 Platinum Rings|70-75 Jeweled Gold Rings", "Goldsmith")
$combo4 = GUICtrlCreateCombo("Leathercraft", 4, 124, 120, 100)
GUICtrlSetData($combo4, "0-2 Sheep leather|0-4 Sheep Wool|4-11 Solea|11-14 Lizard Mantle|14-21 Dhalmel Leather|21-27 Dhalmel Mantle|27-29 Sandals|29-31 Parchment|31-35 Ram Leather|35-43 Waistbelt|43-49 Ram Mantles|49-52 Himantes|52-59 Moccasins|59-61 Tiger Leather", "Leathercraft")
$combo5 = GUICtrlCreateCombo("Bonecraft", 150, 4, 120, 100)
GUICtrlSetData($combo5, "1-4 Bone Hairpins|4-9 Bone Arrowheads|9-17 Bone Ring|17-25 Beetle Ring|22-28 Gelatin|25-29 Horn Hairpin|29-33 Beetle Arrowheads|33-37 Horn Ring|37-43 Horn Arrowheads|43-45 Carapace Mask|45-53 Scorpion Arrowheads|53-60 Scorpion Ring|60-66 Crumhorn|66-70 Demon's Ring|70-77 Coral Visor|77-80 Coral Ring|80-84 Behemoth KnIfe", "Bonecraft")
$combo6 = GUICtrlCreateCombo("Smithing", 150, 44, 120, 100)
GUICtrlSetData($combo6, "0-4 Bronze Sheet|4-9 Bronze Scales|9-14 Bronze Bolt Heads|14-16 Crossbow Bolt|17-20 Iron Arrowheads|20-22 Iron Sheet|22-25 Baselard|25-30 Tathlum|30-33 War Pick|26-34 Padded Cap|34-36 Steel Sheet|36-40 Steel Scales|40-44 Mythril Bolt Heads|40-44 Juji Shuriken|44-46 Hibari|45-53 Darksteel KnIfe|52-55 Darksteel Sheet|55-62 Darksteel Bolt Heads|58-66 Nodowa|66-73 Darksteel Pick|73-79 Karimata Arrowheads|79-83 Darksteel Nodowa|83-87 Dark Adaman Sheet|87-92 Molybdenum Sheet", "Smithing")
$combo7 = GUICtrlCreateCombo("Alchemy", 150, 84, 120, 100)
GUICtrlSetData($combo7, "0-3 Antidote|3-8 Silencing Potion|5-10 Deodorizer|10-16 Mercury|14-20 Echo Drops|20-25 R. Glass Fiber Rod|25-28 Blinding Potion|28-30 Eye Drops|28-31 Minnow|28-34 ArtIficial Lens|34-40 Potion|40-43 Vitriol|43-51 Holy Water|45-49 R. Carbon Fiber Rod|51-56 Cermet Chunk|53-61 Glass Fibers|61-65 R. Single-Hook Fishing Rod|65-71 Paralysis Dust|71-78 Paralyze Potion|78-85 R. Composite Fishing Rod", "Alchemy")
$combo8 = GUICtrlCreateCombo("Clothcraft", 150, 124, 120, 100)
GUICtrlSetData($combo8, "0-1 Grass Thread|1-4 Grass Cloth|4-11 Cotton Thread|11-12 Cotton Cloth|12-19 Linen Thread|19-22 Linen Cloth|22-30 Fly Lure|30-35 Wool Thread|35-37 Wool Cloth|35-42 Bird Fletchings|42-45 Velvet Cloth|45-52 Insect Fletchings|52-53 Silk Cloth|53-62 Green Ribbons|62-69 Silk Headbands|69-78 Rainbow Thread|78-81 Rainbow Cloth", "Clothcraft")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; OK BUTTON
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$button_1 = GUICtrlCreateButton("OK", 4, 160, 75, 25)
GUICtrlSetState($button_1, $GUI_FOCUS)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; EXIT BUTTON
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$n2 = GUICtrlCreateButton("EXIT", 150, 160, 75, 25)
GUISetState()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Values
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Do
    $msg = GUIGetMsg()
    If $msg = $button_1 Then
        $cook = GUICtrlRead($combo1)
        $wood = GUICtrlRead($combo2)
        $gold = GUICtrlRead($combo3)
        $leather = GUICtrlRead($combo4)
        $bone = GUICtrlRead($combo5)
        $smith = GUICtrlRead($combo6)
        $alch = GUICtrlRead($combo7)
        $cloth = GUICtrlRead($combo8)
        Select
            Case $cook = "Cooking"
                $cook2 = 0
            Case $cook = "0-3 Carrot Broth"
                $cook2 = 4000
            Case $cook = "3-10 Orange Juice"
                $cook2 = 4000
            Case $cook = "10-14 Slice of Bluetail"
                $cook2 = 100
            Case $cook = "14-20 Apple Juice"
                $cook2 = 4000
            Case $cook = "14-20 Selbina Butter"
                $cook2 = 200
            Case $cook = "20-26 Meat Jerky"
                $cook2 = 300
            Case $cook = "26-29 Insect Paste"
                $cook2 = 300
            Case $cook = "26-29 Dhalmel Steak"
                $cook2 = 300
            Case $cook = "26-30 Pineapple Juice"
                $cook2 = 2000
            Case $cook = "30-35 Meatball"
                $cook2 = 301
            Case $cook = "35-38 Meat Mithkabob"
                $cook2 = 400
            Case $cook = "35-38 Jack - o - Lantern"
                $cook2 = 200
            Case $cook = "38-40 Melon Juice"
                $cook2 = 200
            Case $cook = "40-42 Pie Dough"
                $cook2 = 301
            Case $cook = "42-48 Apple Pie"
                $cook2 = 500
            Case $cook = "48-50 Grape Juice"
                $cook2 = 4000
            Case $cook = "50-54 Carp Sushi"
                $cook2 = 300
            Case $cook = "54-60 Yagudo Drink"
                $cook2 = 4030
            Case $cook = "60-62 Melon Pie"
                $cook2 = 500
            Case $cook = "62-68 Colored Egg"
                $cook2 = 400
            Case $cook = "68-70 Squid Sushi"
                $cook2 = 501
            Case $cook = "68-70 San d'Orian Tea"
                $cook2 = 500
            Case $cook = "70-72 Pear au Lait"
                $cook2 = 4020
            Case $cook = "72-77 Navarin"
                $cook2 = 800
            Case $cook = "72-77 Tuna Sushi"
                $cook2 = 501
            Case $cook = "77-81 Pamama au Lait"
                $cook2 = 4020
            Case $cook = "81-84 Sole Sushi"
                $cook2 = 500
            Case $cook = "81-85 Pumpkin Pie"
                $cook2 = 800
            Case $cook = "85-90 Rolanberry Pie"
                $cook2 = 701
        EndSelect
;Woodworking
        Select
            Case $wood = "Woodworking"
                $wood2 = 0
            Case $wood = "0-3 Arrowwood lumber"
                $wood2 = 101
            Case $wood = "3-8 Ash lumber"
                $wood2 = 101
            Case $wood = "8-12 Holly lumber"
                $wood2 = 101
            Case $wood = "12-16 Bolts"
                $wood2 = 200
            Case $wood = "16-21 Maple Sugar"
                $wood2 = 101
            Case $wood = "21-27 Iron arrows"
                $wood2 = 300
            Case $wood = "27-30 Silver Arrows"
                $wood2 = 300
            Case $wood = "30-35 Oak Lumber"
                $wood2 = 101
            Case $wood = "35-39 Beetle Arrows"
                $wood2 = 300
            Case $wood = "39-42 Fang Arrows"
                $wood2 = 300
            Case $wood = "42-45 Rosewood Lumber"
                $wood2 = 101
            Case $wood = "45-49 Horn Arrows"
                $wood2 = 300
            Case $wood = "49-52 Mahogany Lumber"
                $wood2 = 101
            Case $wood = "52-59 Scorpion Arrows"
                $wood2 = 300
            Case $wood = "59-62 Darksteel bolts"
                $wood2 = 200
            Case $wood = "62-68 Bodkin Arrows"
                $wood2 = 300
            Case $wood = "68-72 R. Hume Fishing Rod"
                $wood2 = 101
            Case $wood = "72-74 Hume Fishing rod"
                $wood2 = 200
            Case $wood = "74-77 Clothespole"
                $wood2 = 200
            Case $wood = "77-83 Mithran Fishing Rod"
                $wood2 = 200
        EndSelect
;Gold Smithing
        Select
            Case $gold = "Goldsmith"
                $gold2 = 0
            Case $gold = "0-3 Copper Ingot"
                $gold2 = 4040
            Case $gold = "3-7 Copper Hairpin"
                $gold2 = 100
            Case $gold = "7-11 Brass Sheet"
                $gold2 = 100
            Case $gold = "11-15 Brass Ring"
                $gold2 = 2000
            Case $gold = "15-17 Brass Hairpins"
                $gold2 = 100
            Case $gold = "15-18 Silver Ingot"
                $gold2 = 4000
            Case $gold = "15-19 Brass Chain"
                $gold2 = 2000
            Case $gold = "19-27 Silver Hairpin"
                $gold2 = 100
            Case $gold = "19-27 Silver Arrowheads"
                $gold2 = 200
            Case $gold = "27-31 Hiraishin"
                $gold2 = 200
            Case $gold = "31-35 Jeweled Silver Rings"
                $gold2 = 201
            Case $gold = "35-38 Mythril Ingot"
                $gold2 = 4000
            Case $gold = "38-41 Mythril Sheet"
                $gold2 = 100
            Case $gold = "41-47 Mythril Ring"
                $gold2 = 2000
            Case $gold = "47-51 Gold Ingots"
                $gold2 = 4000
            Case $gold = "51-55 Jeweled Mythril Rings"
                $gold2 = 201
            Case $gold = "55-60 Gold Ring"
                $gold2 = 2000
            Case $gold = "60-61 Platinum Ingot"
                $gold2 = 4000
            Case $gold = "61-67 Hydro Patas"
                $gold2 = 301
            Case $gold = "67-70 Platinum Rings"
                $gold2 = 2000
            Case $gold = "70-75 Jeweled Gold Rings"
                $gold2 = 201
        EndSelect
;Bonecraft
        Select
            Case $bone = "Bonecraft"
                $bone2 = 0
            Case $bone = "1-4 Bone Hairpins"
                $bone2 = 100
            Case $bone = "4-9 Bone Arrowheads"
                $bone2 = 2000
            Case $bone = "9-17 Bone Ring"
                $bone2 = 200
            Case $bone = "17-25 Beetle Ring"
                $bone2 = 100
            Case $bone = "22-28 Gelatin"
                $bone2 = 201
            Case $bone = "25-29 Horn Hairpin"
                $bone2 = 101
            Case $bone = "29-33 Beetle Arrowheads"
                $bone2 = 200
            Case $bone = "33-37 Horn Ring"
                $bone2 = 201
            Case $bone = "37-43 Horn Arrowheads"
                $bone2 = 201
            Case $bone = "43-45 Carapace Mask"
                $bone2 = 201
            Case $bone = "45-53 Scorpion Arrowheads"
                $bone2 = 201
            Case $bone = "53-60 Scorpion Ring"
                $bone2 = 101
            Case $bone = "60-66 Crumhorn"
                $bone2 = 200
            Case $bone = "66-70 Demon's Ring"
                $bone2 = 200
            Case $bone = "70-77 Coral Visor"
                $bone2 = 3020
            Case $bone = "77-80 Coral Ring"
                $bone2 = 2000
            Case $bone = "80-84 Behemoth KnCasee"
                $bone2 = 201
        EndSelect
;Smithing
        Select
            Case $smith = "Smithing"
                $smith2 = 0
            Case $smith = "0-4 Bronze Sheet"
                $smith2 = 100
            Case $smith = "4-9 Bronze Scales"
                $smith2 = 100
            Case $smith = "9-14 Bronze Bolt Heads"
                $smith2 = 100
            Case $smith = "14-16 Crossbow Bolt"
                $smith2 = 200
            Case $smith = "17-20 Iron Arrowheads"
                $smith2 = 200
            Case $smith = "20-22 Iron Sheet"
                $smith2 = 100
            Case $smith = "22-25 Baselard"
                $smith2 = 200
            Case $smith = "25-30 Tathlum"
                $smith2 = 100
            Case $smith = "30-33 War Pick"
                $smith2 = 101
            Case $smith = "26-34 Padded Cap"
                $smith2 = 101
            Case $smith = "34-36 Steel Sheet"
                $smith2 = 100
            Case $smith = "36-40 Steel Scales"
                $smith2 = 100
            Case $smith = "40-44 Mythril Bolt Heads"
                $smith2 = 100
            Case $smith = "40-44 Juji Shuriken"
                $smith2 = 200
            Case $smith = "44-46 Hibari"
                $smith2 = 200
            Case $smith = "45-53 Darksteel KnCasee"
                $smith2 = 200
            Case $smith = "52-55 Darksteel Sheet"
                $smith2 = 100
            Case $smith = "55-62 Darksteel Bolt Heads"
                $smith2 = 100
            Case $smith = "58-66 Nodowa"
                $smith2 = 200
            Case $smith = "66-73 Darksteel Pick"
                $smith2 = 200
            Case $smith = "73-79 Karimata Arrowheads"
                $smith2 = 200
            Case $smith = "79-83 Darksteel Nodowa"
                $smith2 = 200
            Case $smith = "83-87 Dark Adaman Sheet"
                $smith2 = 100
            Case $smith = "87-92 Molybdenum Sheet"
                $smith2 = 100
        EndSelect
;Alchemy
        Select
            Case $alch = "Alchemy"
                $alch2 = 0
            Case $alch = "0-3 Antidote"
                $alch2 = 300
            Case $alch = "3-8 Silencing Potion"
                $alch2 = 200
            Case $alch = "5-10 Deodorizer"
                $alch2 = 300
            Case $alch = "10-16 Mercury"
                $alch2 = 4000
            Case $alch = "14-20 Echo Drops"
                $alch2 = 300
            Case $alch = "20-25 R. Glass Fiber Rod"
                $alch2 = 101
            Case $alch = "25-28 Blinding Potion"
                $alch2 = 200
            Case $alch = "28-30 Eye Drops"
                $alch2 = 300
            Case $alch = "28-31 Minnow"
                $alch2 = 200
            Case $alch = "28-34 ArtCaseicial Lens"
                $alch2 = 2000
            Case $alch = "34-40 Potion"
                $alch2 = 300
            Case $alch = "40-43 Vitriol"
                $alch2 = 2000
            Case $alch = "43-51 Holy Water "
                $alch2 = 100
            Case $alch = "45-49 R. Carbon Fiber Rod"
                $alch2 = 101
            Case $alch = "51-56 Cermet Chunk"
                $alch2 = 4000
            Case $alch = "53-61 Glass Fiber"
                $alch2 = 8000
            Case $alch = "61-65 R. Single-Hook Fishing Rod"
                $alch2 = 101
            Case $alch = "65-71 Paralysis Dust"
                $alch2 = 2000
            Case $alch = "71-78 Paralyze Potion"
                $alch2 = 200
            Case $alch = "78-85 R. Composite Fishing Rod"
                $alch2 = 101
        EndSelect
;Leathercraft
        Select
            Case $leather = "Leathercraft"
                $leather2 = 0
            Case $leather = "0-2 Sheep leather"
                $leather2 = 301
            Case $leather = "0-4 Sheep Wool"
                $leather2 = 202
            Case $leather = "4-11 Solea"
                $leather2 = 2000
            Case $leather = "11-14 Lizard Mantle"
                $leather2 = 300
            Case $leather = "14-21 Dhalmel Leather"
                $leather2 = 301
            Case $leather = "21-27 Dhalmel Mantle"
                $leather2 = 201
            Case $leather = "27-29 Sandals"
                $leather2 = 200
            Case $leather = "29-31 Parchment"
                $leather2 = 200
            Case $leather = "31-35 Ram Leather"
                $leather2 = 301
            Case $leather = "35-43 Waistbelt"
                $leather2 = 3020
            Case $leather = "43-49 Ram Mantles"
                $leather2 = 201
            Case $leather = "49-52 Himantes"
                $leather2 = 201
            Case $leather = "52-59 Moccasins"
                $leather2 = 300
            Case $leather = "59-61 Tiger Leather"
                $leather2 = 301
        EndSelect
;Clothcraft
        Select
            Case $cloth = "Clothcraft"
                $cloth2 = 0
            Case $cloth = "0-1 Grass Thread"
                $cloth2 = 101
            Case $cloth = "1-4 Grass Cloth"
                $cloth2 = 3000
            Case $cloth = "4-11 Cotton Thread"
                $cloth2 = 2000
            Case $cloth = "11-12 Cotton Cloth"
                $cloth2 = 3000
            Case $cloth = "12-19 Linen Thread"
                $cloth2 = 2000
            Case $cloth = "19-22 Linen Cloth"
                $cloth2 = 3000
            Case $cloth = "22-30 Fly Lure"
                $cloth2 = 300
            Case $cloth = "30-35 Wool Thread"
                $cloth2 = 2000
            Case $cloth = "35-37 Wool Cloth"
                $cloth2 = 3000
            Case $cloth = "35-42 Bird Fletchings"
                $cloth2 = 2000
            Case $cloth = "42-45 Velvet Cloth"
                $cloth2 = 3020
            Case $cloth = "45-52 Insect Fletchings"
                $cloth2 = 2000
            Case $cloth = "52-53 Silk Cloth"
                $cloth2 = 3000
            Case $cloth = "53-62 Green Ribbons"
                $cloth2 = 100
            Case $cloth = "62-69 Silk Headbands"
                $cloth2 = 200
            Case $cloth = "69-78 Rainbow Thread"
                $cloth2 = 2000
            Case $cloth = "78-81 Rainbow Cloth"
                $cloth2 = 3000
        EndSelect
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Totals and Activation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        $combot = $cook2 + $wood2 + $gold2 + $leather2 + $bone2 + $smith2 + $alch2 + $cloth2
        Call('synth' & $combot)
        If @error Then ContinueLoop
    EndIf
    If $msg = $n2 Then
        MsgBox(0, "Exit", "OK. Bye!")
        Exit
    EndIf
Until $msg = $GUI_EVENT_CLOSE
;
;
;
;
;
Func synth100()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 100
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 100", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(1000)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 2}{RIGHT 4}{ENTER 1}')
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth100
;
;
Func synth101()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 101
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 101", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(10000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(1000)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 1}{RIGHT 4}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth101
;
;
;
Func synth200()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 200
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 200", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(500)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 2}{RIGHT 1}{ENTER 1}{DOWN 1}{ENTER 2}{RIGHT 3}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth200
;
;
Func synth201()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 201
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 201", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(500)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 2}{RIGHT 1}{ENTER 1}{DOWN 1}{ENTER 1}{RIGHT 3}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth201
;
;
Func synth202()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 202
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 202", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(500)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 1}{RIGHT 1}{ENTER 1}{DOWN 1}{ENTER 1}{RIGHT 3}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth202
;
;
Func synth300()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 300
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 300", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(500)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 2}{RIGHT 1}{ENTER 1}{DOWN 1}{ENTER 2}{RIGHT 1}{ENTER 1}{DOWN 1}{ENTER 2}{RIGHT 2}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth300
;
;
Func synth301()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 301
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 301", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(500)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1[code]}{ENTER 2}{RIGHT 1}{ENTER 1}{DOWN 1}{ENTER 2}{RIGHT 1}{ENTER 1}{RIGHT 2}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth301

Script is to long so it is shortened

Edited by onestcoder

Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites



check the help file for "hotkeyset" pause

phil

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Ok how does this look?

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; AutoIt V 3.1.1
; Laura's Synthesis Powerlever Bot
; Version V3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Gui start
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#include <GUIConstants.au3>
$gui = GUICreate("Laura's Synthesis Bot V3a", 274, 200, 0, 0, -1, $WS_EX_TOPMOST)
opt("GUICoordMode", 1)
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Combo Lists
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$combo1 = GUICtrlCreateCombo("Cooking", 4, 4, 120, 100)
GUICtrlSetData($combo1, "0-3 Carrot Broth|3-10 Orange Juice|10-14 Slice of Bluetail|14-20 Apple Juice|14-20 Selbina Butter|20-26 Meat Jerky|26-29 Insect Paste|26-29 Dhalmel Steak|26-30 Pineapple Juice|30-35 Meatball|35-38 Meat Mithkabob|35-38 Jack - o - Lantern|38-40 Melon Juice|40-42 Pie Dough|42-48 Apple Pie|48-50 Grape Juice|50-54 Carp Sushi|54-60 Yagudo Drink|60-62 Melon Pie|62-68 Colored Egg|68-70 Squid Sushi|68-70 San d'Orian Tea|70-72 Pear au Lait|72-77 Navarin|72-77 Tuna Sushi|77-81 Pamama au Lait|81-84 Sole Sushi|81-85 Pumpkin Pie|85-90 Rolanberry Pie", "Cooking")
$combo2 = GUICtrlCreateCombo("Woodworking", 4, 44, 120, 100)
GUICtrlSetData($combo2, "0-3 Arrowwood lumber|3-8 Ash lumber|8-12 Holly lumber|12-16 Bolts|16-21 Maple Sugar|21-27 Iron arrows|27-30 Silver Arrows|30-35 Oak Lumber|35-39 Beetle Arrows|39-42 Fang Arrows|42-45 Rosewood Lumber|45-49 Horn Arrows|49-52 Mahogany Lumber|52-59 Scorpion Arrows|59-62 Darksteel bolts|62-68 Bodkin Arrows|68-72 R. Hume Fishing Rod|72-74 Hume Fishing rod|74-77 Clothespole|77-83 Mithran Fishing Rod", "Woodworking")
$combo3 = GUICtrlCreateCombo("Goldsmith", 4, 84, 120, 100)
GUICtrlSetData($combo3, "0-3 Copper Ingot|3-7 Copper Hairpin|7-11 Brass Sheet|11-15 Brass Ring|15-17 Brass Hairpins|15-18 Silver Ingot|15-19 Brass Chain|19-27 Silver Hairpin|19-27 Silver Arrowheads|27-31 Hiraishin|31-35 Jeweled Silver Rings|35-38 Mythril Ingot|38-41 Mythril Sheet|41-47 Mythril Ring|47-51 Gold Ingots|51-55 Jeweled Mythril Rings|55-60 Gold Ring|60-61 Platinum Ingot|61-67 Hydro Patas|67-70 Platinum Rings|70-75 Jeweled Gold Rings", "Goldsmith")
$combo4 = GUICtrlCreateCombo("Leathercraft", 4, 124, 120, 100)
GUICtrlSetData($combo4, "0-2 Sheep leather|0-4 Sheep Wool|4-11 Solea|11-14 Lizard Mantle|14-21 Dhalmel Leather|21-27 Dhalmel Mantle|27-29 Sandals|29-31 Parchment|31-35 Ram Leather|35-43 Waistbelt|43-49 Ram Mantles|49-52 Himantes|52-59 Moccasins|59-61 Tiger Leather", "Leathercraft")
$combo5 = GUICtrlCreateCombo("Bonecraft", 150, 4, 120, 100)
GUICtrlSetData($combo5, "1-4 Bone Hairpins|4-9 Bone Arrowheads|9-17 Bone Ring|17-25 Beetle Ring|22-28 Gelatin|25-29 Horn Hairpin|29-33 Beetle Arrowheads|33-37 Horn Ring|37-43 Horn Arrowheads|43-45 Carapace Mask|45-53 Scorpion Arrowheads|53-60 Scorpion Ring|60-66 Crumhorn|66-70 Demon's Ring|70-77 Coral Visor|77-80 Coral Ring|80-84 Behemoth KnIfe", "Bonecraft")
$combo6 = GUICtrlCreateCombo("Smithing", 150, 44, 120, 100)
GUICtrlSetData($combo6, "0-4 Bronze Sheet|4-9 Bronze Scales|9-14 Bronze Bolt Heads|14-16 Crossbow Bolt|17-20 Iron Arrowheads|20-22 Iron Sheet|22-25 Baselard|25-30 Tathlum|30-33 War Pick|26-34 Padded Cap|34-36 Steel Sheet|36-40 Steel Scales|40-44 Mythril Bolt Heads|40-44 Juji Shuriken|44-46 Hibari|45-53 Darksteel KnIfe|52-55 Darksteel Sheet|55-62 Darksteel Bolt Heads|58-66 Nodowa|66-73 Darksteel Pick|73-79 Karimata Arrowheads|79-83 Darksteel Nodowa|83-87 Dark Adaman Sheet|87-92 Molybdenum Sheet", "Smithing")
$combo7 = GUICtrlCreateCombo("Alchemy", 150, 84, 120, 100)
GUICtrlSetData($combo7, "0-3 Antidote|3-8 Silencing Potion|5-10 Deodorizer|10-16 Mercury|14-20 Echo Drops|20-25 R. Glass Fiber Rod|25-28 Blinding Potion|28-30 Eye Drops|28-31 Minnow|28-34 ArtIficial Lens|34-40 Potion|40-43 Vitriol|43-51 Holy Water|45-49 R. Carbon Fiber Rod|51-56 Cermet Chunk|53-61 Glass Fibers|61-65 R. Single-Hook Fishing Rod|65-71 Paralysis Dust|71-78 Paralyze Potion|78-85 R. Composite Fishing Rod", "Alchemy")
$combo8 = GUICtrlCreateCombo("Clothcraft", 150, 124, 120, 100)
GUICtrlSetData($combo8, "0-1 Grass Thread|1-4 Grass Cloth|4-11 Cotton Thread|11-12 Cotton Cloth|12-19 Linen Thread|19-22 Linen Cloth|22-30 Fly Lure|30-35 Wool Thread|35-37 Wool Cloth|35-42 Bird Fletchings|42-45 Velvet Cloth|45-52 Insect Fletchings|52-53 Silk Cloth|53-62 Green Ribbons|62-69 Silk Headbands|69-78 Rainbow Thread|78-81 Rainbow Cloth", "Clothcraft")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; OK BUTTON
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$button_1 = GUICtrlCreateButton("OK", 4, 160, 75, 25)
GUICtrlSetState($button_1, $GUI_FOCUS)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; EXIT BUTTON
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$n2 = GUICtrlCreateButton("EXIT", 150, 160, 75, 25)
GUISetState()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Values
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Do
    $msg = GUIGetMsg()
    If $msg = $button_1 Then
        $cook = GUICtrlRead($combo1)
        $wood = GUICtrlRead($combo2)
        $gold = GUICtrlRead($combo3)
        $leather = GUICtrlRead($combo4)
        $bone = GUICtrlRead($combo5)
        $smith = GUICtrlRead($combo6)
        $alch = GUICtrlRead($combo7)
        $cloth = GUICtrlRead($combo8)
        Select
            Case $cook = "Cooking"
                $cook2 = 0
        EndSelect
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Totals and Activation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        $combot = $cook2 + $wood2 + $gold2 + $leather2 + $bone2 + $smith2 + $alch2 + $cloth2
        Call('synth' & $combot)
        If @error Then ContinueLoop
    EndIf
    If $msg = $n2 Then
        MsgBox(0, "Exit", "OK. Bye!")
        Exit
    EndIf
Until $msg = $GUI_EVENT_CLOSE
;
;
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc
;
;
;
Func synth100()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 100
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 100", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(30000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(1000)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 2}{RIGHT 4}{ENTER 1}')
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth100
;
;
Func synth101()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 101
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $answer = MsgBox(4, "Synthesis Version 101", "This will run Synthesis V2 In 30sec after you click OK. Run?" & @CRLF & "Use this 30secs to get Image Support if you can!!!" & @CRLF & "REMEMBER!!! Sort your items in your Inventory before hitting OK!!!")
    If $answer = 7 Then
        MsgBox(0, "Exit", "OK.  Bye!")
        Return
    EndIf
    Sleep(10000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    Sleep(1000)
    Send('{ESCAPE}')
    opt('SendKeyDelay', 500); SendKeyDelay set to 500 ms
    For $loop = 1 To 11
        Sleep(1000)
        Send('{CTRLDOWN}i{CTRLUP}{LEFT 5}{ENTER 3}{DOWN 1}{ENTER 1}{RIGHT 4}{ENTER 1}')
;Synthesis
        Sleep(32000)
    Next
; Finished!
    MsgBox(0, "Exit", "Finished!")
    opt('SendKeyDelay', 5); SendKeyDelay to default.
EndFunc ;==>synth101

Script was shortened to save lines

Edited by onestcoder

Need a website: http://www.iconixmarketing.com

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