Import Python Functions From C++ Dll

11/28/2018 18:56 GlossyBr#1
Hi, EPVP :D

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 shits. 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")
12/02/2018 01:46 GlossyBr#2
Bump
12/10/2018 03:50 xYNIX1#3
PN me i can help.