[Plugin] xAutoConfig

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”

Direct download : [Save as Link] :ballot_box_with_check:
Lastest version on GitHub
Try xPluginUpdater to keep the track of my updates! :male_detective:

3 Likes

this plugin only work for .json? can you add to conf. db3 too?

There is…

xAutoConfig v0.0.2
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")
3 Likes

[23:48:00] Your config is out of date. Please reconfigure the bot
No esta funcionando con la parte del .db3

Right, how it’s setup the .db3 ?
It’s “Servername - Server_Charname.db3” too?

[23:59:06] Your config is out of date. Please reconfigure the bot.

	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")
xAutoConfig v0.0.3
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.

hmm…

Added character select/deleter/creator. I was curious about some packet structures :male_detective:

Conditions :

  • If character is level < 40 and is not being deleted: Select it !
  • If character is level between 41 and 50: Delete it!
  • If there is not characters level < 40: Create it!

Lastest version at GitHub. Waiting feedback! :yum:

1 Like

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” :joy:

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.

1 Like

Divide and rule ! A new plugin has born: xAcademy

There you go, you can use a custom name now…

# 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
2 Likes

v0.0.4 … I’m pretty sure is fixed now!

Python Error: Can’t convert ‘NoneType’ object to str implicitly

i getting this error. how its working?

You can try v0.0.5

2 Likes

image

4 Likes

Python Error: index out of range

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?

Guys im a complete noob when it comes to this stuff :laughing:.

Can someone explain to me how this works and how to set it up?