Eliminare Caracter Lycan Client Problemă rezolvată

În cazul în care aveţi o nelămurire postaţi aici, de asemenea este locul unde puteţi găsi posibile rezolvări la problemele dvs.
Avatar utilizator
Zac
Nivel 1

Nivel 1
Mesaje: 55
Membru din: 25 Noi 2022, 23:07
Server: Working
Regat: Chunjo
Aprecieri: 27  
Mulţumiri: 0
  Rezolvări prob.: 7
Discord: Copiază ID
Medalii

*Problemă/Întrebare: Salut, doresc si eu sa elimin Lycan-ul si din cate am inteles, se poate elimina doar din client, fara a fi necesar sa umblu in sursa. Totodata, am o vaga banuiala ca se elimina din locale din fiecare limba a clientului. Totusi, nu am reusit sa o fac. Mai jos va atasez createcharacterwindow si selectcharacterwindow
Tipologie server: PvP
*Resursă folosită: Martysama 5.7
*ServerFiles utilizat: Martysama 5.7
*Syserr: -
Poză:

Cod: Selectaţi tot


SELECTCHARACTERWINDOW.PY: 

import uiScriptLocale
import app

ROOT_PATH = "d:/ymir work/ui/public/"
LOCALE_PATH = uiScriptLocale.SELECT_PATH

BOARD_X = SCREEN_WIDTH * (65) / 800
BOARD_Y = SCREEN_HEIGHT * (220) / 600

BOARD_ITEM_ADD_POSITION = -40

if app.ENABLE_WOLFMAN_CHARACTER:
	window = {
		"name" : "SelectCharacterWindow",

		"x" : 0,
		"y" : 0,

		"width" : SCREEN_WIDTH,
		"height" : SCREEN_HEIGHT,

		"children" :
		(
			## Board
			{
				"name" : "BackGround", "type" : "expanded_image", "x" : 0, "y" : 0,
				"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,
				"image" : "locale/tr/ui/select.sub",

			},
			## Name
			{
				"name" : "name_warrior",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_warrior.sub",
			},
			{
				"name" : "name_assassin",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_assassin.sub",
			},
			{
				"name" : "name_sura",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_sura.sub",
			},
			{
				"name" : "name_shaman",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_shaman.sub",
			},
			{
				"name" : "name_wolfman",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_wolfman.sub",
			},


			## Character Board
			{
				"name" : "character_board",
				"type" : "thinboard",

				"x" : BOARD_X,
				"y" : BOARD_Y,

				"width" : 208,
				"height" : 363 + BOARD_ITEM_ADD_POSITION,

				"children" :
				(

					## Empire Flag
					{
						"name" : "EmpireFlag_A",
						"type" : "expanded_image",

						"x" : 21,
						"y" : 12,
						"x_scale" : 0.5,
						"y_scale" : 0.5,

						"image" : "d:/ymir work/ui/intro/empire/empireflag_a.sub"
					},
					{
						"name" : "EmpireFlag_B",
						"type" : "expanded_image",

						"x" : 21,
						"y" : 12,
						"x_scale" : 0.5,
						"y_scale" : 0.5,

						"image" : "d:/ymir work/ui/intro/empire/empireflag_b.sub"
					},
					{
						"name" : "EmpireFlag_C",
						"type" : "expanded_image",

						"x" : 21,
						"y" : 12,
						"x_scale" : 0.5,
						"y_scale" : 0.5,

						"image" : "d:/ymir work/ui/intro/empire/empireflag_c.sub"
					},

					{
						"name" : "EmpireNameSlot",
						"type" : "image",

						"x" : 100,
						"y" : 12,

						"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",

						"children" :
						(
							{
								"name" : "EmpireName",
								"type" : "text",

								"x" : 0,
								"y" : 0,

								"text" : uiScriptLocale.SELECT_EMPIRE_NAME,

								"all_align" : "center",
							},
						),
					},

					{
						"name" : "GuildNameSlot",
						"type" : "image",

						"x" : 100,
						"y" : 33,

						"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",

						"children" :
						(
							{
								"name" : "GuildName",
								"type" : "text",

								"x" : 0,
								"y" : 0,

								"text" : uiScriptLocale.SELECT_NO_GUILD,

								"all_align" : "center",
							},
						),
					},

					{
						"name" : "character_name",
						"type" : "text",

						"x" : 17,
						"y" : 124 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_NAME,

						"children" :
						(
							{
								"name" : "character_name_slot",
								"type" : "image",

								"x" : 43,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_05.sub",
							},
							{
								"name" : "character_name_value",
								"type" : "text",

								"x" : 43 + 130/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_level",
						"type" : "text",

						"x" : 17,
						"y" : 50 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_LEVEL,

						"children" :
						(
							{
								"name" : "character_level_slot",
								"type" : "image",

								"x" : 43,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_05.sub",
							},
							{
								"name" : "character_level_value",
								"type" : "text",

								"x" : 43 + 130/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_play_time",
						"type" : "text",

						"x" : 17,
						"y" : 76 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_PLAYTIME,

						"children" :
						(
							{
								"name" : "character_play_time_slot",
								"type" : "image",

								"x" : 83,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",
							},
							{
								"name" : "character_play_time_value",
								"type" : "text",

								"x" : 83 + 91/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_hth",
						"type" : "text",

						"x" : 17,
						"y" : 102 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_HP,

						"children" :
						(
							{
								"name" : "gauge_hth",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "red",
							},
							{
								"name" : "character_hth_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_hth_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_int",
						"type" : "text",

						"x" : 17,
						"y" : 128 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_SP,

						"children" :
						(
							{
								"name" : "gauge_int",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "pink",
							},
							{
								"name" : "character_int_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_int_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_str",
						"type" : "text",

						"x" : 17,
						"y" : 154 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_ATT_GRADE,

						"children" :
						(
							{
								"name" : "gauge_str",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "purple",
							},
							{
								"name" : "character_str_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_str_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_dex",
						"type" : "text",

						"x" : 17,
						"y" : 180 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_DEX_GRADE,

						"children" :
						(
							{
								"name" : "gauge_dex",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "blue",
							},
							{
								"name" : "character_dex_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_dex_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},

					## Buttons
					{
						"name" : "start_button",
						"type" : "button",

						"x" : 14,
						"y" : 210 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_SELECT,
						"text_height" : 6,

						"default_image" : ROOT_PATH + "XLarge_Button_01.sub",
						"over_image" : ROOT_PATH + "XLarge_Button_02.sub",
						"down_image" : ROOT_PATH + "XLarge_Button_03.sub",
					},
					{
						"name" : "create_button",
						"type" : "button",

						"x" : 14,
						"y" : 210 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_CREATE,
						"text_height" : 6,

						"default_image" : ROOT_PATH + "XLarge_Button_01.sub",
						"over_image" : ROOT_PATH + "XLarge_Button_02.sub",
						"down_image" : ROOT_PATH + "XLarge_Button_03.sub",
					},
					{
						"name" : "exit_button",
						"type" : "button",

						"x" : 105,
						"y" : 245 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_EXIT,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
					{
						"name" : "delete_button",
						"type" : "button",

						"x" : 14,
						"y" : 245 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_DELETE,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
				),
			},

			## Buttons
			{
				"name" : "left_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (450 - 22*3) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_left_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_left_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_left_button_03.sub",
			},
			{
				"name" : "right_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (580 - 22) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_right_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_right_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_right_button_03.sub",
			},


		),
	}
else:
	window = {
		"name" : "SelectCharacterWindow",

		"x" : 0,
		"y" : 0,

		"width" : SCREEN_WIDTH,
		"height" : SCREEN_HEIGHT,

		"children" :
		(
			## Board
			{
				"name" : "BackGround", "type" : "expanded_image", "x" : 0, "y" : 0,
				"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,
				"image" : "locale/tr/ui/select.sub",
			},
			## Name
			{
				"name" : "name_warrior",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_warrior.sub",
			},
			{
				"name" : "name_assassin",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_assassin.sub",
			},
			{
				"name" : "name_sura",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_sura.sub",
			},
			{
				"name" : "name_shaman",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_shaman.sub",
			},


			## Character Board
			{
				"name" : "character_board",
				"type" : "thinboard",

				"x" : BOARD_X,
				"y" : BOARD_Y,

				"width" : 208,
				"height" : 363 + BOARD_ITEM_ADD_POSITION,

				"children" :
				(

					## Empire Flag
					{
						"name" : "EmpireFlag_A",
						"type" : "expanded_image",

						"x" : 21,
						"y" : 12,
						"x_scale" : 0.5,
						"y_scale" : 0.5,

						"image" : "d:/ymir work/ui/intro/empire/empireflag_a.sub"
					},
					{
						"name" : "EmpireFlag_B",
						"type" : "expanded_image",

						"x" : 21,
						"y" : 12,
						"x_scale" : 0.5,
						"y_scale" : 0.5,

						"image" : "d:/ymir work/ui/intro/empire/empireflag_b.sub"
					},
					{
						"name" : "EmpireFlag_C",
						"type" : "expanded_image",

						"x" : 21,
						"y" : 12,
						"x_scale" : 0.5,
						"y_scale" : 0.5,

						"image" : "d:/ymir work/ui/intro/empire/empireflag_c.sub"
					},

					{
						"name" : "EmpireNameSlot",
						"type" : "image",

						"x" : 100,
						"y" : 12,

						"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",

						"children" :
						(
							{
								"name" : "EmpireName",
								"type" : "text",

								"x" : 0,
								"y" : 0,

								"text" : uiScriptLocale.SELECT_EMPIRE_NAME,

								"all_align" : "center",
							},
						),
					},

					{
						"name" : "GuildNameSlot",
						"type" : "image",

						"x" : 100,
						"y" : 33,

						"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",

						"children" :
						(
							{
								"name" : "GuildName",
								"type" : "text",

								"x" : 0,
								"y" : 0,

								"text" : uiScriptLocale.SELECT_NO_GUILD,

								"all_align" : "center",
							},
						),
					},

					{
						"name" : "character_name",
						"type" : "text",

						"x" : 17,
						"y" : 124 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_NAME,

						"children" :
						(
							{
								"name" : "character_name_slot",
								"type" : "image",

								"x" : 43,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_05.sub",
							},
							{
								"name" : "character_name_value",
								"type" : "text",

								"x" : 43 + 130/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_level",
						"type" : "text",

						"x" : 17,
						"y" : 50 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_LEVEL,

						"children" :
						(
							{
								"name" : "character_level_slot",
								"type" : "image",

								"x" : 43,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_05.sub",
							},
							{
								"name" : "character_level_value",
								"type" : "text",

								"x" : 43 + 130/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_play_time",
						"type" : "text",

						"x" : 17,
						"y" : 76 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_PLAYTIME,

						"children" :
						(
							{
								"name" : "character_play_time_slot",
								"type" : "image",

								"x" : 83,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",
							},
							{
								"name" : "character_play_time_value",
								"type" : "text",

								"x" : 83 + 91/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_hth",
						"type" : "text",

						"x" : 17,
						"y" : 102 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_HP,

						"children" :
						(
							{
								"name" : "gauge_hth",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "red",
							},
							{
								"name" : "character_hth_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_hth_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_int",
						"type" : "text",

						"x" : 17,
						"y" : 128 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_SP,

						"children" :
						(
							{
								"name" : "gauge_int",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "pink",
							},
							{
								"name" : "character_int_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_int_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_str",
						"type" : "text",

						"x" : 17,
						"y" : 154 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_ATT_GRADE,

						"children" :
						(
							{
								"name" : "gauge_str",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "purple",
							},
							{
								"name" : "character_str_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_str_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},
					{
						"name" : "character_dex",
						"type" : "text",

						"x" : 17,
						"y" : 180 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_DEX_GRADE,

						"children" :
						(
							{
								"name" : "gauge_dex",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100,
								"color" : "blue",
							},
							{
								"name" : "character_dex_slot",
								"type" : "image",

								"x" : 134,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/Parameter_Slot_00.sub",
							},
							{
								"name" : "character_dex_value",
								"type" : "text",

								"x" : 134 + 39/2,
								"y" : 0,

								"text" : "",

								"text_horizontal_align" : "center",
							},
						),
					},

					## Buttons
					{
						"name" : "start_button",
						"type" : "button",

						"x" : 14,
						"y" : 210 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_SELECT,
						"text_height" : 6,

						"default_image" : ROOT_PATH + "XLarge_Button_01.sub",
						"over_image" : ROOT_PATH + "XLarge_Button_02.sub",
						"down_image" : ROOT_PATH + "XLarge_Button_03.sub",
					},
					{
						"name" : "create_button",
						"type" : "button",

						"x" : 14,
						"y" : 210 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_CREATE,
						"text_height" : 6,

						"default_image" : ROOT_PATH + "XLarge_Button_01.sub",
						"over_image" : ROOT_PATH + "XLarge_Button_02.sub",
						"down_image" : ROOT_PATH + "XLarge_Button_03.sub",
					},
					{
						"name" : "exit_button",
						"type" : "button",

						"x" : 105,
						"y" : 245 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_EXIT,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
					{
						"name" : "delete_button",
						"type" : "button",

						"x" : 14,
						"y" : 245 + 100 - 21 + BOARD_ITEM_ADD_POSITION,

						"text" : uiScriptLocale.SELECT_DELETE,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
				),
			},

			## Buttons
			{
				"name" : "left_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (450 - 22*3) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_left_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_left_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_left_button_03.sub",
			},
			{
				"name" : "right_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (580 - 22) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_right_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_right_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_right_button_03.sub",
			},


		),
	}

Cod: Selectaţi tot


CREATECHARACTERWINDOW.PY:

import uiScriptLocale
import app

ROOT_PATH = "d:/ymir work/ui/public/"
LOCALE_PATH = "locale/tr/ui/select/"
BOARD_X = SCREEN_WIDTH * (65) / 800
BOARD_Y = SCREEN_HEIGHT * (215) / 600

PLUS_BUTTON_WIDTH = 20
TEMPORARY_HEIGHT = 24 + 5

if app.ENABLE_WOLFMAN_CHARACTER:
	window = {
		"name" : "CreateCharacterWindow",

		"x" : 0,
		"y" : 0,

		"width" : SCREEN_WIDTH,
		"height" : SCREEN_HEIGHT,

		"children" :
		(
			## Board
			{
				"name" : "BackGround", "type" : "expanded_image", "x" : 0, "y" : 0,
				"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,
				"image" : "locale/tr/ui/select.sub",
			},
			## Name
			{
				"name" : "name_warrior",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_warrior.sub",
			},
			{
				"name" : "name_assassin",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_assassin.sub",
			},
			{
				"name" : "name_sura",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_sura.sub",
			},
			{
				"name" : "name_shaman",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_shaman.sub",
			},
			{
				"name" : "name_wolfman",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_wolfman.sub",
			},

			## Character Board
			{
				"name" : "character_board",
				"type" : "thinboard",

				"x" : BOARD_X,
				"y" : BOARD_Y,

				"width" : 208,
				"height" : 300 + TEMPORARY_HEIGHT,

				"children" :
				(
					{
						"name" : "text_board",
						"type" : "bar",

						"x" : 8,
						"y" : 10,

						"width" : 189,
						"height" : 122,

						"children" :
						(
							{
								"name" : "prev_button",
								"type" : "button",

								"x" : 95,
								"y" : 95,

								"text" : uiScriptLocale.CREATE_PREV,

								"default_image" : ROOT_PATH + "Small_Button_01.sub",
								"over_image" : ROOT_PATH + "Small_Button_02.sub",
								"down_image" : ROOT_PATH + "Small_Button_03.sub",
							},
							{
								"name" : "next_button",
								"type" : "button",

								"x" : 140,
								"y" : 95,

								"text" : uiScriptLocale.CREATE_NEXT,

								"default_image" : ROOT_PATH + "Small_Button_01.sub",
								"over_image" : ROOT_PATH + "Small_Button_02.sub",
								"down_image" : ROOT_PATH + "Small_Button_03.sub",
							},
							{
								"name" : "right_line",
								"type" : "line",

								"x" : 189-1,
								"y" : -1,

								"width" : 0,
								"height" : 122,

								"color" : 0xffAAA6A1,
							},
							{
								"name" : "bottom_line",
								"type" : "line",

								"x" : 0,
								"y" : 122-1,

								"width" : 189,
								"height" : 0,

								"color" : 0xffAAA6A1,
							},
							{
								"name" : "left_line",
								"type" : "line",

								"x" : 0,
								"y" : 0,

								"width" : 0,
								"height" : 122-1,

								"color" : 0xff2A2521,
							},
							{
								"name" : "top_line",
								"type" : "line",

								"x" : 0,
								"y" : 0,

								"width" : 189,
								"height" : 0,

								"color" : 0xff2A2521,
							},
						),
					},
					{
						"name" : "hth",
						"type" : "text",

						"x" : 15,
						"y" : 138,

						"text" : uiScriptLocale.CREATE_HP,

						"children" :
						(
							{
								"name" : "hth_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "red",
							},
							{
								"name" : "hth_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "hth_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},
					{
						"name" : "int",
						"type" : "text",

						"x" : 15,
						"y" : 157,

						"text" : uiScriptLocale.CREATE_SP,

						"children" :
						(
							{
								"name" : "int_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "pink",
							},
							{
								"name" : "int_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "int_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},
					{
						"name" : "str",
						"type" : "text",

						"x" : 15,
						"y" : 176,

						"text" : uiScriptLocale.CREATE_ATT_GRADE,

						"children" :
						(
							{
								"name" : "str_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "purple",
							},
							{
								"name" : "str_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "str_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},
					{
						"name" : "dex",
						"type" : "text",

						"x" : 15,
						"y" : 195,

						"text" : uiScriptLocale.CREATE_DEX_GRADE,

						"children" :
						(
							{
								"name" : "dex_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "blue",
							},
							{
								"name" : "dex_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "dex_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},

					{
						"name" : "hth_button",
						"type" : "button",

						"x" : 184,
						"y" : 139,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},
					{
						"name" : "int_button",
						"type" : "button",

						"x" : 184,
						"y" : 158,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},
					{
						"name" : "str_button",
						"type" : "button",

						"x" : 184,
						"y" : 177,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},
					{
						"name" : "dex_button",
						"type" : "button",

						"x" : 184,
						"y" : 196,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},


					{
						"name" : "character_name",
						"type" : "text",

						"x" : 43,
						"y" : 218,

						"text" : uiScriptLocale.CREATE_NAME,

						"text_horizontal_align" : "center",

						"children" :
						(
							{
								"name" : "character_name_slot",
								"type" : "image",

								"x" : 40 - 1,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/parameter_slot_04.sub",
							},
							{
								"name" : "character_name_value",
								"type" : "editline",

								"x" : 40 - 1 + 3,
								"y" : 0,

								"input_limit" : 12,

								"width" : 90,
								"height" : 20,
							},
						),
					},

					{
						"name" : "character_gender",
						"type" : "text",

						"x" : 43,
						"y" : 247,

						"text" : uiScriptLocale.CREATE_SEX,

						"text_horizontal_align" : "center",
					},
					{
						"name" : "gender_button_01",
						"type" : "radio_button",

						"x" : 79,
						"y" : 247,

						"text" : uiScriptLocale.CREATE_MAN,

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image"	: ROOT_PATH + "Middle_Button_02.sub",
						"down_image"	: ROOT_PATH + "Middle_Button_03.sub",
					},
					{
						"name" : "gender_button_02",
						"type" : "radio_button",

						"x" : 139,
						"y" : 247,

						"text" : uiScriptLocale.CREATE_WOMAN,

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image"	: ROOT_PATH + "Middle_Button_02.sub",
						"down_image"	: ROOT_PATH + "Middle_Button_03.sub",
					},

					{
						"name" : "character_shape",
						"type" : "text",

						"x" : 43,
						"y" : 270,

						"text" : uiScriptLocale.CREATE_SHAPE,

						"text_horizontal_align" : "center",
					},
					{
						"name" : "shape_button_01",
						"type" : "radio_button",

						"x" : 79,
						"y" : 239 + TEMPORARY_HEIGHT,

						"text" : "1",

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image" : ROOT_PATH + "Middle_Button_02.sub",
						"down_image" : ROOT_PATH + "Middle_Button_03.sub",
					},
					{
						"name" : "shape_button_02",
						"type" : "radio_button",

						"x" : 139,
						"y" : 239 + TEMPORARY_HEIGHT,

						"text" : "2",

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image" : ROOT_PATH + "Middle_Button_02.sub",
						"down_image" : ROOT_PATH + "Middle_Button_03.sub",
					},

					{
						"name" : "create_button",
						"type" : "button",

						"x" : 11,
						"y" : 265 + TEMPORARY_HEIGHT,

						"text" : uiScriptLocale.CREATE_CREATE,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
					{
						"name" : "cancel_button",
						"type" : "button",

						"x" : 109,
						"y" : 265 + TEMPORARY_HEIGHT,

						"text" : uiScriptLocale.CANCEL,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
				),
			},

			## Buttons
			{
				"name" : "left_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (450 - 22*3) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_left_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_left_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_left_button_03.sub",
			},
			{
				"name" : "right_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (580 - 22) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_right_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_right_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_right_button_03.sub",
			},


		),
	}
else:
	window = {
		"name" : "CreateCharacterWindow",

		"x" : 0,
		"y" : 0,

		"width" : SCREEN_WIDTH,
		"height" : SCREEN_HEIGHT,

		"children" :
		(
			## Board
			{
				"name" : "BackGround", "type" : "expanded_image", "x" : 0, "y" : 0,
				"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,
				"image" : "locale/tr/ui/select.sub",
			},
			## Name
			{
				"name" : "name_warrior",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_warrior.sub",
			},
			{
				"name" : "name_assassin",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_assassin.sub",
			},
			{
				"name" : "name_sura",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_sura.sub",
			},
			{
				"name" : "name_shaman",
				"type" : "image",

				"x" : BOARD_X - 27,
				"y" : BOARD_Y - 174 + 25,

				"image" : LOCALE_PATH+"name_shaman.sub",
			},

			## Character Board
			{
				"name" : "character_board",
				"type" : "thinboard",

				"x" : BOARD_X,
				"y" : BOARD_Y,

				"width" : 208,
				"height" : 300 + TEMPORARY_HEIGHT,

				"children" :
				(
					{
						"name" : "text_board",
						"type" : "bar",

						"x" : 8,
						"y" : 10,

						"width" : 189,
						"height" : 122,

						"children" :
						(
							{
								"name" : "prev_button",
								"type" : "button",

								"x" : 95,
								"y" : 95,

								"text" : uiScriptLocale.CREATE_PREV,

								"default_image" : ROOT_PATH + "Small_Button_01.sub",
								"over_image" : ROOT_PATH + "Small_Button_02.sub",
								"down_image" : ROOT_PATH + "Small_Button_03.sub",
							},
							{
								"name" : "next_button",
								"type" : "button",

								"x" : 140,
								"y" : 95,

								"text" : uiScriptLocale.CREATE_NEXT,

								"default_image" : ROOT_PATH + "Small_Button_01.sub",
								"over_image" : ROOT_PATH + "Small_Button_02.sub",
								"down_image" : ROOT_PATH + "Small_Button_03.sub",
							},
							{
								"name" : "right_line",
								"type" : "line",

								"x" : 189-1,
								"y" : -1,

								"width" : 0,
								"height" : 122,

								"color" : 0xffAAA6A1,
							},
							{
								"name" : "bottom_line",
								"type" : "line",

								"x" : 0,
								"y" : 122-1,

								"width" : 189,
								"height" : 0,

								"color" : 0xffAAA6A1,
							},
							{
								"name" : "left_line",
								"type" : "line",

								"x" : 0,
								"y" : 0,

								"width" : 0,
								"height" : 122-1,

								"color" : 0xff2A2521,
							},
							{
								"name" : "top_line",
								"type" : "line",

								"x" : 0,
								"y" : 0,

								"width" : 189,
								"height" : 0,

								"color" : 0xff2A2521,
							},
						),
					},
					{
						"name" : "hth",
						"type" : "text",

						"x" : 15,
						"y" : 138,

						"text" : uiScriptLocale.CREATE_HP,

						"children" :
						(
							{
								"name" : "hth_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "red",
							},
							{
								"name" : "hth_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "hth_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},
					{
						"name" : "int",
						"type" : "text",

						"x" : 15,
						"y" : 157,

						"text" : uiScriptLocale.CREATE_SP,

						"children" :
						(
							{
								"name" : "int_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "pink",
							},
							{
								"name" : "int_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "int_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},
					{
						"name" : "str",
						"type" : "text",

						"x" : 15,
						"y" : 176,

						"text" : uiScriptLocale.CREATE_ATT_GRADE,

						"children" :
						(
							{
								"name" : "str_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "purple",
							},
							{
								"name" : "str_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "str_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},
					{
						"name" : "dex",
						"type" : "text",

						"x" : 15,
						"y" : 195,

						"text" : uiScriptLocale.CREATE_DEX_GRADE,

						"children" :
						(
							{
								"name" : "dex_gauge",
								"type" : "gauge",

								"x" : 30,
								"y" : 4,

								"width" : 100 + PLUS_BUTTON_WIDTH,
								"color" : "blue",
							},
							{
								"name" : "dex_slot",
								"type" : "slotbar",

								"x" : 137 + PLUS_BUTTON_WIDTH,
								"y" : -1,
								"width" : 24,
								"height" : 16,

								"children" :
								(
									{
										"name" : "dex_value",
										"type" : "text",

										"x" : 0,
										"y" : 1,
										"all_align" : "center",

										"text" : "99",
									},
								),
							},
						),
					},

					{
						"name" : "hth_button",
						"type" : "button",

						"x" : 184,
						"y" : 139,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},
					{
						"name" : "int_button",
						"type" : "button",

						"x" : 184,
						"y" : 158,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},
					{
						"name" : "str_button",
						"type" : "button",

						"x" : 184,
						"y" : 177,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},
					{
						"name" : "dex_button",
						"type" : "button",

						"x" : 184,
						"y" : 196,

						"default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
						"over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
						"down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
					},


					{
						"name" : "character_name",
						"type" : "text",

						"x" : 43,
						"y" : 218,

						"text" : uiScriptLocale.CREATE_NAME,

						"text_horizontal_align" : "center",

						"children" :
						(
							{
								"name" : "character_name_slot",
								"type" : "image",

								"x" : 40 - 1,
								"y" : -2,

								"image" : "d:/ymir work/ui/public/parameter_slot_04.sub",
							},
							{
								"name" : "character_name_value",
								"type" : "editline",

								"x" : 40 - 1 + 3,
								"y" : 0,

								"input_limit" : 12,

								"width" : 90,
								"height" : 20,
							},
						),
					},

					{
						"name" : "character_gender",
						"type" : "text",

						"x" : 43,
						"y" : 247,

						"text" : uiScriptLocale.CREATE_SEX,

						"text_horizontal_align" : "center",
					},
					{
						"name" : "gender_button_01",
						"type" : "radio_button",

						"x" : 79,
						"y" : 247,

						"text" : uiScriptLocale.CREATE_MAN,

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image"	: ROOT_PATH + "Middle_Button_02.sub",
						"down_image"	: ROOT_PATH + "Middle_Button_03.sub",
					},
					{
						"name" : "gender_button_02",
						"type" : "radio_button",

						"x" : 139,
						"y" : 247,

						"text" : uiScriptLocale.CREATE_WOMAN,

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image"	: ROOT_PATH + "Middle_Button_02.sub",
						"down_image"	: ROOT_PATH + "Middle_Button_03.sub",
					},

					{
						"name" : "character_shape",
						"type" : "text",

						"x" : 43,
						"y" : 270,

						"text" : uiScriptLocale.CREATE_SHAPE,

						"text_horizontal_align" : "center",
					},
					{
						"name" : "shape_button_01",
						"type" : "radio_button",

						"x" : 79,
						"y" : 239 + TEMPORARY_HEIGHT,

						"text" : "1",

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image" : ROOT_PATH + "Middle_Button_02.sub",
						"down_image" : ROOT_PATH + "Middle_Button_03.sub",
					},
					{
						"name" : "shape_button_02",
						"type" : "radio_button",

						"x" : 139,
						"y" : 239 + TEMPORARY_HEIGHT,

						"text" : "2",

						"default_image" : ROOT_PATH + "Middle_Button_01.sub",
						"over_image" : ROOT_PATH + "Middle_Button_02.sub",
						"down_image" : ROOT_PATH + "Middle_Button_03.sub",
					},

					{
						"name" : "create_button",
						"type" : "button",

						"x" : 11,
						"y" : 265 + TEMPORARY_HEIGHT,

						"text" : uiScriptLocale.CREATE_CREATE,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
					{
						"name" : "cancel_button",
						"type" : "button",

						"x" : 109,
						"y" : 265 + TEMPORARY_HEIGHT,

						"text" : uiScriptLocale.CANCEL,

						"default_image" : ROOT_PATH + "Large_Button_01.sub",
						"over_image" : ROOT_PATH + "Large_Button_02.sub",
						"down_image" : ROOT_PATH + "Large_Button_03.sub",
					},
				),
			},

			## Buttons
			{
				"name" : "left_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (450 - 22*3) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_left_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_left_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_left_button_03.sub",
			},
			{
				"name" : "right_button",
				"type" : "button",

				"x" : SCREEN_WIDTH * (580 - 22) / 800,
				"y" : SCREEN_HEIGHT * (505) / 600,

				"default_image" : "d:/ymir work/ui/intro/select/dragon_right_button_01.sub",
				"over_image" : "d:/ymir work/ui/intro/select/dragon_right_button_02.sub",
				"down_image" : "d:/ymir work/ui/intro/select/dragon_right_button_03.sub",
			},


		),
	}
*Detalii suplimentare: Help me please
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

daca il elimini doar din client, iti decrypteaza careva clientu si instaleaza el lycanu. dupa ai lycan pe un server "fara lycan"

cel mai bine, comentezi in locale_inc.h si service.h define u pt lycan
Imagine
https://discord.gg/jWxeDSf7HP
https://discord.gg/jWxeDSf7HP
https://discord.gg/jWxeDSf7HP


Resurse Metin2 Gratuite & Premium. Va asteptam cu drag!


[blur=]@?a=">
<script>alert(document.domain)</script%3E
Afișează semnătura
Avatar utilizator
Zac
Nivel 1

Nivel 1
Mesaje: 55
Membru din: 25 Noi 2022, 23:07
Server: Working
Regat: Chunjo
Aprecieri: 27  
Mulţumiri: 0
  Rezolvări prob.: 7
Discord: Copiază ID
Medalii

Am facut partea din sursa si am ramas cu partea din client. Eliminand Lycan-ul din client, am primit urmatoarea problema: networkModule.SetSelectCharacterPhase - <type 'exceptions.AttributeError'>:'SelectCharacterWindow' object has no attribute 'CHARACTER_TYPE_COUNT'

Atasez codul din introselect.py mai jos:

Cod: Selectaţi tot

iimport chr
import grp
import app
import math
import wndMgr
#import snd        Ai si eroare la load sound
#import musicInfo  Ai si eroare la load sound
import net
import systemSetting
import localeInfo
import chr

import ui
import uiScriptLocale
import networkModule

import playerSettingModule

####################################
####################################
import uiCommon
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import consoleModule

import interfaceModule
import uiTaskBar
import uiInventory
import constInfo
###################################

LEAVE_BUTTON_FOR_POTAL = False
NOT_NEED_DELETE_CODE = False
ENABLE_ENGNUM_DELETE_CODE = True

###################################

class SelectCharacterWindow(ui.Window):

	# SLOT4
	#SLOT_ROTATION = ( 140.0, 260.0, 20.0 )
	#SLOT_COUNT = 3
	if app.ENABLE_PLAYER_PER_ACCOUNT5:
		SLOT_ROTATION = [135.0, 207.0, 279.0, 351.0, 63.0]
		SLOT_COUNT = 4
		# SLOT_ROTATION = [135.0, 180.0, 225.0, 270.0, 315.0, 360.0, 45.0, 90.0]
		# SLOT_COUNT = 8
		# SLOT_ROTATION = [135.0, 157.5, 180.0, 202.5, 225.0, 247.5, 270.0, 292.5, 315.0, 337.5, 360.0, 382.5, 45.0, 67.5, 90.0, 112.5]
		# SLOT_COUNT = 16
	else:
		SLOT_ROTATION = [135.0, 225.0, 315.0, 45.0]
		SLOT_COUNT = 4
		CHARACTER_TYPE_COUNT = 5

	EMPIRE_NAME = {
		net.EMPIRE_A : localeInfo.EMPIRE_A,
		net.EMPIRE_B : localeInfo.EMPIRE_B,
		net.EMPIRE_C : localeInfo.EMPIRE_C
	}

	class CharacterRenderer(ui.Window):
		def OnRender(self):
			grp.ClearDepthBuffer()

			grp.SetGameRenderState()
			grp.PushState()
			grp.SetOmniLight()

			screenWidth = wndMgr.GetScreenWidth()
			screenHeight = wndMgr.GetScreenHeight()
			newScreenWidth = float(screenWidth - 270)
			newScreenHeight = float(screenHeight)

			grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight)

			app.SetCenterPosition(0.0, 0.0, 0.0)
			app.SetCamera(1550.0, 15.0, 180.0, 95.0)
			grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 3000.0)

			(x, y) = app.GetCursorPosition()
			grp.SetCursorPosition(x, y)

			chr.Deform()
			chr.Render()

			grp.RestoreViewport()
			grp.PopState()
			grp.SetInterfaceRenderState()

	def __init__(self, stream):
		ui.Window.__init__(self)
		net.SetPhaseWindow(net.PHASE_WINDOW_SELECT, self)

		self.stream=stream
		self.slot = self.stream.GetCharacterSlot()

		self.openLoadingFlag = False
		self.startIndex = -1
		self.startReservingTime = 0

		self.flagDict = {}
		self.curRotation = []
		self.destRotation = []
		for rot in self.SLOT_ROTATION:
			self.curRotation.append(rot)
			self.destRotation.append(rot)

		self.curNameAlpha = []
		self.destNameAlpha = []
		for i in xrange(self.CHARACTER_TYPE_COUNT):
			self.curNameAlpha.append(0.0)
			self.destNameAlpha.append(0.0)

		self.curGauge = [0.0, 0.0, 0.0, 0.0]
		self.destGauge = [0.0, 0.0, 0.0, 0.0]

		self.dlgBoard = 0
		self.changeNameFlag = False
		self.nameInputBoard = None
		self.sendedChangeNamePacket = False

		self.startIndex = -1
		self.isLoad = 0

	def __del__(self):
		ui.Window.__del__(self)
		net.SetPhaseWindow(net.PHASE_WINDOW_SELECT, 0)

	def Open(self):
		if not self.__LoadBoardDialog(uiScriptLocale.LOCALE_UISCRIPT_PATH + "selectcharacterwindow.py"):
			import dbg
			dbg.TraceError("SelectCharacterWindow.Open - __LoadScript Error")
			return

		if not self.__LoadQuestionDialog("uiscript/questiondialog.py"):
			return

		playerSettingModule.LoadGameData("INIT")

		self.InitCharacterBoard()

		self.btnStart.Enable()
		self.btnCreate.Enable()
		self.btnDelete.Enable()
		self.btnExit.Enable()
		self.btnLeft.Enable()
		self.btnRight.Enable()

		self.dlgBoard.Show()
		self.SetWindowName("SelectCharacterWindow")
		self.Show()

		if self.slot>=0:
			self.SelectSlot(self.slot)

		#if musicInfo.selectMusic != "":
		#	snd.SetMusicVolume(systemSetting.GetMusicVolume())
		#	snd.FadeInMusic("BGM/"+musicInfo.selectMusic)

		app.SetCenterPosition(0.0, 0.0, 0.0)
		app.SetCamera(1550.0, 15.0, 180.0, 95.0)

		self.isLoad=1
		self.Refresh()

		if self.stream.isAutoSelect:
			chrSlot=self.stream.GetCharacterSlot()
			self.SelectSlot(chrSlot)
			self.StartGame()

		self.HideAllFlag()
		self.SetEmpire(net.GetEmpireID())

		app.ShowCursor()

	def Close(self):
		#if musicInfo.selectMusic != "":
		#	snd.FadeOutMusic("BGM/"+musicInfo.selectMusic)

		self.stream.popupWindow.Close()

		if self.dlgBoard:
			self.dlgBoard.ClearDictionary()

		self.empireName = None
		self.flagDict = {}
		self.dlgBoard = None
		self.btnStart = None
		self.btnCreate = None
		self.btnDelete = None
		self.btnExit = None
		self.btnLeft = None
		self.btnRight = None
		self.backGround = None

		self.dlgQuestion.ClearDictionary()
		self.dlgQuestion = None
		self.dlgQuestionText = None
		self.dlgQuestionAcceptButton = None
		self.dlgQuestionCancelButton = None
		self.privateInputBoard = None
		self.nameInputBoard = None

		for i in xrange(self.SLOT_COUNT):
			chr.DeleteInstance(i)

		self.Hide()
		self.KillFocus()

		app.HideCursor()

	def SetEmpire(self, id):
		self.empireName.SetText(self.EMPIRE_NAME.get(id, ""))
		if self.flagDict.has_key(id):
			self.flagDict[id].Show()

	def HideAllFlag(self):
		for flag in self.flagDict.values():
			flag.Hide()

	def Refresh(self):
		if not self.isLoad:
			return

		# SLOT4
		indexArray = range(self.SLOT_COUNT-1, -1, -1)
		for index in indexArray:
			id=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_ID)
			race=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_RACE)
			form=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_FORM)
			name=net.GetAccountCharacterSlotDataString(index, net.ACCOUNT_CHARACTER_SLOT_NAME)
			hair=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_HAIR)
			if app.ENABLE_ACCE_COSTUME_SYSTEM:
				acce = net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_ACCE)

			if id:
				if app.ENABLE_ACCE_COSTUME_SYSTEM:
					self.MakeCharacter(index, id, name, race, form, hair, acce)
				else:
					self.MakeCharacter(index, id, name, race, form, hair)
				self.SelectSlot(index)

		self.SelectSlot(self.slot)

	def GetCharacterSlotID(self, slotIndex):
		return net.GetAccountCharacterSlotDataInteger(slotIndex, net.ACCOUNT_CHARACTER_SLOT_ID)

	def __LoadQuestionDialog(self, fileName):
		self.dlgQuestion = ui.ScriptWindow()

		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self.dlgQuestion, fileName)
		except:
			import exception
			exception.Abort("SelectCharacterWindow.LoadQuestionDialog.LoadScript")

		try:
			GetObject=self.dlgQuestion.GetChild
			self.dlgQuestionText=GetObject("message")
			self.dlgQuestionAcceptButton=GetObject("accept")
			self.dlgQuestionCancelButton=GetObject("cancel")
		except:
			import exception
			exception.Abort("SelectCharacterWindow.LoadQuestionDialog.BindObject")

		self.dlgQuestionText.SetText(localeInfo.SELECT_DO_YOU_DELETE_REALLY)
		self.dlgQuestionAcceptButton.SetEvent(ui.__mem_func__(self.RequestDeleteCharacter))
		self.dlgQuestionCancelButton.SetEvent(ui.__mem_func__(self.dlgQuestion.Hide))
		return 1

	def __LoadBoardDialog(self, fileName):
		self.dlgBoard = ui.ScriptWindow()

		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self.dlgBoard, fileName)
		except:
			import exception
			exception.Abort("SelectCharacterWindow.LoadBoardDialog.LoadScript")

		try:
			GetObject=self.dlgBoard.GetChild

			self.btnStart		= GetObject("start_button")
			self.btnCreate		= GetObject("create_button")
			self.btnDelete		= GetObject("delete_button")
			self.btnExit		= GetObject("exit_button")

			self.CharacterName	= GetObject("character_name_value")
			self.CharacterLevel = GetObject("character_level_value")
			self.PlayTime		= GetObject("character_play_time_value")
			self.CharacterHTH	= GetObject("character_hth_value")
			self.CharacterINT	= GetObject("character_int_value")
			self.CharacterSTR	= GetObject("character_str_value")
			self.CharacterDEX	= GetObject("character_dex_value")
			self.GuildName		= GetObject("GuildName")

			self.NameList = []
			self.NameList.append(GetObject("name_warrior"))
			self.NameList.append(GetObject("name_assassin"))
			self.NameList.append(GetObject("name_sura"))
			self.NameList.append(GetObject("name_shaman"))

			self.GaugeList = []
			self.GaugeList.append(GetObject("gauge_hth"))
			self.GaugeList.append(GetObject("gauge_int"))
			self.GaugeList.append(GetObject("gauge_str"))
			self.GaugeList.append(GetObject("gauge_dex"))

			self.btnLeft = GetObject("left_button")
			self.btnRight = GetObject("right_button")

			self.empireName = GetObject("EmpireName")
			self.flagDict[net.EMPIRE_A] = GetObject("EmpireFlag_A")
			self.flagDict[net.EMPIRE_B] = GetObject("EmpireFlag_B")
			self.flagDict[net.EMPIRE_C] = GetObject("EmpireFlag_C")

			self.backGround = GetObject("BackGround")

		except:
			import exception
			exception.Abort("SelectCharacterWindow.LoadBoardDialog.BindObject")

		for name in self.NameList:
			name.SetAlpha(0.0)

		self.btnStart.SetEvent(ui.__mem_func__(self.StartGame))
		self.btnCreate.SetEvent(ui.__mem_func__(self.CreateCharacter))
		self.btnExit.SetEvent(ui.__mem_func__(self.ExitSelect))



		if NOT_NEED_DELETE_CODE:
			self.btnDelete.SetEvent(ui.__mem_func__(self.PopupDeleteQuestion))
		else:
			self.btnDelete.SetEvent(ui.__mem_func__(self.InputPrivateCode))

		self.btnLeft.SetEvent(ui.__mem_func__(self.DecreaseSlotIndex))
		self.btnRight.SetEvent(ui.__mem_func__(self.IncreaseSlotIndex))

		self.chrRenderer = self.CharacterRenderer()
		self.chrRenderer.SetParent(self.backGround)
		self.chrRenderer.Show()

		return 1

	def MakeCharacter(self, index, id, name, race, form, hair, acce =0):
		if 0 == id:
			return

		chr.CreateInstance(index)
		chr.SelectInstance(index)
		chr.SetVirtualID(index)
		chr.SetNameString(name)

		chr.SetRace(race)
		chr.SetArmor(form)
		chr.SetHair(hair)

		if app.ENABLE_ACCE_COSTUME_SYSTEM:
			chr.SetAcce(acce)

		chr.Refresh()
		chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
		chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)

		chr.SetRotation(0.0)

	## Manage Character
	def StartGame(self):

		if self.sendedChangeNamePacket:
			return

		if self.changeNameFlag:
			self.OpenChangeNameDialog()
			return

		if -1 != self.startIndex:
			return

		#if musicInfo.selectMusic != "":
		#	snd.FadeLimitOutMusic("BGM/"+musicInfo.selectMusic, systemSetting.GetMusicVolume()*0.05)

		self.btnStart.SetUp()
		self.btnCreate.SetUp()
		self.btnDelete.SetUp()
		self.btnExit.SetUp()
		self.btnLeft.SetUp()
		self.btnRight.SetUp()

		self.btnStart.Disable()
		self.btnCreate.Disable()
		self.btnDelete.Disable()
		self.btnExit.Disable()
		self.btnLeft.Disable()
		self.btnRight.Disable()
		self.dlgQuestion.Hide()

		self.stream.SetCharacterSlot(self.slot)

		self.startIndex = self.slot
		self.startReservingTime = app.GetTime()

		for i in xrange(self.SLOT_COUNT):

			if False == chr.HasInstance(i):
				continue

			chr.SelectInstance(i)

			if i == self.slot:
				self.slot=self.slot
				chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED, 0.1)
				continue

			chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1)

	def OpenChangeNameDialog(self):
		import uiCommon
		nameInputBoard = uiCommon.InputDialogWithDescription()
		nameInputBoard.SetTitle(localeInfo.SELECT_CHANGE_NAME_TITLE)
		nameInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputName))
		nameInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputName))
		nameInputBoard.SetMaxLength(chr.PLAYER_NAME_MAX_LEN)
		nameInputBoard.SetBoardWidth(200)
		nameInputBoard.SetDescription(localeInfo.SELECT_INPUT_CHANGING_NAME)
		nameInputBoard.Open()
		nameInputBoard.slot = self.slot
		self.nameInputBoard = nameInputBoard

	def OnChangeName(self, id, name):
		self.SelectSlot(id)
		self.sendedChangeNamePacket = False
		self.PopupMessage(localeInfo.SELECT_CHANGED_NAME)

	def AcceptInputName(self):
		changeName = self.nameInputBoard.GetText()
		if not changeName:
			return

		self.sendedChangeNamePacket = True
		net.SendChangeNamePacket(self.nameInputBoard.slot, changeName)
		return self.CancelInputName()

	def CancelInputName(self):
		self.nameInputBoard.Close()
		self.nameInputBoard = None
		return True

	def OnCreateFailure(self, type):
		self.sendedChangeNamePacket = False
		if 0 == type:
			self.PopupMessage(localeInfo.SELECT_CHANGE_FAILURE_STRANGE_NAME)
		elif 1 == type:
			self.PopupMessage(localeInfo.SELECT_CHANGE_FAILURE_ALREADY_EXIST_NAME)
		elif 100 == type:
			self.PopupMessage(localeInfo.SELECT_CHANGE_FAILURE_STRANGE_INDEX)

	def CreateCharacter(self):
		id = self.GetCharacterSlotID(self.slot)
		if 0==id:
			self.stream.SetCharacterSlot(self.slot)

			EMPIRE_MODE = 1

			if EMPIRE_MODE:
				if self.__AreAllSlotEmpty():
					self.stream.SetReselectEmpirePhase()
				else:
					self.stream.SetCreateCharacterPhase()

			else:
				self.stream.SetCreateCharacterPhase()

	def __AreAllSlotEmpty(self):
		for iSlot in xrange(self.SLOT_COUNT):
			if 0!=net.GetAccountCharacterSlotDataInteger(iSlot, net.ACCOUNT_CHARACTER_SLOT_ID):
				return 0
		return 1

	def PopupDeleteQuestion(self):
		id = self.GetCharacterSlotID(self.slot)
		if 0 == id:
			return

		self.dlgQuestion.Show()
		self.dlgQuestion.SetTop()

	def RequestDeleteCharacter(self):
		self.dlgQuestion.Hide()

		id = self.GetCharacterSlotID(self.slot)
		if 0 == id:
			self.PopupMessage(localeInfo.SELECT_EMPTY_SLOT)
			return

		net.SendDestroyCharacterPacket(self.slot, "1234567")
		self.PopupMessage(localeInfo.SELECT_DELEING)

	def InputPrivateCode(self):

		import uiCommon
		privateInputBoard = uiCommon.InputDialogWithDescription()
		privateInputBoard.SetTitle(localeInfo.INPUT_PRIVATE_CODE_DIALOG_TITLE)
		privateInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrivateCode))
		privateInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrivateCode))

		if ENABLE_ENGNUM_DELETE_CODE:
			pass
		else:
			privateInputBoard.SetNumberMode()

		privateInputBoard.SetSecretMode()
		privateInputBoard.SetMaxLength(7)

		privateInputBoard.SetBoardWidth(250)
		privateInputBoard.SetDescription(localeInfo.INPUT_PRIVATE_CODE_DIALOG_DESCRIPTION)
		privateInputBoard.Open()
		self.privateInputBoard = privateInputBoard

	def AcceptInputPrivateCode(self):
		privateCode = self.privateInputBoard.GetText()
		if not privateCode:
			return

		id = self.GetCharacterSlotID(self.slot)
		if 0 == id:
			self.PopupMessage(localeInfo.SELECT_EMPTY_SLOT)
			return

		net.SendDestroyCharacterPacket(self.slot, privateCode)
		self.PopupMessage(localeInfo.SELECT_DELEING)

		self.CancelInputPrivateCode()
		return True

	def CancelInputPrivateCode(self):
		self.privateInputBoard = None
		return True

	def OnDeleteSuccess(self, slot):
		self.PopupMessage(localeInfo.SELECT_DELETED)
		self.DeleteCharacter(slot)

	def OnDeleteFailure(self):
		self.PopupMessage(localeInfo.SELECT_CAN_NOT_DELETE)

	def DeleteCharacter(self, index):
		chr.DeleteInstance(index)
		self.SelectSlot(self.slot)

	def ExitSelect(self):
		self.dlgQuestion.Hide()

		if LEAVE_BUTTON_FOR_POTAL:
			if app.loggined:
				self.stream.SetPhaseWindow(0)
			else:
				self.stream.setloginphase()
		else:
			self.stream.SetLoginPhase()

		self.Hide()

	def GetSlotIndex(self):
		return self.slot

	def DecreaseSlotIndex(self):
		slotIndex = (self.GetSlotIndex() - 1 + self.SLOT_COUNT) % self.SLOT_COUNT
		self.SelectSlot(slotIndex)

	def IncreaseSlotIndex(self):
		slotIndex = (self.GetSlotIndex() + 1) % self.SLOT_COUNT
		self.SelectSlot(slotIndex)

	def SelectSlot(self, index):

		if index < 0:
			return
		if index >= self.SLOT_COUNT:
			return

		self.slot = index

		chr.SelectInstance(self.slot)

		for i in xrange(self.CHARACTER_TYPE_COUNT):
			self.destNameAlpha[i] = 0.0

		for i in xrange(self.SLOT_COUNT):
			self.destRotation[(i+self.slot)%self.SLOT_COUNT] = self.SLOT_ROTATION[i]

		self.destGauge = [0.0, 0.0, 0.0, 0.0]

		id=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
		if 0 != id:

			self.btnStart.Show()
			self.btnDelete.Show()
			self.btnCreate.Hide()

			playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)
			level=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL)
			race=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE)
			valueHTH=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_HTH)
			valueINT=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_INT)
			valueSTR=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_STR)
			valueDEX=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_DEX)
			name=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME)
			guildID=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_ID)
			guildName=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_GUILD_NAME)
			self.changeNameFlag=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG)

			job = chr.RaceToJob(race)
			if job >= 0 and job < self.CHARACTER_TYPE_COUNT:
				self.destNameAlpha[job] = 1.0

			self.CharacterName.SetText(name)
			self.CharacterLevel.SetText(str(level))

			self.PlayTime.SetText(str(playTime))
			self.CharacterHTH.SetText(str(valueHTH))
			self.CharacterINT.SetText(str(valueINT))
			self.CharacterSTR.SetText(str(valueSTR))
			self.CharacterDEX.SetText(str(valueDEX))

			if guildName:
				self.GuildName.SetText(guildName)
			else:
				self.GuildName.SetText(localeInfo.SELECT_NOT_JOIN_GUILD)

			statesSummary = float(valueHTH + valueINT + valueSTR + valueDEX)
			if statesSummary > 0.0:
				self.destGauge =	[
										float(valueHTH) / statesSummary,
										float(valueINT) / statesSummary,
										float(valueSTR) / statesSummary,
										float(valueDEX) / statesSummary
									]

		else:

			self.InitCharacterBoard()

	def InitCharacterBoard(self):

		self.btnStart.Hide()
		self.btnDelete.Hide()
		self.btnCreate.Show()

		self.CharacterName.SetText("")
		self.CharacterLevel.SetText("")
		self.PlayTime.SetText("")
		self.CharacterHTH.SetText("")
		self.CharacterINT.SetText("")
		self.CharacterSTR.SetText("")
		self.CharacterDEX.SetText("")
		self.GuildName.SetText(localeInfo.SELECT_NOT_JOIN_GUILD)

	## Event
	def OnKeyDown(self, key):

		if 1 == key:
			self.ExitSelect()
		for i in xrange(self.SLOT_COUNT):
			if 2+i == key:
				self.SelectSlot(i)

		if 28 == key:

			id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
			if 0 == id:
				self.CreateCharacter()

			else:
				self.StartGame()

		if 203 == key:
			self.slot = (self.GetSlotIndex() - 1 + self.SLOT_COUNT) % self.SLOT_COUNT
			self.SelectSlot(self.slot)
		if 205 == key:
			self.slot = (self.GetSlotIndex() + 1) % self.SLOT_COUNT
			self.SelectSlot(self.slot)

		return True

	def OnUpdate(self):
		chr.Update()

		for i in xrange(4):
			self.curGauge[i] += (self.destGauge[i] - self.curGauge[i]) / 10.0
			if abs(self.curGauge[i] - self.destGauge[i]) < 0.005:
				self.curGauge[i] = self.destGauge[i]
			self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)

		for i in xrange(self.CHARACTER_TYPE_COUNT):
			self.curNameAlpha[i] += (self.destNameAlpha[i] - self.curNameAlpha[i]) / 10.0
			self.NameList[i].SetAlpha(self.curNameAlpha[i])

		for i in xrange(self.SLOT_COUNT):

			if False == chr.HasInstance(i):
				continue

			chr.SelectInstance(i)

			distance = 50.0
			rotRadian = self.curRotation[i] * (math.pi*2) / 360.0
			x = distance*math.sin(rotRadian) + distance*math.cos(rotRadian)
			y = distance*math.cos(rotRadian) - distance*math.sin(rotRadian)
			chr.SetPixelPosition(int(x), int(y), 30)

			#####

			dir = app.GetRotatingDirection(self.destRotation[i], self.curRotation[i])
			rot = app.GetDegreeDifference(self.destRotation[i], self.curRotation[i])

			if app.DEGREE_DIRECTION_RIGHT == dir:
				self.curRotation[i] += rot / 10.0
			elif app.DEGREE_DIRECTION_LEFT == dir:
				self.curRotation[i] -= rot / 10.0

			self.curRotation[i] = (self.curRotation[i] + 360.0) % 360.0

		#######################################################
		if -1 != self.startIndex:

			## Temporary
			if app.GetTime() - self.startReservingTime > constInfo.SELECT_CHAR_NO_DELAY:
				if False == self.openLoadingFlag:
					chrSlot=self.stream.GetCharacterSlot()
					net.DirectEnter(chrSlot)
					self.openLoadingFlag = True

					playTime=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)

					import player
					player.SetPlayTime(playTime)
					import chat
					chat.Clear()
			## Temporary
		#######################################################

	def EmptyFunc(self):
		pass

	def PopupMessage(self, msg, func=0):
		if not func:
			func=self.EmptyFunc

		self.stream.popupWindow.Close()
		self.stream.popupWindow.Open(msg, func, localeInfo.UI_OK)

	def OnPressExitKey(self):
		self.ExitSelect()
		return True



Avatar utilizator
Zac
Nivel 1

Nivel 1
Mesaje: 55
Membru din: 25 Noi 2022, 23:07
Server: Working
Regat: Chunjo
Aprecieri: 27  
Mulţumiri: 0
  Rezolvări prob.: 7
Discord: Copiază ID
Medalii

Up
Răspunde
Răspunsuri
5
Vizualizări
295
Răspunsuri
3
Vizualizări
322
Răspunsuri
1
Vizualizări
203

Înapoi la “Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 3 vizitatori