[Plugin] Job notification

from phBot import *
import phBotChat

EVENT_UNIQUE_SPAWN = 0  # data = monster name
EVENT_HUNTER_SPAWN = 1  # data = player name (includes traders)
EVENT_THIEF_SPAWN = 2  # data = player name
EVENT_TRANSPORT_DIED = 3  # data = transport id (includes horses)
EVENT_PLAYER_ATTACKING = 4  # data = player name
EVENT_RARE_DROP = 5  # data = item model (equippable only)
EVENT_ITEM_DROP = 6  # data = item model (equippable only)
EVENT_DIED = 7  # data = empty string
EVENT_ALCHEMY_FINISHED = 8  # data = empty string

members = ['God', 'Elizabethhh', 'LoveFaiL', 'Falcon', 'Anne_']

spies = {
 #   "Spy1": "JANGAN EAST",
    "Rage_NTFY4": "JANGAN Specialty trader buying/selling",
    "Rage_NTFY3": "DOWNHANG Specialty trader buying/selling",
    "Rage_NTFY2": "{CHINA EAST FERRY}",
    "Rage_NTFY1": "[CHINA WEST FERRY]"

def handle_event(t, data):
        location = spies[get_character_data()['name']]
        for mem in members:
            phBotChat.Private(mem, data + ' Trader/Hunter is at ' + location)

log('JOB-NOTIFICATION-Plugin loaded')

Currently set to hunters / traders modify to your own needs

1 Like

I just want to ask some questions related to this.
My server: Private server.
Expected behavior: handle_event fired
Actual behavior: handle_event does not trigger

And also: get_players() return null even though I’m in the middle of a lot of player.
But: Sound alarm does trigger when there is hunter/thief around.

Can someone dig into this pls, thank you!

what does it do?


bro u re doing again funny things i like it :slight_smile: i ll change it to my use thx <3

hello Bro, can U guide me to setup???

I downloaded it but the bot plugin can’t read this file. Can someone update this plugin?