├── .gitattributes ├── .gitignore ├── OSBuddy_hide.txt ├── OSBuddy_show.txt ├── bossing-zulrah.ahk ├── construction-carvedTeakWardrobe.ahk ├── construction-dungeonDoors.ahk ├── construction-oakLarders.ahk ├── crafting-charters.ahk ├── dartsMesshall.ahk ├── fDrop - shortcuts for dropping items.ahk ├── firemaking-wintertodt.ahk ├── fishing.ahk ├── fletching-darts.ahk ├── guibutton ├── app.ico ├── bin │ └── gui button script.exe ├── gui button script.ahk ├── inc │ ├── class gui main.ahk │ ├── functions.ahk │ └── subroutines.ahk └── lib │ └── Class Gui.ahk ├── intervalTimer.ahk ├── mining-motherlodeMine.ahk ├── mining-motherlodeMine.ini ├── misc-launchOSBuddy.ahk ├── misc-launchOSBuddy.ini ├── misc-nmzTimer.ahk ├── misc-nmzTimer.ini ├── misc-updateCML.ahk ├── monitorPixelColor.ahk ├── osrsWikiApi.txt ├── prayer-gildedAltar.ahk ├── runecrafting-abyss.ahk ├── shops-buyAmount50.ahk ├── smithing-blastfurnace.ahk ├── smithing-platebodies.ahk ├── thieving-blackjacking.ahk ├── thieving-men.ahk └── toothysPickaxes.ahk /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /OSBuddy_hide.txt: -------------------------------------------------------------------------------- 1 | Bones, irit*, staff of earth, dwarf weed seed, spider carcass, guam leaf, grimy rogue's purse, trading sticks, grimy snake weed, knife, dark fishing bait, eye of newt, tile, plank, crossbow, watermelon seed, harralander*, irit seed, kwuarm seed, mushroom spore, adamant battleaxe, rune dagger, wildblood seed, coal, jangerberry seed, whiteberry seed, adamant med helm, crossbow string, strength potion*, ugthanki kebab, weapon poison, thread, harpoon, bone bolts, Waterskin(4), clue scroll (hard), *mourner*, Wyvern bones, Antipoison*, Leather*, Granite*, Sandstone*, Defence potion*, Attack potion*, Big bones, Steel*, Broad bolts, Cactus seed, Belladonna seed, Poison ivy seed, Suqah hide, Salmon, Seaweed, Mithril*, Pirate boots, Pottery*, Stone*, Bronze*, Dagannoth hide, Caviar, Roe, Tinderbox, Bucket, Weeds, Lava scale, Spinach roll, Black dragonhide, Lava dragon bones, Willow*, Gold ring, Plant pot, Burnt bones, Fire rune, Teak logs, Leaping*, Water rune, Air rune, Feather, Earth rune, Ashes, Dragon bones, Black*, Herb, Vial, Curry, Kebab, coins, lobster pot, clue scroll (medium), fishing bait, opal bolt tips, iron spear, raw lobster, oyster pearls, raw herring, raw tuna, raw sardine, Fried mushrooms, Strawberry seed, oyster pearl, raw mackerel, limpwurt seed, adamant axe, Empty plant pot, Beer, Iron*, *arrom*, *gua*, *adym*, *arrenti*, *harralander, *kwuarm, *irit*, *vanto*, smoke rune, *adantin*, *oadfla*, enchanted gem, crossbow string, gold bar, tuna, suqah tooth, adamant dart, lobster, adamantite bar, emerald ring, yellow gloves, red gloves, sapphire ring, purple gloves, teal gloves, potato seed, onion*, limpwurt*, cabbage seed, tomato seed, sweetcorn seed, adamantite ore, law rune, adamant full helm, pineapple, flax, banana, white berries, brewin' guide, grimy dwarf weed, red bead, yellow bead, white bead, black bead, mind talisman, shears, raw chicken, flier, burnt bread, ball of wool, burnt meat, hammer, blue wizard hat, jug, pot, cabbage, chef's hat, jug of water, bucket of water, clay, cadava berries, grain, cooked meat, pot of flour, bread dough, air talisman, goblin mail, body rune, dust rune, bread, death rune, nature talisman, cosmic talisman, chaos talisman, cosmic rune, chaos rune, fire talisman, body talisman, mind rune, egg, silver bar, -------------------------------------------------------------------------------- /OSBuddy_show.txt: -------------------------------------------------------------------------------- 1 | crawling hand, cockatrice*, basilisk*, kurask*, *king*, ancient page, *lumberjack*, occult*, Ecumenical key, Kraken*, Abyssal whip, Armadyl*, Bandos*, Zamorak Hilt, Zamoraki*, Saradomin sword, Saradomin hilt, Dark bow, *visage*, Smoke battlestaff, Berserker ring, Seers ring, Archers ring, Warrior ring, Seercull, Mud battlestaff, Steam battlestaff, Staff of the dead, *trident*, Champion scroll, Ring of the gods, *jar*, Tyrannical ring, Treasonous ring, Odium*, Malediction*, Ranger boots, Guthans*, Karils*, Veracs*, Amulet of fury, Black mask*, Shield left half, granite shield, *spirit shield*, chewed bones, holy elixir, *head*, tanzanite fang, magic fang, serpentine visage, *mutagen*, uncut onyx -------------------------------------------------------------------------------- /bossing-zulrah.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | 7 | q::f1 ; inventory 8 | w::f2 ; combat options 9 | e::f3 ; prayers 10 | r::f4 ; magic 11 | t::f5 ; equipment 12 | 13 | z::f1 ; inventory 14 | x::f2 ; combat options 15 | c::f3 ; prayers 16 | v::f4 ; magic 17 | b::f5 ; equipment 18 | 19 | ; banking 20 | { 21 | a:: 22 | click right 23 | return 24 | 25 | s:: 26 | MouseMove, 0, 70, 0, R 27 | return 28 | 29 | d:: 30 | click 31 | return 32 | 33 | f:: 34 | send {escape} 35 | ; send {f1} 36 | return 37 | } 38 | 39 | #If 40 | 41 | #IfWinActive, ahk_exe Notepad++ 42 | ~^s::reload 43 | #IfWinActive 44 | 45 | 46 | ~f12:: 47 | suspend 48 | SoundBeep 49 | return -------------------------------------------------------------------------------- /construction-carvedTeakWardrobe.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | SetKeyDelay -1 5 | 6 | return 7 | 8 | #If WinClassActive("ahk_class SunAwtFrame") 9 | 10 | ; build 11 | { 12 | q:: 13 | click right 14 | return 15 | 16 | w:: 17 | MouseMove, 0, 50, 0, R 18 | return 19 | 20 | e:: 21 | click 22 | return 23 | 24 | r:: 25 | MouseMove, 0, -50, 0, R 26 | return 27 | 28 | t::4 29 | } 30 | 31 | ; remove 32 | { 33 | 34 | a:: 35 | click right 36 | return 37 | 38 | s:: 39 | MouseMove, 0, 70, 0, R 40 | return 41 | 42 | d:: 43 | click 44 | return 45 | 46 | f:: 47 | MouseMove, 0, -70, 0, R 48 | return 49 | 50 | g::1 51 | } 52 | 53 | ; butler 54 | { 55 | z::1 56 | 57 | x::space 58 | 59 | } 60 | #If 61 | 62 | ~f12:: 63 | suspend 64 | SoundBeep 65 | return 66 | 67 | #IfWinActive, ahk_exe Code.exe 68 | ~^s::reload 69 | #IfWinActive 70 | -------------------------------------------------------------------------------- /construction-dungeonDoors.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | SetKeyDelay -1 5 | 6 | return 7 | 8 | #If WinClassActive("ahk_class SunAwtFrame") 9 | 10 | ; build door 11 | { 12 | q:: 13 | click right 14 | 15 | ; Gosub RefreshStats 16 | return 17 | 18 | w:: 19 | MouseMove, 0, 50, 0, R 20 | return 21 | 22 | e:: 23 | click 24 | return 25 | } 26 | 27 | ; remove door 28 | { 29 | 30 | a:: 31 | click right 32 | return 33 | 34 | s:: 35 | MouseMove, 0, 100, 0, R 36 | return 37 | 38 | d:: 39 | click 40 | return 41 | 42 | f::1 43 | } 44 | 45 | ; butler interaction 46 | { 47 | z::1 48 | 49 | x::space 50 | 51 | } 52 | #IfWinActive 53 | 54 | ~f12:: 55 | suspend 56 | SoundBeep 57 | return 58 | 59 | #IfWinActive, ahk_exe Code.exe 60 | ~^s::reload 61 | #IfWinActive 62 | -------------------------------------------------------------------------------- /construction-oakLarders.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | SetKeyDelay -1 5 | 6 | return 7 | 8 | #If WinClassActive("ahk_class SunAwtFrame") 9 | 10 | ; build 11 | { 12 | q:: 13 | click right 14 | 15 | ; Gosub RefreshStats 16 | return 17 | 18 | w:: 19 | MouseMove, 0, 50, 0, R 20 | return 21 | 22 | e:: 23 | click 24 | return 25 | 26 | r::2 27 | } 28 | 29 | ; remove 30 | { 31 | 32 | a:: 33 | click right 34 | return 35 | 36 | s:: 37 | MouseMove, 0, 70, 0, R 38 | return 39 | 40 | d:: 41 | click 42 | return 43 | 44 | f::1 45 | } 46 | 47 | ; butler 48 | { 49 | z::1 50 | 51 | x::space 52 | 53 | } 54 | #IfWinActive 55 | 56 | ~f12:: 57 | suspend 58 | SoundBeep 59 | return 60 | 61 | #IfWinActive, ahk_exe Code.exe 62 | ~^s::reload 63 | #IfWinActive 64 | -------------------------------------------------------------------------------- /crafting-charters.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | ;; withdraw all 7 | a:: 8 | click right 9 | return 10 | 11 | s:: 12 | MouseMove, 0, 70, 0, R 13 | return 14 | 15 | d:: 16 | click 17 | return 18 | 19 | ;; withdraw custom 20 | 21 | q:: 22 | click right 23 | return 24 | 25 | w:: 26 | MouseMove, 0, 85, 0, R 27 | return 28 | 29 | e:: 30 | click 31 | return 32 | 33 | ;; hotkeys 34 | r:: 35 | send {escape} 36 | send {f1} 37 | return 38 | f:: 39 | send {escape} 40 | send {f4} 41 | return 42 | v:: 43 | send {escape} 44 | send {f12} 45 | return 46 | 47 | #If 48 | 49 | #IfWinActive, ahk_exe Code.exe 50 | ~^s::reload 51 | #IfWinActive 52 | 53 | ~f12:: 54 | suspend 55 | SoundBeep 56 | return 57 | -------------------------------------------------------------------------------- /dartsMesshall.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | 7 | 8 | f1::send {2 down} 9 | f2::send {2 up} 10 | 11 | ; take x 12 | { 13 | q:: 14 | click right 15 | return 16 | 17 | w:: 18 | MouseMove, 0, 85, 0, R 19 | return 20 | 21 | e:: 22 | click 23 | return 24 | 25 | r:: 26 | MouseMove, 0, -85, 0, R 27 | return 28 | } 29 | 30 | ; inventory darts style 31 | { 32 | a:: 33 | click 34 | return 35 | 36 | s:: 37 | MouseMove, 0, 30, 0, R 38 | return 39 | 40 | d:: 41 | click 42 | return 43 | 44 | f:: 45 | MouseMove, 0, -30, 0, R 46 | return 47 | } 48 | 49 | ; amounts 50 | { 51 | z::1 52 | 53 | x::3 54 | 55 | c::send {enter} 56 | 57 | v::send {escape} 58 | } 59 | 60 | #If 61 | 62 | ~^s::reload 63 | 64 | ~f12:: 65 | suspend 66 | SoundBeep 67 | return 68 | -------------------------------------------------------------------------------- /fDrop - shortcuts for dropping items.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | ; SetBatchLines -1 4 | ; SetMouseDelay -1 5 | 6 | #If WinClassActive("ahk_class SunAwtFrame") 7 | LButton:: 8 | WheelLeft:: 9 | WheelRight:: 10 | f:: 11 | Send +{Click} 12 | ; Send {shift down} 13 | ; click 14 | ; Send {shift up} 15 | return 16 | #If 17 | 18 | #IfWinActive, ahk_exe Code.exe 19 | ~^s::reload 20 | #IfWinActive 21 | 22 | f12:: 23 | suspend 24 | SoundBeep 25 | return 26 | -------------------------------------------------------------------------------- /firemaking-wintertodt.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | 4 | OnMessage(0x201, "WM_LBUTTONDOWN") 5 | 6 | ; ahk_class SunAwtFrame 7 | displayGui("-") 8 | return 9 | 10 | inputHandler(input) { 11 | static count 12 | If !(count) 13 | count := 0 14 | 15 | If (input = "add") { 16 | count++ 17 | displayGui(count) 18 | } 19 | 20 | If (input = "reset") { 21 | count := 0 22 | displayGui("-") 23 | } 24 | 25 | } 26 | 27 | displayGui(input) { 28 | If !(input) 29 | return 30 | 31 | _client := WinExist("ahk_class SunAwtFrame") 32 | 33 | If !WinExist("guiDisplay") { 34 | ; properties 35 | gui display: new 36 | gui display: +hwnd_guiDisplay 37 | gui display: +labelguiDisplay_ 38 | gui display: +Owner%_client% 39 | gui display: +LastFound -caption 40 | gui display: margin, 10, 10 41 | 42 | Gui display: Color, Green 43 | WinSet, Transparent, 200 44 | 45 | ; controls 46 | gui display: font, verdana s18 47 | gui display: add, text, w30 h30 Center, - 48 | gui display: font 49 | 50 | ; show 51 | gui display: show, hide, guiDisplay 52 | 53 | DetectHiddenWindows, On 54 | WinGetPos, clientX, clientY, clientW, clientH, ahk_class SunAwtFrame 55 | ControlGetPos, osrsX, osrsY, osrsW, osrsH, , ahk_class SunAwtFrame 56 | WinGetPos, guiDisplayX, guiDisplayY, guiDisplayW, guiDisplayH, guiDisplay 57 | 58 | gui display: show, % " x" clientX + osrsX + osrsW - guiDisplayW " y" clientY + osrsY, guiDisplay 59 | return 60 | } 61 | 62 | If (input) { 63 | ControlSetText, Static1, % input, guiDisplay 64 | return 65 | } 66 | 67 | guiDisplay_ContextMenu: 68 | menu, rightClickMenu, add 69 | menu, rightClickMenu, DeleteAll 70 | 71 | menu, rightClickMenu, add, Reset, guiDisplay_Reset 72 | 73 | menu, rightClickMenu, show 74 | return 75 | 76 | guiDisplay_Reset: 77 | inputHandler("reset") 78 | return 79 | } 80 | 81 | WM_LBUTTONDOWN() { 82 | inputHandler("add") 83 | } 84 | 85 | 86 | #IfWinActive, ahk_exe Code.exe 87 | ~^s::reload 88 | #IfWinActive 89 | -------------------------------------------------------------------------------- /fishing.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | SetKeyDelay -1 5 | 6 | #If WinClassActive("ahk_class SunAwtFrame") 7 | xbutton1:: 8 | Send {shift down} 9 | 10 | verticalPixels := 36 11 | verticalRows := 7 12 | 13 | loop, 4 { 14 | loop, % verticalRows { 15 | click 16 | MouseMove, 0, % verticalPixels, 0, R 17 | } 18 | MouseMove, 40, -verticalPixels * verticalRows, 0, R 19 | } 20 | 21 | Send {shift up} 22 | return 23 | #If 24 | 25 | #IfWinActive, ahk_exe Code.exe 26 | ~^s::reload 27 | #IfWinActive 28 | 29 | ~f12:: 30 | suspend 31 | SoundBeep 32 | return 33 | -------------------------------------------------------------------------------- /fletching-darts.ahk: -------------------------------------------------------------------------------- 1 | 1::click 2 | 2::mousemove,0,35,0,R 3 | 3::click 4 | 4::mousemove,0,-35,0,R 5 | 6 | #Persistent 7 | #SingleInstance, force 8 | SetBatchLines -1 9 | SetKeyDelay -1 10 | 11 | return 12 | 13 | #If WinClassActive("SunAwtFrame") 14 | 15 | ; darts 16 | { 17 | a:: 18 | click 19 | return 20 | 21 | s:: 22 | MouseMove, 35, 0, 0, R 23 | return 24 | 25 | d:: 26 | click 27 | return 28 | 29 | f:: 30 | MouseMove, -35, 0, 0, R 31 | return 32 | } 33 | 34 | ; darts 35 | { 36 | j:: 37 | MouseMove, -35, 0, 0, R 38 | return 39 | 40 | k:: 41 | click 42 | return 43 | 44 | l:: 45 | MouseMove, 35, 0, 0, R 46 | return 47 | 48 | `;:: 49 | click 50 | return 51 | } 52 | #If 53 | 54 | ~f12:: 55 | suspend 56 | SoundBeep 57 | return 58 | 59 | #IfWinActive, ahk_exe Code.exe 60 | ~^s::reload 61 | #IfWinActive 62 | -------------------------------------------------------------------------------- /guibutton/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RB490/ahk-scripts-osrs/d64d64b082ed0941e172bc3455034c7bd643f65d/guibutton/app.ico -------------------------------------------------------------------------------- /guibutton/bin/gui button script.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RB490/ahk-scripts-osrs/d64d64b082ed0941e172bc3455034c7bd643f65d/guibutton/bin/gui button script.exe -------------------------------------------------------------------------------- /guibutton/gui button script.ahk: -------------------------------------------------------------------------------- 1 | ; misc 2 | #SingleInstance Off 3 | OnMessage(0x201, "WM_LBUTTONDOWN") ; WM_LBUTTONDOWN := 0x201 4 | OnMessage(0x204, "WM_RBUTTONDOWN") ; WM_RBUTTONDOWN := 0x204 5 | OnMessage(0x111, "WM_COMMAND") ; WM_COMMAND := 0x111 detect edit field losing focus 6 | If (A_IsCompiled) { 7 | Menu, Tray, NoStandard ; remove default compiled tray menu 8 | Menu, Tray, Add, Reload, btnReloadScript ; remove default compiled tray menu 9 | Menu, Tray, Add, Exit, btnExitScript ; remove default compiled tray menu 10 | } 11 | 12 | ; global vars 13 | global mainGui := new class_mainGuiClass("gui button script") 14 | global g_debug := false 15 | 16 | ; autoexec 17 | If (g_debug) { 18 | Gosub debug 19 | return 20 | } 21 | mainGui.Setup() ; show main gui 22 | WinWaitClose, % mainGui.ahkid ; if gui gets closed from alt+tab menu, 'GuiClose' label is not triggered 23 | exitapp 24 | return 25 | 26 | ; menu buttons 27 | dummyHandler: 28 | return 29 | 30 | btnExitScript: 31 | exitapp 32 | return 33 | 34 | btnReloadScript: 35 | reload 36 | return 37 | 38 | ; global hotkeys 39 | #If !(A_IsCompiled) 40 | ~^s::reload 41 | #If 42 | 43 | ; includes 44 | #Include, 45 | #Include, %A_ScriptDir%\inc 46 | #Include, class gui main.ahk 47 | #Include, functions.ahk 48 | #Include, subroutines.ahk -------------------------------------------------------------------------------- /guibutton/inc/class gui main.ahk: -------------------------------------------------------------------------------- 1 | class class_mainGuiClass extends gui { 2 | Setup() { 3 | ; events 4 | this.Events["Close"] := this.Close.Bind(this) 5 | this.Events["_Btn+"] := this.AlwaysOntop.Bind(this) 6 | this.Events["_Btn-"] := this.Minimize.Bind(this) 7 | this.Events["_BtnX"] := this.Close.Bind(this) 8 | this.Events["_BtnDigits"] := this.SetTarget.Bind(this) 9 | ; this.Events["_BtnStart"] := this.Start.Bind(this) 10 | this.Events["_BtnPgUp"] := this.MainButton.Bind(this) 11 | 12 | ; properties 13 | this.Margin(5, 5) 14 | this.Options("-border") 15 | this.Options("+LabelmainGui_") 16 | 17 | ; controls 18 | this.Font("s1") 19 | this.Add("Text", "x0 y0 w65 h23 Border Center cSilver gmainGui_BtnHandler") 20 | this.Font("") 21 | 22 | this.Add("Text", "x4 y4 w60 BackGroundTrans", "Button") 23 | this.Add("Button", "x68 y0 h23 w23 gmainGui_BtnHandler", "+") 24 | this.Add("Button", "x94 y0 h23 w23 gmainGui_BtnHandler", "-") 25 | this.Add("Button", "x120 y0 h23 w23 gmainGui_BtnHandler", "X") 26 | 27 | 28 | ; this.Font("s25") 29 | ; this.Add("Text", "x5 w135 Center gmainGui_BtnHandler", "00:00:00") 30 | ; this.Font("") 31 | 32 | ; this.Add("Button", "x5 w65 gmainGui_BtnHandler", "Start") 33 | this.Add("Button", "x+5 w130 gmainGui_BtnHandler", "PgUp") 34 | 35 | ; show 36 | If (g_debug) 37 | this.Pos(1640, 5) 38 | this.Pos(1627, 496) 39 | this.Show() 40 | this.AlwaysOnTop() 41 | return 42 | } 43 | 44 | MoveGui() { ; wm_mousemove event is used since this method was causing issues 45 | msgbox % A_ThisFunc 46 | PostMessage, 0xA1, 2,,, A 47 | } 48 | 49 | AlwaysOnTop() { 50 | WinSet, AlwaysOnTop, Toggle, % "ahk_id " this.hwnd 51 | } 52 | 53 | Minimize() { 54 | WinMinimize, % "ahk_id " this.hwnd 55 | } 56 | 57 | Start() { 58 | } 59 | 60 | MainButton() { 61 | WinActivate, ahk_exe RuneLite.exe 62 | Send {PgUp} 63 | } 64 | 65 | Stop() { 66 | } 67 | 68 | Close() { 69 | exitapp 70 | } 71 | } 72 | 73 | mainGui_BtnHandler: 74 | ; ignore 'menu bar' 75 | control := getMouseControl() 76 | if InStr(control, "Static1") or InStr(control, "Static2") 77 | return 78 | 79 | OutputControlText := getMouseControl("retrieveControlText") 80 | 81 | If InStr(OutputControlText, ":") ; handle the ever changing digit text control 82 | OutputControlText := "Digits" 83 | 84 | ; msgbox % A_ThisLabel ": _Btn" OutputControlText ; debug - view called method 85 | 86 | ; call the class's method 87 | for a, b in class_mainGuiClass.Instances 88 | if (a = A_Gui+0) 89 | b["Events"]["_Btn" OutputControlText].Call() 90 | return 91 | -------------------------------------------------------------------------------- /guibutton/inc/functions.ahk: -------------------------------------------------------------------------------- 1 | WM_LBUTTONDOWN() { 2 | ; ignore everything except the 'menu bar' 3 | control := getMouseControl() 4 | if !InStr(control, "Static1") and !InStr(control, "Static2") 5 | return 6 | 7 | PostMessage, 0xA1, 2,,, A 8 | } 9 | 10 | WM_RBUTTONDOWN() { 11 | control := getMouseControl() 12 | if !InStr(control, "Static1") and !InStr(control, "Static2") 13 | return 14 | 15 | InputBox, input, Set title, Please enter a new title , , 240, 130 16 | if (ErrorLevel) 17 | return ; CANCEL was pressed. 18 | 19 | mainGui.SetText("Static2", input) ; title bar 20 | } 21 | 22 | WM_COMMAND(wParam) { ; source: https://www.autohotkey.com/boards/viewtopic.php?t=57152 23 | NC := (wParam >> 16) & 0xFFFF ; NC= notification code 24 | if (NC = 0x0200) { ; if the message is "EN_KILLFOCUS = 0x200" 25 | setTargetGui.Hide() ; lost focus 26 | } 27 | } 28 | 29 | getMouseControl(getText := "") { 30 | MouseGetPos, , , , OutputVarControlClassNN, 0 ; get control classNN eg. Edit1 31 | 32 | If (getText) { 33 | ControlGetText, OutputControlText , % OutputVarControlClassNN, A ; retrieve control text 34 | output := StrReplace(OutputControlText, A_Space) 35 | } 36 | else 37 | output := OutputVarControlClassNN 38 | 39 | return output 40 | } -------------------------------------------------------------------------------- /guibutton/inc/subroutines.ahk: -------------------------------------------------------------------------------- 1 | debug: 2 | mainGui.Setup() ; show main gui 3 | ; Gosub menuChooseMode_TimerUntil 4 | 5 | 6 | return 7 | ; debugging - timer 8 | loop, 3 { 9 | timer.Start() 10 | sleep 1000 11 | timer.Pause() 12 | } 13 | 14 | 15 | ; debugging - stopwatch 16 | ; loop, 3 { 17 | ; stopwatch.Start() 18 | ; sleep 1000 19 | ; stopwatch.Pause() 20 | ; } 21 | ; stopwatch.Stop() 22 | ; stopwatch.Start() 23 | return -------------------------------------------------------------------------------- /guibutton/lib/Class Gui.ahk: -------------------------------------------------------------------------------- 1 | ; source: https://github.com/Run1e/Columbus 2 | Class Gui { 3 | static Instances := [] 4 | static params := {Size:["A_GuiWidth", "A_GuiHeight"], DropFiles:["A_GuiEvent"]} 5 | 6 | __New(title := "AutoHotkey Window", options := "") { 7 | Gui, New, % "+hwndhwnd " options, % title 8 | this.hwnd := hwnd 9 | this.ahkid := "ahk_id" hwnd 10 | this.IsVisible := false 11 | this.Events := [] 12 | Gui.Instances[hwnd] := this 13 | } 14 | 15 | __Delete() { 16 | this.Destroy() 17 | } 18 | 19 | SetDefault() { 20 | Gui % this.hwnd ":Default" 21 | } 22 | 23 | Owner(hwnd) { 24 | Gui % this.hwnd ":+Owner" hwnd 25 | } 26 | 27 | Disable() { 28 | Gui % this.hwnd ": +Disabled" 29 | } 30 | 31 | Enable() { 32 | Gui % this.hwnd ": -Disabled" 33 | } 34 | 35 | Destroy() { 36 | Gui % this.hwnd ":Destroy" 37 | } 38 | 39 | Options(options, ext := "") { 40 | Gui % this.hwnd ":" options, % ext 41 | } 42 | 43 | Show(options := "") { 44 | this.IsVisible := true 45 | Gui % this.hwnd ":Show", % options 46 | } 47 | 48 | Hide() { 49 | this.IsVisible := false 50 | Gui % this.hwnd ":Hide" 51 | } 52 | 53 | Toggle() { 54 | this[this.IsVisible ? "Hide" : "Show"]() 55 | } 56 | 57 | Pos(x := "", y := "", w := "", h := "") { 58 | this.IsVisible := true 59 | Gui % this.hwnd ":Show", % (x ? "x" x : "") 60 | . (y ? " y" y : "") 61 | . (w ? " w" w : "") 62 | . (h ? " h" h : "") 63 | } 64 | 65 | Control(cmd := "", control := "", param := "") { 66 | GuiControl % this.hwnd ":" (cmd ? cmd : ""), % (control ? control : ""), % (param ? param : "") 67 | ; set carret to end of edit 68 | If InStr(control, "Edit") 69 | ControlSend, % control, ^{end}, % this.ahkid 70 | } 71 | 72 | ControlGet(cmd, value := "", control := "") { 73 | ControlGet, out, % cmd, % (value ? value : ""), % (control ? control : ""), % this.ahkid 74 | return out 75 | } 76 | 77 | GuiControlGet(cmd := "", control := "", param := "") { 78 | GuiControlGet, out, % (cmd ? cmd : ""), % (control ? control : ""), % (param ? param : "") 79 | return out 80 | } 81 | 82 | Add(control, options := "", param := "") { 83 | if InStr(options, "hwnd") 84 | return m("HWNDS are returned!") 85 | Gui % this.hwnd ":Add", % control, % options " hwndcontrolhwnd", % param 86 | return controlhwnd 87 | } 88 | 89 | AddGlobal(control, options := "", param := "") { 90 | global 91 | if InStr(options, "hwnd") 92 | return m("HWNDS are returned!") 93 | Gui % this.hwnd ":Add", % control, % options " hwndcontrolhwnd", % param 94 | return controlhwnd 95 | } 96 | 97 | Font(font := "", type := "") { 98 | Gui % this.hwnd ":Font", % font, % type 99 | } 100 | 101 | Tab(num) { 102 | Gui % this.hwnd ":Tab", % num 103 | } 104 | 105 | Color(BG, FG) { 106 | Gui % this.hwnd ":Color", % BG, % FG 107 | } 108 | 109 | Margin(x, y) { 110 | Gui % this.hwnd ":Margin", % x, % y 111 | } 112 | 113 | GetText(control := "Edit1") { 114 | ControlGetText, text, % control, % this.ahkid 115 | return text 116 | } 117 | 118 | SetText(control := "Edit1", text := "") { 119 | this.Control(, control, text) 120 | } 121 | 122 | SelectText(control := "Edit1") { 123 | ControlFocus, % control, % this.ahkid 124 | 125 | ControlGet, _control, Hwnd, , % control, % this.ahkid 126 | 127 | ControlFocus,, ahk_id %_control% 128 | SendMessage, 177, 0, -1,, ahk_id %_control% 129 | } 130 | 131 | ControlFocus(control := "Edit1") { 132 | ControlFocus, % control, % this.ahkid 133 | } 134 | 135 | SetEvents(x) { 136 | for a, b in x 137 | this.Events[a] := b 138 | } 139 | } 140 | 141 | GuiSize: 142 | GuiClose: 143 | GuiEscape: 144 | GuiDropFiles: 145 | params := [] 146 | for a, b in Gui.Params[SubStr(A_ThisLabel, 4)] 147 | params.Insert(%b%) 148 | for a, b in Gui.Instances 149 | if (a = A_Gui+0) { 150 | if IsLabel(b["Events"][SubStr(A_ThisLabel, 4)]) 151 | SetTimer, % b["Events"][SubStr(A_ThisLabel, 4)], -1 152 | else if A_ThisLabel.contains("escape", "close") 153 | Gui % a ":Destroy" 154 | else 155 | b["Events"][SubStr(A_ThisLabel, 4)].Call(params*) 156 | } 157 | return 158 | 159 | m(x*){ 160 | for a,b in x 161 | list.=b "`n" 162 | MsgBox,0, % A_ScriptName, % list 163 | } -------------------------------------------------------------------------------- /intervalTimer.ahk: -------------------------------------------------------------------------------- 1 | #SingleInstance, force 2 | 3 | global g_nullTime := A_YYYY A_MM A_DD 00 00 00 4 | global g_interval := 13 ; interval time in seconds 5 | global g_timerRunning := true ; interval time in seconds 6 | global g_startTime ; timer start time 7 | 8 | InputBox, g_interval, Interval timer, Choose interval time in seconds`n`n13 For broad arrows 9 | If !(g_interval) 10 | exitapp 11 | 12 | SetTimer, intervalTimer, On 13 | return 14 | 15 | intervalTimer: 16 | If !(g_startTime) ; set start time 17 | g_startTime := A_Now 18 | 19 | passedSeconds := A_Now 20 | EnvSub, passedSeconds, g_startTime, Seconds ; calculate amount of seconds passed since start 21 | 22 | If (passedSeconds = g_interval) { ; interval has been reached 23 | g_startTime := "" ; reset start time so the interval starts over 24 | 25 | SoundBeep, 2750, 100 ; Play a higher pitch for half a second. 26 | SoundBeep, 2750, 100 ; Play a higher pitch for half a second. 27 | 28 | ; SoundBeep, 750, 500 ; Play a higher pitch for half a second. 29 | } 30 | guiDisplay(g_interval - passedSeconds) 31 | ; tooltip % passedSeconds 32 | return 33 | 34 | 35 | guiDisplay(input) { 36 | static _guiDisplay 37 | 38 | displayTime := g_nullTime 39 | EnvAdd, displayTime, input, Seconds 40 | FormatTime, displayTime, % displayTime, s 41 | 42 | If (_guiDisplay) { ; guiDisplay exists, update it 43 | GuiControl guiDisplay: Text, Static1, % displayTime 44 | 45 | ; repaint gui based on time left 46 | If (input <= 6) 47 | gui guiDisplay: Color, Yellow 48 | If (input <= 3) 49 | gui guiDisplay: Color, Red 50 | If (input > 6) 51 | gui guiDisplay: Color, Default 52 | return 53 | } 54 | 55 | ; properties 56 | gui guiDisplay: +labelguiDisplay_ +hwnd_guiDisplay 57 | gui guiDisplay: margin, 15 , 15 58 | gui guiDisplay: +ToolWindow +AlwaysOnTop 59 | 60 | ; controls 61 | gui guiDisplay: font, s25 62 | gui guiDisplay: add, text, Center, 99 ; create text control wide enough for double digits 63 | GuiControl guiDisplay: Text, Static1, % displayTime ; set current time 64 | 65 | ; show 66 | WinGetPos, rsX, rsY, rsWidth, rsHeight, ahk_exe RuneLite.exe 67 | If (rsX) 68 | gui guiDisplay: show, x%rsX% y%rsY% NoActivate, Interval 69 | else 70 | gui guiDisplay: show, NoActivate, Interval 71 | return 72 | 73 | guiDisplay_ContextMenu: 74 | Menu, MyMenu, Add 75 | Menu, MyMenu, DeleteAll 76 | 77 | Menu, MyMenu, Add, Interval timer, guiDisplay_toggleTimer 78 | If (g_timerRunning) 79 | Menu, MyMenu, Check, Interval timer 80 | Menu, MyMenu, Add ; Add a separator line. 81 | Menu, MyMenu, Add, Reset, guiDisplay_resetTimer ; Add a separator line. 82 | 83 | Menu, MyMenu, Show 84 | return 85 | 86 | guiDisplay_toggleTimer: 87 | If (g_timerRunning) { 88 | g_timerRunning := false 89 | SetTimer, intervalTimer, Off 90 | } 91 | else { 92 | g_timerRunning := true 93 | SetTimer, intervalTimer, On 94 | } 95 | return 96 | 97 | guiDisplay_resetTimer: 98 | g_timerRunning := true 99 | g_startTime := A_Now 100 | SetTimer, intervalTimer, On 101 | return 102 | 103 | guiDisplay_close: 104 | exitapp 105 | return 106 | } 107 | 108 | 109 | 110 | ~^s::reload -------------------------------------------------------------------------------- /mining-motherlodeMine.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | CoordMode, Mouse, Relative 4 | SetBatchLines -1 5 | SetKeyDelay -1 6 | 7 | OnMessage(0x201, "WM_LBUTTONDOWN") 8 | OnMessage(0x203, "WM_LBUTTONDBLCLK") 9 | 10 | OnExit, exitRoutine 11 | Gosub loadSettings 12 | 13 | inventoryCount := 0 14 | 15 | guiMotherlode() 16 | return 17 | 18 | loadSettings: 19 | SplitPath, A_ScriptName, , , , ScriptName 20 | iniFile := A_ScriptDir "\" ScriptName ".ini" 21 | 22 | ini_load(ini, iniFile) 23 | If (ErrorLevel = 1) 24 | { 25 | Gosub writeIni 26 | ini_load(ini, iniFile) 27 | } 28 | 29 | iniWrapper_loadAllSections(ini) 30 | return 31 | 32 | saveSettings: 33 | iniWrapper_saveAllSections(ini) 34 | 35 | ini_save(ini, iniFile) 36 | return 37 | 38 | writeIni: 39 | ini_insertSection(ini, "Settings") 40 | ini_insertKey(ini, "Settings", "guiMotherlodeX=" . "") 41 | ini_insertKey(ini, "Settings", "guiMotherlodeY=" . "") 42 | 43 | ini_save(ini) 44 | return 45 | 46 | exitRoutine: 47 | WinGetPos(_guiMotherlode, guiMotherlodeX, guiMotherlodeY) 48 | 49 | Gosub saveSettings 50 | 51 | exitapp 52 | return 53 | 54 | guiMotherlode(command := "") { 55 | global 56 | 57 | If !WinExist("ahk_id " _guiMotherlode) 58 | { 59 | ; properties 60 | gui motherlode: +LastFound 61 | gui motherlode: margin, 5, 3 62 | gui motherlode: +hwnd_guiMotherlode +labelguiMotherlode_ -caption 63 | gui motherlode: +AlwaysOnTop 64 | 65 | ; controls 66 | ; gui motherlode: add, button, h25 w60 gmotherlodeBtnReset, Reset 67 | ; gui motherlode: add, button, x+0 w25 h25 gmotherlodeBtnSubtract, - 68 | gui motherlode: font, s15 verdana 69 | gui motherlode: add, text, cWhite Center vinventoryCount, 00 70 | 71 | FormatTime, updateTime , % a_now, HH:mm:ss 72 | 73 | gui motherlode: add, text, x+5 cWhite Center vupdateTime, % updateTime 74 | gui motherlode: font 75 | 76 | ; gui motherlode: add, button, x+0 w25 h25 gmotherlodeBtnAdd, + 77 | 78 | WinSet, Transparent, 100 79 | gui motherlode: color, 000000 80 | 81 | ; show 82 | 83 | If !(guiMotherlodeX = "") and !(guiMotherlodeY = "") 84 | gui motherlode: show, % "x" guiMotherlodeX " y" guiMotherlodeY " AutoSize", Inv Count 85 | else 86 | gui motherlode: show, AutoSize, Inv Count 87 | 88 | ; close 89 | WinWaitclose, % "ahk_id " _guiMotherlode 90 | return 91 | } 92 | If (command = "reset") 93 | Gosub motherlodeBtnReset 94 | If (command = "add") 95 | Gosub motherlodeBtnAdd 96 | 97 | return 98 | 99 | ; labels 100 | motherlodeBtnAdd: 101 | gui motherlode: Submit, NoHide 102 | 103 | inventoryCount++ 104 | Gosub motherlodeRefreshInventoryCount 105 | return 106 | 107 | motherlodeBtnSubtract: 108 | gui motherlode: Submit, NoHide 109 | 110 | inventoryCount-- 111 | 112 | Gosub motherlodeRefreshInventoryCount 113 | return 114 | 115 | motherlodeBtnReset: 116 | inventoryCount := 0 117 | 118 | Gosub motherlodeRefreshInventoryCount 119 | return 120 | 121 | motherlodeRefreshInventoryCount: 122 | If (inventoryCount < 0) 123 | inventoryCount := 0 124 | 125 | GuiControl motherlode: , inventoryCount, % inventoryCount 126 | 127 | If (inventoryCount >= 3) 128 | gui motherlode: color, B0171F 129 | else 130 | gui motherlode: color, 000000 131 | 132 | FormatTime, updateTime , % a_now, HH:mm:ss 133 | GuiControl motherlode: , updateTime, % updateTime 134 | return 135 | } 136 | 137 | 138 | WM_LBUTTONDOWN() { 139 | guiMotherlode("add") 140 | } 141 | 142 | WM_LBUTTONDBLCLK() { 143 | guiMotherlode("reset") 144 | } 145 | 146 | 147 | #If WinClassActive("ahk_class SunAwtFrame") 148 | j:: 149 | click right 150 | return 151 | k:: 152 | MouseMove, 0, 40, 0, R 153 | return 154 | l:: 155 | click 156 | return 157 | 158 | #If 159 | 160 | ~f12:: 161 | suspend 162 | SoundBeep 163 | return 164 | 165 | #IfWinActive, ahk_exe Code.exe 166 | ~^s::reload 167 | -------------------------------------------------------------------------------- /mining-motherlodeMine.ini: -------------------------------------------------------------------------------- 1 | 2 | [Settings] 3 | guiMotherlodeX=902 4 | guiMotherlodeY=524 -------------------------------------------------------------------------------- /misc-launchOSBuddy.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | 4 | Gosub loadSettings 5 | 6 | If (osbuddyPath = "") 7 | { 8 | InputBox, osbuddyPath, Locate OSBuddy.exe 9 | If (osbuddyPath = "") 10 | exitapp 11 | 12 | Gosub saveSettings 13 | } 14 | 15 | If WinExist("ahk_exe OSBuddy.exe") ; check if an instance of osbuddy is running 16 | { 17 | If (countWindows("OSBuddy") = 2) ; if so, check if two instances are running 18 | exitapp 19 | else 20 | run % osbuddyPath ; open an additional instance if not 21 | } 22 | else 23 | { 24 | run % osbuddyPath 25 | sleep 100 ; prevent error that occurs when launching osbuddy rapidly in succession 26 | run % osbuddyPath 27 | } 28 | 29 | WinWait OSBuddy Loader 30 | WinWaitClose OSBuddy Loader 31 | 32 | loop, 33 | { 34 | If (countWindows("OSBuddy") = 2) 35 | { 36 | sleep 100 ; wait until both windows are fully loaded 37 | break 38 | } 39 | sleep 100 40 | } 41 | 42 | Gosub positionWindows 43 | 44 | exitapp 45 | return 46 | 47 | loadSettings: 48 | SplitPath, A_ScriptName, , , , ScriptName 49 | iniFile := A_ScriptDir "\" ScriptName ".ini" 50 | 51 | ini_load(ini, iniFile) 52 | If (ErrorLevel = 1) 53 | { 54 | Gosub writeIni 55 | ini_load(ini, iniFile) 56 | } 57 | 58 | iniWrapper_loadAllSections(ini) 59 | return 60 | 61 | saveSettings: 62 | iniWrapper_saveAllSections(ini) 63 | 64 | ini_save(ini, iniFile) 65 | return 66 | 67 | writeIni: 68 | ini_insertSection(ini, "Settings") 69 | ini_insertKey(ini, "Settings", "osbuddyPath=" . "") 70 | 71 | ini_save(ini) 72 | return 73 | 74 | countWindows(input) { 75 | WinGet windowsList, List 76 | Loop %windowsList% 77 | { 78 | id := windowsList%A_Index% 79 | WinGetTitle wt, ahk_id %id% 80 | r .= wt . "`n" 81 | 82 | If InStr(wt, input) 83 | count++ 84 | } 85 | 86 | return count 87 | } 88 | 89 | positionWindows: 90 | WinGet windowsList, List 91 | Loop %windowsList% 92 | { 93 | id := windowsList%A_Index% 94 | WinGetTitle wt, ahk_id %id% 95 | r .= wt . "`n" 96 | 97 | If InStr(wt, "OSBuddy") 98 | { 99 | count++ 100 | 101 | If (count = 1) 102 | WinMovePos(id, "TopRight") 103 | else 104 | WinMovePos(id, "BottomRight") 105 | 106 | } 107 | } 108 | return 109 | 110 | ~^s:: 111 | reload 112 | return -------------------------------------------------------------------------------- /misc-launchOSBuddy.ini: -------------------------------------------------------------------------------- 1 | 2 | [Settings] 3 | osbuddyPath=G:\GAMES\OSBuddy\OSBuddy.exe 4 | -------------------------------------------------------------------------------- /misc-nmzTimer.ahk: -------------------------------------------------------------------------------- 1 | /* 2 | Add features: 3 | Gui which shows time passed since last overload and rapidheal 4 | */ 5 | 6 | #Persistent 7 | #SingleInstance, force 8 | CoordMode, ToolTip, Screen 9 | 10 | OnMessage( 0x200, "WM_MOUSEMOVE" ) 11 | 12 | Gosub loadSettings 13 | OnExit, exitRoutine 14 | 15 | nullTime := A_YYYY A_MM A_DD "000000" 16 | 17 | SetTimer, Timer_Clock, On 18 | return 19 | 20 | WM_MOUSEMOVE( wparam, lparam, msg, hwnd ) 21 | { 22 | if wparam = 1 ; LButton 23 | PostMessage, 0xA1, 2,,, A 24 | } 25 | 26 | loadSettings: 27 | SplitPath, A_ScriptName, , , , ScriptName 28 | iniFile := A_ScriptDir "\" ScriptName ".ini" 29 | 30 | ini_load(ini, iniFile) 31 | If (ErrorLevel = 1) 32 | { 33 | Gosub writeIni 34 | ini_load(ini, iniFile) 35 | } 36 | 37 | iniWrapper_loadAllSections(ini) 38 | return 39 | 40 | saveSettings: 41 | iniWrapper_saveAllSections(ini) 42 | 43 | ini_save(ini, iniFile) 44 | return 45 | 46 | writeIni: 47 | ini_insertSection(ini, "Settings") 48 | ini_insertKey(ini, "Settings", "guiDisplayX=" . "") 49 | ini_insertKey(ini, "Settings", "guiDisplayY=" . "") 50 | 51 | ini_save(ini) 52 | return 53 | exitRoutine: 54 | WinGetPos(_guiDisplay, guiDisplayX, guiDisplayY) 55 | 56 | Gosub saveSettings 57 | 58 | exitapp 59 | return 60 | 61 | Timer_Clock: 62 | Clock_now:=a_now 63 | 64 | if (Clock_prev_now = Clock_now) ; check if time has changed since last cycle 65 | return 66 | 67 | FormatTime, Clock_now_formatted , % Clock_now, % l_digitsFormat ; convert current time into readable format 68 | 69 | Clock_prev_now:=Clock_now ; store current time to check if time has changed since last timer cycle 70 | 71 | ; GuiControl time:, t_digits, % Clock_now_formatted ; update gui 72 | ; tooltip % Clock_now_formatted, 0, 0 73 | 74 | Gosub warnTimers 75 | return 76 | 77 | warnTimers: 78 | { ; Overload 79 | If (lastOverload = "") 80 | lastOverload := Clock_now 81 | 82 | Overload_passedTime := Clock_now 83 | EnvSub, Overload_passedTime, % lastOverload, seconds 84 | 85 | { ; time passed since last cycle 86 | timeSinceLastOverload_a := nullTime 87 | EnvAdd, timeSinceLastOverload_a, Overload_passedTime, Seconds 88 | FormatTime, timeSinceLastOverload_formatted, % timeSinceLastOverload_a, HH:mm:ss 89 | } 90 | 91 | If (Overload_passedTime = 305) ; reset 92 | { 93 | lastOverload := Clock_now 94 | 95 | SoundBeep, 2000, 100 96 | } 97 | } 98 | 99 | ; /* 100 | { ; rapidheal 101 | If (lastRapidheal = "") 102 | lastRapidheal := Clock_now 103 | 104 | rapidHeal_passedTime := Clock_now 105 | EnvSub, rapidHeal_passedTime, % lastRapidheal, seconds 106 | 107 | { ; time passed since last cycle 108 | timeSinceLastRapidheal_a := nullTime 109 | EnvAdd, timeSinceLastRapidheal_a, rapidHeal_passedTime, Seconds 110 | FormatTime, timeSinceLastRapidheal_formatted, % timeSinceLastRapidheal_a, HH:mm:ss 111 | } 112 | 113 | If (rapidHeal_passedTime = 50) ; reset 114 | { 115 | lastRapidheal := Clock_now 116 | 117 | SoundBeep, 2000, 100 118 | WinActivate, ahk_exe OSBuddy.exe 119 | } 120 | } 121 | ; */ 122 | /* 123 | { ; prayerPot 124 | If (lastprayerPot = "") 125 | lastprayerPot := Clock_now 126 | 127 | prayerPot_passedTime := Clock_now 128 | EnvSub, prayerPot_passedTime, % lastprayerPot, seconds 129 | 130 | { ; time passed since last cycle 131 | timeSinceLastprayerPot_a := nullTime 132 | EnvAdd, timeSinceLastprayerPot_a, prayerPot_passedTime, Seconds 133 | FormatTime, timeSinceLastprayerPot_formatted, % timeSinceLastprayerPot_a, HH:mm:ss 134 | } 135 | 136 | If (prayerPot_passedTime = 83) ; reset 137 | { 138 | lastprayerPot := Clock_now 139 | 140 | SoundBeep, 2000, 100 141 | WinActivate, ahk_exe OSBuddy.exe 142 | } 143 | } 144 | */ 145 | ; guiDisplay(timeSinceLastprayerPot_formatted, timeSinceLastOverload_formatted) 146 | return 147 | 148 | guiDisplay(input1, input2) { 149 | global 150 | 151 | If !WinExist("ahk_id " _guiDisplay) 152 | { 153 | ; properties 154 | gui display: Default 155 | gui display: Margin, 5, 5 156 | gui display: +Hwnd_guiDisplay +LabelguiDisplay_ +AlwaysOnTop +LastFound -Caption +ToolWindow 157 | 158 | WinSet, Transparent, 100 159 | gui display: color, 000000 160 | 161 | ; controls 162 | gui display: font, s15 verdana 163 | 164 | gui display: add, text, cWhite vguiDisplay_a, % input1 165 | gui display: add, text, cWhite vguiDisplay_b, % input2 166 | 167 | gui motherlode: font 168 | 169 | ; show 170 | If !(guiDisplayX = "") and !(guiDisplayY = "") 171 | gui Display: show, % "x" guiDisplayX " y" guiDisplayY " AutoSize NoActivate" 172 | else 173 | gui Display: show, AutoSize 174 | 175 | ; close 176 | 177 | } 178 | else 179 | { 180 | GuiControl display:, guiDisplay_a, % input1 181 | GuiControl display:, guiDisplay_b, % input2 182 | } 183 | } 184 | 185 | ~f1::reload 186 | #IfWinActive, ahk_exe Code.exe 187 | ; ~^s::reload 188 | -------------------------------------------------------------------------------- /misc-nmzTimer.ini: -------------------------------------------------------------------------------- 1 | 2 | [Settings] 3 | guiDisplayX=0 4 | guiDisplayY=0 5 | -------------------------------------------------------------------------------- /misc-updateCML.ahk: -------------------------------------------------------------------------------- 1 | #SingleInstance, force 2 | 3 | guiBrowser("http://crystalmathlabs.com/tracker/update.php?player=hersen") 4 | guiBrowser("http://crystalmathlabs.com/tracker/update.php?player=hersens") 5 | return 6 | 7 | guiBrowser(url) { 8 | global 9 | 10 | DetectHiddenWindows, On 11 | 12 | IfWinExist, % "ahk_id " _guiBrowser 13 | ie.quit 14 | 15 | ie := ComObjCreate("InternetExplorer.Application") 16 | 17 | ie.Visible := false ; This is known to work incorrectly on IE7. 18 | 19 | ie.ToolBar := false 20 | ie.Silent := false 21 | ie.width := 500 ; A_ScreenWidth - 100 22 | ie.height := 500 ; A_ScreenHeight - 100 23 | 24 | _guiBrowser := ie.hwnd 25 | 26 | ie.Navigate(url) 27 | 28 | loop, 29 | { 30 | If !(ie.busy = 0) ; done loading 31 | break 32 | sleep 100 33 | } 34 | 35 | sleep 100 36 | 37 | ie.quit 38 | } -------------------------------------------------------------------------------- /monitorPixelColor.ahk: -------------------------------------------------------------------------------- 1 | #SingleInstance, force 2 | 3 | ; set relevant commands to the same coordinate mode 4 | CoordMode, Mouse, Screen 5 | CoordMode, Pixel, Screen 6 | 7 | ; set global vars 8 | global g_color ; RGB format of selected pixel color 9 | global g_colorX ; x coordinate of selected pixel color 10 | global g_colorY ; y coordinate of selected pixel color 11 | global g_capturePixelMode := false ; capture mouse mode 12 | 13 | ; setup hotkey for disabling mouse input 14 | #If (g_capturePixelMode) 15 | Hotkey, If, (g_capturePixelMode) 16 | Hotkey, LButton, menuHandler 17 | Hotkey, If 18 | #If 19 | 20 | Gosub setPixelColor 21 | 22 | guiMain() 23 | 24 | SetTimer, checkPixelColor, On 25 | return 26 | 27 | guiMain() { 28 | ; properties 29 | gui guiMain: +labelguiMain_ +hwnd_guiMain 30 | gui guiMain: +ToolWindow +AlwaysOnTop +Resize 31 | 32 | ; controls 33 | gui guiMain: Color, % g_color 34 | 35 | ; show 36 | WinGetPos, rsX, rsY, rsWidth, rsHeight, ahk_exe RuneLite.exe 37 | If (rsX) 38 | gui guiMain: show, x%rsX% y%rsY% w100 h100 NoActivate, Pixel color 39 | else 40 | gui guiMain: show, w100 h100 NoActivate, Pixel color 41 | return 42 | 43 | guiMain_contextMenu: 44 | Menu, MyMenu, add 45 | Menu, MyMenu, DeleteAll 46 | 47 | Menu, MyMenu, add, Set pixel color, setPixelColor 48 | Menu, MyMenu, Show 49 | return 50 | 51 | guiMain_close: 52 | exitapp 53 | return 54 | } 55 | 56 | setPixelColor: 57 | SetTimer, showChoosePixelTooltip, 5 58 | 59 | ; capture single mouseclick / prevent from sending to click location 60 | g_capturePixelMode := true 61 | KeyWait, LButton, D ; wait for mouse button down 62 | KeyWait, LButton ; wait for mouse button up 63 | MouseGetPos, g_colorX, g_colorY 64 | g_capturePixelMode := false 65 | 66 | PixelGetColor, g_color, % g_colorX, % g_colorY, RGB 67 | 68 | gui guiMain: Color, % g_color 69 | 70 | SetTimer, showChoosePixelTooltip, Off 71 | tooltip 72 | return 73 | 74 | checkPixelColor: 75 | PixelGetColor, output, % g_colorX, % g_colorY, RGB 76 | 77 | If !(output = g_color) ; pixel is currently not at the selected color 78 | gui guiMain: Color, Red 79 | else 80 | gui guiMain: Color, % g_color ; pixel is at the selected color 81 | return 82 | 83 | showChoosePixelTooltip: 84 | tooltip, Choose pixel 85 | return 86 | 87 | menuHandler: 88 | return 89 | 90 | ~^s::reload -------------------------------------------------------------------------------- /osrsWikiApi.txt: -------------------------------------------------------------------------------- 1 | http://oldschoolrunescape.wikia.com/api/v1 2 | 3 | Get articles list in alphabetical order 4 | 5 | Link 6 | http://oldschoolrunescape.wikia.com/api/v1/Articles/List?limit=2 7 | 8 | Result 9 | { 10 | "items": [ 11 | { 12 | "id": 73301, 13 | "title": "!price", 14 | "url": "/wiki/!price", 15 | "ns": 0 16 | }, 17 | { 18 | "id": 20787, 19 | "title": "\"Perfect\" gold bar", 20 | "url": "/wiki/%22Perfect%22_gold_bar", 21 | "ns": 0 22 | } 23 | ], 24 | "basepath": "http://oldschoolrunescape.wikia.com", 25 | "offset": "\"Perfect\" gold ore" 26 | } 27 | 28 | Get articles list (in a category) in alphabetical order 29 | 30 | Link 31 | http://oldschoolrunescape.wikia.com/api/v1/Articles/List?category=Bestiary&limit=2 32 | 33 | Result 34 | { 35 | "items": [ 36 | { 37 | "id": 27806, 38 | "title": "A Doubt", 39 | "url": "/wiki/A_Doubt", 40 | "ns": 0 41 | }, 42 | { 43 | "id": 12869, 44 | "title": "Aberrant spectre", 45 | "url": "/wiki/Aberrant_spectre", 46 | "ns": 0 47 | } 48 | ], 49 | "basepath": "http://oldschoolrunescape.wikia.com", 50 | "offset": "page|4142484f5252454e542053504543545245|80108" 51 | } 52 | 53 | Get simplified article contents 54 | 55 | Link 56 | http://oldschoolrunescape.wikia.com/api/v1/Articles/AsSimpleJson?id=27806 57 | 58 | Result 59 | { 60 | "sections": [ 61 | { 62 | "title": "A Doubt", 63 | "level": 1, 64 | "content": [ 65 | { 66 | "type": "paragraph", 67 | "text": "A Doubt is a monster that can be fought during the Dream Mentor quest. Numerous Doubts are summoned during the first battle by The Inadequacy, and represent the protagonist of the quest, Cyrisus, and his little nagging doubts about combat. Though they can be fought and killed with ease, it is recommended that players do not attempt to kill them and instead focus only on the main fight. All spawned Doubts will disappear once The Inadequacy is killed. Players can, however, take advantage of the Doubts by using blood spells on them to heal hitpoints." 68 | } 69 | ], 70 | "images": [] 71 | }, 72 | { 73 | "title": "Strategy", 74 | "level": 2, 75 | "content": [ 76 | { 77 | "type": "paragraph", 78 | "text": "Players should remember to turn auto-retaliate off whilst fighting The Inadequacy. Otherwise, players may start fighting the Doubts that are also attacking them. The Inadequacy has a higher max hit making a Doubt undesirable to attack. It's best to leave a Doubt seeing as they're highly inaccurate and do not hit very high." 79 | } 80 | ], 81 | "images": [] 82 | }, 83 | { 84 | "title": "Habitat", 85 | "level": 2, 86 | "content": [ 87 | { 88 | "type": "list", 89 | "elements": [ 90 | { 91 | "text": "Dream World", 92 | "elements": [] 93 | } 94 | ] 95 | } 96 | ], 97 | "images": [] 98 | } 99 | ] 100 | } 101 | 102 | Get details about one or more articles 103 | 104 | Link 105 | http://oldschoolrunescape.wikia.com/api/v1/Articles/Details?ids=27806&abstract=9999&width=200&height=200 106 | 107 | Result 108 | { 109 | "items": { 110 | "27806": { 111 | "id": 27806, 112 | "title": "A Doubt", 113 | "ns": 0, 114 | "url": "/wiki/A_Doubt", 115 | "revision": { 116 | "id": 5843342, 117 | "user": "Spineweilder", 118 | "user_id": 1759647, 119 | "timestamp": "1519267786" 120 | }, 121 | "type": "article", 122 | "abstract": "A Doubt is a monster that can be fought during the Dream Mentor quest. Numerous Doubts are summoned during the first battle by The Inadequacy, and represent the protagonist of the quest, Cyrisus, and his little nagging doubts about combat. Though they can be fought and killed with ease, it is recommended that players do not attempt to kill them and instead focus only on the main fight. All spawned Doubts will disappear once The Inadequacy is killed. Players can, however, take advantage of...", 123 | "thumbnail": "https://vignette.wikia.nocookie.net/2007scape/images/f/fb/A_Doubt.png/revision/latest/window-crop/width/200/x-offset/0/y-offset/0/window-width/456/window-height/456?cb=20151201042219", 124 | "original_dimensions": { 125 | "width": 456, 126 | "height": 512 127 | } 128 | } 129 | }, 130 | "basepath": "http://oldschoolrunescape.wikia.com" 131 | } -------------------------------------------------------------------------------- /prayer-gildedAltar.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | CoordMode, Mouse, Relative 4 | SetBatchLines -1 5 | SetKeyDelay -1 6 | 7 | return 8 | 9 | #If WinClassActive("ahk_class SunAwtFrame") 10 | 11 | { 12 | q:: 13 | click right 14 | return 15 | 16 | w:: 17 | MouseMove, 0, 40, 0, R 18 | return 19 | 20 | e:: 21 | click 22 | return 23 | 24 | r:: 25 | MouseMove, 0, -40, 0, R 26 | return 27 | 28 | t:: 29 | send {f5} ; Equipment tab 30 | return 31 | } 32 | 33 | { 34 | /* 35 | 36 | a:: 37 | click right 38 | return 39 | 40 | s:: 41 | MouseMove, 0, 70, 0, R 42 | return 43 | 44 | d:: 45 | click 46 | return 47 | 48 | */ 49 | 50 | a:: 51 | MouseMove, -180, 0, 0, R 52 | return 53 | 54 | s:: 55 | click 56 | return 57 | 58 | d:: 59 | MouseMove, 180, 0, 0, R 60 | return 61 | 62 | f:: 63 | return 64 | } 65 | 66 | { 67 | z:: 68 | click right 69 | return 70 | 71 | x:: 72 | MouseMove, 0, 70, 0, R 73 | return 74 | 75 | c:: 76 | click 77 | return 78 | 79 | v::escape 80 | } 81 | 82 | j:: 83 | click right 84 | return 85 | 86 | k:: 87 | MouseMove, 0, 50, 0, R 88 | return 89 | 90 | l:: 91 | click 92 | return 93 | 94 | #If 95 | 96 | ~f12:: 97 | suspend 98 | SoundBeep 99 | return 100 | 101 | #IfWinActive, ahk_exe Code.exe 102 | ~^s::reload 103 | #IfWinActive 104 | -------------------------------------------------------------------------------- /runecrafting-abyss.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | 7 | ; misc 8 | { 9 | r::f5 ; equipment 10 | 11 | f:: 12 | send {escape} 13 | send {f1} 14 | return 15 | 16 | g::f4 ; magic tab 17 | } 18 | 19 | ; pouches 20 | { 21 | q:: 22 | click right 23 | return 24 | 25 | w:: 26 | MouseMove, 0, 38, 0, R 27 | return 28 | 29 | e:: 30 | click 31 | return 32 | } 33 | 34 | ; banking 35 | { 36 | a:: 37 | click right 38 | return 39 | 40 | s:: 41 | MouseMove, 0, 70, 0, R 42 | return 43 | 44 | d:: 45 | click 46 | return 47 | } 48 | 49 | ; zamorak mage 50 | { 51 | z:: 52 | click right 53 | return 54 | 55 | x:: 56 | MouseMove, 0, 60, 0, R 57 | return 58 | 59 | c:: 60 | click 61 | return 62 | } 63 | 64 | #If 65 | 66 | #IfWinActive, ahk_exe Code.exe 67 | ~^s::reload 68 | #IfWinActive 69 | 70 | ~f12:: 71 | suspend 72 | SoundBeep 73 | return 74 | -------------------------------------------------------------------------------- /shops-buyAmount50.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | 7 | ; buy 50 8 | { 9 | a:: 10 | click right 11 | return 12 | 13 | s:: 14 | MouseMove, 0, 90, 0, R 15 | return 16 | 17 | d:: 18 | click 19 | return 20 | 21 | f:: 22 | MouseMove, 0, -90, 0, R 23 | return 24 | } 25 | 26 | #If 27 | 28 | #IfWinActive, ahk_exe Code.exe 29 | ~^s::reload 30 | #IfWinActive 31 | 32 | ~f12:: 33 | suspend 34 | SoundBeep 35 | return -------------------------------------------------------------------------------- /smithing-blastfurnace.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | ;; withdraw all 7 | a:: 8 | click right 9 | return 10 | 11 | s:: 12 | MouseMove, 0, 100, 0, R 13 | return 14 | 15 | d:: 16 | click 17 | return 18 | 19 | f:: 20 | MouseMove, 0, -100, 0, R 21 | return 22 | 23 | ;; withdraw custom 24 | 25 | q:: 26 | click right 27 | return 28 | 29 | w:: 30 | MouseMove, 0, 70, 0, R 31 | return 32 | 33 | e:: 34 | click 35 | return 36 | 37 | r:: 38 | MouseMove, 0, -70, 0, R 39 | return 40 | 41 | ;; hotkeys 42 | g::escape 43 | 44 | #If 45 | 46 | #IfWinActive, ahk_exe Code.exe 47 | ~^s::reload 48 | #IfWinActive 49 | 50 | ~f12:: 51 | suspend 52 | SoundBeep 53 | return 54 | -------------------------------------------------------------------------------- /smithing-platebodies.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | ;; withdraw all 7 | a:: 8 | click right 9 | return 10 | 11 | s:: 12 | MouseMove, 0, 100, 0, R 13 | return 14 | 15 | d:: 16 | click 17 | return 18 | 19 | f:: 20 | MouseMove, 0, -100, 0, R 21 | return 22 | 23 | ;; withdraw custom 24 | 25 | q:: 26 | click right 27 | return 28 | 29 | w:: 30 | MouseMove, 0, 80, 0, R 31 | return 32 | 33 | e:: 34 | click 35 | return 36 | 37 | r:: 38 | MouseMove, 0, -80, 0, R 39 | return 40 | 41 | ;; hotkeys 42 | g::escape 43 | 44 | #If 45 | 46 | #IfWinActive, ahk_exe Code.exe 47 | ~^s::reload 48 | #IfWinActive 49 | 50 | ~f12:: 51 | suspend 52 | SoundBeep 53 | return 54 | -------------------------------------------------------------------------------- /thieving-blackjacking.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | ;; men 7 | a:: 8 | click right 9 | return 10 | 11 | s:: 12 | MouseMove, 0, 70, 0, R 13 | return 14 | 15 | d:: 16 | click 17 | return 18 | 19 | f:: 20 | MouseMove, 0, -70, 0, R 21 | return 22 | 23 | ;; ham 24 | 25 | q:: 26 | click right 27 | return 28 | 29 | w:: 30 | MouseMove, 0, 40, 0, R 31 | return 32 | 33 | e:: 34 | click 35 | return 36 | 37 | r:: 38 | MouseMove, 0, -40, 0, R 39 | return 40 | #If 41 | 42 | #IfWinActive, ahk_exe Code.exe 43 | ~^s::reload 44 | #IfWinActive 45 | 46 | ~f12:: 47 | suspend 48 | SoundBeep 49 | return 50 | -------------------------------------------------------------------------------- /thieving-men.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | ;; men 7 | a:: 8 | click right 9 | return 10 | 11 | s:: 12 | MouseMove, 0, 55, 0, R 13 | return 14 | 15 | d:: 16 | click 17 | return 18 | 19 | f:: 20 | MouseMove, 0, -55, 0, R 21 | return 22 | 23 | ;; ham 24 | 25 | q:: 26 | click right 27 | return 28 | 29 | w:: 30 | MouseMove, 0, 40, 0, R 31 | return 32 | 33 | e:: 34 | click 35 | return 36 | 37 | r:: 38 | MouseMove, 0, -40, 0, R 39 | return 40 | 41 | LButton:: 42 | Send {Shift down} 43 | click 44 | Send {Shift up} 45 | return 46 | #If 47 | 48 | #IfWinActive, ahk_exe Code.exe 49 | ~^s::reload 50 | #IfWinActive 51 | 52 | WinClassActive("ahk_class SunAwtFrame") { 53 | WinGet, WIN, ProcessName, A 54 | If InStr(WIN, "JagexLauncher.exe") or InStr(WIN, "OSBuddy.exe") 55 | return true 56 | else 57 | return false 58 | } 59 | 60 | ~f12:: 61 | suspend 62 | status !=: status 63 | SoundBeep 64 | tooltip, % status,0,0 65 | return 66 | -------------------------------------------------------------------------------- /toothysPickaxes.ahk: -------------------------------------------------------------------------------- 1 | #Persistent 2 | #SingleInstance, force 3 | SetBatchLines -1 4 | 5 | #If WinClassActive("ahk_class SunAwtFrame") 6 | ;; men 7 | a:: 8 | click right 9 | return 10 | 11 | s:: 12 | MouseMove, 0, 90, 0, R 13 | return 14 | 15 | d:: 16 | click 17 | return 18 | 19 | f:: 20 | MouseMove, 0, -90, 0, R 21 | return 22 | 23 | ;; ham 24 | 25 | q:: 26 | click right 27 | return 28 | 29 | w:: 30 | MouseMove, 0, 40, 0, R 31 | return 32 | 33 | e:: 34 | click 35 | return 36 | 37 | r:: 38 | MouseMove, 0, -40, 0, R 39 | return 40 | 41 | g::escape 42 | #If 43 | 44 | #IfWinActive, ahk_exe Code.exe 45 | ~^s::reload 46 | #IfWinActive 47 | 48 | ~f12:: 49 | suspend 50 | SoundBeep 51 | return 52 | --------------------------------------------------------------------------------