Jump to content

MoonBrew

Members
  • Content count

    58
  • Joined

  • Last visited

Everything posted by MoonBrew

  1. Disclaimer: Requirements: Install AutoHotkey: https://www.autohotkey.com/. A file with item ids/names that you regularly want on the list. Should be in the same folder Script assumes filename to be "alootids.txt" Each item should be in a single line Use empty line to indicate end of list. Everything after that is ignored. Use the remainder of the file to keep other lists. Only the top list is the one that will be read. Here is a sample file: alootids.txt AutoHotkey is a tool for windows that lets you automate keystrokes and mouse input, much like macros in Excel. It uses scripts that are stored in .ahk files. Copy the code below and save in an .ahk file. filename := "alootids.txt" delay := 200 ~^1:: theFile := FileOpen(filename, "r `n") if !IsObject(theFile) { MsgBox Can't open "%filename%" for reading. error code %A_LastError%. return } line := theFile.ReadLine() line := StrReplace(line, "`n") ;`n is newline char while StrLen(line) > 0 { Send @autoloot item %line% Sleep %delay% Send {Enter} Sleep %delay% line := theFile.ReadLine() line := StrReplace(line, "`n") } theFile.Close() return ~^2:: ;Bonus Send @autoloot clear Sleep %delay% Send {Enter} return After saving, right click and run the script as administrator (if RO is run as administrator). Usage: Always switch to RO and make sure your chat box is active for typing. Then press Ctrl+1 to populate your autoloot list. Hotkeys Ctrl+1: Populate your autoloot list. For people who want to play around with the script: The Hotkey: In the third line before '::' is the hotkey to trigger the actions in the block below it. In this case, its '~^1' which indicated 'Ctrl+1'('^' stands for 'Ctrl" and see the website for what '~' stands for). You can change this to whatever you want and make sure you use correct notation for the keys. Delays: The delays are what works for me and might require changes for you. Delays are in milliseconds. Try not to be too fast that the keystrokes are missed. Tip: You can use an empty text file to test your script.
  2. MoonBrew

    Autoloot list: AutoHotkey script

    Version 2 This is the version I am using. Its slightly faster and allows entries in alootids.txt to be stored with more freedom. The script uses tabs as delimiter and ignores () and space. It can use both name and ids, whichever is in the last column. Sample file: alootids.txt Here is the code: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. filename := "alootids.txt" ~^1:: WinGet id, , ahk_exe dreamerro.exe ; ControlGet id, HWND, , , ahk_exe dreamerro.exe Send % "@autoloot clear" Sleep 200 Send {Enter} Sleep 200 Send % "@autoloot rate 10" Sleep 200 Send {Enter} Sleep 200 theFile := FileOpen(filename, "r `n") if !IsObject(theFile) { MsgBox Can't open "%filename%" for reading. error code %A_LastError%. return } line := theFile.ReadLine() line := StrSplit(line, A_Tab, "() `n", MaxParts := 20) while StrLen(line[line.MaxIndex()]) > 0 { Send % "@autoloot item " line[line.MaxIndex()] Sleep 200 Send {Enter} Sleep 200 line := theFile.ReadLine() line := StrSplit(line, A_Tab, "() `n", MaxParts := 20) } theFile.Close() return
  3. MoonBrew

    (Legacy RO Player) New Here Though!

    Or be a loner like I am.
  4. MoonBrew

    Hello.

    Let me know if you need company
  5. MoonBrew

    hi

    Welcome.
  6. MoonBrew

    Hello.

    Nice. Welcome. Any reason why you choose high rate?
  7. MoonBrew

    Tone's Lazy GX Rolling Cutter STP Guide

    Does more delay not benefit Rolling Cutter? I am using macro.
  8. Am working on a uni assignment. After that I will get back to fixing my script. I believe I have a solution but need to test it.

  9. MoonBrew

    Updated Mining Script

    This script is an update of Pros: You can take advantage of drill heat resets provided by the Repair skill. You can pause/start the script instantly. You can modify depth, hotkeys and delays in the script relatively easily using my annotations. Cons: You can't alt tab while mining. BM mode needs to be off. Requirements: Install AutoHotkey: https://www.autohotkey.com/ AutoHotkey is a tool for windows that lets you automate keystrokes and mouse input, much like macros in Excel. It uses scripts that are stored in .ahk files. Copy the code below and save in an .ahk file. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ;|---------------------------------------Modify these--------------------------------------| times = 6 ; 1. Change this to how many times you want mining the same spot. This is how many times you press Enter. miningDelay = 2600 ; 2. This is the time the script will wait while mining in milliseconds. Default 2.6 secs startingDelay = 300 ; 3. Delay before the script starts jumping and mining. Default 0.3 secs. ;|----------Script start-----------| stop = 0 N := times ~F2:: ; 4. Key for mining start. Default F2 loop { if stop = 1 { stop = 0 return } Sleep, 300 send, {Alt down} sleep, 200 send, {7 down} ; 5. In-game Alt+m macro number for first co-ordinate. Default Alt+7 sleep, 17 send, {7 up} ; 5. In-game Alt+m macro number for first co-ordinate sleep, 200 send, {Alt up} Sleep, startingDelay Send, +d1 Sleep, 200 N := times while N > 0 { if stop = 1 { stop = 0 return } Send, {Enter} Sleep, miningDelay --N } if stop = 1 { stop = 0 return } Sleep, 300 send, {Alt down} sleep, 200 send, {8 down} ; 5. In-game Alt+m macro number for second co-ordinate. Default Alt+8 sleep, 17 send, {8 up} ; 5. In-game Alt+m macro number for second co-ordinate sleep, 200 send, {Alt up} Sleep, startingDelay Send, +d2 Sleep, 200 N := times while N > 0 { if stop = 1 { stop = 0 return } Send, {Enter} Sleep, miningDelay --N } } return ~F3::stop = 1 ; 4. Key for mining stop. Default F3 ~`::N := times ; 7. Key for restarting the mining count, for use when the Drill heat resets. Default resets to times value ` After saving, right click and run the script as administrator (if RO is run as administrator). Configuration As you can see in the code, there are places where you need to configure this script for yourself. I have marked them with numbers 1-4 and mentioned the defaults. times: Change this to how many times you want the script to press mine. miningDelay: This is how long the script should wait for you to finish mining each time. This will depend on your skill Faster Drill level. startingDelay: This is the delay before the script jumps and starts mining. Jumping quickly sometimes causes the drill to break. These lines are where you should change the keys used to trigger and stop the script. The string before :: is the hotkey to trigger the actions in the block below it. In this case, its ~F1 which represents the F1 key (see the website for what ~ stands for). You can change this to whatever you want and make sure you use correct notation for the keys. These should be the Alt-M macros where you have saved the mining co-ordinates. We need two because the script will keep switching between the two to by pass drill heat cool down. Change the last line N := times to N := times -1 or N := times - 2 based on what you want the N counter to reset to. This should be based on when you want to press the reset key. When configuring, save the script and run it again. Make sure to exit the previous instance and that there are not multiple instances running in the task bar. You can also just right-click and select Reload This Script Here is a video of the script running: Usage: Make sure RO is active. Find a mine and save two co-ordinates near it in Alt+7 and Alt+8 macros (Press Alt+m in RO to open the macro menu). Type npc:mine in the whisper box and make sure the cursor is in the chat box, ready to type. Then press F2 to start mining. Press F3 anytime to stop mining. Press ` to reset the script's mining counter N. N starts from the value of times and counts down to 1. When you reset this, it starts counting down again from times. Do this if your Drill heat resets to 0 due to skill Repair. You should press this after you see the message of heat reset and before the pop-up to continue mining disappears and the next mining starts. If you make a mistake, just press F3 to stop the script whenever. Pressing this correctly will let the script mine as deep as possible without breaking the drill. Hotkeys F2: Start mining F3: Stop mining. `: Reset mining counter N.
  10. MoonBrew

    Updated Mining Script

    Found a potential issue with the color detection. I use custom grfs and so my background is always a shade of dark green or black. Turns out the background color can affect the color of the yellow plume. The difference between the colors was 35. I don't know if setting the shade range to 35 is worth it performance wise or how big the range is with normal background colors. I will be doing more testing.
  11. MoonBrew

    Updated Mining Script

    The mining functionality is based off window i.e. whichever DreamerRo window is active when you press F2. The drill resets are based off a pixel on the screen (not window). The position is absolute and not relative to a window or w/e.
  12. MoonBrew

    Updated Mining Script

    Version 3 has been edited. Please re-download. Dual client should work now. The search was happening in the active window only earlier but now it should be based off the screen. I might keep making small changes to the script over the next few hours for clarity or small bug fixes. Please check for edits and re-download the script. I am online on forums and in-game on Crysanthium for demos and support. I will upload a video showing the functionality in a bit.
  13. MoonBrew

    Updated Mining Script

    Hold on. I am checking.
  14. MoonBrew

    Updated Mining Script

    Version 3: New feature: Auto Reset. A caveat. The RO window needs to be visible for this feature to work and any change to its position requires reconfiguration. The reason is because the script searches for changes on a fixed pixel visible on the screen. Also as a result, this feature requires configuration for your setup to work. New Feature: Change times without editing: No more editing the file for each different mine! Now there are hotkeys for it. Requirements: AutoHotkey: https://www.autohotkey.com/ Window Spy: Installed with above. AutoHotkey is a tool for windows that lets you automate keystrokes and mouse input, much like macros in Excel. It uses scripts that are stored in .ahk files. Window Spy lets you know pixel details. Copy the code below and save in an .ahk file. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. CoordMode, Pixel, Screen CoordMode, Mouse, Screen CoordMode, ToolTip, Screen ; |-----------------------------------------------Config---------------------------------------------------| times = 7 ; No. of times to press Enter on one spot miningDelay = 1400 ; Delay for mining(ms) startingDelay = 400 ; Delay after jump and before mining(ms) makeDelay = 5000 ; Delay for make drill(ms) jump1Key = {F7} ; @jump location 1 jump2Key = {F8} ; @jump locaiton 2 hideKey = {F9} ; Hide key. x = 723 ; x co-ordinate y = 329 ; y co-ordinate targetcolor = 0x8B8150 ; reset color (RGB hex) pixelrange = 5 ; Pixels around the target area to search for the color shades = 10 ; Range of colors to search config = 1 ; 1 for tooltips, 0 for none. ; My Range is 0x958B5A - 0x827A4C. 0x8B8150 is the median #If GetKeyState( "F2", "P") ; |-------------------------Values for times--------------------------| 5::times = 5 6::times = 6 7::times = 7 ; |--------------------------------------------------END---------------------------------------------------| #If F2 UP:: ; 1. Mining Key stop = 0 WinGet id, , ahk_exe dreamerro.exe Loop { Loop 2 { if config { ToolTip,,,,2 ToolTip,,,,3 } if stop { if config ToolTip return } Sleep 200 if A_Index = 1 ControlSend, , %jump1Key%, ahk_id %id% else ControlSend, , %jump2Key%, ahk_id %id% Sleep startingDelay ControlSend, , %hideKey%, ahk_id %id% Sleep 200 ControlSend, , d%A_Index%, ahk_id %id% Sleep 200 N := times while N > 0 { if stop { if config ToolTip return } ControlSend, , {Enter}, ahk_id %id% if config msOri := A_TickCount SetTimer CheckReset, On Sleep miningDelay SetTimer CheckReset, Off --N } } } return F3::stop = 1 ; 2. Stop script `:: ; 3. Reset counter N := times if config { PixelGetColor color, x, y, RGB ms := A_TickCount - msOri Clipboard = Found color %color% at x %x%, y %y% at %ms%ms ToolTip %Clipboard%, , , 3 } return CheckReset: if config { ms := A_TickCount - msOri ToolTip Searching: %ms%ms, x-25, y-200, 1 } PixelSearch, px, py, x - pixelrange, y - pixelrange, x + pixelrange, y + pixelrange, targetcolor, shades, Fast RGB if !ErrorLevel { if config { ms := A_TickCount - msOri ToolTip Detected at %ms%ms, px, py, 2 } N := times } return ; |---------------------------------------------make drill-------------------------------------------------| F4:: ; 5. make drill stop = 0 WinGet id, , ahk_exe dreamerro.exe Sleep 200 loop { loop 4 { if stop return ControlSend, , make, ahk_id %id% Sleep 200 ControlSend, , {Enter}, ahk_id %id% Sleep makeDelay } ControlSend, , d3, ahk_id %id% Sleep 200 ControlSend, , {Enter}, ahk_id %id% Sleep 400 } return After saving, right click and run the script as administrator (if RO is run as administrator). Configuration Things are same as earlier but everything is moved into a section in the beginning. The new stuff is explained below. hideKey: I see people using Hide skill in their scripts. So now its added. Values for times: Edit the section based on the type of mines you mine. Follow the given format. For example, I mine 5 times in one spot for Amon Ra mines, 6 times for Pharoah and Moonlight and 7 times for Mayan mines. So my section has 5::times = 5 6::times = 6 7::times = 7 Setting up auto reset: We need two things, a pixel range to search in and a color to search for. Enable tooltips: Set config to 1. Selecting the search pixel: Open your ragnarok client. Decide on where you want the script to search for the reset plume. Right above where the reset message would appear is good. Then using Window Spy, find the x,y co-ordinates at approximately the center of that area. Obtain the Screen value under Mouse Position. Set the values below using this. pixelrange is the range around this pixel to include in the search. Start with maybe a larger value maybe 10 and reduce it to 5 once you have refined the script. x = 723 ; x co-ordinate y = 329 ; y co-ordinate Selecting the search color: Take a screenshot of when a drill reset happens. Using Window Spy again find the the color of the plume in the area above the reset message. Append 0x to this value and set tagetcolor to it. For example, 0x8B8150. targetcolor = 0x8B8150 ; reset color (RGB hex) Selecting the ranges: Set pixelrange to 10, which is the area around the pixel to search. and shades to 10, which is the range of shades around the color to search. Eventually reduce these as you refine the script. pixelrange = 10 ; Pixels around the target area to search for the color shades = 10 ; Range of colors to search Test and refine: You will see tooltips giving you information. Pressing the manual reset key now also gives you some helpful information. Disable tooltips: Once you are done testing, set config to 0. Usage´╗┐: Find a mine and save two co-ordinates near it in F7 (changed from Alt+7) and F8 (changed from Alt+8) macros (Press Alt+m in RO to open the macro menu). Turn off bm mode Type npc:mine in the whisper box and make sure the cursor is in the chat box, ready to type. Then press F2 + number to set times to number. For example I press F2 + 7 for mayan mines. If you are not already mining, mining will start. Otherwise only the times value is changed. Pressing only F2 will start mining with the previous or default value of times. Press F3 anytime to stop mining. Press ` to reset the script's mining counter N. This is there just for convenience. The script should automatically detect resets now. Hotkeys F2: Start mining previous or default times. F2 + number: Start mining number times. F3: Stop mining. `: Reset counter. F4: make drill.
  15. MoonBrew

    New Forging Headgears

    Does failing a headgear forge still give exp?
  16. MoonBrew

    Guide to Buying Vend

    I don't know if there is an option to use zeny bags as currency for a buy shop.
  17. MoonBrew

    Guide to Buying Vend

    I have an issue with setting the prices. I have 2bil on the merchant in zeny and want to buy 20 items worth 100m. But no matter how I enter the prices I get some error text like Please enter the price for item %s. It must be less than 9999 million Zeny. OR you don't have enough zeny or something. Looks like the maximum buy price I can put is 100m minus 1.
  18. MoonBrew

    Valentines Event 2021 - Phase 3

    Why does it say 0 for everything? I can't see the prices.
  19. MoonBrew

    Elemental Immunity guide

    So Undead element behaves differently on this server? From the wiki element tables, I don't get how it reduces 20%.
  20. MoonBrew

    Updated Mining Script

    That is an interesting idea. Would you happen to have to a link to this ygg script? Glad you enjoy .
  21. MoonBrew

    Updated Mining Script

    That would be nice. I haven't figured out a way to do this yet. It is hard to read messages from inside the Ragnarok Client.
  22. MoonBrew

    Updated Mining Script

    The script has a reset. By default it uses the ` key.
  23. MoonBrew

    Updated Mining Script

    Does anyone need a way to change the value of times without editing the script every time?
×