Hello Epvp
let's start with if you want
[Only registered and activated users can see links. Click Here To Register...]
How-To Einfügen:
game.py opening
Now add below
let's start with if you want
[Only registered and activated users can see links. Click Here To Register...]
How-To Einfügen:
game.py opening
Now add below
Quote:
self.targetBoard.Hide()
looking for this codeQuote:
#PET_SYSTEM
ExpBar = ui.AniImageBox()
ExpBar.AddFlag("not_pick")
ExpBar.SetDelay(6)
ExpBar.AppendImage("d:/ymir work/ui/pattern/pets/giallo.tga")
ExpBar.AppendImage("d:/ymir work/ui/pattern/pets/gialloC.tga")
self.ExpBar = ExpBar
self.ExpBar.SetPosition(wndMgr.GetScreenWidth() - 131, 225)
AbiBar = ui.AniImageBox()
AbiBar.AddFlag("not_pick")
AbiBar.SetDelay(6)
AbiBar.AppendImage("d:/ymir work/ui/pattern/pets/blu.tga")
AbiBar.AppendImage("d:/ymir work/ui/pattern/pets/bluC.tga")
self.AbiBar = AbiBar
self.AbiBar.SetPosition(wndMgr.GetScreenWidth() - 131, 214)
self.Boardx = ui.ImageBox()
self.Boardx.SetParent(self)
self.Boardx.LoadImage("d:/ymir work/ui/pattern/pets/board.tga")
self.Boardx.SetPosition(wndMgr.GetScreenWidth() - 225, 170)
self.Boardx.SetSize(225, 155)
self.Boardx.Hide()
self.PetImg = ui.ImageBox()
self.PetImg.SetParent(self)
self.PetImg.OnMouseLeftButtonUp = ui.__mem_func__(self.__Pet_Click)
self.PetImg.SetSize(50, 50)
self.PetImg.Hide()
self.info1 = ui.TextLine()
self.info1.SetFontName("Tahoma:11
self.info1.SetText("Puntiità: ")
self.info1.SetPosition(wndMgr.GetScreenWidth() - 125, 213)
self.info1.SetFeather()
self.info1.SetOutline()
self.info1.Hide()
self.abi = ui.TextLine()
self.abi.SetFontName("Tahoma:11
self.abi.SetHorizontalAlignLeft()
self.abi.SetPosition(wndMgr.GetScreenWidth() - 43, 213)
self.abi.SetFeather()
self.abi.SetOutline()
self.abi.Hide()
self.info2 = ui.TextLine()
self.info2.SetFontName("Tahoma:11
self.info2.SetText("Exp
self.info2.SetPosition(wndMgr.GetScreenWidth() - 125, 234)
self.info2.SetFeather()
self.info2.SetOutline()
self.info2.Hide()
self.exp = ui.TextLine()
self.exp.SetFontName("Tahoma:11
self.exp.SetHorizontalAlignRight()
self.exp.SetPosition(wndMgr.GetScreenWidth() - 55, 234)
self.exp.SetFeather()
self.exp.SetOutline()
self.exp.Hide()
self.nextExp = ui.TextLine()
self.nextExp.SetFontName("Tahoma:11")
self.nextExp.SetHorizontalAlignLeft()
self.nextExp.SetFeather()
self.nextExp.SetOutline()
self.nextExp.Hide()
self.nome = ui.TextLine()
self.nome.SetFontName(locale.UI_DEF_FONT_LARGE)
self.nome.SetPosition(wndMgr.GetScreenWidth() - 110, 195)
self.nome.SetFeather()
self.nome.SetOutline()
self.nome.Hide()
self.livello = ui.TextLine()
self.livello.SetFontName("Tahoma:11")
self.livello.SetPosition(wndMgr.GetScreenWidth() - 154, 230)
self.livello.SetFeather()
self.livello.SetOutline()
self.livello.Hide()
#END_OF_PET_SYSTEM
Add belowQuote:
# SHOW_LOCAL_MAP_NAME
looking for this codeQuote:
#PET_SYSTEM
def __OpenBoardx(self, index, livello, abi, ExpPet, nextExpPet, lock, maxAbi):
from array import array
pets = ('Fenice Rossa','Fenice Blu','Renna','Azarel','Lupo','Leone','Cinghiale',' Tigre')
petimage = ('fenice_rossa','fenice_blu','renna','azarel','can e','leone','cinghiale','tigre')
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 200, 185)
self.PetImg.LoadImage("d:/ymir work/ui/pattern/pets/"+petimage[int(index)-1]+".tga")
self.nome.SetText(pets[int(index)-1])
self.livello.SetText(livello)
self.AbiBar.SetPercentage(abi, maxAbi)
# nextExpFix = max(nextExpPet, ExpPet)
self.abi.SetText(abi)
if int(nextExpPet) > 0:
self.ExpBar.SetPercentage(ExpPet, nextExpPet)
else:
pass
self.IsLock = int(lock)
if self.IsLock:
self.nextExp.SetText("BLOCCATO")
self.nextExp.SetPosition(wndMgr.GetScreenWidth() - 90, 234)
self.exp.Hide()
else:
self.exp.SetText(ExpPet+" / ")
self.nextExp.SetText(nextExpPet)
self.exp.Show()
self.nextExp.SetPosition(wndMgr.GetScreenWidth() - 55, 234)
self.info1.Show()
self.info2.Show()
self.Boardx.Show()
self.nome.Show()
self.livello.Show()
self.abi.Show()
self.nextExp.Show()
self.ExpBar.Show()
self.AbiBar.Show()
self.PetImg.Show()
self.PetIsClose = FALSE
def __UpdateBoardx(self, index, livello, abi, ExpPet, nextExpPet, lock, maxAbi):
self.livello.SetText(livello)
self.AbiBar.SetPercentage(abi, maxAbi)
# nextExpFix = max(nextExpPet, ExpPet)
self.abi.SetText(abi)
if int(nextExpPet) > 0:
self.ExpBar.SetPercentage(ExpPet, nextExpPet)
else:
pass
self.IsLock = int(lock)
if self.IsLock:
self.nextExp.SetText("BLOCCATO")
else:
self.exp.SetText(ExpPet+" / ")
self.nextExp.SetText(nextExpPet)
def __Pet_Click(self):
if self.PetIsClose and self.IsLock:
self.Boardx.Show()
self.nome.Show()
self.livello.Show()
self.info1.Show()
self.info2.Show()
self.abi.Show()
self.exp.Hide()
self.nextExp.Show()
self.ExpBar.Show()
self.AbiBar.Show()
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 200, 185)
self.PetImg.Show()
self.PetIsClose = FALSE
elif self.PetIsClose:
self.Boardx.Show()
self.nome.Show()
self.livello.Show()
self.info1.Show()
self.info2.Show()
self.abi.Show()
self.exp.Show()
self.nextExp.Show()
self.ExpBar.Show()
self.AbiBar.Show()
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 200, 185)
self.PetImg.Show()
self.PetIsClose = FALSE
else:
self.Boardx.Hide()
self.nome.Hide()
self.livello.Hide()
self.info1.Hide()
self.info2.Hide()
self.abi.Hide()
self.exp.Hide()
self.nextExp.Hide()
self.ExpBar.Hide()
self.AbiBar.Hide()
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 90, 190)
self.PetImg.Show()
self.PetIsClose = TRUE
def __CloseBoardx(self):
self.Boardx.Hide()
self.nome.Hide()
self.livello.Hide()
self.info1.Hide()
self.info2.Hide()
self.abi.Hide()
self.exp.Hide()
self.nextExp.Hide()
self.AbiBar.Hide()
self.ExpBar.Hide()
self.PetImg.Hide()
#END_OF_PET_SYSTEM
Add belowQuote:
# END_OF_WEDDING
Quote:
#PET_SYSTEM
"apri" : self.__OpenBoardx,
"chiudi" : self.__CloseBoardx,
"aggiorna" : self.__UpdateBoardx,
#END_OF_PET_SYSTEM