Python Question

so basically i was writing a code, and i am a beginer at coding :smiley:

from phBot import *
import phBotChat

pName = ‘Quest End’
pVersion = ‘0.1’

PT1 = {“HighWizz2”}

def handle_chat(t, player, msg):

if msg == "QEND":
    log('Plugin ' + pName + ': Set training position to HotanToDailyQuest.txt')

elif msg == “ONG1”:
if player == PT1:
log('Plugin ’ + pName + ‘: Test Done’)

log(‘Plugins: Quest End successfully loaded’)

the first part working fine with me, in the second part
i want to figure out a way that if i wrote ONG1 for example
not all the chars gonna follow the command i want specific char to use the command

(( NOTE : I am running more than 3 pt, they all doing a quest,
So what i am trying to do is : using a command to change the script for all the chars,
and when they done, i want to send a command at the guild ONG1 = Party 1 spot , ONG2 = Party 2 spot ))

so if anyone could help me how should i do it, i will be appreciated

1 Like

@ryan @JellyBitz

u can make it change script example hour 10.00 and days can be?

xControl has a list handled and saved by character. Edit it to your necessities as your customized plugin if you are stuck.

so basically i tried to create a script,

I send the command and i recieved

[02:06:05] Plugin AutoScriptChanger: Set training position to HotanToDailyQuest.txt

in bot chat for using


but the problem, the training script didnt change ?

Any Solution ?

please guys i need ur help its my first plugin ever :smiley:
and i guess i did a hardwork but i couldn’t fix it

Is that loading?


if 'name': Party1

Should be:

if get_character_data()['name'] in Party1:

not even the first one that dont have (name) condition is work

You should be checking if the current character name is in a specific party list and then change it accordingly. You don’t need to look at the name of the person that sent the message.

if i changed

if 'name': Party1


if get_character_data()['name'] in Party1:

[02:37:01] Plugin: has failed to load

put the plugin runs when i change it to

if get_character_data()['name'] : Party

i did’t understand that part ?

btw dont waste ur time with me I just gave up i think i wont be able to fix it :smiley:

It seems something other is wrong now.

if get_character_data()['name'] in Party1:

This is the correct