ÇáãæÖæÚ: Added Python plugin support
ÚÑÖ ãÔÇÑßÉ æÇÍÏÉ
ÞÏíã 30-07-2015, 06:32 AM   #5

™Mahmoud Gamal™
ÚÖæ áÇãÚ



ÇáÕæÑÉ ÇáÑãÒíÉ ™Mahmoud Gamal™


• ÇáÇäÜÊÜÓÜÇÈ » Jan 2015
• ÑÞÜã ÇáÚÜÖÜæíÜÉ » 120509
• ÇáãÔÜÜÜÇÑßÜÇÊ » 1,474
• ÇáÜÏæáÜÉ » EGYPT
• ÇáÜåÜæÇíÜÉ »
• ÇÓÜã ÇáÜÓÜíÜÑÝÜÑ » Orion
• ÇáÜÌÜäÜÓ » Male
• äÞÜÇØ ÇáÊÞííã » 21
™Mahmoud Gamal™ ÕÜÇÚÜÏ

™Mahmoud Gamal™ ÛíÑ ãÊæÇÌÏ ÍÇáíÇð



ÇÝÊÑÇÖí ÑÏ: Added Python plugin support



In v12.1.55 of the testing releasePython 3.4 plugin support has been addedPlugins allow you to extend the bot with Python by sending packets or starting/stopping the bot.

Any .py file you place in the 'Plugins' directory will be loaded at runtimeThis requires you to also have the Python 3.4 'Lib' folder inside 'Plugins\python34'It is included in the download below.

An example Python script has been included to give you a list of available functionsYou should not call any functions that return a lot of data (eg'get_inventory'very frequently otherwise it will increase the CPU usage significantly
from phBot import *

# Called when the bot successfully connects to the game server
def connected():
    
pass

# All packets received from Silkroad will be passed to this function
# Returning True will keep the packet and False will not forward it to the game server
def handle_silkroad(opcodedata):
    
log('Python: (Silkroad) 0x%02X' opcode)
    return 
True

# All packets received from Joymax will be passed to this function
# Returning True will keep the packet and False will not forward it to the client
def handle_joymax(opcodedata):
    
log('Python: (Joymax) 0x%02X' opcode)
    return 
True

# Called when the character enters the game world
def joined_game():
    
pass

# Called when the character teleports
# This function will also be called after the "joined_game" function
def teleported():
    
pass

log
('[%s] Loaded' __name__
Ïå ÇáãÝÑæÖ ÇáÔÑÍ Çááí ãäÒáå Weaman


ÊæÞíÚ ™Mahmoud Gamal™ :
ÚÝæÇ ,,, áÇíãßäß ãÔÇåÏå ÇáÑæÇÈØ áÇäß ÛíÑ ãÓÌá áÏíäÇ [ ááÊÓÌíá ÇÖÛØ åäÇ ]