Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 04:26

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

Advertisement



How to code route function for metin2?

Discussion on How to code route function for metin2? within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2023
Posts: 9
Received Thanks: 0
How to code route function for metin2?

Hello guys, im trying to code some metin2 internal cheats. I made a "run along recorded route" function. But its not waiting for next coordinate. I mean i need to move to the coord step by step but its running all coords in one second. So i need to check if char was came the selected coord or not. If it is then it can go next coord. Im using c4us'us source code. If im not wrong i need instance address from "PythonCharacterManagerInstance" this. Who can help me?
Apropos is offline  
Old 07/25/2023, 22:30   #2
Non ducor, duco.
 
Drewfire's Avatar
 
elite*gold: 0
Join Date: Jan 2014
Posts: 16,099
Received Thanks: 3,404
Arrow Metin2 Hacks, Bots, Cheats, Exploits & Macros -> General Coding

#moved
Drewfire is offline  
Old 07/27/2023, 10:36   #3
 
DonAirBerlin's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 62
Received Thanks: 18
First it is necessary that you share more information about what/how you want to do something. From your description no one here will be able to help you. Don't forget to mention what you already tried and how your data looks like.
Anyway for that to work its crucial to have access to the current players coordinates. If you have them you can try something like the following PSEUDO code:

Code:
# variables
recorded_route = [(x1, y1), (x2, y2), (x3, y3), ...]  # List of recorded coordinates
current_coord_index = 0  # Index to keep track of the current coordinate in the route

# Function to get character's current position
function get_character_position():
    # like mentioned get the coordinates here either by accessing the characters object or directly read it out from the recv function
    return character_instance.position  # Return character's position (x, y)

# Function to move character towards a target coordinate
function move_character_towards(target_x, target_y):
    current_x, current_y = get_character_position()  # Get current position
    # Calculate the direction vector towards the target
    direction_x = target_x - current_x
    direction_y = target_y - current_y
    # Normalize the direction vector (optional but recommended to control speed)
    direction_length = sqrt(direction_x^2 + direction_y^2)
    normalized_direction_x = direction_x / direction_length
    normalized_direction_y = direction_y / direction_length
    # Set the character's movement (you might have a function for this in your code)
    set_character_movement(normalized_direction_x, normalized_direction_y)

# Function to check if character reached the target coordinate
function has_character_reached(target_x, target_y):
    current_x, current_y = get_character_position()  # Get current position
    distance_to_target = distance(current_x, current_y, target_x, target_y)
    return distance_to_target < tolerance_threshold  # Check if character is close enough to the target

# Main function for running along the recorded route
function run_along_recorded_route():
    while current_coord_index < len(recorded_route):
        target_x, target_y = recorded_route[current_coord_index]  # Get the current target coordinate
        move_character_towards(target_x, target_y)  # Move character towards the target coordinate

        # Wait until the character reaches the target coordinate
        while not has_character_reached(target_x, target_y):
            wait_for_short_interval()  # Add a small delay to control the movement speed

        # Character reached the target coordinate, move to the next one
        current_coord_index += 1

    # Character has reached the end of the route
    set_character_movement(0, 0)  # Stop character's movement

# call main function
run_along_recorded_route()
DonAirBerlin is offline  
Old 07/28/2023, 12:15   #4
 
elite*gold: 0
Join Date: Jul 2023
Posts: 9
Received Thanks: 0
Hey man i did it already. No need help anymore for this. Now i need to find IsDead function on cheat engine. Can you help me?
Apropos is offline  
Reply

Tags
metin2 cheats


Similar Threads Similar Threads
std::function of a function returning an std::function
11/11/2013 - C/C++ - 19 Replies
Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann. Ich verzweifle an Folgendem Vorhaben: #include <Windows.h> #include <string> #include <iostream> using namespace std;
Running Function 2 after Function 1 finished
09/15/2013 - AutoIt - 3 Replies
Hey, its me again. Im stuck on a problem since yesterday and as much as i hate to ask for help, i really dont know what else to try. I want Function 2 to run after Function 1 has finished. I tried GuiCtrlSetOnEvent and MsgLoop, but i dont really understand it. I tried to read tutorials but they didnt help at all. The line that are underline is what im talking about. I want gamestart() to run first and when its finished, i want iniviteteam() to run. #AutoIt3Wrapper_UseX64=n...
[VIP-function] ToxicSYS [VIP-function]
08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies
heeeey E-pvpers :pimp: this is a new hack by TSYS Status : UNDETECTED Functions (VIDEO) : YouTube - WarRock - Bikini event VIP hack
Bot die auto route ändern
05/24/2006 - Ragnarok Online - 2 Replies
Also ich habe selbst danach gesucht aber nicht gefunden diese frage ist für ein paar schlauere köpfe ^_^ also mein bot startet in morocc und soll nach moc_ruins aber wen der durch den warp gehen soll bleibt der so ca in der mitte der 2 warps stecken und kann nicht auf die andere map changen das hat mir heute vversaut das er nicht 99 assa geworden ist weil der bestimmt nicht sehr lange da war vieleicht nur 2 - 3 stunden.
Route
05/02/2006 - Ragnarok Online - 5 Replies
wollte frage wie ich meinem bot in einer map ne bestimmte route gebe damit er die abläuft ? weil bei diesem random kack läuft er hin wo er will und wenn ich bei en seals bin ist das lame ... des weiterem wollte ich noch fragen wie mein bot quivers benuzten kann :( thx im vorraus , euer yomo



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


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.