This plugin will load default configuration (and default profiles) that you need for your new created character (or any other with no configuration previously).
How to:
Rename the config from any character to “Default.json” and/or “Default.JellyProfile.json”
It also support default filter but will be loaded 90 seconds later to not interrupt bot process
Rename the filter from any character to “Default.db3”
from phBot import *
import shutil
import os
log('Plugin: xAutoConfig successfully loaded.')
# Called when the user successfully selects a character. No character data has been loaded yet.
def joined_game():
# JSON config not found
if not os.path.exists(get_config_path()):
# JSON default configs path
defaultConfig = get_config_dir()+"Default.json"
# Loading JSON
if os.path.exists(defaultConfig):
shutil.copyfile(defaultConfig,get_config_path())
log("Plugin: Default JSON successfully loaded")
# db3 default filter path
defaultFilter = get_config_dir()+"Default.db3"
# Loading db3
if os.path.exists(defaultFilter):
shutil.copyfile(defaultFilter,get_config_path())
log("Plugin: Default Filter successfully loaded")
from phBot import *
import shutil
import os
log('Plugin: xAutoConfig v0.0.3 successfully loaded.')
# Called when the user successfully selects a character. No character data has been loaded yet.
def joined_game():
# JSON config not found
if not os.path.exists(get_config_path()):
# JSON default configs path
defaultConfig = get_config_dir()+"Default.json"
# Loading JSON
if os.path.exists(defaultConfig):
shutil.copyfile(defaultConfig,get_config_path())
log("Plugin: Default JSON successfully loaded")
# db3 default filter path
defaultFilter = get_config_dir()+"Default.db3"
# Loading db3
if os.path.exists(defaultFilter):
shutil.copyfile(defaultFilter,get_config_path().replace(".json",".db3"))
log("Plugin: Default Filter successfully loaded")
Ahora si funciono, un millon de gracias.
Una pregunta, donde puedo aprender hacer los plugin mas bien conocer todo sobre los packets del game y demas porque sin eso no podre hacer nada.
It’s working nice? …Well, number sequence is not an option at the moment.
It’s generating a random name, using 4 parts of this little pieces (3 characters max) join with another 3. Ex.: “WiZuRiYi”
4 x 3 chars = 12. I don’t remember what it’s the max. chars, so I stay at that number.
36 subnames / 4 combinations : 58905 max possibilities at the moment
A better method like a name list require a lot more checks, and like you said (a list names), an user interface having with that too little possibilities. Remember, won’t be only you using this plugin.
# Use a name as reference. Ex.: CUSTOM_NAME = "Jelly"
# will try to create "Jelly101","Jelly102","Jelly103"
# Will be random if you leave it empty
CUSTOM_NAME = ""
SEQUENCE_START_NUMBER = 100
RANDOM_GENRE = True
# True/False. Genre possibilities : CH or EU
Hey i have tried the db3 thing and its not creating. Char config exist but pickfilter of my chars i delete them for replace. Now its not replacing with default.db3 how can i fix it?