[Plugin] xAutoConfig

#1

This plugin will load default configuration that you wish to your new created character (or any other with no configuration previously).

How to use:

  • Rename the config that you want by default to “default”

Example: Default.json

xAutoConfig
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()):
		# Looking for JSON default configs
		defaultConfig = get_config_dir()+"Default.json"
		# Loading JSON default configs
		if os.path.exists(defaultConfig):
			shutil.copyfile(defaultConfig,get_config_path())
			log("Plugin: Default JSON configurations successfully loaded (xAutoConfig)")
2 Likes
Phbot setting
[Plugin] xAcademy
[Suggestion]Change profile in manager
#2

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

#3

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")
2 Likes
#4

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

#5

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

#6

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

#7
	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")
#8
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")
#9

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.

#10

hmm…

Script leveling up
#11

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
#12

i want try it but i have still same issue

  • we seting up in manager a name char like * example * * example 1* etc etc
  • in your plugin i see name like * “Han”,“Je”,“Tuk”,“Zen”,“Jin”,“Xan”,“Xen”,“Xin”,“Za”,“Ke”,“Zoh”,“Zan”,“Zu”,“Lid”,“Yek”,“Ri”,“Riu”,“Ruk”,“Vi”,“Vik”,“Ki”,“Yi”,“Bok”,“Kah”,“Khan”,“War”,“Ten”,“Fu”,“Wan”,“Wi”,“Lin”,“Ran”,“Min”,“Ez”,“Kra”,“Ken” *

how i can add my list name ? need juste replace your list name ?
it will change the number like i want ? if i mak *“example”,“example1”,“example2”,“example3”,“example4”,“example5”, etc etc

#13

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
#14

at now i dont see any pb with give me time for making mor test =)
i understand about your random name
but maybe can we loock about list from academi leader ? like import list or somthing like that ? sorry if im wrong but it’s really importantly for me i understand im not the only one too use it
but can you help me in mp maybe ?

#15

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
#16

thx for your work @JellyBitz
idk what i have doing but now geting * errore python out of range * somthing like that
i will refrech all and retry with a new config after the next inspection cuz of trafik

but great job really thx

#17

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

#18

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

i getting this error. how its working?

#19

You can try v0.0.5

2 Likes
#20

image

3 Likes