Hello there
Im trying to call a Python function to send a message to a character when a specific player spawns.
Cuz handle_event lacks this function
ive seen this
from phBot import *
import phBotChat
player = 'CharName'
def player_spawn():
global player
if len(player) > 0:
phBotChat.Private(player, 'player is here')
log('[%s] Loaded' % __name__)
i need help
i will appreciate any hints
thanks in advance.
from phBot import *
import phBotChat
player = 'CharName'
def player_spawn():
global player
if len(player) > 0:
phBotChat.Private(player, 'player is here')
log('[%s] Loaded' % __name__)
i need to make a sleep time so it sends a message every 60 seconds for an example.
i made this:
from phBot import *
import phBotChat
import time
player = 'charname'
def player_spawn():
time.sleep(60)
global player
if len(player) > 0:
phBotChat.Private(player, 'message')
log('[%s] Loaded' % __name__)
but it prevents the char from botting.
So how to make a sleep time without stopping attack ?
Also why when i use Chat conditions (party-union-guild) it sends messages every second. Is theres a way to use chat conditions with an interval time?
Thanks. I really appreciate ur help.