Functii Buton Minimap

Avatar utilizator
kastor123
Nou Venit

Nou Venit
Mesaje: 25
Membru din: 19 Mai 2014, 10:41
Aprecieri: 409  
Mulţumiri: 1  
Medalii

*Problemă/Întrebare: Am adaugat la minimap un buton si vreau sa stiu cum pot adauga si functie pe el.
Tipologie server(PvM / PvP): pvm
*Resursă folosită: *Link exclusiv J4M*
*ServerFiles utilizat: Propiu
*Syserr:
Poză:
*Detalii suplimentare:
Avatar utilizator
Alcinous
Untrusted User

Untrusted User
Mesaje: 670
Membru din: 13 Noi 2020, 23:46
Server: None
Regat: Jinno
Aprecieri: 322  
Mulţumiri: 487  
Discord: Copiază ID

Functia se face in uiminimap.py din root,acum depinde si ce ar trb sa faca acel button

[ Postat de pe iPhone ] Imagine
Avatar utilizator
kastor123
Nou Venit

Nou Venit
Mesaje: 25
Membru din: 19 Mai 2014, 10:41
Aprecieri: 409  
Mulţumiri: 1  
Medalii

Manah scrie: ↑01 Dec 2020, 22:42 Functia se face in uiminimap.py din root,acum depinde si ce ar trb sa faca acel button

[ Postat de pe iPhone ] Imagine
Exemplu : Buton afisare evenimente.
Avatar utilizator
amvenitsavadcv
Nivel 3

Nivel 3
Mesaje: 413
Membru din: 28 Iul 2018, 11:25
Server: da
Aprecieri: 44  
Mulţumiri: 156  
Medalii

Păi în uiminimap.py trebuie făcut totu.
Îți faci o variabila care ia butonu ăla:
După:
self.CloseWindow = self.GetChild("CloseWindow")
Adaugi:
self.EventBtn= self.GetChild("NumeleDin-/uiscript/Minimap.py al butonului")
După:
self.MiniMapShowButton.SetEvent(ui.__mem_func__(self.ShowMiniMap))
Adaugi:
self.EventBtn.SetEvent(ui.__mem_func__(self.EventBtnPress))
Și la final de tot:
	def EventBtnPress(self):
		##Aici pui codul ce îți deschide calendarul
Dacă vrei și tooltip, trebuie să mai adaugi cateva chestii.
Avatar utilizator
amvenitsavadcv
Nivel 3

Nivel 3
Mesaje: 413
Membru din: 28 Iul 2018, 11:25
Server: da
Aprecieri: 44  
Mulţumiri: 156  
Medalii

kastor123 scrie: ↑02 Dec 2020, 00:43
amvenitsavadcv scrie: ↑02 Dec 2020, 00:34 Păi în uiminimap.py trebuie făcut totu.
Îți faci o variabila care ia butonu ăla:
După:
self.CloseWindow = self.GetChild("CloseWindow")
Adaugi:
self.EventBtn= self.GetChild("NumeleDin-/uiscript/Minimap.py al butonului")
După:
self.MiniMapShowButton.SetEvent(ui.__mem_func__(self.ShowMiniMap))
Adaugi:
self.EventBtn.SetEvent(ui.__mem_func__(self.EventBtnPress))
Și la final de tot:
	def EventBtnPress(self):
		##Aici pui codul ce îți deschide calendarul
Dacă vrei și tooltip, trebuie să mai adaugi cateva chestii.
Ma poti ajuta cu un discord te rog? Sa nu spamez aici
Nu. Pe discord te ajut contra cost. Vrei asta?
Descurcă-te cu ce ți-am dat
Avatar utilizator
amvenitsavadcv
Nivel 3

Nivel 3
Mesaje: 413
Membru din: 28 Iul 2018, 11:25
Server: da
Aprecieri: 44  
Mulţumiri: 156  
Medalii

kastor123 scrie: ↑02 Dec 2020, 00:50
amvenitsavadcv scrie: ↑02 Dec 2020, 00:45
kastor123 scrie: ↑02 Dec 2020, 00:43
Ma poti ajuta cu un discord te rog? Sa nu spamez aici
Nu. Pe discord te ajut contra cost. Vrei asta?
Descurcă-te cu ce ți-am dat
Daca aveam acum money pe card te plateam nu era problema... Mai astept
Doamne ferește, și mâine poimâine vrei să deschizi svr de metin și nu poți face un buton.
Lasă-mi fișieru .py de la calendaru de evenimente sau ce vrei tu sa deschizi acolo prin butonu ala.
Avatar utilizator
kastor123
Nou Venit

Nou Venit
Mesaje: 25
Membru din: 19 Mai 2014, 10:41
Aprecieri: 409  
Mulţumiri: 1  
Medalii

kastor123 scrie: ↑02 Dec 2020, 00:59
kastor123 scrie: ↑02 Dec 2020, 00:57
amvenitsavadcv scrie: ↑02 Dec 2020, 00:51
Doamne ferește, și mâine poimâine vrei să deschizi svr de metin și nu poți face un buton.
Lasă-mi fișieru .py de la calendaru de evenimente sau ce vrei tu sa deschizi acolo prin butonu ala.
Man, butoane stiu sa fac dar pe minimap nu am facut niciodata. Nu pot pune poza sau link ca sa intelegi, de asta am si cerut discord
[img] https://pasteboard.co/JCYlyyN.png [img]

import uiCommon, ui, time, playersettingmodule, localeInfo, mouseModule, constInfo, uiScriptLocale, interfaceModule, dbg, wndMgr, snd, item, player, net, app
import timp_evenimente

class eventsystemwindow(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.LoadWindow()


def __del__(self):
ui.ScriptWindow.__del__(self)

def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/calendarevenimente.py")
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.LoadObject")
try:
self.titleBar = self.GetChild("titlebar")
self.board = self.GetChild("board")
self.ScrollBar = self.GetChild("ScrollBar")
self.title_name_eveniment = self.GetChild("title_name")

self.luni_incepe = self.GetChild("luni_incepe")
self.luni_termina = self.GetChild("luni_termina")

self.marti_incepe = self.GetChild("marti_incepe")
self.marti_termina = self.GetChild("marti_termina")

self.miercuri_incepe = self.GetChild("miercuri_incepe")
self.miercuri_termina = self.GetChild("miercuri_termina")

self.joi_incepe = self.GetChild("joi_incepe")
self.joi_termina = self.GetChild("joi_termina")

self.vineri_incepe = self.GetChild("vineri_incepe")
self.vineri_termina = self.GetChild("vineri_termina")

self.sambata_incepe = self.GetChild("sambata_incepe")
self.sambata_termina = self.GetChild("sambata_termina")

self.duminica_incepe = self.GetChild("duminica_incepe")
self.duminica_termina = self.GetChild("duminica_termina")


self.GetChild("jigsaw_eveniment").SAFE_SetEvent(self.__MenuFunction, 1)
self.GetChild("ox_eveniment").SAFE_SetEvent(self.__MenuFunction, 2)
self.GetChild("pvp_rase_eveniment").SAFE_SetEvent(self.__MenuFunction, 3)
self.GetChild("pvp_rege_eveniment").SAFE_SetEvent(self.__MenuFunction, 4)
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.BindObject")

self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))



self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

def __MenuFunction(self, value):
if value == 1:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_DE_PESCUIT)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.JIGSAW["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.JIGSAW["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.JIGSAW["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.JIGSAW["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.JIGSAW["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.JIGSAW["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.JIGSAW["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.JIGSAW["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.JIGSAW["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.JIGSAW["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.JIGSAW["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.JIGSAW["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.JIGSAW["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.JIGSAW["duminica_termina_e"])

if value == 2:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_OX)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.OX["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.OX["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.OX["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.OX["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.OX["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.OX["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.OX["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.OX["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.OX["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.OX["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.OX["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.OX["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.OX["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.OX["duminica_termina_e"])

if value == 3:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_RASE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_RASE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_RASE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_RASE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_RASE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_RASE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_RASE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_RASE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_RASE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_RASE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_RASE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_RASE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_RASE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_RASE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_RASE["duminica_termina_e"])

if value == 4:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_REGE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_REGE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_REGE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_REGE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_REGE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_REGE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_REGE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_REGE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_REGE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_REGE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_REGE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_REGE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_REGE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_REGE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_REGE["duminica_termina_e"])

def Destroy(self):
self.ClearDictionary()
self.board = None

def Open(self):
self.SetCenterPosition()
self.SetTop()
self.Show()

def Close(self):
self.Hide()

def OnPressEscapeKey(self):
self.Close()
return True
Avatar utilizator
amvenitsavadcv
Nivel 3

Nivel 3
Mesaje: 413
Membru din: 28 Iul 2018, 11:25
Server: da
Aprecieri: 44  
Mulţumiri: 156  
Medalii

kastor123 scrie: ↑02 Dec 2020, 01:00
kastor123 scrie: ↑02 Dec 2020, 00:59
kastor123 scrie: ↑02 Dec 2020, 00:57

Man, butoane stiu sa fac dar pe minimap nu am facut niciodata. Nu pot pune poza sau link ca sa intelegi, de asta am si cerut discord
[img] https://pasteboard.co/JCYlyyN.png [img]

import uiCommon, ui, time, playersettingmodule, localeInfo, mouseModule, constInfo, uiScriptLocale, interfaceModule, dbg, wndMgr, snd, item, player, net, app
import timp_evenimente

class eventsystemwindow(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.LoadWindow()


def __del__(self):
ui.ScriptWindow.__del__(self)

def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/calendarevenimente.py")
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.LoadObject")
try:
self.titleBar = self.GetChild("titlebar")
self.board = self.GetChild("board")
self.ScrollBar = self.GetChild("ScrollBar")
self.title_name_eveniment = self.GetChild("title_name")

self.luni_incepe = self.GetChild("luni_incepe")
self.luni_termina = self.GetChild("luni_termina")

self.marti_incepe = self.GetChild("marti_incepe")
self.marti_termina = self.GetChild("marti_termina")

self.miercuri_incepe = self.GetChild("miercuri_incepe")
self.miercuri_termina = self.GetChild("miercuri_termina")

self.joi_incepe = self.GetChild("joi_incepe")
self.joi_termina = self.GetChild("joi_termina")

self.vineri_incepe = self.GetChild("vineri_incepe")
self.vineri_termina = self.GetChild("vineri_termina")

self.sambata_incepe = self.GetChild("sambata_incepe")
self.sambata_termina = self.GetChild("sambata_termina")

self.duminica_incepe = self.GetChild("duminica_incepe")
self.duminica_termina = self.GetChild("duminica_termina")


self.GetChild("jigsaw_eveniment").SAFE_SetEvent(self.__MenuFunction, 1)
self.GetChild("ox_eveniment").SAFE_SetEvent(self.__MenuFunction, 2)
self.GetChild("pvp_rase_eveniment").SAFE_SetEvent(self.__MenuFunction, 3)
self.GetChild("pvp_rege_eveniment").SAFE_SetEvent(self.__MenuFunction, 4)
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.BindObject")

self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))



self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

def __MenuFunction(self, value):
if value == 1:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_DE_PESCUIT)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.JIGSAW["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.JIGSAW["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.JIGSAW["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.JIGSAW["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.JIGSAW["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.JIGSAW["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.JIGSAW["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.JIGSAW["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.JIGSAW["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.JIGSAW["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.JIGSAW["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.JIGSAW["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.JIGSAW["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.JIGSAW["duminica_termina_e"])

if value == 2:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_OX)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.OX["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.OX["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.OX["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.OX["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.OX["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.OX["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.OX["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.OX["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.OX["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.OX["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.OX["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.OX["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.OX["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.OX["duminica_termina_e"])

if value == 3:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_RASE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_RASE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_RASE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_RASE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_RASE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_RASE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_RASE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_RASE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_RASE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_RASE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_RASE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_RASE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_RASE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_RASE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_RASE["duminica_termina_e"])

if value == 4:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_REGE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_REGE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_REGE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_REGE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_REGE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_REGE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_REGE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_REGE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_REGE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_REGE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_REGE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_REGE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_REGE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_REGE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_REGE["duminica_termina_e"])

def Destroy(self):
self.ClearDictionary()
self.board = None

def Open(self):
self.SetCenterPosition()
self.SetTop()
self.Show()

def Close(self):
self.Hide()

def OnPressEscapeKey(self):
self.Close()
return True
	def EventBtnPress(self):
		import numefisiercalendar
		self.butonCalendar= numefisiercalendar.eventsystemwindow()
		self.butonCalendar.Open()		
Unde numefisiercalendar e numele .py al fisierului ce l-ai descarcat si l-ai pus in root.
Dacă nici așa nu reușești, înseamnă că trb să te pui să înveți python și după să lucrezi la server de metin.
Avatar utilizator
kastor123
Nou Venit

Nou Venit
Mesaje: 25
Membru din: 19 Mai 2014, 10:41
Aprecieri: 409  
Mulţumiri: 1  
Medalii

amvenitsavadcv scrie: ↑02 Dec 2020, 13:09
kastor123 scrie: ↑02 Dec 2020, 01:00
kastor123 scrie: ↑02 Dec 2020, 00:59
[img] https://pasteboard.co/JCYlyyN.png [img]

import uiCommon, ui, time, playersettingmodule, localeInfo, mouseModule, constInfo, uiScriptLocale, interfaceModule, dbg, wndMgr, snd, item, player, net, app
import timp_evenimente

class eventsystemwindow(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.LoadWindow()


def __del__(self):
ui.ScriptWindow.__del__(self)

def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/calendarevenimente.py")
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.LoadObject")
try:
self.titleBar = self.GetChild("titlebar")
self.board = self.GetChild("board")
self.ScrollBar = self.GetChild("ScrollBar")
self.title_name_eveniment = self.GetChild("title_name")

self.luni_incepe = self.GetChild("luni_incepe")
self.luni_termina = self.GetChild("luni_termina")

self.marti_incepe = self.GetChild("marti_incepe")
self.marti_termina = self.GetChild("marti_termina")

self.miercuri_incepe = self.GetChild("miercuri_incepe")
self.miercuri_termina = self.GetChild("miercuri_termina")

self.joi_incepe = self.GetChild("joi_incepe")
self.joi_termina = self.GetChild("joi_termina")

self.vineri_incepe = self.GetChild("vineri_incepe")
self.vineri_termina = self.GetChild("vineri_termina")

self.sambata_incepe = self.GetChild("sambata_incepe")
self.sambata_termina = self.GetChild("sambata_termina")

self.duminica_incepe = self.GetChild("duminica_incepe")
self.duminica_termina = self.GetChild("duminica_termina")


self.GetChild("jigsaw_eveniment").SAFE_SetEvent(self.__MenuFunction, 1)
self.GetChild("ox_eveniment").SAFE_SetEvent(self.__MenuFunction, 2)
self.GetChild("pvp_rase_eveniment").SAFE_SetEvent(self.__MenuFunction, 3)
self.GetChild("pvp_rege_eveniment").SAFE_SetEvent(self.__MenuFunction, 4)
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.BindObject")

self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))



self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

def __MenuFunction(self, value):
if value == 1:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_DE_PESCUIT)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.JIGSAW["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.JIGSAW["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.JIGSAW["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.JIGSAW["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.JIGSAW["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.JIGSAW["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.JIGSAW["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.JIGSAW["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.JIGSAW["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.JIGSAW["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.JIGSAW["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.JIGSAW["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.JIGSAW["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.JIGSAW["duminica_termina_e"])

if value == 2:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_OX)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.OX["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.OX["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.OX["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.OX["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.OX["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.OX["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.OX["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.OX["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.OX["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.OX["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.OX["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.OX["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.OX["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.OX["duminica_termina_e"])

if value == 3:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_RASE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_RASE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_RASE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_RASE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_RASE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_RASE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_RASE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_RASE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_RASE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_RASE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_RASE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_RASE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_RASE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_RASE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_RASE["duminica_termina_e"])

if value == 4:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_REGE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_REGE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_REGE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_REGE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_REGE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_REGE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_REGE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_REGE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_REGE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_REGE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_REGE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_REGE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_REGE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_REGE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_REGE["duminica_termina_e"])

def Destroy(self):
self.ClearDictionary()
self.board = None

def Open(self):
self.SetCenterPosition()
self.SetTop()
self.Show()

def Close(self):
self.Hide()

def OnPressEscapeKey(self):
self.Close()
return True
	def EventBtnPress(self):
		import numefisiercalendar
		self.butonCalendar= numefisiercalendar.eventsystemwindow()
		self.butonCalendar.Open()		
Unde numefisiercalendar e numele .py al fisierului ce l-ai descarcat si l-ai pus in root.
Dacă nici așa nu reușești, înseamnă că trb să te pui să înveți python și după să lucrezi la server de metin.
Da vreau sa invat, de asta am si intrebat. Un singur exemplu clar vreau ca dupa rezolv eu restul.
Pacat ca nu sunt acei oameni in care sa fie CLARI in ceea ce spun. La ce ai spus tu stau si ma uit...atat... Te dor degetele sa fii putin mai explicit. In fine se duce la vale grupul. Cer inchidere post, aici nu gasesc rezolvare
Avatar utilizator
Alcinous
Untrusted User

Untrusted User
Mesaje: 670
Membru din: 13 Noi 2020, 23:46
Server: None
Regat: Jinno
Aprecieri: 322  
Mulţumiri: 487  
Discord: Copiază ID

kastor123 scrie: ↑02 Dec 2020, 13:25
amvenitsavadcv scrie: ↑02 Dec 2020, 13:09
kastor123 scrie: ↑02 Dec 2020, 01:00

[img] https://pasteboard.co/JCYlyyN.png [img]

import uiCommon, ui, time, playersettingmodule, localeInfo, mouseModule, constInfo, uiScriptLocale, interfaceModule, dbg, wndMgr, snd, item, player, net, app
import timp_evenimente

class eventsystemwindow(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.LoadWindow()


def __del__(self):
ui.ScriptWindow.__del__(self)

def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/calendarevenimente.py")
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.LoadObject")
try:
self.titleBar = self.GetChild("titlebar")
self.board = self.GetChild("board")
self.ScrollBar = self.GetChild("ScrollBar")
self.title_name_eveniment = self.GetChild("title_name")

self.luni_incepe = self.GetChild("luni_incepe")
self.luni_termina = self.GetChild("luni_termina")

self.marti_incepe = self.GetChild("marti_incepe")
self.marti_termina = self.GetChild("marti_termina")

self.miercuri_incepe = self.GetChild("miercuri_incepe")
self.miercuri_termina = self.GetChild("miercuri_termina")

self.joi_incepe = self.GetChild("joi_incepe")
self.joi_termina = self.GetChild("joi_termina")

self.vineri_incepe = self.GetChild("vineri_incepe")
self.vineri_termina = self.GetChild("vineri_termina")

self.sambata_incepe = self.GetChild("sambata_incepe")
self.sambata_termina = self.GetChild("sambata_termina")

self.duminica_incepe = self.GetChild("duminica_incepe")
self.duminica_termina = self.GetChild("duminica_termina")


self.GetChild("jigsaw_eveniment").SAFE_SetEvent(self.__MenuFunction, 1)
self.GetChild("ox_eveniment").SAFE_SetEvent(self.__MenuFunction, 2)
self.GetChild("pvp_rase_eveniment").SAFE_SetEvent(self.__MenuFunction, 3)
self.GetChild("pvp_rege_eveniment").SAFE_SetEvent(self.__MenuFunction, 4)
except:
import exception
exception.Abort("CalendarEvenimente.LoadWindow.BindObject")

self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))



self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + localeInfo.SELECTECTEAZA_UN_EVENIMENT)
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + localeInfo.SELECTECTEAZA_UN_EVENIMENT)

def __MenuFunction(self, value):
if value == 1:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_DE_PESCUIT)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.JIGSAW["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.JIGSAW["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.JIGSAW["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.JIGSAW["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.JIGSAW["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.JIGSAW["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.JIGSAW["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.JIGSAW["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.JIGSAW["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.JIGSAW["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.JIGSAW["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.JIGSAW["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.JIGSAW["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.JIGSAW["duminica_termina_e"])

if value == 2:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_OX)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.OX["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.OX["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.OX["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.OX["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.OX["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.OX["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.OX["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.OX["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.OX["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.OX["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.OX["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.OX["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.OX["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.OX["duminica_termina_e"])

if value == 3:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_RASE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_RASE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_RASE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_RASE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_RASE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_RASE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_RASE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_RASE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_RASE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_RASE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_RASE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_RASE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_RASE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_RASE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_RASE["duminica_termina_e"])

if value == 4:
self.title_name_eveniment.SetText(localeInfo.EVENIMENTUL_PVP_REGE)

self.luni_incepe.SetText(localeInfo.EVENTIMENT_LUNI_START + timp_evenimente.PVP_REGE["luni_incepe_e"])
self.luni_termina.SetText(localeInfo.EVENTIMENT_LUNI_SFARSIT + timp_evenimente.PVP_REGE["luni_termina_e"])

self.marti_incepe.SetText(localeInfo.EVENTIMENT_MARTI_START + timp_evenimente.PVP_REGE["marti_incepe_e"])
self.marti_termina.SetText(localeInfo.EVENTIMENT_MARTI_SFARSIT + timp_evenimente.PVP_REGE["marti_termina_e"])

self.miercuri_incepe.SetText(localeInfo.EVENTIMENT_MIERCURI_START + timp_evenimente.PVP_REGE["miercuri_incepe_e"])
self.miercuri_termina.SetText(localeInfo.EVENTIMENT_MIERCURI_SFARSIT + timp_evenimente.PVP_REGE["miercuri_termina_e"])

self.joi_incepe.SetText(localeInfo.EVENTIMENT_JOI_START + timp_evenimente.PVP_REGE["joi_incepe_e"])
self.joi_termina.SetText(localeInfo.EVENTIMENT_JOI_SFARSIT + timp_evenimente.PVP_REGE["joi_termina_e"])

self.vineri_incepe.SetText(localeInfo.EVENTIMENT_VINERI_START + timp_evenimente.PVP_REGE["vineri_incepe_e"])
self.vineri_termina.SetText(localeInfo.EVENTIMENT_VINERI_SFARSIT + timp_evenimente.PVP_REGE["vineri_termina_e"])

self.sambata_incepe.SetText(localeInfo.EVENTIMENT_SAMBATA_START + timp_evenimente.PVP_REGE["sambata_incepe_e"])
self.sambata_termina.SetText(localeInfo.EVENTIMENT_SAMBATA_SFARSIT + timp_evenimente.PVP_REGE["sambata_termina_e"])

self.duminica_incepe.SetText(localeInfo.EVENTIMENT_DUMINICA_START + timp_evenimente.PVP_REGE["duminica_incepe_e"])
self.duminica_termina.SetText(localeInfo.EVENTIMENT_DUMINICA_SFARSIT + timp_evenimente.PVP_REGE["duminica_termina_e"])

def Destroy(self):
self.ClearDictionary()
self.board = None

def Open(self):
self.SetCenterPosition()
self.SetTop()
self.Show()

def Close(self):
self.Hide()

def OnPressEscapeKey(self):
self.Close()
return True
	def EventBtnPress(self):
		import numefisiercalendar
		self.butonCalendar= numefisiercalendar.eventsystemwindow()
		self.butonCalendar.Open()		
Unde numefisiercalendar e numele .py al fisierului ce l-ai descarcat si l-ai pus in root.
Dacă nici așa nu reușești, înseamnă că trb să te pui să înveți python și după să lucrezi la server de metin.
Da vreau sa invat, de asta am si intrebat. Un singur exemplu clar vreau ca dupa rezolv eu restul.
Pacat ca nu sunt acei oameni in care sa fie CLARI in ceea ce spun. La ce ai spus tu stau si ma uit...atat... Te dor degetele sa fii putin mai explicit. In fine se duce la vale grupul. Cer inchidere post, aici nu gasesc rezolvare
Nu mai bine vrei sa ti-l si bage? Omul a incercat sa iti de-a o mana de ajuto,daca tu nu intelegi o iota din ce ti-a dat mai sus asta e partea a doua.
Închis
Răspunsuri
1
Vizualizări
254
Răspunsuri
4
Vizualizări
123
Răspunsuri
3
Vizualizări
709
Răspunsuri
8
Vizualizări
983

Înapoi la “Probleme Rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator