Phbot Plugins Adding and using

Firstly Phbot User 4 years

I’ve found plugins, but I don’t know how to use it.
I’ve added a .py file to the Plugins. I’ve added phbot to it, but when I start phbot in front of the battle arena, I don’t take any action and I need your help.

Thanks.
Good Forums.

Which plugin are you trying to use?

Battle Arena Auto Registration

from phBot import *
import struct
from datetime import datetime

log(’[Plugin] Succesfully loaded [%s].’ % name)

ArenaType = ‘’

def handle_joymax(opcode, data):
if opcode == 0x34D2:
if data[0] == 0xFF and data[1] == 0x00 and data[2] == 0x01 and data[3] == 0x01:
log(’[Arena] Successfully registered to arena: %s’ % ArenaType)
stop_bot()
return True

def arena(arguments):
NPCID = 0
Time = datetime.utcnow()
Hours = int(Time.strftime(’%H’))
Minutes = int(Time.strftime(’%M’))
Seconds = int(Time.strftime(’%S’))

if (Minutes == 35 and Seconds >= 5) or (Minutes > 35 and Minutes < 45):
	NPCs = get_npcs()
	for UniqueID, NPC in NPCs.items():
		if NPC['name'] == 'Arena Manager':
			NPCID = UniqueID
			break

	if NPCID != 0:
		global ArenaType
		ArenaType = ''
		Packet = bytearray()
		Packet.append(0x01)

		# if Hours == 18:
		# 	ArenaType = 'Job Flag'
		# 	Packet.append(0x03)
		# 	Packet.append(0x02)
		# elif Hours == 6:
		# 	ArenaType = 'Job Points'
		# 	Packet.append(0x03)
		# 	Packet.append(0x01)
		if Hours == 1 or Hours == 2 or Hours == 3 or Hours == 4 or Hours == 5 or Hours == 6 or Hours == 7 or Hours == 8 or Hours == 9 or Hours == 10 or Hours == 11 or Hours == 12 or Hours == 13 or Hours == 14 or Hours == 15 or Hours == 16 or Hours == 17 or Hours == 18 or Hours == 19 or Hours == 20 or Hours == 21 or Hours == 22 or Hours == 23 or Hours == 24:
			ArenaType = 'Random Flag'
			Packet.append(0x00)
			Packet.append(0x02)
		elif Hours == 1 or Hours == 2 or Hours == 3 or Hours == 4 or Hours == 5 or Hours == 6 or Hours == 7 or Hours == 8 or Hours == 9 or Hours == 10 or Hours == 11 or Hours == 12 or Hours == 13 or Hours == 14 or Hours == 15 or Hours == 16 or Hours == 17 or Hours == 18 or Hours == 19 or Hours == 20 or Hours == 21 or Hours == 22 or Hours == 23 or Hours == 24:
			ArenaType = 'Random Points'
			Packet.append(0x00)
			Packet.append(0x01)
		elif Hours == 1 or Hours == 2 or Hours == 3 or Hours == 4 or Hours == 5 or Hours == 6 or Hours == 7 or Hours == 8 or Hours == 9 or Hours == 10 or Hours == 11 or Hours == 12 or Hours == 13 or Hours == 14 or Hours == 15 or Hours == 16 or Hours == 17 or Hours == 18 or Hours == 19 or Hours == 20 or Hours == 21 or Hours == 22 or Hours == 23 or Hours == 24:
			ArenaType = 'Party Flag'
			Packet.append(0x01)
			Packet.append(0x02)
		elif Hours == 1 or Hours == 2 or Hours == 3 or Hours == 4 or Hours == 5 or Hours == 6 or Hours == 7 or Hours == 8 or Hours == 9 or Hours == 10 or Hours == 11 or Hours == 12 or Hours == 13 or Hours == 14 or Hours == 15 or Hours == 16 or Hours == 17 or Hours == 18 or Hours == 19 or Hours == 20 or Hours == 21 or Hours == 22 or Hours == 23 or Hours == 24:
			ArenaType = 'Party Points'
			Packet.append(0x01)
			Packet.append(0x01)
		else:
			log('[Arena] Guild arena not supported')
			return 0

		inject_joymax(0x74D3, Packet, False)
return 500

Linking it would be better instead of pasting the plugin. There are options you need to change so it registers for the one you want.

on the server I’m playing
Arena Registration Hours Random
09:32
10:32
14:32
16:32
19:32
22:32
23:32
01:32
02:32

Can you give me a ready file? I’ll just bring my character in front of the battle arena manager and the rest will be phbot :slight_smile:

I would really like to thank you

My Plugins Have Problem

i really need your help by admin

hi here you can found some help plugins arena

good share it nice but i don’t know how to do this it doesn’t work how i install it