Random regen X/Y generator [PYTHON]

05/29/2017 20:24 KilleRzZ™#1
Hello. i was bored so i made this i dont know if its useful but maybe someone will need it so i post it here :P
its python file so you need python :P
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
Download:
[Only registered and activated users can see links. Click Here To Register...]

PS:Sorry for shity code i did it fast
05/29/2017 20:27 Cyber36#2
And what if the place where the monster spawns is a blocked area, which makes it impossible to reach it?

MfG
Cyber
05/29/2017 21:32 VegaS ♆#3
_

Good idea, code not look very good but if is working should be fine, but about the "language option" you can use a dict not a list, and do it in this mode because looks better and is more understable for users to can translate it.

Code:
languageOptionDict = {
	"EN" : {
		'SELECT_REGEN_TYPE' : "Give regen type: (m = mob / g = group):",
		'SELECT_ID' : "Give id Mob/Group:",
		'SELECT_RESPAWN' : "Give Respawn Time(example: 1m, 15s, 1h): ",
		'SELECT_MAX_MOBS' : "How much regens of this monster:",
		'POS_MAX_NUM_X' : "Give maximum x of map:",
		'POS_MAX_NUM_Y' : "Give maximum y of map:",
		'SELECT_TYPE' : "Please put a number bigger than 25.",
		'FILE_EXIST' : "File regen.txt already exists. do you want to make a new one or write on the existing one? ",
		'SELECT_TYPE_READ' : "1 = new 2 = on this one:"
	},
	"GR" : {
		######################################################
	}
}
langDict = languageOptionDict['EN'] # input()
print (langDict['FILE_EXIST'])
05/30/2017 00:13 KilleRzZ™#4
Quote:
Originally Posted by VegaS ♆ View Post
_

Good idea, code not look very good but if is working should be fine, but about the "language option" you can use a dict not a list, and do it in this mode because looks better and is more understable for users to can translate it.

Code:
languageOptionDict = {
	"EN" : {
		'SELECT_REGEN_TYPE' : "Give regen type: (m = mob / g = group):",
		'SELECT_ID' : "Give id Mob/Group:",
		'SELECT_RESPAWN' : "Give Respawn Time(example: 1m, 15s, 1h): ",
		'SELECT_MAX_MOBS' : "How much regens of this monster:",
		'POS_MAX_NUM_X' : "Give maximum x of map:",
		'POS_MAX_NUM_Y' : "Give maximum y of map:",
		'SELECT_TYPE' : "Please put a number bigger than 25.",
		'FILE_EXIST' : "File regen.txt already exists. do you want to make a new one or write on the existing one? ",
		'SELECT_TYPE_READ' : "1 = new 2 = on this one:"
	},
	"GR" : {
		######################################################
	}
}
langDict = languageOptionDict['EN'] # input()
print (langDict['FILE_EXIST'])

Thanks vegas :D im still learning i know my coding still bad :P :D
05/30/2017 15:01 Bekir Akdemir#5
you can add check func. of attr_block attr_water with read server_attr
05/30/2017 21:27 rollback#6
[Only registered and activated users can see links. Click Here To Register...]

I would recommend to add some empty lines to your code. I don't think that you'll be able to keep track over that big block of code.