[Release][GF] eXLib - The Python Advanced Module

06/05/2021 04:10 martinx1#1
Hello everyone, today I came to release an advanced python module with lot of rich features for all python developers.
I have been adding functions for this module for the past few months, and finally i think is stable enought for release.

With this python module developers will be able to create the folowing only using python!:
  • Inject python scripts
  • WaitHack
  • Access the entity list
  • Create a route using path-finding
  • Create fast fishing-bot
  • Wallhack
  • Pickup range filter
  • Use older functions like GetPixelPosition
  • And much more!

How to use the module?
  • Edit script.py to execute your code
  • Grab any injector
  • Make sure you are in server or in character select (Important!)
  • Inject eXLib.dll
DO NOT USE MANUAL MAP

API and documentation:
All functions are available in the eXLib module, to use them just import eXLib.
To execute your script just edit script.py and import yours.
This script will be executed after injection.
Inside the folder there is an example script.


Feel free to contact me on discord(eXploit#8057) for further information about the functions. I will block people that ignore sentence below!

THIS IS ONLY FOR DEVELOPERS, IF YOU DONT KNOW WHAT IS THIS, THEN IT IS NOT FOR YOU, DON'T SPAM THE TOPIC WTH USELESS QUESTIONS


Join our [Only registered and activated users can see links. Click Here To Register...] for download links and announcements.

Fell free to donate and support the project:)

Bitcoin: 1PFmojvLVYsAdYFiQVZqwz5WNs9mTw4nAD
Etherum: 0x1168B532aaEf156b93ff7afb335D7bcaE75F19BD
Cardano: DdzFFzCqrhshKV92CHqGg5eefSGRvvsGnSYgQjyaWqNQYMSfj3 odrsnSyJmy28tmm6zEn1GWNX6rcv14ZpzNsoC8jUjt9osCUtsj 6WJf
PayPal: [Only registered and activated users can see links. Click Here To Register...]
06/05/2021 11:07 Aeryas#2
So that's what you were working on :P . Good job, nice release. I hope that people find this as a good anchor to start doing their thing.
06/05/2021 13:50 senpaiex#3
Amazing job! Specially path-finding algorithm. Thanks for the release..
06/05/2021 16:40 KALLLLLLLL#4
Thanx for sharing.

İs there a way to execute script.py file to execute every x seconds or execute when enter a new map ?
06/05/2021 19:26 martinx1#5
Quote:
Originally Posted by KALLLLLLLL View Post
Thanx for sharing.

İs there a way to execute script.py file to execute every x seconds or execute when enter a new map ?
It is not needed, you can replicate that feature using only python by using a timer window with the OnUpdate function.
But if this becomes a very requested feature i can add for example a callback function on every frame.
06/06/2021 01:40 madagascar007#6
Amazing work martinx1,

I managed to revive the old Metin Finder by Eigenartig which uses the GetPixelPosition() and MoveToDestPosition() methods which were removed from the official GF servers some time ago.

06/08/2021 00:36 martinx1#7
Quote:
Originally Posted by madagascar007 View Post
Amazing work martinx1,

I managed to revive the old Metin Finder by Eigenartig which uses the GetPixelPosition() and MoveToDestPosition() methods which were removed from the official GF servers some time ago.

[Only registered and activated users can see links. Click Here To Register...]
BTW, you can speed up that reload process, instead of guessing which instances are close, you can just loop trough InstancesList and check which VID's are metin stones.
06/08/2021 21:48 vojtani#8
How to sleep? i am trying to make Autopickup
06/08/2021 23:29 martinx1#9
Quote:
Originally Posted by vojtani View Post
Can someone give me example how to move to position and how to find item id for loot filter?
eXLib.MoveToDestPosition(x,y), where x and y are the coordinates you see on the minimap multiplied by 100.

For pickup use:

HTML Code:
vid, posX, posY = eXLib.GetCloseItemGround(myX,myY)
eXLib.SendPickupItem(vid)
This will get the vid and position of the closest item to you, according to the filter you specified. And then will pick it up.

Quote:
Originally Posted by vojtani View Post
How to sleep? i am trying to make Autopickup
Create a window and use the OnUpdate function for that. I will provide a script that does this when i have time.
06/09/2021 00:02 Maxi,#10
Great job Thanks for Release
06/09/2021 00:18 vojtani#11
@[Only registered and activated users can see links. Click Here To Register...] It will be fantastic because i am beginer at python and i dont understant the code much. Btv where are you from I am from czech
06/09/2021 01:14 martinx1#12
Quote:
Originally Posted by vojtani View Post
@[Only registered and activated users can see links. Click Here To Register...] It will be fantastic because i am beginer at python and i dont understant the code much. Btv where are you from I am from czech
I am from Portugal.

Code:
import net,player,chat
import ui
import time

#Delay in seconds
TIME_WAIT = 3

#Get current time in seconds
def GetTime():
    return time.clock()

#Return a tupple, the first value is true or false according if the timer has been reached, and the second value is the current timer
#if first value is true or the old timer if false
def timeSleep(last_time,sleepTime):
    timer = time.clock()
    if(last_time<timer-sleepTime):
        return(True,timer)
    return(False,last_time)


class window(ui.ScriptWindow):
    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.Show()
        self.lastTime = 0

    
    def OnUpdate(self):
        val, self.lastTime = timeSleep(self.lastTime,TIME_WAIT)
        if val and player.GetStatus(player.HP) <= 0:
            #Do Your Stuff
            chat.AppendChat(3,"Delayed command")

win = window()
win.Show()
Change the "chat.AppendChat(3,"Delayed command")" for whatever you want to do, and it should execute every 3 seconds.
06/09/2021 03:27 MrCrisp#13
Nice work! I remember when Padmak & co. did a similar library back in the days.
06/09/2021 13:35 vojtani#14
@[Only registered and activated users can see links. Click Here To Register...] I was trying to experimnts my own but i find lot of problems. And i dindt find way how to run your code. For example this is my code that describes the problem.
Code:
import chat,eXLib,player,net,chr
import ui

class window(ui.ScriptWindow):

	def __init__(self):
		ui.ScriptWindow.__init__(self)
		self.Show()
		self.my_vid = 0
	def OnUpdate(self):
		#this is working--------------------------------------------------------------
		vids = eXLib.InstancesList
		chat.AppendChat(3,"There are "+str(len(vids))+" players/monster arround.")
		#-----------------------------------------------------------------------------

		# and this is not working-------------------------
		my_vid = net.GetMainActorVID()
		chat.AppendChat(3,"my_vid:"+str(my_vid))

		x,y,z = eXLib.GetPixelPosition(my_vid)
		chat.AppendChat(3,"x:"+str(x))
		#-------------------------------------------------

#this is working--------------------------------------------------------------
my_vid = net.GetMainActorVID()
chat.AppendChat(3,"my_vid:"+str(my_vid))

x,y,z = eXLib.GetPixelPosition(my_vid)
chat.AppendChat(3,"x:"+str(x))
#-----------------------------------------------------------------------------
win = window()
win.Show()
OnUpdate()
06/09/2021 14:01 martinx1#15
Quote:
Originally Posted by vojtani View Post
@[Only registered and activated users can see links. Click Here To Register...] I was trying to experimnts my own but i find lot of problems. And i dindt find way how to run your code. For example this is my code that describes the problem.
Code:
import chat,eXLib,player,net,chr
import ui

class window(ui.ScriptWindow):

	def __init__(self):
		ui.ScriptWindow.__init__(self)
		self.Show()
		self.my_vid = 0
	def OnUpdate(self):
		#this is working--------------------------------------------------------------
		vids = eXLib.InstancesList
		chat.AppendChat(3,"There are "+str(len(vids))+" players/monster arround.")
		#-----------------------------------------------------------------------------

		# and this is not working-------------------------
		my_vid = net.GetMainActorVID()
		chat.AppendChat(3,"my_vid:"+str(my_vid))

		x,y,z = eXLib.GetPixelPosition(my_vid)
		chat.AppendChat(3,"x:"+str(x))
		#-------------------------------------------------

#this is working--------------------------------------------------------------
my_vid = net.GetMainActorVID()
chat.AppendChat(3,"my_vid:"+str(my_vid))

x,y,z = eXLib.GetPixelPosition(my_vid)
chat.AppendChat(3,"x:"+str(x))
#-----------------------------------------------------------------------------
win = window()
win.Show()
OnUpdate()
I bet you are injecting the script with the PythonInjector.py script. That will yeld you an error because of the inner workings of the exec function that is used on that module, you can read more about someone witha similar error here: [Only registered and activated users can see links. Click Here To Register...].
To work arround that, you have 2 options:
  1. Define every global variable as "global" on every function, in the example you gave, it would become:
    Code:
    import chat,eXLib,player,net,chr
    import ui
    
    class window(ui.ScriptWindow):
    
    	def __init__(self):
    		ui.ScriptWindow.__init__(self)
    		self.Show()
    		self.my_vid = 0
    	def OnUpdate(self):
    		global eXLib,chat,net
    		#this is working--------------------------------------------------------------
    		vids = eXLib.InstancesList
    		chat.AppendChat(3,"There are "+str(len(vids))+" players/monster arround.")
    		#-----------------------------------------------------------------------------
    
    		# and this is not working-------------------------
    		my_vid = net.GetMainActorVID()
    		chat.AppendChat(3,"my_vid:"+str(my_vid))
    
    		x,y,z = eXLib.GetPixelPosition(my_vid)
    		chat.AppendChat(3,"x:"+str(x))
    		#-------------------------------------------------
    
    #this is working--------------------------------------------------------------
    my_vid = net.GetMainActorVID()
    chat.AppendChat(3,"my_vid:"+str(my_vid))
    
    x,y,z = eXLib.GetPixelPosition(my_vid)
    chat.AppendChat(3,"x:"+str(x))
    #-----------------------------------------------------------------------------
    win = window()
    win.Show()
  2. Import your script from script.py as this does not use exec()