Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 22:13

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

Advertisement



Import Python Functions From C++ Dll

Discussion on Import Python Functions From C++ Dll within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2015
Posts: 9
Received Thanks: 0
Import Python Functions From C++ Dll

Hi, EPVP

For example: i want to load a pick-up bot created in python, but i want to load this directly with a C++ Dll and without using PyRun_SimpleStringFlags.

I need to load the python code directly without using PyRun_SimpleStringFlags or any of these *****. Is it possible?

For example, i want to load this bot with a C++ Dll, BUT NOT WITH A SIMPLE PYTHON LOADER THAT USES PYRUN_SIMPLESHITFLAGS etc...

I don't want to made asm hacks, pointer-based or this types of hacks and i only want this solution.
I think a while ago i had seen a topic about it here, but unfortunately, i didn't find it.

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

DONATION_CHECK_DELAY = 1.0
AUTODONATION = TRUE

EXPDONATOR_HOTKEY_DOWN = FALSE
EXPDONATOR_LAST_TIME = 0

def MainLoop():
	global AUTODONATION
	global EXPDONATOR_HOTKEY_DOWN
	global EXPDONATOR_LAST_TIME
	global DONATION_CHECK_DELAY
	
	if (app.IsPressed(app.DIK_F5) == FALSE):
		EXPDONATOR_HOTKEY_DOWN = FALSE
	
	if (app.IsPressed(app.DIK_F5) == TRUE and EXPDONATOR_HOTKEY_DOWN == FALSE):
		EXPDONATOR_HOTKEY_DOWN = TRUE
		
		if (AUTODONATION == FALSE):
			AUTODONATION = TRUE
			chat.AppendChat(chat.CHAT_TYPE_INFO, "EXP-Donator: Autodonation enabled.")
		else:
			AUTODONATION = FALSE
			chat.AppendChat(chat.CHAT_TYPE_INFO, "EXP-Donator: Autodonation disenabled.")

	cur_exp = player.GetStatus(player.EXP)
	if (AUTODONATION == TRUE and time.clock() > EXPDONATOR_LAST_TIME + DONATION_CHECK_DELAY and cur_exp >= 100):
		new_exp = cur_exp - int(round(cur_exp,-2))
		
		if (new_exp < 0):
			return

		EXPDONATOR_LAST_TIME = time.clock()
		player.SetStatus(player.EXP, new_exp)
		net.SendGuildOfferPacket(cur_exp)

EXPDonator = ui.Window()
EXPDonator.OnUpdate = MainLoop
EXPDonator.Show()
chat.AppendChat(chat.CHAT_TYPE_INFO, "EXP-Donator by musicinstructor")
GlossyBr is offline  
Old 12/02/2018, 01:46   #2
 
elite*gold: 0
Join Date: Jan 2015
Posts: 9
Received Thanks: 0
Bump
GlossyBr is offline  
Old 12/10/2018, 03:50   #3
 
elite*gold: 0
Join Date: Nov 2018
Posts: 24
Received Thanks: 1
PN me i can help.
xYNIX1 is offline  
Reply


Similar Threads Similar Threads
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video: MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube Aber den ganzen Kram könnt ihr auch als Text haben: Viele von euch kennen bestimmt das Problem das ne dll auf dem PC fehlt und das Programme dann nicht laufen. Hier ist die Lösung: Schaut erstmal nach, welche Microsoft Redistributables auf eurem PC installiert sind. Geht hierzu auf Start > Sytemsteuerung > Programme > Programme und Funktionen und...
[Python Help] Import hack file in logininfo.py
07/30/2013 - Metin2 Private Server - 2 Replies
I want to import my python hack with logininfo.py file, but, when i try to import it, it does an LOG error, but, if i rename the hack file to logininfo.py the hack open. http://i45.tinypic.com/2ex6883.jpg Any one can help ? :(
[Python]Python Loader vs import
07/29/2013 - Metin2 Private Server - 2 Replies
when i tried to inject my bot with this pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "eigenartig/mainboard.py") syserr shows me: 0728 16:55:05139 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage1.mse) Error 0728 16:55:05139 :: CInstanceBase::RegisterEffect(eEftType=264, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage1.mse, isCache=1) - Error 0728 16:55:05139 :: CEffectManager::RegisterEffect...
Python import files
05/29/2013 - Metin2 Private Server - 2 Replies
Hi all, When modifying the client Python files, almost all of them include something like import locale import net import player Yet I can't find those files anywhere! Where the hell are they loaded from? I've been able to retrieve the functions names but not the code... because I can't find the source. Any help?
Python Import Error ?! WTF!!
01/10/2013 - Metin2 Private Server - 1 Replies
Hallo leute, versuche seit 2std ein paar Gui´s zu schreiben allerdings haut der Client mir einen Import error rein. Ich möchte ein Fenster in der InterfaceModule zum aufrufen einbinden, will die datei "uiEphKill.py" importen allerdings haut mir der Client beim starten folgenden fehler hin: 0110 05:17:07457 :: networkModule.py(line:194) SetSelectCharacterPhase system.py(line:130) __pack_import system.py(line:110) _process_result introSelect.py(line:28) ?



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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.