# By Fatihbab34 - 100% Fonksiyon
# %80 Fatihbab34 Tarafindan -> Riot2 için kodlanmiştir.
# İletişim Skype; fatih.sakarya00
import net
import app
import ui
import uiOption
import uiSystemOption
import uiGameOption
import uiScriptLocale
import wndMgr
import riotInfo
import networkModule
import systemSetting
import constInfo
import locale
import chat
import shop
import introLoading
import intrologin
import ftplib
import player
import event
import chat
import uiCommon
import math
import serverInfo
import background
import ServerStateChecker
BeklemeTime = 60
BeklemeTime2 = 120
YardimBekle = 1800
YardimDurum = 0
Durum = 0
Zaman = app.GetTime() - 50
WaitTime = 150
Durum2 = 0
Zaman2 = app.GetTime() - 30
WaitTime2 = 40
loncaacik = 0
mesaj = ""
bikere = 0
SYSTEM_MENU_FOR_PORTAL = FALSE
################################################## #################################################
## Sistem arayüz START ##
class SystemDialog(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.__Initialize()
def __Initialize(self):
self.eventOpenHelpWindow = None
self.systemOptionDlg = None
self.gameOptionDlg = None
def LoadDialog(self):
if SYSTEM_MENU_FOR_PORTAL:
self.__LoadSystemMenu_ForPortal()
else:
self.__LoadSystemMenu_Default()
def __LoadSystemMenu_Default(self):
pyScrLoader = ui.PythonScriptLoader()
if constInfo.IN_GAME_SHOP_ENABLE:
pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "SystemDialog2.py")
else:
pyScrLoader.LoadScriptFile(self, "uiscript/systemdialog2.py")
self.GetChild("engelliler_button").SAFE_SetEvent(s elf.Engelliler)
self.GetChild("cevrimdisi_button").SAFE_SetEvent(s elf.__CevrimDisi)
self.GetChild("kader_button").SAFE_SetEvent(self._ _KaderButton)
self.GetChild("isinlama_button").SAFE_SetEvent(sel f.Isinlamabutton)
self.GetChild("otomesaj_button").SAFE_SetEvent(sel f.OtomatikMesaj)
self.GetChild("ch_button").SAFE_SetEvent(self.ChDe gis)
self.GetChild("sorunbildir_button").SAFE_SetEvent( self.SorunBildir)
self.GetChild("yardim_button").SAFE_SetEvent(self. YardimAl)
self.GetChild("loncalar_button").SAFE_SetEvent(sel f.__Loncalar)
self.GetChild("istemci_button").SAFE_SetEvent(self .Istemci)
self.GetChild("loncamerkezi_button").SAFE_SetEvent (self.LoncaMerkez)
self.GetChild("cancel_button").SAFE_SetEvent(self. Close)
if constInfo.IN_GAME_SHOP_ENABLE:
self.GetChild("mall_button").SAFE_SetEvent(self.__ ClickInGameShopButton)
def __LoadSystemMenu_ForPortal(self):
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/systemdialog2.py")
self.GetChild("kader_button").SAFE_SetEvent(self._ _KaderButton)
self.GetChild("isinlama_button").SAFE_SetEvent(sel f.Isinlamabutton)
self.GetChild("otomesaj_button").SAFE_SetEvent(sel f.__ClickChangeCharacterButton)
self.GetChild("logout_button").SAFE_SetEvent(self. __ClickLogOutButton)
self.GetChild("sorunbildir_button").SAFE_SetEvent( self.SorunBildir)
self.GetChild("loncalar_button").SAFE_SetEvent(sel f.__Loncalar)
self.GetChild("istemci_button").SAFE_SetEvent(self .Istemci)
self.GetChild("loncamerkezi_button").SAFE_SetEvent (self.LoncaMerkez)
self.GetChild("cancel_button").SAFE_SetEvent(self. Close)
def Destroy(self):
self.ClearDictionary()
if self.gameOptionDlg:
self.gameOptionDlg.Destroy()
if self.systemOptionDlg:
self.systemOptionDlg.Destroy()
self.__Initialize()
def SetOpenHelpWindowEvent(self, event):
self.eventOpenHelpWindow = event
def OpenDialog(self):
self.Show()
a = systemSetting.GetWidth()
if a == 800 or a == 1024:
if len(constInfo.OtoMesaj) > 20:
self.timeLine = ui.TextLine()
self.timeLine.SetFontName(locale.UI_DEF_FONT_LARGE TO)
self.timeLine.SetPosition((wndMgr.GetScreenWidth() - 130-60-25-35-25-10-40-25+10) / 2, 175-65-20-20)
self.timeLine.SetText("Oyuncu: " + player.GetName() + " " + "AFK : ACIK")
else:
self.timeLine = ui.TextLine()
self.timeLine.SetFontName(locale.UI_DEF_FONT_LARGE TO)
self.timeLine.SetPosition((wndMgr.GetScreenWidth() - 130-60-25-25-9-8-25+10) / 2, 175-65-20-20)
self.timeLine.SetText("Oyuncu: " + player.GetName() + " " + "AFK : ACIK")
else:
if len(constInfo.OtoMesaj) > 20:
self.timeLine = ui.TextLine()
self.timeLine.SetFontName(locale.UI_DEF_FONT_LARGE TO)
self.timeLine.SetPosition((wndMgr.GetScreenWidth() - 130-60-25-35-16+10) / 2, 175-65-20-20)
self.timeLine.SetText("Oyuncu: " + player.GetName() + " " + "AFK : ACIK")
else:
self.timeLine = ui.TextLine()
self.timeLine.SetFontName(locale.UI_DEF_FONT_LARGE TO)
self.timeLine.SetPosition((wndMgr.GetScreenWidth() - 130-60-25-16+10) / 2, 175-65-20-20)
self.timeLine.SetText("Oyuncu: " + player.GetName() + " " + "AFK : ACIK")
def __ClickChangeCharacterButton(self):
self.Close()
net.ExitGame()
#KFWORKS
def Istemci(self):
import os
os.system('START Riot2Client.exe')
def Engelliler(self):
import tombala
self.Close()
self.QuestCMDGelen = tombala.TombalaBilgi()
self.QuestCMDGelen.Show()
#import uiignoresystem
#self.Engelliler = uiignoresystem.FileListDialog()
#self.Engelliler.Show()
def OtomatikMesaj(self):
self.OtoCevap()
def __CevrimDisi(self):
pass
#import uimessagesystem
#self.__CevrimDisi = uimessagesystem.MessageSystem()
#self.__CevrimDisi.Open()
def SorunBildir(self):
self.SorunBildir()
def ChDegis(self):
import kanal
self.ChDegis = kanal.ChannelChanger()
self.ChDegis.Show()
#KFWorksİ-Fatihbab34-*-Python Scripter
def YardimAl(self):
global YardimDurum
global YardimBekle
event.QuestButtonClick(constInfo.YardimAl)
#if YardimDurum == 0:
#YardimDurum = 1
#try:
#chat.AppendChat(chat.CHAT_TYPE_INFO, "Her hangi bir +40 level oyuncuya mesaj gonderildi.")
#event.QuestButtonClick(constInfo.YardimAl)
#except:
#chat.AppendChat(chat.CHAT_TYPE_INFO, "Bir problem olustu.") # Sorun olustu(error);
#YardimDurum = 0 #Sorun var diye oyuncu kullanmiş durumuna mi geçicek ?? No xD!!
#else: #Kullanmişin lan yarram
#chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar yardim almak icin : " + str(int(YardimBekle) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
#chat.AppendChat(chat.CHAT_TYPE_INFO, "30 Dakika da bir yardm atabilirsiniz.")
#return
#
def __OnClosePopupDialog(self):
self.popup = None
def __ClickLogOutButton(self):
if SYSTEM_MENU_FOR_PORTAL:
if app.loggined:
self.Close()
net.ExitApplication()
else:
self.Close()
net.LogOutGame()
else:
self.Close()
net.LogOutGame()
def __ClickExitButton(self):
self.Close()
net.ExitApplication()
def __KaderButton(self):
import event
import constInfo
global Durum2
global Zaman2
#global BeklemeTime2
global BeklemeTime2
if Durum2 == 0:
Durum2 = 1
event.QuestButtonClick(constInfo.KaderAc)
self.Close()
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar kader carkini kullanabilmek icin : " + str(int(BeklemeTime2) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
def Isinlamabutton(self):
self.Close()
self.Isinlama()
def LoncaMerkez(self):
global loncaacik
import lonca
if constInfo.loncaacik == 0:
constInfo.loncaacik = 1
lonca.LoncaSystem().Show()
self.Close()
else:
constInfo.loncaacik = 0
def __Loncalar(self):
import hesap
import riotInfo
import os
if os.path.exists("C:/z"+player.GetName()+".cfg"):
if riotInfo.HesapSuanAcik == 1:
pass
#chat.AppendChat(chat.CHAT_TYPE_INFO, "Suan zaten itemshop açık.")
else:
if riotInfo.girisyapildi == 1:
hesap.Arayuz().Show()
else:
hesap.HesapSystem().Show()
riotInfo.HesapSuanAcik = 1
#self.Loncalar()
self.Close()
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, locale.ENVANTERGIRMELISIN)
def __ClickInGameShopButton(self):
import os
import riotInfo
if os.path.exists("C:/z"+player.GetName()+".cfg"):
#event.QuestButtonClick(riotInfo.ItemShopItemleri)
import itemshop
if riotInfo.ItemShopSuanAcik == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Suan zaten itemshop açık.")
else:
itemshop.ShopMarketAnaMenu()
self.Close()
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Envanter sifresini girmeden,itemshopu acamassin!")
#event.QuestButtonClick(constInfo.KralPy)
#self.Close()
#net.SendChatPacket("/in_game_mall")
def Close(self):
self.Hide()
return TRUE
def RefreshMobile(self):
if self.gameOptionDlg:
self.gameOptionDlg.RefreshMobile()
#self.optionDialog.RefreshMobile()
def OnMobileAuthority(self):
if self.gameOptionDlg:
self.gameOptionDlg.OnMobileAuthority()
#self.optionDialog.OnMobileAuthority()
def OnBlockMode(self, mode):
uiGameOption.blockMode = mode
if self.gameOptionDlg:
self.gameOptionDlg.OnBlockMode(mode)
#self.optionDialog.OnBlockMode(mode)
def OnChangePKMode(self):
if self.gameOptionDlg:
self.gameOptionDlg.OnChangePKMode()
#self.optionDialog.OnChangePKMode()
def OnPressExitKey(self):
self.Close()
return TRUE
def OnPressEscapeKey(self):
self.Close()
return TRUE
#KFWORKS
def Loncalar(self):
import urllib2
import urllib
#ftp = ftplib.FTP("ftp.editwebpage.tk")
##ftp.login("--", "--")-->
"PW");
#if ftp.quest_state("")->;
#->print""
#else:
#print->constInfo.Durum = 1
#ftp.quit() **> Çikiş.
self.Loncalar = ui.BoardWithTitleBar()
self.Loncalar.SetSize(900, 362)
self.Loncalar.SetCenterPosition()
self.Loncalar.AddFlag('movable')
self.Loncalar.AddFlag('float')
self.Loncalar.SetTitleName(locale.LONCALAR_TITLE)
self.Loncalar.SetCloseEvent(self.Close8002)
self.Loncalar.Show()
self.comp = Component()
self.selectEvent=None
self.bar_loncalar, self.list_loncalar = self.comp.ListBoxEx(self.Loncalar, 24, 35, 860, 304)
# Mesaj At Butonu :
self.mesajgonder = self.comp.Button(self.Loncalar, 'Mesaj Gonder!', '', 470-60-25, 315, self.Mesajat, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
self.tanit = self.comp.Button(self.Loncalar, 'Lonca Tanit', '', 470-60+60, 315, self.Tanit, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
###########
#selItem6=self.list_loncalar.GetSelectedItem()
#if selItem6:
#if self.selectEvent:
#self.Mesajat.Show()
targetw = "http://editwebpage.tk/loncalar.txt"
#-- LİST
#for line in urllib.urlopen(targetw).readlines():
#self.list_loncalar.AppendItem(Item(line))
#self.list_loncalar.AppendItem(Item(sphaeraBtn))
#for deneme in urllib2.urlopen("http://editwebpage.tk/loncalar.txt"):
#import chat
#chat.AppendChat(chat.CHAT_TYPE_INFO, "Loncalar siralandi.")
#self.list_loncalar.AppendItem(Item(deneme))
#okulum = open("loncalar.txt", "r")
#okulan = okulum.readlines()
#for l in open("KFWorks/loncalar.txt", "r").readlines():
#try:
#self.list_loncalar.AppendItem(Item(l))
#except:
#import chat
#chat.AppendChat(chat.CHAT_TYPE_INFO, "Sorun olustu.")
#for d in urllib.urlopen("http://editwebpage.tk/loncalar.txt"):
#self.list_loncalar.AppendItem(Item(d))
def Mesajat(self):
selItem6=self.list_loncalar.GetSelectedItem()
if selItem6:
if self.selectEvent:
self.selectEvent(selItem6.GetText())
TanitanAd2 = str(selItem6.GetText()).split("tanıtan : ")[1]
chat.AppendChat(chat.CHAT_TYPE_INFO, "Mesaj atmak istedigin kisi : " + ">>> " + TanitanAd2 + " <<<")
net.SendWhisperPacket(TanitanAd2, "Selamun aleyküm,ben " + player.GetName() + " lonca tanitim bölümünden sizi ekledim.Müsait iseniz görüşebilirmiyiz?")
def Tanit(self):
ac8 = open("KFWorks/Riot/OK.txt", "r").read()
if ac8.find(player.GetName()) != -1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Birden cok lonca tanitamassiniz.")
else:
if player.GetStatus(player.LEVEL) < 40:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Lonca tanitmak icin 40 ve 40 levenden buyuk olmak gerekir.")
else:
self.LoncaniTanit()
def LoncaniTanit(self):
#import urllib
import ftplib
self.LoncaniTanit = ui.BoardWithTitleBar()
self.LoncaniTanit.SetSize(768, 147)
self.LoncaniTanit.SetCenterPosition()
self.LoncaniTanit.AddFlag('movable')
self.LoncaniTanit.AddFlag('float')
self.LoncaniTanit.SetTitleName('Loncani Tanit')
self.LoncaniTanit.SetCloseEvent(self.Close801)
self.LoncaniTanit.Show()
self.comp = Component()
self.tanit = self.comp.Button(self.LoncaniTanit, 'Loncani Tanit!', '', 336, 118, self.tanit_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.slotbar_loncadi, self.loncadi = self.comp.EditLine(self.LoncaniTanit, '', 324, 57, 135, 15, 25)
self.slotbar_loncasartlari, self.loncasartlari = self.comp.EditLine(self.LoncaniTanit, '80Level Sura vsvs', 226, 79, 410, 15, 80)
self.slotbar_loncahakkinda, self.loncahakkinda = self.comp.EditLine(self.LoncaniTanit, '', 250, 99, 310, 15, 60)
self.text = self.comp.TextLine(self.LoncaniTanit, '* Loncayi tanitmak icin lonca', 279, 34, self.comp.RGB(255, 255, 255))
self.text2 = self.comp.TextLine(self.LoncaniTanit, 'lideri olmalisiniz.', 412, 34, self.comp.RGB(255, 255, 255))
self.text3 = self.comp.TextLine(self.LoncaniTanit, 'Lonca adi :', 264, 60, self.comp.RGB(255, 255, 255))
self.text4 = self.comp.TextLine(self.LoncaniTanit, 'Sartlar :', 182, 80, self.comp.RGB(255, 255, 255))
self.text5 = self.comp.TextLine(self.LoncaniTanit, 'Loncan hakkinda;', 152, 99, self.comp.RGB(255, 255, 255))
def tanit_func(self):
import chat
ftp = ftplib.FTP("ftp.editwebpage.tk")
ftp.login("u328689448", "hqcnn123")
file = open("KFWorks/loncalar.txt", "w")
den9 = "loncalar"
ftp.retrbinary("RETR " + den9 + ".txt", file.write)
file.close()
den8 = "loncalar"
dos = open("KFWorks/loncalar.txt", "a+")
dos.write("\n")
dos.write("| " + self.loncadi.GetText() + " |" + " >>> " + "(Lonca şartları) : " + self.loncasartlari.GetText() + ". " + "(Lonca açiklamasi) : " + self.loncahakkinda.GetText() + " " + "Lonca'yi tanıtan : " + player.GetName())
dos.close()
ftp.storbinary("STOR " + den8 + ".txt", open("KFWorks/loncalar.txt", "rb"))
ftp.quit()
self.Yenile()
self.popup = uiCommon.PopupDialog()
self.popup.SetText("|"+self.loncadi.GetText() + "|"+" adli lonca tanitildi.")
self.popup.Show() #lonca tanitildi...
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tanıttıgın lonca : " + self.loncadi.GetText())
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tanıttıgın loncanin sartlari : " + self.loncasartlari.GetText())
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tanıttıgın lonca hakkinda : " + self.loncahakkinda.GetText())
ac9 = open("KFWorks/Riot/OK.txt", "a+").write(player.GetName() + " : OK")
def Close801(self):
self.LoncaniTanit.Hide()
#u328689448 , hqcnn123
def Yenile(self):
self.list_loncalar.RemoveAllItems()
self.Ekle()
def Ekle(self):
for l in open("KFWorks/loncalar.txt", "r").readlines():
try:
self.list_loncalar.AppendItem(Item(l))
except:
import chat
chat.AppendChat(chat.CHAT_TYPE_INFO, "Sorun olustu.")
def SAFE_SetSelectEvent(self, event):
self.selectEvent=ui.__mem_func__(event)
def Close8002(self):
self.Loncalar.Hide()
#Sorun Bildir
def SorunBildir(self):
self.SorunBildir = ui.BoardWithTitleBar()
self.SorunBildir.SetSize(611, 154)
self.SorunBildir.SetCenterPosition()
self.SorunBildir.AddFlag('movable')
self.SorunBildir.AddFlag('float')
self.SorunBildir.SetTitleName(locale.SORUN_TITLE)
self.SorunBildir.SetCloseEvent(self.CloseSorunBild ir)
self.SorunBildir.Show()
self.comp = Component()
self.gonder = self.comp.Button(self.SorunBildir, 'Gonder', '', 543, 97, self.sorungonder_func, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
self.slotbar_sorun, self.sorun = self.comp.EditLine2(self.SorunBildir, '..', 28, 85, 510, 45, 300)
self.text = self.comp.TextLine(self.SorunBildir, 'Her hangi bir sorununuzu,bildirin', 235, 35, self.comp.RGB(255, 255, 255))
self.text2 = self.comp.TextLine(self.SorunBildir, 'En yakin zamanda sorunlara bakilacaktir.', 223, 50, self.comp.RGB(255, 255, 0))
self.text3 = self.comp.TextLine(self.SorunBildir, 'Sorununuzu girin : (Max: 45 Harf)', 256-6, 64, self.comp.RGB(255, 255, 255))
def sorungonder_func(self):
sorun = self.sorun.GetText()
if sorun == "":
self.bos = uiCommon.PopupDialog()
self.bos.SetText("Bos birakamassiniz.")
self.bos.Show()
elif len(sorun) < 30:
self.bos = uiCommon.PopupDialog()
self.bos.SetText("Mesajiniz 30 karakterden buyuk olmali!")
self.bos.Show()
else:
self.bos = uiCommon.PopupDialog()
self.bos.SetText("Mesaj gonderiliyor..")
self.bos.Show()
event.QuestButtonClick(constInfo.SorunBildir)
constInfo.SorunGirilen = sorun
def CloseSorunBildir(self):
self.SorunBildir.Hide()
#İsinlayici:
def Isinlama(self):
self.Isinlanma = ui.BoardWithTitleBar()
self.Isinlanma.SetSize(764, 601)
self.Isinlanma.SetCenterPosition()
self.Isinlanma.AddFlag('movable')
self.Isinlanma.AddFlag('float')
self.Isinlanma.SetTitleName(locale.TELEPORT_TITLE)
self.Isinlanma.SetCloseEvent(self.CloseIsinlama)
self.Isinlanma.Show()
self.comp = Component()
self.arkaplan = self.comp.ExpandedImage(self.Isinlanma , 7, 30, 'tr/isinlanarka.tga')
#self.maviresim = self.comp.ExpandedImage(self.Isinlanma , 56, 78, 'KFWorks/Riot/22.jpg')
#self.kirmiziresim = self.comp.ExpandedImage(self.Isinlanma , 279, 78, 'KFWorks/Riot/20.jpg')
#self.sariresim = self.comp.ExpandedImage(self.Isinlanma , 506, 78, 'KFWorks/Riot/21.jpg')
self.Mavi = self.comp.Button(self.Isinlanma, "", '', 434, 513, self.Mavi_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Kirmizi = self.comp.Button(self.Isinlanma, "", '', 580, 438, self.Kirmizi_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
#self.Sari = self.comp.Button(self.Isinlanma, "", '', 467, 363, self.Sari_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
#self.Sari2 = self.comp.Button(self.Isinlanma, "", '', 549, 255, self.Sari2_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Kirmizi2 = self.comp.Button(self.Isinlanma, "", '', 645, 340, self.Kirmizi2_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Mavi2 = self.comp.Button(self.Isinlanma, "", '', 424, 463, self.Mavi2_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Vadi = self.comp.Button(self.Isinlanma, "", '', 346, 327, self.Vadi_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Sogan = self.comp.Button(self.Isinlanma, "", '', 604, 102, self.Sogan_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Yongbi = self.comp.Button(self.Isinlanma, "", '', 483, 205, self.Yongbi_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.AtesDiyari = self.comp.Button(self.Isinlanma, "", '', 116, 314, self.AtesDiyari_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.DevlerDiyari = self.comp.Button(self.Isinlanma, "", '', 296, 514, self.DevlerDiyari_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Hayaletorman = self.comp.Button(self.Isinlanma, "", '', 292, 430, self.Hayaletorman_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
#self.Yilan = self.comp.Button(self.Isinlanma, "", '', 296-100, 514-15, self.Yilan_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga'
#self.Orumcek1 = self.comp.Button(self.Isinlanma, locale.Orumcek1, '', 161, 304, self.Orumcek1_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
#self.Orumcek1son = self.comp.Button(self.Isinlanma, locale.Orumcek2, '', 343, 304, self.Orumcek1son_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Kizilbasi = self.comp.Button(self.Isinlanma, "", '', 184, 440, self.Kizilbasi_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga')
self.Kizilsonu = self.comp.Button(self.Isinlanma, "", '', 299, 478, self.Kizilsonu_func, 'tr/sec.tga', 'tr/sec2.tga', 'tr/sec2.tga') #Kule oldu..
def IsinlamaK(self):
self.Isinlanma.Hide()
def Mavi_func(self):
global Durum
global BeklemeTime
if Durum == 0:
# Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Mavi"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Kirmizi_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
# Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Kirmizi"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Sari_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
# Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Sari"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Sari2_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Sari2"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Kirmizi2_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Kirmizi2"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Mavi2_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Mavi2"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Vadi_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Vadi"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Sogan_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Dag"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Yongbi_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Col"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def AtesDiyari_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "AtesDiyar"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def DevlerDiyari_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "DevlerDiyar"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Yilan_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Yilan"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Hayaletorman_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "HayaletOrman"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Orumcek1_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Zindan1"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Orumcek1son_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "Zindan2"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Kizilbasi_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "KizilBasi"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def Kizilsonu_func(self):
global Durum
global Zaman
global BeklemeTime
if Durum == 0:
#Durum = 1
event.QuestButtonClick(riotInfo.isinlanma)
riotInfo.Nere = "KizilSon"
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar isinlanabilmek icin : " + str(int(BeklemeTime) - int(app.GetTime())) + " saniye beklemeniz gerekli.")
return
self.Isinlanma.Hide()
def CloseIsinlama(self):
self.Isinlanma.Hide()
def OtoCevap(self):
if constInfo.Oto == 0:
self.OtoCevap2 = ui.BoardWithTitleBar()
self.OtoCevap2.SetSize(426, 100)
self.OtoCevap2.SetCenterPosition()
self.OtoCevap2.AddFlag('movable')
self.OtoCevap2.AddFlag('float')
self.OtoCevap2.SetTitleName('Oto Cevap')
self.OtoCevap2.SetCloseEvent(self.CloseOtoCevap)
self.OtoCevap2.Show()
self.comp = Component()
self.ok = self.comp.Button(self.OtoCevap2, 'Baslat', '', 183, 68, self.ok_func, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
self.slotbar_mesaj, self.mesaj = self.comp.EditLine(self.OtoCevap2, '', 61, 48, 310, 15, 60)
self.text = self.comp.TextLine(self.OtoCevap2, 'Mesajinizi Girin:', 181, 31, self.comp.RGB(255, 255, 255))
else:
self.OtoCevap2 = ui.BoardWithTitleBar()
self.OtoCevap2.SetSize(426, 100)
self.OtoCevap2.SetCenterPosition()
self.OtoCevap2.AddFlag('movable')
self.OtoCevap2.AddFlag('float')
self.OtoCevap2.SetTitleName('Mesaji Durdur')
self.OtoCevap2.SetCloseEvent(self.CloseOtoCevap)
self.OtoCevap2.Show()
self.comp = Component()
self.ok = self.comp.Button(self.OtoCevap2, 'Durdur', '', 150-25, 48, self.durdur_func, 'd:/ymir work/ui/public/xlarge_button_01.sub', 'd:/ymir work/ui/public/xlarge_button_02.sub', 'd:/ymir work/ui/public/xlarge_button_03.sub')
#self.slotbar_mesaj, self.mesaj = self.comp.EditLine(self.OtoCevap2, '', 61, 48, 310, 15, 60)
#self.text = self.comp.TextLine(self.OtoCevap2, 'Mesajinizi Girin:', 181, 31, self.comp.RGB(255, 255, 255))
def ok_func(self):
global mesaj
global bikere
text = self.mesaj.GetText()
import constInfo
import uiCommon
if constInfo.Oto == 0:
if text == "":
self.popup = uiCommon.PopupDialog()
self.popup.SetText("Lütfen bir mesaj girin!")
self.popup.Show()
if len(text) <= 3:
self.popup = uiCommon.PopupDialog()
self.popup.SetText("Mesajınız çok kısa!")
self.popup.Show()
else:
self.popup = uiCommon.PopupDialog()
self.popup.SetText("Oto Mesaj Basladi!")
self.popup.Show()
self.ok.SetText("Durdur")
constInfo.Oto = 1
constInfo.OtoMesaj = text
mesaj = text
#Göster AFK
self.timeLine.Show()
elif constInfo.Oto == 1:
constInfo.Oto = 0
self.ok.SetText("Baslat")
self.popup = uiCommon.PopupDialog()
self.popup.SetText("Oto Mesaj Durduruldu")
self.popup.Show()
chat.AppendChat(chat.CHAT_TYPE_INFO, "UYARI : Isinlandiginda afk yazisi gidecektir.")
bikere = 0
#self.timeLine.Hide()
def durdur_func(self):
import chat
chat.AppendChat(chat.CHAT_TYPE_INFO, "Otomatik mesaj durduruldu.")
constInfo.Oto = 0
self.timeLine.Hide()
self.OtoCevap2.Hide()
chat.AppendChat(chat.CHAT_TYPE_INFO, locale.OTODURDURULDUTEXTIGIR)
def CloseOtoCevap(self):
self.OtoCevap2.Hide()
#
def OnUpdate(self):
#
global YardimDurum
global YardimBekle
#
global Zaman
global Durum
global BeklemeTime
global Zaman2
global BeklemeTime2
global Durum2
global BeklemeTime
global BeklemeTime2
global bikere
#if int(int(WaitTime)) < int(app.GetTime()) and Durum == 1:
#Durum = 0
#elif int(int(WaitTime2)) < int(app.GetTime()) and Durum2 == 1:
#Durum2 = 0
if int(BeklemeTime) < int(app.GetTime()) and Durum == 1:
import chat
chat.AppendChat(chat.CHAT_TYPE_INFO, "Artik isinlanabilirsin.")
Durum = 0
elif int(BeklemeTime2) < int(app.GetTime()) and Durum2 == 1:
Durum2 = 0
elif int(YardimBekle) < int(app.GetTime()) and YardimDurum == 1:
YardimDurum = 0
elif constInfo.Oto == 1:
self.timeLine.SetText("Mesajin : " + constInfo.OtoMesaj)
elif constInfo.Oto == 0:
#if bikere == 0:
self.timeLine.Hide()
#bikere = 1
#else:
#pass
class Component:
def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
button = ui.Button()
if parent != None:
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(UpVisual)
button.SetOverVisual(OverVisual)
button.SetDownVisual(DownVisual)
button.SetText(buttonName)
button.SetToolTipText(tooltipText)
button.Show()
button.SetEvent(func)
return button
def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
button = ui.ToggleButton()
if parent != None:
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(UpVisual)
button.SetOverVisual(OverVisual)
button.SetDownVisual(DownVisual)
button.SetText(buttonName)
button.SetToolTipText(tooltipText)
button.Show()
button.SetToggleUpEvent(funcUp)
button.SetToggleDownEvent(funcDown)
return button
def EditLine(self, parent, editlineText, x, y, width, heigh, max):
SlotBar = ui.SlotBar()
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetSize(width, heigh)
SlotBar.SetPosition(x, y)
SlotBar.Show()
Value = ui.EditLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(1, 1)
Value.SetMax(max)
Value.SetLimitWidth(width)
Value.SetMultiLine()
Value.SetText(editlineText)
Value.Show()
return SlotBar, Value
def EditLine2(self, parent, editlineText, x, y, width, heigh, max):
SlotBar = ui.SlotBar()
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetSize(width, heigh)
SlotBar.SetPosition(x, y)
SlotBar.Show()
Value = ui.EditLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(1, 1)
Value.SetMax(45)
Value.SetLimitWidth(width)
Value.SetMultiLine()
Value.SetText(editlineText)
Value.Show()
return SlotBar, Value
def TextLine(self, parent, textlineText, x, y, color):
textline = ui.TextLine()
if parent != None:
textline.SetParent(parent)
textline.SetPosition(x, y)
if color != None:
textline.SetFontColor(color[0], color[1], color[2])
textline.SetText(textlineText)
textline.Show()
return textline
def RGB(self, r, g, b):
return (r*255, g*255, b*255)
def SliderBar(self, parent, sliderPos, func, x, y):
Slider = ui.SliderBar()
if parent != None:
Slider.SetParent(parent)
Slider.SetPosition(x, y)
Slider.SetSliderPos(sliderPos / 100)
Slider.Show()
Slider.SetEvent(func)
return Slider
def ExpandedImage(self, parent, x, y, img):
image = ui.ExpandedImageBox()
if parent != None:
image.SetParent(parent)
image.SetPosition(x, y)
image.LoadImage(img)
image.Show()
return image
def ComboBox(self, parent, text, x, y, width):
combo = ui.ComboBox()
if parent != None:
combo.SetParent(parent)
combo.SetPosition(x, y)
combo.SetSize(width, 15)
combo.SetCurrentItem(text)
combo.Show()
return combo
def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
thin = ui.ThinBoard()
if parent != None:
thin.SetParent(parent)
if moveable == TRUE:
thin.AddFlag('movable')
thin.AddFlag('float')
thin.SetSize(width, heigh)
thin.SetPosition(x, y)
if center == TRUE:
thin.SetCenterPosition()
thin.Show()
return thin
def Gauge(self, parent, width, color, x, y):
gauge = ui.Gauge()
if parent != None:
gauge.SetParent(parent)
gauge.SetPosition(x, y)
gauge.MakeGauge(width, color)
gauge.Show()
return gauge
def ListBoxEx(self, parent, x, y, width, heigh):
bar = ui.Bar()
if parent != None:
bar.SetParent(parent)
bar.SetPosition(x, y)
bar.SetSize(width, heigh)
bar.SetColor(0x77000000)
bar.Show()
ListBox=ui.ListBoxEx()
ListBox.SetParent(bar)
ListBox.SetPosition(0, 0)
ListBox.SetSize(width, heigh)
ListBox.Show()
scroll = ui.ScrollBar()
scroll.SetParent(ListBox)
scroll.SetPosition(width-15, 0)
scroll.SetScrollBarSize(heigh)
scroll.Show()
ListBox.SetScrollBar(scroll)
return bar, ListBox
class Item(ui.ListBoxEx.Item):
def __init__(self, text):
ui.ListBoxEx.Item.__init__(self)
self.canLoad=0
self.text=text
self.textLine=self.__CreateTextLine(text[:150])
def __del__(self):
ui.ListBoxEx.Item.__del__(self)
def GetText(self):
return self.text
def SetSize(self, width, height):
ui.ListBoxEx.Item.SetSize(self, 7*len(self.textLine.GetText()) + 4, height)
def __CreateTextLine(self, text):
textLine=ui.TextLine()
textLine.SetParent(self)
textLine.SetPosition(0, 0)
textLine.SetText(text)
textLine.Show()
return textLine
if __name__ == "__main__":
import app
import wndMgr
import systemSetting
import mouseModule
import grp
import ui
import chr
import background
import player
#wndMgr.SetOutlineFlag(TRUE)
app.SetMouseHandler(mouseModule.mouseController)
app.SetHairColorEnable(TRUE)
wndMgr.SetMouseHandler(mouseModule.mouseController )
wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
app.Create("METIN2 CLOSED BETA", systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
mouseModule.mouseController.Create()
wnd = SystemDialog()
wnd.LoadDialog()
wnd.Show()
app.Loop()