Ejemplo n.º 1
0
    def Open(self, maxValue, unitValue=1):

        if localeInfo.IsYMIR() or localeInfo.IsCHEONMA(
        ) or localeInfo.IsHONGKONG():
            unitValue = ""

        width = self.GetWidth()
        (mouseX, mouseY) = wndMgr.GetMousePosition()

        if mouseX + width / 2 > wndMgr.GetScreenWidth():
            xPos = wndMgr.GetScreenWidth() - width
        elif mouseX - width / 2 < 0:
            xPos = 0
        else:
            xPos = mouseX - width / 2

        self.SetPosition(xPos, mouseY - self.GetHeight() - 20)

        if localeInfo.IsARABIC():
            self.maxValueTextLine.SetText("/" + str(maxValue))
        else:
            self.maxValueTextLine.SetText(" / " + str(maxValue))

        self.pickValueEditLine.SetText(str(unitValue))
        self.pickValueEditLine.SetFocus()

        ime.SetCursorPosition(1)

        self.unitValue = unitValue
        self.maxValue = maxValue
        self.Show()
        self.SetTop()
Ejemplo n.º 2
0
import net
import chat
import app
import localeInfo
import constInfo
import chrmgr
import player
import uiPrivateShopBuilder
import interfaceModule

blockMode = 0
viewChatMode = 0

MOBILE = False

if localeInfo.IsYMIR():
    MOBILE = True


class OptionDialog(ui.ScriptWindow):
    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.__Initialize()
        self.__Load()
        self.RefreshViewChat()
        self.RefreshAlwaysShowName()
        self.RefreshShowDamage()
        self.RefreshShowSalesText()
        if app.WJ_SHOW_MOB_INFO:
            self.RefreshShowMobInfo()
Ejemplo n.º 3
0
    def Open(self):
        print "OPEN LOADING WINDOW -------------------------------------------------------------------------------"

        #app.HideCursor()

        try:
            pyScrLoader = ui.PythonScriptLoader()

            if localeInfo.IsYMIR() or localeInfo.IsWE_KOREA(
            ) or localeInfo.IsCANADA() or localeInfo.IsBRAZIL(
            ) or localeInfo.IsEUROPE() or localeInfo.IsJAPAN():
                pyScrLoader.LoadScriptFile(
                    self,
                    uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoadingWindow.py")
            else:
                pyScrLoader.LoadScriptFile(self, "UIScript/LoadingWindow.py")
        except:
            import exception
            exception.Abort("LodingWindow.Open - LoadScriptFile Error")

        try:
            self.loadingImage = self.GetChild("BackGround")
            self.errMsg = self.GetChild("ErrorMessage")
            self.loadingGage = self.GetChild("FullGage")
            self.tipTextLine = self.GetChild("tipTextLine")
        except:
            import exception
            exception.Abort("LodingWindow.Open - LoadScriptFile Error")

        self.errMsg.Hide()

        if localeInfo.IsHONGKONG():
            imgFileNameDict = {
                0: app.GetLocalePath() + "/ui/loading/loading0.sub",
                1: app.GetLocalePath() + "/ui/loading/loading1.sub",
                2: app.GetLocalePath() + "/ui/loading/loading2.sub",
                3: app.GetLocalePath() + "/ui/loading/loading3.sub",
                4: app.GetLocalePath() + "/ui/loading/loading4.sub",
                5: app.GetLocalePath() + "/ui/loading/loading5.sub",
                6: app.GetLocalePath() + "/ui/loading/loading6.sub"
            }
        elif localeInfo.IsCIBN10():
            imgFileNameDict = {
                0: app.GetLocalePath() + "/ui/loading/loading0.jpg",
                1: app.GetLocalePath() + "/ui/loading/loading1.jpg",
                2: app.GetLocalePath() + "/ui/loading/loading2.jpg",
                3: app.GetLocalePath() + "/ui/loading/loading3.jpg",
                4: app.GetLocalePath() + "/ui/loading/loading4.jpg",
                5: app.GetLocalePath() + "/ui/loading/loading5.jpg",
                6: app.GetLocalePath() + "/ui/loading/loading6.jpg",
                7: app.GetLocalePath() + "/ui/loading/loading7.jpg",
            }
        elif localeInfo.IsYMIR() or localeInfo.IsWE_KOREA(
        ) or localeInfo.IsCANADA() or localeInfo.IsBRAZIL(
        ) or localeInfo.IsEUROPE() or localeInfo.IsJAPAN():
            imgFileNameDict = {
                0: "yamato_load/loading01.jpg",
            }
        elif constInfo.SUB2_LOADING_ENABLE:
            imgFileNameDict = {
                0: "d:/ymir work/uiloading/background_loading_warrior.sub",
                1: "d:/ymir work/uiloading/background_loading_assassin.sub",
                2: "d:/ymir work/uiloading/background_loading_shaman.sub",
                3: "d:/ymir work/uiloading/background_loading_sura.sub",
                4: "d:/ymir work/uiloading/background_loading_assassin2.sub",
                5: "d:/ymir work/uiloading/background_loading_sura2.sub",
                6: "d:/ymir work/uiloading/background_loading_assassin3.sub",
                7: "d:/ymir work/uiloading/background_loading_assassin3.sub",
            }
        else:
            imgFileNameDict = {
                0:
                "d:/ymir work/ui/intro/pattern/background_loading_warrior.jpg",
                1:
                "d:/ymir work/ui/intro/pattern/background_loading_assassin.jpg",
                2:
                "d:/ymir work/ui/intro/pattern/background_loading_shaman.jpg",
            }

        try:
            imgFileName = imgFileNameDict[app.GetRandom(
                0,
                len(imgFileNameDict) - 1)]
            self.loadingImage.LoadImage(imgFileName)

        except:
            print "LoadingWindow.Open.LoadImage - %s File Load Error" % (
                imgFileName)
            self.loadingImage.Hide()

        self.tipTextLine.SetText(settinginfo.GetTipText())

        width = float(wndMgr.GetScreenWidth()) / float(
            self.loadingImage.GetWidth())
        height = float(wndMgr.GetScreenHeight()) / float(
            self.loadingImage.GetHeight())

        self.loadingImage.SetScale(width, height)
        self.loadingGage.SetPercentage(2, 100)

        self.Show()

        chrSlot = self.stream.GetCharacterSlot()
        GFHhg54GHGhh45GHGH.SendSelectCharacterPacket(chrSlot)

        app.SetFrameSkip(0)
Ejemplo n.º 4
0
	def ShowMapName(self, mapName, x, y):
		if not self.MAP_NAME_IMAGE.has_key(mapName):
			print " [ERROR] - There is no map name image", mapName
			return

		try:
			self.LoadImage(self.MAP_NAME_IMAGE[mapName])
		except RuntimeError:
			return

		self.__Initialize()

		if mapName == "metin2_map_deviltower1":
			self.SetPosition(-60, 80)

			self.floorImage = ui.ExpandedImageBox()
			self.floorImage.AddFlag("not_pick")
			self.floorImage.SetWindowHorizontalAlignCenter()
			self.floorImage.SetPosition(100, 80)
			self.floorImage.SetAlpha(0.0)
			self.floorImage.Show()
			try:
				floor = self.__GetDevilTowerFloor(x, y)
				print x, y, floor
				self.floorImage.LoadImage(LOCALE_PATH+"devil1_%df.tga" % floor)
			except RuntimeError:
				self.SetPosition(0, 80)
				self.floorImage.Hide()
				self.floorImage = None

			if localeInfo.IsYMIR() or localeInfo.IsWE_KOREA():
				self.objectiveImage = ui.ExpandedImageBox()
				self.objectiveImage.AddFlag("not_pick")
				self.objectiveImage.SetWindowHorizontalAlignCenter()
				self.objectiveImage.SetPosition(0, 200)
				self.objectiveImage.SetAlpha(0.0)
				self.objectiveImage.Show()

				try:
					floor = self.__GetDevilTowerFloor(x, y)
					print x, y, floor
					self.objectiveImage.LoadImage(LOCALE_PATH + mapName + "/obj_%02df.tga" % floor)
				except RuntimeError:
					self.SetPosition(0, 80)
					self.objectiveImage.Hide()
					self.objectiveImage = None

		if mapName == "metin2_map_devilsCatacomb":
			self.SetPosition(-75, 80)

			self.floorImage = ui.ExpandedImageBox()
			self.floorImage.AddFlag("not_pick")
			self.floorImage.SetWindowHorizontalAlignCenter()
			self.floorImage.SetPosition(100, 80)
			self.floorImage.SetAlpha(0.0)
			self.floorImage.Show()

			try:
				floor = self.__GetDevilBase(x, y)
				print x, y, floor
				self.floorImage.LoadImage(LOCALE_PATH+"devil1_%df.tga" % floor)
			except RuntimeError:
				self.SetPosition(0, 80)
				self.floorImage.Hide()
				self.floorImage = None
			if localeInfo.IsYMIR() or localeInfo.IsWE_KOREA():
				self.objectiveImage = ui.ExpandedImageBox()
				self.objectiveImage.AddFlag("not_pick")
				self.objectiveImage.SetWindowHorizontalAlignCenter()
				self.objectiveImage.SetPosition(0, 200)
				self.objectiveImage.SetAlpha(0.0)
				self.objectiveImage.Show()


				try:
					floor = self.__GetDevilBase(x, y)
					print x, y, floor
					self.objectiveImage.LoadImage(LOCALE_PATH + mapName + "/obj_%02df.tga" % floor)
				except RuntimeError:
					self.SetPosition(0, 80)
					self.objectiveImage.Hide()
					self.objectiveImage = None

		self.state = self.STATE_FADE_IN
		self.fadeStartTime = app.GetTime() + 1.0
		self.Show()
Ejemplo n.º 5
0
	else:
		return src

if localeInfo.IsNEWCIBN() or localeInfo.IsCIBN10():
	LOGIN_DELAY_SEC = 60.0
	FULL_BACK_IMAGE = TRUE
	NEWCIBN_PASSPOD_AUTH = TRUE
	PASSPOD_MSG_DICT = {
		"PASERR1"	: localeInfo.LOGIN_FAILURE_PASERR1,
		"PASERR2"	: localeInfo.LOGIN_FAILURE_PASERR2,
		"PASERR3"	: localeInfo.LOGIN_FAILURE_PASERR3,
		"PASERR4"	: localeInfo.LOGIN_FAILURE_PASERR4,
		"PASERR5"	: localeInfo.LOGIN_FAILURE_PASERR5,
	}

elif localeInfo.IsYMIR() or localeInfo.IsCHEONMA():
	FULL_BACK_IMAGE = TRUE

elif localeInfo.IsHONGKONG():
	FULL_BACK_IMAGE = TRUE
	RUNUP_MATRIX_AUTH = TRUE 
	PASSPOD_MSG_DICT = {
		"NOTELE"	: localeInfo.LOGIN_FAILURE_NOTELEBLOCK,
	}

elif localeInfo.IsJAPAN():
	FULL_BACK_IMAGE = TRUE
	
elif localeInfo.IsBRAZIL():
	LOGIN_DELAY_SEC = 60.0
Ejemplo n.º 6
0
def DefineSkillIndexDict():
    global NEW_678TH_SKILL_ENABLE
    global SKILL_INDEX_DICT

    NEW_678TH_SKILL_ENABLE = localeInfo.IsYMIR()
    if NEW_678TH_SKILL_ENABLE:
        SKILL_INDEX_DICT = {
            JOB_WARRIOR: {
                1: (
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                2: (
                    16,
                    17,
                    18,
                    19,
                    20,
                    21,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                    141,
                    142,
                ),
            },
            JOB_ASSASSIN: {
                1: (
                    31,
                    32,
                    33,
                    34,
                    35,
                    36,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                    140,
                ),
                2: (
                    46,
                    47,
                    48,
                    49,
                    50,
                    51,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                    140,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                    141,
                    142,
                ),
            },
            JOB_SURA: {
                1: (
                    61,
                    62,
                    63,
                    64,
                    65,
                    66,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                2: (
                    76,
                    77,
                    78,
                    79,
                    80,
                    81,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                    141,
                    142,
                ),
            },
            JOB_SHAMAN: {
                1: (
                    91,
                    92,
                    93,
                    94,
                    95,
                    96,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                2: (
                    106,
                    107,
                    108,
                    109,
                    110,
                    111,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                    141,
                    142,
                ),
            },
        }
    else:
        SKILL_INDEX_DICT = {
            JOB_WARRIOR: {
                1: (
                    1,
                    2,
                    3,
                    4,
                    5,
                    0,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                2: (
                    16,
                    17,
                    18,
                    19,
                    20,
                    0,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                ),
            },
            JOB_ASSASSIN: {
                1: (
                    31,
                    32,
                    33,
                    34,
                    35,
                    0,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                    140,
                ),
                2: (
                    46,
                    47,
                    48,
                    49,
                    50,
                    0,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                    140,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                ),
            },
            JOB_SURA: {
                1: (
                    61,
                    62,
                    63,
                    64,
                    65,
                    66,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                2: (
                    76,
                    77,
                    78,
                    79,
                    80,
                    81,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                ),
            },
            JOB_SHAMAN: {
                1: (
                    91,
                    92,
                    93,
                    94,
                    95,
                    96,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                2: (
                    106,
                    107,
                    108,
                    109,
                    110,
                    111,
                    0,
                    0,
                    137,
                    0,
                    138,
                    0,
                    139,
                    0,
                ),
                "SUPPORT": (
                    122,
                    123,
                    121,
                    124,
                    125,
                    129,
                    0,
                    0,
                    130,
                    131,
                ),
            },
        }