-- Settings local toggleKey = key.VK_F11; -- Change to any hotkey you would like. local forwardKey = key.VK_W; -- Probably will be W unless you re-bound it local turnKey = key.VK_Q; -- Should be either A/Q to turn left, or D/E to turn right. local chatKey = key.VK_ENTER; -- Probably don't need to change this. local secondsBetweenInput = 30; -- Probably don't need to change this. -- Don't modify these local win; local timeLeft = secondsBetweenInput; local running = false; local targetWindowClass = "ArcheAge"; local targetWindowName = "- ArcheAge*- *"; -- Main script function macro.init() win = window.find(targetWindowName, targetWindowClass); if( not win ) then error("Could not find ArcheAge window. You must have the game running to use this script.\n", 0); end printf("ArcheAge mount leveling script is ready to go!\n"); printf("This script will use "); cli.setColor(cli.LIGHT_YELLOW); printf("%s", keyboard.getKeyName(turnKey)); cli.resetColor(); printf(" to turn the character.\nMake sure that is correct before starting!\n\n"); printf("Press "); cli.setColor(cli.LIGHT_YELLOW); printf("%s", keyboard.getKeyName(toggleKey)); cli.resetColor(); printf(" to toggle running state.\n"); end function macro.main(dt) if( running ) then timeLeft = timeLeft - dt; if( timeLeft < 0 ) then timeLeft = secondsBetweenInput; keyboard.virtualHold(win, forwardKey); keyboard.virtualHold(win, turnKey); end end end function macro.event(e, data1, data2) if( e == "keypressed" ) then if( data1 == toggleKey ) then if( running ) then keyboard.virtualRelease(win, forwardKey); keyboard.virtualRelease(win, turnKey); running = false; printf("Stopped at %s\n", os.date("%I:%M %p")); else timeLeft = 0; running = true; printf("Started at %s\n", os.date("%I:%M %p")); end end if( data == chatKey ) then -- Give the user time to enter a message without interuption. timeLeft = secondsBetweenInput; end end end