Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Lost Ark
You last visited: Today at 14:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[FREE] Lost Ark AFK Macro [Python 3.9]

Discussion on [FREE] Lost Ark AFK Macro [Python 3.9] within the Lost Ark forum part of the Popular Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2022
Posts: 7
Received Thanks: 7
[FREE] Lost Ark AFK Macro [Python 3.9]

This is a simple Lost Ark Afk Macro to farm collectibles from named bosses in the open world.
Before you start, stay close to a named boss (higher drop chance when you kill the boss) location, change game to windowed mode, start script and follow the instruction in the command promt window.

The script is written in Python 3.9 with modules time, random, pyautogui and keyboard.
Install python via windows store or from the official website.
Then install pyautogui and keyboard in Windows command prompt with pip:

pip install pyautogui
pip install keyboard


When you have installed python and the two modules above, take any text editor you have and save the script into a .py file on your desktop. For example... macro.py, or blabla.py.

Start "cmd" (Windows Command Prompt) and navigate into your desktop folder where u have the "macro.py" with....

cd \users\yourusername\desktop

start script with...

python3 macro.py


Btw.... i have implemented the random.uniform function to make the inputs more human... but this is no garantee to be safe.
Do not stay 24/7 on any Farm Location, there is a high chance to get reported.


Code:
import keyboard, pyautogui, random, time



def simple_afk_script():

    # ability variables to randomize the time.sleep function
    # random function to make inputs more human

    q_ability = random.uniform(0, 3)
    w_ability = random.uniform(0, 3)
    e_ability = random.uniform(0, 3)
    r_ability = random.uniform(0, 3)
    a_ability = random.uniform(0, 3)
    s_ability = random.uniform(0, 3)
    d_ability = random.uniform(0, 3)
    f_ability = random.uniform(0, 3)

    # awakening ability variables to randomize the time.sleep function

    v_ability = random.uniform(0, 3)

    # hotkey potion, variables with randomize function

    one_battle_hotkey = random.uniform(0, 3)
    five_item_hotkey = random.uniform(0, 3)

    # input, time and print functions for a better overview
    # comment out inputs if you dont need them 

    pyautogui.press('q')
    time.sleep(q_ability)
    print("key 'q' float time in seconds", q_ability)

    pyautogui.press('w')
    time.sleep(w_ability)
    print("key 'w' float time in seconds", w_ability)

    pyautogui.press('e')
    time.sleep(e_ability)
    print("key 'q' float time in seconds", e_ability)

    pyautogui.press('r')
    time.sleep(r_ability)
    print("key 'r' float time in seconds", r_ability)

    pyautogui.press('a')
    time.sleep(a_ability)
    print("key 'a' float time in seconds", a_ability)

    pyautogui.press('s')
    time.sleep(s_ability)
    print("key 's' float time in seconds", s_ability)

    pyautogui.press('d')
    time.sleep(d_ability)
    print("key 'd' float time in seconds", d_ability)

    pyautogui.press('f')
    time.sleep(f_ability)
    print("key 'f' float time in seconds", f_ability)

    pyautogui.press('v')
    time.sleep(v_ability)
    print("key 'v' float time in seconds", v_ability)

    pyautogui.press('1')
    time.sleep(one_battle_hotkey)
    print("key '1' float in seconds", one_battle_hotkey)

    pyautogui.press('5')
    time.sleep(five_item_hotkey)
    print("key '5' float in seconds", five_item_hotkey)
    
    print("\n")

    return

# example script to loop afk macro

print("press space... switch back into game\n")

if keyboard.read_key() == "space":

    loop_counter = 0

    while True:

        loop_counter = loop_counter + 1
        print("loop counter: ", loop_counter,"\n")
        simple_afk_script()


        # example if statement to kill the script at 100 loops 
        # remove quotation marks if u need it

        """if loop_counter == 100:
            break"""

       
else:
    print("wrong key...")
x-actly is offline  
Thanks
5 Users
Old 03/12/2022, 01:05   #2
 
elite*gold: 0
Join Date: Mar 2022
Posts: 4
Received Thanks: 0
Hello, I can't seem to find the module when running in python. The pip list shows that I have the current version of keyboard and pyautogui. I am using python 3.10. I check both python and python3 pip and tried installing to both, del both of them and tried reinstalling but for some reason python is not finding module keyboard or pyautogui.

Edit: As it always happens right when you reach out for help you solve it yourself. I figured it out and have fixed the problem!
PlebCodeWritter is offline  
Old 03/12/2022, 04:33   #3
 
elite*gold: 0
Join Date: Mar 2022
Posts: 7
Received Thanks: 7
i had the same problem when i installed python on my new laptop via microsoft store. i had to add the path environment manually to the python library... now it works as always!
x-actly is offline  
Old 03/12/2022, 22:36   #4
 
elite*gold: 0
Join Date: Apr 2021
Posts: 2
Received Thanks: 0
can someone explain better how it works? :/
iiScoovy is offline  
Old 03/13/2022, 04:48   #5
 
elite*gold: 0
Join Date: Feb 2018
Posts: 1
Received Thanks: 0
Quote:
Originally Posted by iiScoovy View Post
can someone explain better how it works? :/
1. install python
2. install python modules keyboard and pyautogui as described above
3. copy paste script into .py file with notepad or notepad++
4. start script in cmd with "python3 PATH/yourfilename.py"
bimbusa is offline  
Old 03/13/2022, 19:43   #6
 
elite*gold: 0
Join Date: Mar 2022
Posts: 1
Received Thanks: 0
is it possible to run the script without python?
skill3r199 is offline  
Old 03/15/2022, 00:12   #7
 
elite*gold: 0
Join Date: Mar 2022
Posts: 7
Received Thanks: 7
Quote:
Originally Posted by skill3r199 View Post
is it possible to run the script without python?
sure... you can do this with "auto-py-to-exe", but u need to install python first!
x-actly is offline  
Old 04/25/2022, 10:21   #8
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 2
Hey, is this still working or lost ark patched it. I manage to run it and it will type out all the keys such as i tried opening a notepad the keys will be typed. But inside the game it cannot be input. Thank you.
Afpire9333 is offline  
Old 04/25/2022, 18:55   #9
 
Cage's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 221
Received Thanks: 10
i hope you improve this project
Cage is offline  
Old 06/02/2022, 19:41   #10
 
elite*gold: 0
Join Date: Jun 2022
Posts: 1
Received Thanks: 0
does the script still work?
KarltheGreat is offline  
Reply




All times are GMT +1. The time now is 14:04.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.