What's new

Legal Scripts and Macros

log163

Member
May 12, 2020
7
2
Not Sure if this is a good place for this thread, but i thought a place for players to post scripts/macros to share would be nice. this first post will be including a rundown on AutoIt and 1 scripts made in AutoIt

Download Link:
Code:
https://www.autoitscript.com/site/autoit/downloads/
you will be able to copy and paste the text for the scripts in a new '.txt' file and rename it so the extension is '.au3'
or create a new AutoIt v3 script from your context menu after installing the program
inside the instalation folder is a '.exe' called 'Au3Info.exe' which you can use to readjust the mouse coordinates if yours don't match with mine

Please Note: this script tests for a window that has a title that starts with: "Dragon", so if your title is in a different language you may need to adjust it in the code, and then maximizes it (DP may need to be in windowed mode)
Code:
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.14.5
 Author:         log163

 Script Function:
    Use a specific powder a specific number of times on an egg

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <UpDownConstants.au3>
Opt("GUIOnEventMode", 1)
   global const $xArray[3] = [393, 440, 490]; the screen x coordinates for the first,second,and third row on powder pane
   global const $xbutton = 442; the screen x coordinates for the confirm button on the powder pane
   global const $yArray[3] = [330, 374, 416]; the screen y coordinates for the first,second,and third column on powder pane
   global const $ybutton = 447; the screen y coordinates for the confirm button on the powder pane
   global const $DragonTitle = "Dragon"; the start of the title for the Dragon's Prohpet window
   global const $mouseSpeed = 5
   global $repeats = 1
   global $powder = 1
_Main()

Func _Main()
    ;Initialize variables
   Local const $iGUIWidth = 300, $iGUIHeight = 100
   global const $windowTitle = "Egg Powderizer"
   Local $idOK_Btn, $idCancel_Btn
   Local $idRepeat, $idPowder


    ;Create window
    GUICreate($windowTitle, $iGUIWidth, $iGUIHeight)

    ;Create an edit box with no text in it
   GUICtrlCreateLabel("Number of Repeats", 10, 10)
   $idRepeat = GUICtrlCreateInput("1", 120, 10, 50, 20)
   GUICtrlCreateUpdown($idRepeat)
   GUICtrlSetOnEvent($idRepeat, "OnUpDown")
   ;GUICtrlSetLimit($idRepeat,0,2)
   GUICtrlCreateLabel("Powder Slot", 10, 40)
   $idPowder = GUICtrlCreateInput("1", 120, 40, 50, 20)
   GUICtrlCreateUpdown($idPowder)
   GUICtrlSetOnEvent($idPowder, "OnUpDown2")
   ;GUICtrlSetLimit($idPowder,1,0)

    ;Create an "OK" button
    $idOK_Btn = GUICtrlCreateButton("Run", 75, 70, 70, 25)
    GUICtrlSetOnEvent($idOK_Btn, "OnYes")

    ;Create a "CANCEL" button
    $idCancel_Btn = GUICtrlCreateButton("Cancel", 165, 70, 70, 25)
    GUICtrlSetOnEvent($idCancel_Btn, "OnExit")
    GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit")

    ;Show window/Make the window visible
    GUISetState(@SW_SHOW)

    While 1
        Sleep(10000)
    WEnd
 EndFunc   ;==>_Main

 ; --------------- Functions ---------------
 Func OnExit()
    Exit
 EndFunc   ;==>OnExit
 Func OnUpDown()
    $repeats = GUICtrlRead (@GUI_CtrlId)
 EndFunc   ;==>OnUpDown
 Func OnUpDown2()
    $powder = GUICtrlRead (@GUI_CtrlId)
 EndFunc   ;==>OnUpDown2
 Func OnYes()
   local $i = 0
   local $x = 0
   local $y = 0
   Switch $powder
            Case 1
               $x = $xArray[0]
               $y = $yArray[0]
            Case 2
               $x = $xArray[1]
               $y = $yArray[0]
            Case 3
               $x = $xArray[2]
               $y = $yArray[0]
            Case 4
               $x = $xArray[0]
               $y = $yArray[1]
            Case 5
               $x = $xArray[1]
               $y = $yArray[1]
            Case 6
               $x = $xArray[2]
               $y = $yArray[1]
            Case 7
               $x = $xArray[0]
               $y = $yArray[2]
            Case 8
               $x = $xArray[1]
               $y = $yArray[2]
            Case 9
               $x = $xArray[2]
               $y = $yArray[2]
            Case Else
               ;$sMsg = "Error"
               Return
         EndSwitch

         If WinExists($DragonTitle) Then
            WinActivate($DragonTitle)
            ;WinWaitActive("Dragon")
            WinSetState($DragonTitle, "", @SW_MAXIMIZE)

            For $i = 1 To $repeats
               MouseClick($MOUSE_CLICK_PRIMARY, $x, $y, 1, $mouseSpeed)
               Sleep(100)
               MouseClick($MOUSE_CLICK_PRIMARY, $xbutton, $ybutton, 1, $mouseSpeed)
               Sleep(100)
            Next
         EndIf
EndFunc   ;==>OnYes
 
Last edited:

Seiichi

Manager
Oct 20, 2016
2,002
2,429
We will only allow quality of life improvements, mostly ones that automate the repetitive tasks in relation to the UI. Anything that automates gameplay or content will be considered botting.
 

log163

Member
May 12, 2020
7
2
I’m confident it’s ok seeing as when I made the post there were 2 scripts and I was told the second would be considered boting. so I removed it.
 

Seiichi

Manager
Oct 20, 2016
2,002
2,429
I have super anxiety with repetitive tasks, so I'm not going to say no to quality of life macros (such as egg care or powder use). If you're botting or you're doing content, that is a different matter.
 

Dryadia

Holiday Addict
Mar 13, 2017
256
241
adding egg powders is repetitive activity that really hurts my hands....how can i make a macro to help with that?
 

Seiichi

Manager
Oct 20, 2016
2,002
2,429
adding egg powders is repetitive activity that really hurts my hands....how can i make a macro to help with that?
Second script posted in the first post has one that'll do that.
 

Upcoming Events

Linkbacks