[Plugin] xChat

Do you wish to promoting something in all chat? Just say it, loud and clear with this plugin!

Features :

  • Spam messages to all chat every 10s
  • Scripting support, send messages in all possible ways from Chat API

Script example :

chat,all,Hello World!

xChat v0.0.1

The most recent version will be allocated here

from phBot import *
import phBotChat
import QtBind

# Avoid possible issues
inGame = False

# Initializing GUI
gui = QtBind.init(__name__,"xChat")

cbxMsg = QtBind.createCheckBox(gui, 'cbxMsg_clicked','Send message: ', 21, 13)
cbxMsg_checked = False
tbxMsg = QtBind.createLineEdit(gui,"",130,12,590,18)
delayMsg = 10000 # delay between messages
delayCounter = 0

lblSpamCounter = QtBind.createLabel(gui,"Spam Counter:",21,35)
lblCounter = QtBind.createLabel(gui,"0",90,35)

# Check to start sending messages
def cbxMsg_clicked(checked):
	global cbxMsg_checked
	cbxMsg_checked = checked
	if checked:
		# restart spamer counter
		global delayCounter
		delayCounter = 0
		log("Plugin: Starting spammer")
		log("Plugin: Stopping spammer")

# Send message, even through script. Ex. "chat,All,Hello World!" or "chat,private,JellyBitz,Hi!"
def chat(args):
	# check arguments length and empty message
	if (len(args) >= 3 and len(args[2]) > 0):
		success = False
		type = args[1].lower()
		if type == "all":
			success = phBotChat.All(args[2])
		elif type == "private":
			success = phBotChat.Private(args[2],args[3])
		elif type == "party":
			success = phBotChat.Party(args[2])
		elif type == "guild":
			success = phBotChat.Guild(args[2])
		elif type == "union":
			success = phBotChat.Union(args[2])
		elif type == "note":
			success = phBotChat.Note(args[2],args[3])
		elif type == "stall":
			success = phBotChat.Stall(args[2])
		if success:
			log("Plugin: Message sent successfully (xChat)")

# Called when the bot successfully connects to the game server
def connected():
	global inGame
	inGame = False

# Called when the character enters the game world
def joined_game():
	global inGame
	inGame = True

# Called every 500ms.
def event_loop():
	if inGame:
		if cbxMsg_checked:
			global delayCounter
			delayCounter += 500
			if delayCounter%delayMsg == 0:

# Plugin load success
log('Plugin: xChat v0.0.1 plugin successfully loaded.')

Doesn’t work on Ruby Online

dont work?


This works on phBot scripts. Not in-game chat.
Maybe you are looking for xControl …


Lol people didn’t read that it says “script”.

1 Like

Great thanks, I did not read anything on that side. You’re very kind.

Added a chat logger customizable by character (See xChat tab)
Works even on script (to leave the register of anything) like :

logline,Starting script
logline,Finishing script

At log.txt or server_character_log.txt (depends on your char setting) you will find :

23/03 07:02:45 PM > Starting script
23/03 07:02:58 PM > Finishing script

Check last version at GitHub


do you think about adding and pick log since you already have a good implementation of handle_event?

Isn’t that in the bot already?

really ? :open_mouth: where is it?

Item drops get logged to Log\Drops.txt

i dont have that file :thinking:

How to send a customized private message instead of leaving it here

Well sending globals aint working

That’s anoher plugin, not from me by the way.

Send a global is not supported by phbot API. You will have to create it since is like using an item scroll, not just typing in chat.
I can add it but no yet, since I’m interested in other packet sections… but in some point I’ll have to do it. :thinking:

well i guess when u goint to add it make global delay like 60 seconds or so