phBot Plugins
  • Introduction
  • Example Plugins
  • phBot API
    • Client
    • Guild
    • Events
    • Players
    • Party
    • NPC
    • Character
    • Academy
    • Inventory
    • Pets
    • Monsters
    • Encoding
    • Locale
    • Config
    • Botting
    • Taxi
    • Packet Injection
    • Log
    • Game Data
    • Teleport
    • Training Area
    • Command Line Arguments
    • Movement
    • Quests
    • Drops
    • Paths
    • Script
    • Notifications
    • Alchemy
    • Misc
  • Chat API
  • Handling Script Commands
  • GUI API
Powered by GitBook
On this page
  • Chat
  • All(text)
  • Party(text)
  • Guild(text)
  • Union(text)
  • Stall(text)
  • Private(name, text)
  • Note(name, text)
  • Global(text)
  • Notice(text)
  • ClientNotice(text)

Chat API

Chat

You must import phBotChat to use the chat API.

All(text)

Sends a message to general chat.

Party(text)

Sends a message to the party.

Guild(text)

Sends a message to the guild.

Union(text)

Sends a message to the union.

Stall(text)

Sends a message to the stall.

Private(name, text)

Sends a private message to another player.

Note(name, text)

Sends a note to another player.

Global(text)

Sends a global message.

Notice(text)

Sends a GM notice to the server. This function should only ever be used if you are the GM of your own server. It should never be used as a normal player.

ClientNotice(text)

Sends a GM notice to the client. This function is client side only.

Returns

True if the message was sent, False if sending the message failed.

Example

from phBot import *
import phBotChat
import QtBind

gui = QtBind.init(__name__, 'Chat Example')

name = QtBind.createLineEdit(gui, '', 10, 10, 100, 20)
text = QtBind.createLineEdit(gui, '', 10, 40, 250, 20)
send = QtBind.createButton(gui, 'send_message', 'Send', 10, 70)

def send_message():

    player = QtBind.text(gui, name)
    message = QtBind.text(gui, text)

    if len(player) > 0 and len(message) > 0:

        phBotChat.Private(player, message)

log('[%s] Loaded' % __name__)
PreviousMiscNextHandling Script Commands

Last updated 1 year ago