FrKskn Blog
code
Run codeye
Yapıştırılacak Kod :
Yapıştırılacak Kod :
import chat
import ui
import app
import item
import player
import grp
CreateBonus0 = 0
CreateBonus1 = 0
CreateBonus2 = 0
CreateBonus3 = 0
CreateBonus4 = 0
CreateWhish0 = 0
CreateWhish1 = 0
CreateWhish2 = 0
CreateWhish3 = 0
CreateWhish4 = 0
ItemValue =299
ItemValue =289
ItemValue =279
ItemValue =239
ItemValue =229
ItemValue =149
ItemValue =139
ItemValue =129
ItemValue =119
ItemValue =109
ItemValue =109
ItemValue =109
ItemValue =69
ItemValue =49
ItemValue =39
ItemValue =29
ItemValue =19
ItemValue =11971
ItemValue =11971
ItemValue =11971
ItemValue =11971
ItemValue =11270
ItemValue =11260
ItemValue =11250
ItemValue =11240
ItemValue =11230
ItemValue =11220
ItemValue =11210
ItemValue =11200
ItemValue =3199
ItemValue =3189
ItemValue =3179
ItemValue =3169
ItemValue =3159
ItemValue =3149
ItemValue =3139
ItemValue =3129
ItemValue =3119
ItemValue =3109
ItemValue =3099
ItemValue =3089
ItemValue =3079
ItemValue =3069
ItemValue =3059
ItemValue =3049
ItemValue =3039
ItemValue =3009
ItemValue =12249
ItemValue =12229
ItemValue =12209
ItemValue =1139
ItemValue =1129
ItemValue =1119
ItemValue =1109
ItemValue =1099
ItemValue =1089
ItemValue =1079
ItemValue =1069
ItemValue =1059
ItemValue =1049
ItemValue =1039
ItemValue =4029
ItemValue =1029
ItemValue =4019
ItemValue =1019
ItemValue =4009
ItemValue =1009
ItemValue =2169
ItemValue =2139
ItemValue =2159
ItemValue =2149
ItemValue =2139
ItemValue =2129
ItemValue =2109
ItemValue =2099
ItemValue =2089
ItemValue =2079
ItemValue =2069
ItemValue =2059
ItemValue =2049
ItemValue =2039
ItemValue =2029
ItemValue =2019
ItemValue =2009
ItemValue =12389
ItemValue =12369
ItemValue =12349
ItemValue =11972
ItemValue =11490
ItemValue =11480
ItemValue =11470
ItemValue =11460
ItemValue =11450
ItemValue =11440
ItemValue =11430
ItemValue =11420
ItemValue =11410
ItemValue =11400
ItemValue =12489
ItemValue =12509
ItemValue =12529
ItemValue =11973
ItemValue =11699
ItemValue =11689
ItemValue =11679
ItemValue =11669
ItemValue =11659
ItemValue =11649
ItemValue =11639
ItemValue =11629
ItemValue =11619
ItemValue =11609
ItemValue =5129
ItemValue =5119
ItemValue =5109
ItemValue =5099
ItemValue =5089
ItemValue =5079
ItemValue =5069
ItemValue =5059
ItemValue =5049
ItemValue =5039
ItemValue =5029
ItemValue =5019
ItemValue =5009
ItemValue =7199
ItemValue =7159
ItemValue =7149
ItemValue =7139
ItemValue =7129
ItemValue =7119
ItemValue =7099
ItemValue =7089
ItemValue =7079
ItemValue =7069
ItemValue =7059
ItemValue =7049
ItemValue =7039
ItemValue =7029
ItemValue =7019
ItemValue =7009
ItemValue =11974
ItemValue =11899
ItemValue =11889
ItemValue =11879
ItemValue =11869
ItemValue =11859
ItemValue =11849
ItemValue =11839
ItemValue =11829
ItemValue =11819
ItemValue =11809
ItemValue =13129
ItemValue =13109
ItemValue =13089
ItemValue =13069
ItemValue =13049
ItemValue =13029
ItemValue =13009
ItemValue =28543
ItemValue =28542
ItemValue =28541
ItemValue =28537
ItemValue =28536
ItemValue =28535
ItemValue =28534
ItemValue =28533
ItemValue =28531
ItemValue =50401
ItemValue =50402
ItemValue =50403
ItemValue =50404
ItemValue =50405
ItemValue =50416
ItemValue =50417
ItemValue =50418
ItemValue =50419
ItemValue =50420
ItemValue =50431
ItemValue =50432
ItemValue =50433
ItemValue =50434
ItemValue =50435
ItemValue =50446
ItemValue =50447
ItemValue =50448
ItemValue =50449
ItemValue =50450
ItemValue =50461
ItemValue =50462
ItemValue =50463
ItemValue =50464
ItemValue =50466
ItemValue =50465
ItemValue =50476
ItemValue =50477
ItemValue =50479
ItemValue =50478
ItemValue =50480
ItemValue =50481
ItemValue =50491
ItemValue =50492
ItemValue =50493
ItemValue =50494
ItemValue =50495
ItemValue =50496
ItemValue =50506
ItemValue =50507
ItemValue =50508
ItemValue =50509
ItemValue =50511
ItemValue =50510
ItemValue =71095
ItemValue =71003
ItemValue =71002
ItemValue =70038
ItemValue =27989
ItemValue =71033
ItemValue =71084
ItemValue =72001
ItemValue =71053
ItemValue =50053
ItemValue =50056
ItemValue =71048
ItemValue =71050
ItemValue =71008
ItemValue =25041
ItemValue =27993
ItemValue =27994
ItemValue =27992
ItemValue =11901
ItemValue =11903
ItemValue =27988
ItemValue =27991
ItemValue =27995
ItemValue =27996
ItemValue =27997
ItemValue =30185
ItemValue =30186
ItemValue =30187
ItemValue =30188
ItemValue =30189
ItemValue =30190
ItemValue =30191
ItemValue =30192
ItemValue =30193
ItemValue =30194
ItemValue =30195
ItemValue =30196
ItemValue =30197
ItemValue =30198
ItemValue =30199
ItemValue =30225
ItemValue =30228
ItemValue =30252
ItemValue =30253
ItemValue =50001
ItemValue =50002
ItemValue =50003
ItemValue =50004
ItemValue =50010
ItemValue =50011
ItemValue =50016
ItemValue =50017
ItemValue =50018
ItemValue =50019
ItemValue =50020
ItemValue =50021
ItemValue =50022
ItemValue =50023
ItemValue =50024
ItemValue =50025
ItemValue =50027
ItemValue =50031
ItemValue =50032
ItemValue =50033
ItemValue =50034
ItemValue =50035
ItemValue =50036
ItemValue =50084
ItemValue =50037
ItemValue =50096
ItemValue =50108
ItemValue =50120
ItemValue =50121
ItemValue =50122
ItemValue =50124
ItemValue =50125
ItemValue =50126
ItemValue =70031
ItemValue =70104
ItemValue =70105
ItemValue =70106
ItemValue =70107
ItemValue =71107
ItemValue =71110
ItemValue =71113
ItemValue =71114
ItemValue =71115
ItemValue =71116
ItemValue =71117
ItemValue =71118
ItemValue =71119
ItemValue =71120
ItemValue =71121
ItemValue =71123
ItemValue =71124
ItemValue =71125
ItemValue =71126
ItemValue =71127
ItemValue =71128
ItemValue =71129
ItemValue =80001
ItemValue =80008
ItemValue =90002
ItemValue =90003
ItemValue =90005
ItemValue =90010
ItemValue =90011
ItemValue =90012
ItemValue =12289
ItemValue =12399
ItemValue =12409
ItemValue =12539
ItemValue =12549
ItemValue =12679
ItemValue =12689
ItemValue =15379
ItemValue =15399
ItemValue =15419
ItemValue =15439
ItemValue =17009
ItemValue =17029
ItemValue =17049
ItemValue =17069
ItemValue =17089
ItemValue =17109
ItemValue =17129
ItemValue =17149
ItemValue =17169
ItemValue =17189
ItemValue =17209
ItemValue =14009
ItemValue =14029
ItemValue =14049
ItemValue =14069
ItemValue =14089
ItemValue =14109
ItemValue =14129
ItemValue =14149
ItemValue =14169
ItemValue =14189
ItemValue =14209
ItemValue =15009
ItemValue =15029
ItemValue =15049
ItemValue =15069
ItemValue =15089
ItemValue =15109
ItemValue =15129
ItemValue =15169
ItemValue =15149
ItemValue =15189
ItemValue =15209
ItemValue =15229
ItemValue =16009
ItemValue =16029
ItemValue =16049
ItemValue =16069
ItemValue =16089
ItemValue =16109
ItemValue =16129
ItemValue =16149
ItemValue =16169
ItemValue =1689
ItemValue =16209
ItemValue =8099
ItemValue =7239
ItemValue =7229
ItemValue =14229
ItemValue =15269
ItemValue =91009
ItemValue =92009
ItemValue =113129
ItemValue =116209
ItemValue =117209
BonusListe = (
"",
"Max. HP",
"Max. SP",
"Canlılık",
"Zeka",
"Güç",
"Saldırı Değeri",
"Saldırı Hızı",
"Hareket Hızı",
"Büyü Hızı",
"Hasar, HP ile absorbe edile..",
"Hasar, SP ile absorbe edile..",
"Zehirlenme Değişimi",
"Sersemletme Şansı",
"Yavaşlatma Şansı",
"Kritik Vuruş Şansı",
"Delici Vuruş Şansı",
"Yarı insanlara karşı güçlü",
"Hayvanlara karşı güçlü",
"Orklara karşı güçlü",
"Mistiklere karşı güçlü",
"Ölümsüzlere karşı güçlü",
"Şeytanlara karşı güçlü",
"HP Üretimi",
"SP Üretimi",
"Düşmanın Sp’sini Çalma Şa..",
"Vuruş Yapıldığında Sp’yi G..",
"Beden karşısındaki atakla..",
"Oklara Karşı Savunma",
"Kılıç Savunması",
"Çift El Savunması",
"Bıçak Savunması",
"Çan Savunması",
"Yelpaze Savunması",
"Oklara karşı dayanıklık",
"Ateşe karşı dayanıklık",
"Şimşeğe karşı dayanıklık",
"Büyüye karşı dayanıklık",
"Rüzgar dayanıklılığı",
"Vücut darbelerini yansıtma..",
"Lanet yansıtılması",
"Sersemlik karşısında bağış..",
"Yere düşme karşısında bağ..",
"Max. Dayanıklılık",
"Savaşçılara Karşı Savunm..",
"Ninjalara Karşı Savunma Ş..",
"Suralara Karşı Savunma Ş..",
"Şamanlara Karşı Savunm..",
"Canavarlara Karşı Güçlü",
"Beceri Hasarı",
"Ortalama Zarar",
"Beceri hasarına karşı direnç",
"Ortalama hasara karşı direnç",
"Savaşçı karşı güçlü",
"Ninjalara karşı güçlü",
"Suralara karşı güçlü",
"Şamanlara karşı güçlü",
)
BonusIDListe = {
"" : 0,
"Max. HP" : 1,
"Max. SP" : 2,
"Canlılık" : 3,
"Zeka" : 4,
"Güç" : 5,
"Saldırı değeri" : 6,
"Saldırı Hızı" : 7,
"Hareket Hızı" : 8,
"Büyü Hızı" : 9,
"Hasar, HP ile absorbe edilecek" : 10,
"Hasar, SP ile absorbe edilecek" : 11,
"Zehirlenme Değişimi" : 12,
"Sersemletme Şansı" : 13,
"Yavaşlatma Şansı" : 14,
"Kritik Vuruş Şansı" : 15,
"Delici Vuruş Şansı" : 16,
"Yarı insanlara karşı güçlü" : 17,
"Hayvanlara karşı güçlü" : 18,
"Orklara karşı güçlü" : 19,
"Mistiklere karşı güçlü" : 20,
"Ölümsüzlere karşı güçlü" : 21,
"Şeytanlara karşı güçlü" : 22,
"HP Üretimi" : 23,
"SP Üretimi" : 24,
"Düşmanın Sp’sini Çalma Şansı" : 25,
"Vuruş Yapıldığında Sp’yi Geri Kazanma Şansı" : 26,
"Beden karşısındaki atakların bloklanması" : 27,
"Oklara Karşı Savunma" : 28,
"Kılıç Savunması" : 29,
"Çift El Savunması" : 30,
"Bıçak Savunması" : 31,
"Çan Savunması" : 32,
"Yelpaze Savunması" : 33,
"Oklara karşı dayanıklık" : 34,
"Ateşe karşı dayanıklık" : 35,
"Şimşeğe karşı dayanıklık" : 36,
"Büyüye karşı dayanıklık" : 37,
"Rüzgar dayanıklılığı" : 38,
"Vücut darbelerini yansıtma şansı" : 39,
"Lanet yansıtılması" : 40,
"Sersemlik karşısında bağışıklık" : 48,
"Yere düşme karşısında bağışıklık" : 50,
"Max. Dayanıklılık" : 58,
"Savaşçılara Karşı Savunma Şansı" : 59,
"Ninjalara Karşı Savunma Şansı" : 60,
"Suralara Karşı Savunma Şansı" : 61,
"Şamanlara Karşı Savunma Şansı" : 62,
"Canavarlara Karşı Güçlü" : 63,
"Beceri Hasarı" : 71,
"Ortalama Zarar" : 72,
"Beceri hasarına karşı direnç" : 73,
"Ortalama hasara karşı direnç" : 74,
"Savaşçı karşı güçlü" : 78,
"Ninjalara karşı güçlü" : 79,
"Suralara karşı güçlü" : 80,
"Şamanlara karşı güçlü" : 81,
}
class CreateItemDialog(ui.Window):
ENABLE_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0)
DISABLE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0)
def __init__(self):
ui.Window.__init__(self)
self.Board = ui.BoardWithTitleBar()
self.Board.SetSize(350, 355)
self.Board.SetCenterPosition()
self.Board.AddFlag("movable")
self.Board.AddFlag("float")
self.Board.SetTitleName("LeaningF Hile Deposu")
self.Board.SetCloseEvent(self.Close)
self.Board.Show()
self.MetinStone1 = 28930
self.MetinStone2 = 28940
self.MetinStone3 = 0
self.AddTextLines()
self.AddImages()
self.AddSlotBars()
def __del__(self):
ui.Window.__del__(self)
def AddSlotBars(self):
return
def AddImages(self):
global ItemValue
item.SelectItem(int(ItemValue))
ItemIcon = item.GetIconImageFileName()
self.ItemImage = ui.ExpandedImageBox()
self.ItemImage.SetParent(self.Board)
self.ItemImage.SetPosition(17, 65 + 15)
self.ItemImage.LoadImage(str(ItemIcon))
self.ItemImage.Show()
self.ItemNameText = ui.TextLine()
self.ItemNameText.SetParent(self.Board)
self.ItemNameText.SetDefaultFontName()
self.ItemNameText.SetPosition(15, 55)
self.ItemNameText.SetFeather()
self.ItemNameText.SetText(str(item.GetItemName()))
for i in xrange(0,1):
(ItemTypeLimit, ItemLevelLimit) = item.GetLimit(i)
if item.LIMIT_LEVEL == ItemTypeLimit:
if player.GetStatus(player.LEVEL) < ItemLevelLimit:
self.ItemNameText.SetPackedFontColor(self.DISABLE_COLOR)
else:
self.ItemNameText.SetPackedFontColor(self.ENABLE_COLOR)
self.ItemNameText.SetOutline()
self.ItemNameText.Show()
self.Metin1Image = ui.ExpandedImageBox()
self.Metin1Image.SetParent(self.Board)
self.Metin1Image.SetPosition(65, 65 + 15)
if int(self.MetinStone1) != 0:
item.SelectItem(int(self.MetinStone1))
ItemIcon = item.GetIconImageFileName()
self.Metin1Image.LoadImage(str(ItemIcon))
self.Metin1Image.Show()
self.Metin1Text = ui.TextLine()
self.Metin1Text.SetParent(self.Board)
self.Metin1Text.SetDefaultFontName()
self.Metin1Text.SetPosition(105, 65 + 23)
self.Metin1Text.SetFeather()
if int(self.MetinStone1) != 0:
self.Metin1Text.SetText(str(item.GetItemName()))
else:
self.Metin1Text.SetText("Burada taş yok!")
self.Metin1Text.SetFontColor(1.0, 1.0, 1.0)
self.Metin1Text.SetOutline()
self.Metin1Text.Show()
self.Metin1SlotBar = ui.SlotBar()
self.Metin1SlotBar.SetParent(self.Board)
self.Metin1SlotBar.SetSize(5*7, 14)
self.Metin1SlotBar.SetPosition(240, 65 + 23)
self.Metin1SlotBar.Show()
self.Metin1EditLine = ui.EditLine()
self.Metin1EditLine.SetParent(self.Metin1SlotBar)
self.Metin1EditLine.SetSize(5*7, 18)
self.Metin1EditLine.SetPosition(6, 0)
self.Metin1EditLine.SetMax(5)
self.Metin1EditLine.SetNumberMode()
self.Metin1EditLine.SetText(str(self.MetinStone1))
self.Metin1EditLine.SetFocus()
self.Metin1EditLine.Show()
self.Metin1Button = ui.Button()
self.Metin1Button.SetParent(self.Board)
self.Metin1Button.SetUpVisual("d:/ymir work/ui/public/small_Button_01.sub")
self.Metin1Button.SetOverVisual("d:/ymir work/ui/public/small_Button_02.sub")
self.Metin1Button.SetDownVisual("d:/ymir work/ui/public/small_Button_03.sub")
self.Metin1Button.SetText("Tamam")
self.Metin1Button.SetEvent(ui.__mem_func__(self.SetMetin1))
self.Metin1Button.SetPosition(285, 65 + 20)
self.Metin1Button.Show()
self.Metin2Image = ui.ExpandedImageBox()
self.Metin2Image.SetParent(self.Board)
self.Metin2Image.SetPosition(65, 100 + 15)
if int(self.MetinStone2) != 0:
item.SelectItem(int(self.MetinStone2))
ItemIcon = item.GetIconImageFileName()
self.Metin2Image.LoadImage(str(ItemIcon))
self.Metin2Image.Show()
self.Metin2Text = ui.TextLine()
self.Metin2Text.SetParent(self.Board)
self.Metin2Text.SetDefaultFontName()
self.Metin2Text.SetPosition(105, 100 + 23)
self.Metin2Text.SetFeather()
if int(self.MetinStone2) != 0:
self.Metin2Text.SetText(str(item.GetItemName()))
else:
self.Metin2Text.SetText("Burada taş yok!")
self.Metin2Text.SetFontColor(1.0, 1.0, 1.0)
self.Metin2Text.SetOutline()
self.Metin2Text.Show()
self.Metin2SlotBar = ui.SlotBar()
self.Metin2SlotBar.SetParent(self.Board)
self.Metin2SlotBar.SetSize(5*7, 14)
self.Metin2SlotBar.SetPosition(240, 100 + 23)
self.Metin2SlotBar.Show()
self.Metin2EditLine = ui.EditLine()
self.Metin2EditLine.SetParent(self.Metin2SlotBar)
self.Metin2EditLine.SetSize(5*7, 18)
self.Metin2EditLine.SetPosition(6, 0)
self.Metin2EditLine.SetMax(5)
self.Metin2EditLine.SetNumberMode()
self.Metin2EditLine.SetText(str(self.MetinStone2))
self.Metin2EditLine.SetFocus()
self.Metin2EditLine.Show()
self.Metin2Button = ui.Button()
self.Metin2Button.SetParent(self.Board)
self.Metin2Button.SetUpVisual("d:/ymir work/ui/public/small_Button_01.sub")
self.Metin2Button.SetOverVisual("d:/ymir work/ui/public/small_Button_02.sub")
self.Metin2Button.SetDownVisual("d:/ymir work/ui/public/small_Button_03.sub")
self.Metin2Button.SetText("Tamam")
self.Metin2Button.SetEvent(ui.__mem_func__(self.SetMetin2))
self.Metin2Button.SetPosition(285, 100 + 20)
self.Metin2Button.Show()
self.Metin3Image = ui.ExpandedImageBox()
self.Metin3Image.SetParent(self.Board)
self.Metin3Image.SetPosition(65, 135 + 15)
if int(self.MetinStone3) != 0:
item.SelectItem(int(self.MetinStone3))
ItemIcon = item.GetIconImageFileName()
self.Metin3Image.LoadImage(str(ItemIcon))
self.Metin3Image.Show()
self.Metin3Text = ui.TextLine()
self.Metin3Text.SetParent(self.Board)
self.Metin3Text.SetDefaultFontName()
self.Metin3Text.SetPosition(105, 135 + 23)
self.Metin3Text.SetFeather()
if int(self.MetinStone3) != 0:
self.Metin3Text.SetText(str(item.GetItemName()))
else:
self.Metin3Text.SetText("Burada taş yok!")
self.Metin3Text.SetFontColor(1.0, 1.0, 1.0)
self.Metin3Text.SetOutline()
self.Metin3Text.Show()
self.Metin3SlotBar = ui.SlotBar()
self.Metin3SlotBar.SetParent(self.Board)
self.Metin3SlotBar.SetSize(5*7, 14)
self.Metin3SlotBar.SetPosition(240, 135 + 23)
self.Metin3SlotBar.Show()
self.Metin3EditLine = ui.EditLine()
self.Metin3EditLine.SetParent(self.Metin3SlotBar)
self.Metin3EditLine.SetSize(5*7, 18)
self.Metin3EditLine.SetPosition(6, 0)
self.Metin3EditLine.SetMax(5)
self.Metin3EditLine.SetNumberMode()
self.Metin3EditLine.SetText(str(self.MetinStone3))
self.Metin3EditLine.SetFocus()
self.Metin3EditLine.Show()
self.Metin3Button = ui.Button()
self.Metin3Button.SetParent(self.Board)
self.Metin3Button.SetUpVisual("d:/ymir work/ui/public/small_Button_01.sub")
self.Metin3Button.SetOverVisual("d:/ymir work/ui/public/small_Button_02.sub")
self.Metin3Button.SetDownVisual("d:/ymir work/ui/public/small_Button_03.sub")
self.Metin3Button.SetText("Tamam")
self.Metin3Button.SetEvent(ui.__mem_func__(self.SetMetin3))
self.Metin3Button.SetPosition(285, 135 + 20)
self.Metin3Button.Show()
def SetMetin1(self):
self.MetinStone1 = int(self.Metin1EditLine.GetText())
item.SelectItem(int(self.MetinStone1))
ItemIcon = item.GetIconImageFileName()
self.Metin1Image.LoadImage(str(ItemIcon))
if int(self.MetinStone1) != 0:
self.Metin1Text.SetText(str(item.GetItemName()))
else:
self.Metin1Text.SetText("Burada taş yok!")
def SetMetin2(self):
self.MetinStone2 = int(self.Metin2EditLine.GetText())
item.SelectItem(int(self.MetinStone2))
ItemIcon = item.GetIconImageFileName()
self.Metin2Image.LoadImage(str(ItemIcon))
if int(self.MetinStone2) != 0:
self.Metin2Text.SetText(str(item.GetItemName()))
else:
self.Metin2Text.SetText("Burada taş yok!")
def SetMetin3(self):
self.MetinStone3 = int(self.Metin3EditLine.GetText())
item.SelectItem(int(self.MetinStone3))
ItemIcon = item.GetIconImageFileName()
self.Metin3Image.LoadImage(str(ItemIcon))
if int(self.MetinStone2) != 0:
self.Metin3Text.SetText(str(item.GetItemName()))
else:
self.Metin3Text.SetText("Burada taş yok!")
def SetItemValue(self):
global ItemValue
ItemValue = int(self.ItemValueEditLine.GetText())
item.SelectItem(int(ItemValue))
ItemIcon = item.GetIconImageFileName()
self.ItemImage.LoadImage(str(ItemIcon))
self.ItemNameText.SetText(str(item.GetItemName()))
for i in xrange(0,1):
(ItemTypeLimit, ItemLevelLimit) = item.GetLimit(i)
if item.LIMIT_LEVEL == ItemTypeLimit:
if player.GetStatus(player.LEVEL) < ItemLevelLimit:
self.ItemNameText.SetPackedFontColor(self.DISABLE_COLOR)
else:
self.ItemNameText.SetPackedFontColor(self.ENABLE_COLOR)
def AddTextLines(self):
self.CreateItemButton = ui.Button()
self.CreateItemButton.SetParent(self.Board)
self.CreateItemButton.SetUpVisual("d:/ymir work/ui/public/xlarge_Button_01.sub")
self.CreateItemButton.SetOverVisual("d:/ymir work/ui/public/xlarge_Button_02.sub")
self.CreateItemButton.SetDownVisual("d:/ymir work/ui/public/xlarge_Button_03.sub")
self.CreateItemButton.SetText("Editi Oluştur")
self.CreateItemButton.SetEvent(ui.__mem_func__(self.CreateItem))
self.CreateItemButton.SetPosition(80, 318)
self.CreateItemButton.Show()
self.ItemValueText = ui.TextLine()
self.ItemValueText.SetParent(self.Board)
self.ItemValueText.SetDefaultFontName()
self.ItemValueText.SetPosition(15, 35)
self.ItemValueText.SetFeather()
self.ItemValueText.SetText("Eşya Kodu:")
self.ItemValueText.SetFontColor(1.0, 1.0, 1.0)
self.ItemValueText.SetOutline()
self.ItemValueText.Show()
self.ItemValueSlotBar = ui.SlotBar()
self.ItemValueSlotBar.SetParent(self.Board)
self.ItemValueSlotBar.SetSize(5*7, 14)
self.ItemValueSlotBar.SetPosition(70, 35)
self.ItemValueSlotBar.Show()
self.ItemValueEditLine = ui.EditLine()
self.ItemValueEditLine.SetParent(self.ItemValueSlotBar)
self.ItemValueEditLine.SetSize(5*7, 18)
self.ItemValueEditLine.SetPosition(6, 0)
self.ItemValueEditLine.SetMax(5)
self.ItemValueEditLine.SetNumberMode()
self.ItemValueEditLine.SetText("19")
self.ItemValueEditLine.SetFocus()
self.ItemValueEditLine.Show()
self.SetItemValueButton = ui.Button()
self.SetItemValueButton.SetParent(self.Board)
self.SetItemValueButton.SetUpVisual("d:/ymir work/ui/public/small_Button_01.sub")
self.SetItemValueButton.SetOverVisual("d:/ymir work/ui/public/small_Button_02.sub")
self.SetItemValueButton.SetDownVisual("d:/ymir work/ui/public/small_Button_03.sub")
self.SetItemValueButton.SetText("Tamam")
self.SetItemValueButton.SetPosition(110, 33)
self.SetItemValueButton.SetEvent(ui.__mem_func__(self.SetItemValue))
self.SetItemValueButton.Show()
self.CallItemListButton = ui.Button()
self.CallItemListButton.SetParent(self.Board)
self.CallItemListButton.SetUpVisual("d:/ymir work/ui/public/middle_Button_01.sub")
self.CallItemListButton.SetOverVisual("d:/ymir work/ui/public/middle_Button_02.sub")
self.CallItemListButton.SetDownVisual("d:/ymir work/ui/public/middle_Button_03.sub")
self.CallItemListButton.SetText("LeaningF")
self.CallItemListButton.SetPosition(155, 33)
self.CallItemListButton.SetEvent(ui.__mem_func__(self.CallItemList))
self.CallItemListButton.Show()
self.ItemCountText = ui.TextLine()
self.ItemCountText.SetParent(self.Board)
self.ItemCountText.SetDefaultFontName()
self.ItemCountText.SetPosition(15, 55 + 120 + 15)
self.ItemCountText.SetFeather()
self.ItemCountText.SetText("By Yapımcı : LeaningF Youtubeden Takip Etmeyi Unutmayınız")
self.ItemCountText.SetFontColor(1.0, 1.0, 1.0)
self.ItemCountText.SetOutline()
self.ItemCountText.Show()
self.ItemCountEditLine = ui.EditLine()
self.ItemCountEditLine.SetParent(self.Board)
self.ItemCountEditLine.SetSize(3*7, 18)
self.ItemCountEditLine.SetPosition(15 + 55, 55 + 120 + 15)
self.ItemCountEditLine.SetMax(3)
self.ItemCountEditLine.SetNumberMode()
self.ItemCountEditLine.SetText("1")
self.ItemCountEditLine.Show()
self.Bonus1Text = ui.TextLine()
self.Bonus1Text.SetParent(self.Board)
self.Bonus1Text.SetDefaultFontName()
self.Bonus1Text.SetPosition(15, 85 + 120 + 15)
self.Bonus1Text.SetFeather()
self.Bonus1Text.SetText("Efsun 1:")
self.Bonus1Text.SetFontColor(1.0, 1.0, 1.0)
self.Bonus1Text.SetOutline()
self.Bonus1Text.Show()
self.Bonus1AtrText = ui.TextLine()
self.Bonus1AtrText.SetParent(self.Board)
self.Bonus1AtrText.SetDefaultFontName()
self.Bonus1AtrText.SetPosition(65, 85 + 120 + 15)
self.Bonus1AtrText.SetFeather()
self.Bonus1AtrText.SetText("-")
self.Bonus1AtrText.SetFontColor(1.0, 1.0, 1.0)
self.Bonus1AtrText.SetOutline()
self.Bonus1AtrText.Show()
self.Bonus1ValueEditLine = ui.EditLine()
self.Bonus1ValueEditLine.SetParent(self.Board)
self.Bonus1ValueEditLine.SetSize(29, 18)
self.Bonus1ValueEditLine.SetPosition(240 - 29, 85 + 120 + 15)
self.Bonus1ValueEditLine.SetMax(4)
self.Bonus1ValueEditLine.SetNumberMode()
self.Bonus1ValueEditLine.SetText("0")
self.Bonus1ValueEditLine.Show()
self.Bonus1Button = ui.Button()
self.Bonus1Button.SetParent(self.Board)
self.Bonus1Button.SetUpVisual("d:/ymir work/ui/public/large_Button_01.sub")
self.Bonus1Button.SetOverVisual("d:/ymir work/ui/public/large_Button_02.sub")
self.Bonus1Button.SetDownVisual("d:/ymir work/ui/public/large_Button_03.sub")
self.Bonus1Button.SetText("Efsunları Ayarla")
self.Bonus1Button.SetPosition(240, 85 + 120 + 10)
self.Bonus1Button.Show()
self.Bonus2Text = ui.TextLine()
self.Bonus2Text.SetParent(self.Board)
self.Bonus2Text.SetDefaultFontName()
self.Bonus2Text.SetPosition(15, 105 + 120 + 15)
self.Bonus2Text.SetFeather()
self.Bonus2Text.SetText("Efsun 2:")
self.Bonus2Text.SetFontColor(1.0, 1.0, 1.0)
self.Bonus2Text.SetOutline()
self.Bonus2Text.Show()
self.Bonus2AtrText = ui.TextLine()
self.Bonus2AtrText.SetParent(self.Board)
self.Bonus2AtrText.SetDefaultFontName()
self.Bonus2AtrText.SetPosition(65, 105 + 120 + 15)
self.Bonus2AtrText.SetFeather()
self.Bonus2AtrText.SetText("-")
self.Bonus2AtrText.SetFontColor(1.0, 1.0, 1.0)
self.Bonus2AtrText.SetOutline()
self.Bonus2AtrText.Show()
self.Bonus2ValueEditLine = ui.EditLine()
self.Bonus2ValueEditLine.SetParent(self.Board)
self.Bonus2ValueEditLine.SetSize(29, 18)
self.Bonus2ValueEditLine.SetPosition(240 - 29, 105 + 120 + 15)
self.Bonus2ValueEditLine.SetMax(4)
self.Bonus2ValueEditLine.SetNumberMode()
self.Bonus2ValueEditLine.SetText("0")
self.Bonus2ValueEditLine.Show()
self.Bonus2Button = ui.Button()
self.Bonus2Button.SetParent(self.Board)
self.Bonus2Button.SetUpVisual("d:/ymir work/ui/public/large_Button_01.sub")
self.Bonus2Button.SetOverVisual("d:/ymir work/ui/public/large_Button_02.sub")
self.Bonus2Button.SetDownVisual("d:/ymir work/ui/public/large_Button_03.sub")
self.Bonus2Button.SetText("Efsunları Ayarla")
self.Bonus2Button.SetPosition(240, 105 + 120 + 10)
self.Bonus2Button.Show()
self.Bonus3Text = ui.TextLine()
self.Bonus3Text.SetParent(self.Board)
self.Bonus3Text.SetDefaultFontName()
self.Bonus3Text.SetPosition(15, 125 + 120 + 15)
self.Bonus3Text.SetFeather()
self.Bonus3Text.SetText("Efsun 3:")
self.Bonus3Text.SetFontColor(1.0, 1.0, 1.0)
self.Bonus3Text.SetOutline()
self.Bonus3Text.Show()
self.Bonus3AtrText = ui.TextLine()
self.Bonus3AtrText.SetParent(self.Board)
self.Bonus3AtrText.SetDefaultFontName()
self.Bonus3AtrText.SetPosition(65, 125 + 120 + 15)
self.Bonus3AtrText.SetFeather()
self.Bonus3AtrText.SetText("-")
self.Bonus3AtrText.SetFontColor(1.0, 1.0, 1.0)
self.Bonus3AtrText.SetOutline()
self.Bonus3AtrText.Show()
self.Bonus3ValueEditLine = ui.EditLine()
self.Bonus3ValueEditLine.SetParent(self.Board)
self.Bonus3ValueEditLine.SetSize(29, 18)
self.Bonus3ValueEditLine.SetPosition(240 - 29, 125 + 120 + 15)
self.Bonus3ValueEditLine.SetMax(4)
self.Bonus3ValueEditLine.SetNumberMode()
self.Bonus3ValueEditLine.SetText("0")
self.Bonus3ValueEditLine.Show()
self.Bonus3Button = ui.Button()
self.Bonus3Button.SetParent(self.Board)
self.Bonus3Button.SetUpVisual("d:/ymir work/ui/public/large_Button_01.sub")
self.Bonus3Button.SetOverVisual("d:/ymir work/ui/public/large_Button_02.sub")
self.Bonus3Button.SetDownVisual("d:/ymir work/ui/public/large_Button_03.sub")
self.Bonus3Button.SetText("Efsunları Ayarla")
self.Bonus3Button.SetPosition(240, 125 + 120 + 10)
self.Bonus3Button.Show()
self.Bonus4Text = ui.TextLine()
self.Bonus4Text.SetParent(self.Board)
self.Bonus4Text.SetDefaultFontName()
self.Bonus4Text.SetPosition(15, 145 + 120 + 15)
self.Bonus4Text.SetFeather()
self.Bonus4Text.SetText("Efsun 4:")
self.Bonus4Text.SetFontColor(1.0, 1.0, 1.0)
self.Bonus4Text.SetOutline()
self.Bonus4Text.Show()
self.Bonus4AtrText = ui.TextLine()
self.Bonus4AtrText.SetParent(self.Board)
self.Bonus4AtrText.SetDefaultFontName()
self.Bonus4AtrText.SetPosition(65, 145 + 120 + 15)
self.Bonus4AtrText.SetFeather()
self.Bonus4AtrText.SetText("-")
self.Bonus4AtrText.SetFontColor(1.0, 1.0, 1.0)
self.Bonus4AtrText.SetOutline()
self.Bonus4AtrText.Show()
self.Bonus4ValueEditLine = ui.EditLine()
self.Bonus4ValueEditLine.SetParent(self.Board)
self.Bonus4ValueEditLine.SetSize(29, 18)
self.Bonus4ValueEditLine.SetPosition(240 - 29, 145 + 120 + 15)
self.Bonus4ValueEditLine.SetMax(4)
self.Bonus4ValueEditLine.SetNumberMode()
self.Bonus4ValueEditLine.SetText("0")
self.Bonus4ValueEditLine.Show()
self.Bonus4Button = ui.Button()
self.Bonus4Button.SetParent(self.Board)
self.Bonus4Button.SetUpVisual("d:/ymir work/ui/public/large_Button_01.sub")
self.Bonus4Button.SetOverVisual("d:/ymir work/ui/public/large_Button_02.sub")
self.Bonus4Button.SetDownVisual("d:/ymir work/ui/public/large_Button_03.sub")
self.Bonus4Button.SetText("Efsunları Ayarla")
self.Bonus4Button.SetPosition(240, 145 + 120 + 10)
self.Bonus4Button.Show()
self.Bonus5Text = ui.TextLine()
self.Bonus5Text.SetParent(self.Board)
self.Bonus5Text.SetDefaultFontName()
self.Bonus5Text.SetPosition(15, 165 + 120 + 15)
self.Bonus5Text.SetFeather()
self.Bonus5Text.SetText("Efsun 5:")
self.Bonus5Text.SetFontColor(1.0, 1.0, 1.0)
self.Bonus5Text.SetOutline()
self.Bonus5Text.Show()
self.Bonus5AtrText = ui.TextLine()
self.Bonus5AtrText.SetParent(self.Board)
self.Bonus5AtrText.SetDefaultFontName()
self.Bonus5AtrText.SetPosition(65, 165 + 120 + 15)
self.Bonus5AtrText.SetFeather()
self.Bonus5AtrText.SetText("-")
self.Bonus5AtrText.SetFontColor(1.0, 1.0, 1.0)
self.Bonus5AtrText.SetOutline()
self.Bonus5AtrText.Show()
self.Bonus5ValueEditLine = ui.EditLine()
self.Bonus5ValueEditLine.SetParent(self.Board)
self.Bonus5ValueEditLine.SetSize(29, 18)
self.Bonus5ValueEditLine.SetPosition(240 - 29, 165 + 120 + 15)
self.Bonus5ValueEditLine.SetMax(4)
self.Bonus5ValueEditLine.SetNumberMode()
self.Bonus5ValueEditLine.SetText("0")
self.Bonus5ValueEditLine.Show()
self.Bonus5Button = ui.Button()
self.Bonus5Button.SetParent(self.Board)
self.Bonus5Button.SetUpVisual("d:/ymir work/ui/public/large_Button_01.sub")
self.Bonus5Button.SetOverVisual("d:/ymir work/ui/public/large_Button_02.sub")
self.Bonus5Button.SetDownVisual("d:/ymir work/ui/public/large_Button_03.sub")
self.Bonus5Button.SetText("Efsunları Ayarla")
self.Bonus5Button.SetPosition(240, 165 + 120 + 10)
self.Bonus5Button.Show()
self.Bonus1ValueEditLine.SetTabEvent(ui.__mem_func__(self.Bonus2ValueEditLine.SetFocus))
self.Bonus1ValueEditLine.SetReturnEvent(ui.__mem_func__(self.Bonus2ValueEditLine.SetFocus))
self.Bonus2ValueEditLine.SetTabEvent(ui.__mem_func__(self.Bonus3ValueEditLine.SetFocus))
self.Bonus2ValueEditLine.SetReturnEvent(ui.__mem_func__(self.Bonus3ValueEditLine.SetFocus))
self.Bonus3ValueEditLine.SetTabEvent(ui.__mem_func__(self.Bonus4ValueEditLine.SetFocus))
self.Bonus3ValueEditLine.SetReturnEvent(ui.__mem_func__(self.Bonus4ValueEditLine.SetFocus))
self.Bonus4ValueEditLine.SetTabEvent(ui.__mem_func__(self.Bonus5ValueEditLine.SetFocus))
self.Bonus4ValueEditLine.SetReturnEvent(ui.__mem_func__(self.Bonus5ValueEditLine.SetFocus))
self.Bonus1Button.SetEvent(ui.__mem_func__(self.OpenBonusList1))
self.Bonus2Button.SetEvent(ui.__mem_func__(self.OpenBonusList2))
self.Bonus3Button.SetEvent(ui.__mem_func__(self.OpenBonusList3))
self.Bonus4Button.SetEvent(ui.__mem_func__(self.OpenBonusList4))
self.Bonus5Button.SetEvent(ui.__mem_func__(self.OpenBonusList5))
def OpenBonusList1(self):
global CreateWhish0
CreateWhish0 = 1
self.CreateBonusListBox = CreateListDialog()
def OpenBonusList2(self):
global CreateWhish1
CreateWhish1 = 1
self.CreateBonusListBox = CreateListDialog()
def OpenBonusList3(self):
global CreateWhish2
CreateWhish2 = 1
self.CreateBonusListBox = CreateListDialog()
def OpenBonusList4(self):
global CreateWhish3
CreateWhish3 = 1
self.CreateBonusListBox = CreateListDialog()
def OpenBonusList5(self):
global CreateWhish4
CreateWhish4 = 1
self.CreateBonusListBox = CreateListDialog()
def Close(self):
self.Board = None
def OnUpdate(self):
global CreateBonus0
global CreateBonus1
global CreateBonus2
global CreateBonus3
global CreateBonus4
global ItemValue
global ChangedValue
if int(ItemValue) != int(self.ItemValueEditLine.GetText()) and ChangedValue == "TRUE":
self.ItemValueEditLine.SetText(str(ItemValue))
ChangedValue = "FALSE"
self.SetItemValue()
if self.Bonus1AtrText.GetText() != str(BonusListe[int(CreateBonus0)]) and int(CreateBonus0) != 0:
self.Bonus1AtrText.SetText(str(BonusListe[int(CreateBonus0)]))
elif self.Bonus1AtrText.GetText() != "" and int(CreateBonus0) == 0:
self.Bonus1AtrText.SetText("-")
if self.Bonus2AtrText.GetText() != str(BonusListe[int(CreateBonus1)]) and int(CreateBonus1) != 0:
self.Bonus2AtrText.SetText(str(BonusListe[int(CreateBonus1)]))
elif self.Bonus2AtrText.GetText() != "" and int(CreateBonus1) == 0:
self.Bonus2AtrText.SetText("-")
if self.Bonus3AtrText.GetText() != str(BonusListe[int(CreateBonus2)]) and int(CreateBonus2) != 0:
self.Bonus3AtrText.SetText(str(BonusListe[int(CreateBonus2)]))
elif self.Bonus3AtrText.GetText() != "" and int(CreateBonus2) == 0:
self.Bonus3AtrText.SetText("-")
if self.Bonus4AtrText.GetText() != str(BonusListe[int(CreateBonus3)]) and int(CreateBonus3) != 0:
self.Bonus4AtrText.SetText(str(BonusListe[int(CreateBonus3)]))
elif self.Bonus4AtrText.GetText() != "" and int(CreateBonus3) == 0:
self.Bonus4AtrText.SetText("-")
if self.Bonus5AtrText.GetText() != str(BonusListe[int(CreateBonus4)]) and int(CreateBonus4) != 0:
self.Bonus5AtrText.SetText(str(BonusListe[int(CreateBonus4)]))
elif self.Bonus5AtrText.GetText() != "" and int(CreateBonus4) == 0:
self.Bonus5AtrText.SetText("-")
def CreateItem(self):
global CreateBonus0
global CreateBonus1
global CreateBonus2
global CreateBonus3
global CreateBonus4
global ItemValue
self.ItemCount = int(self.ItemCountEditLine.GetText())
Value0 = self.Bonus1ValueEditLine.GetText()
Value1 = self.Bonus2ValueEditLine.GetText()
Value2 = self.Bonus3ValueEditLine.GetText()
Value3 = self.Bonus4ValueEditLine.GetText()
Value4 = self.Bonus5ValueEditLine.GetText()
for slot in xrange(player.INVENTORY_SLOT_COUNT):
state = "go"
if not player.isItem(int(slot)):
if int(slot) >= 5:
if player.isItem(int(slot) - 5):
itemIndex = player.GetItemIndex(int(slot) - 5)
item.SelectItem(itemIndex)
if int(item.GetItemSize()[1]) >= 2:
state = "banned"
else:
state = "banned"
if str(state) == "go":
player.SetItemData(int(slot), int(ItemValue),int(self.ItemCount))
player.SetItemAttribute(int(slot), 0, int(CreateBonus0), int(Value0))
player.SetItemAttribute(int(slot), 1, int(CreateBonus1), int(Value1))
player.SetItemAttribute(int(slot), 2, int(CreateBonus2), int(Value2))
player.SetItemAttribute(int(slot), 3, int(CreateBonus3), int(Value3))
player.SetItemAttribute(int(slot), 4, int(CreateBonus4), int(Value4))
player.SetItemMetinSocket(int(slot), 0, int(self.MetinStone1))
player.SetItemMetinSocket(int(slot), 1, int(self.MetinStone2))
player.SetItemMetinSocket(int(slot), 2, int(self.MetinStone3))
break
def CallItemList(self):
self.ItemListDialog = ItemListDialog()
ChangedValue = "FALSE"
class ItemListDialog(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.Board = ui.BoardWithTitleBar()
self.Board.SetSize(170, 335)
self.Board.SetCenterPosition()
self.Board.AddFlag("movable")
self.Board.AddFlag("float")
self.Board.SetTitleName("Eşya Listesi")
self.Board.SetCloseEvent(self.Close)
self.Board.Show()
self.__Load_BindObject()
self.UpdateFileList()
def __del__(self):
ui.Window.__del__(self)
def Show(self):
ui.Window.Show(self)
def Close(self):
self.Board.Hide()
def OnPressEscapeKey(self):
self.Board.Close()
return TRUE
def __CreateFileListBox(self):
fileListBox = ui.ListBoxEx()
fileListBox.SetParent(self.Board)
fileListBox.SetPosition(15, 80)
fileListBox.Show()
return fileListBox
def __Load_BindObject(self):
self.fileListBox = self.__CreateFileListBox()
self.LoadFuckingScrollBar()
self.fileListBox.SetScrollBar(self.ScrollBar)
self.SelectBonus = ui.Button()
self.SelectBonus.SetParent(self.Board)
self.SelectBonus.SetPosition(19, 295)
self.SelectBonus.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
self.SelectBonus.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
self.SelectBonus.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
self.SelectBonus.SetText("Tamam")
self.SelectBonus.SetEvent(ui.__mem_func__(self.SetBonis))
self.SelectBonus.Show()
self.CancelBonus = ui.Button()
self.CancelBonus.SetParent(self.Board)
self.CancelBonus.SetPosition(89, 295)
self.CancelBonus.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
self.CancelBonus.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
self.CancelBonus.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
self.CancelBonus.SetText("Kapat")
self.CancelBonus.SetEvent(ui.__mem_func__(self.Close))
self.CancelBonus.Show()
self.SearchItemSlotBar = ui.SlotBar()
self.SearchItemSlotBar.SetParent(self.Board)
self.SearchItemSlotBar.SetSize(15*7, 14)
self.SearchItemSlotBar.SetPosition(15, 50)
self.SearchItemSlotBar.Show()
self.SearchItemEditLine = ui.EditLine()
self.SearchItemEditLine.SetParent(self.SearchItemSlotBar)
self.SearchItemEditLine.SetSize(15*7, 18)
self.SearchItemEditLine.SetPosition(3, 0)
self.SearchItemEditLine.SetMax(16)
self.SearchItemEditLine.SetText("")
self.SearchItemEditLine.SetFocus()
self.SearchItemEditLine.Show()
self.SearchItemButton = ui.Button()
self.SearchItemButton.SetParent(self.Board)
self.SearchItemButton.SetPosition(117, 48)
self.SearchItemButton.SetUpVisual("d:/ymir work/ui/public/small_Button_01.sub")
self.SearchItemButton.SetOverVisual("d:/ymir work/ui/public/small_Button_02.sub")
self.SearchItemButton.SetDownVisual("d:/ymir work/ui/public/small_Button_03.sub")
self.SearchItemButton.SetText("Ara")
self.SearchItemButton.SetEvent(ui.__mem_func__(self.SearchItem))
self.SearchItemButton.Show()
self.SearchItemText = ui.TextLine()
self.SearchItemText.SetParent(self.Board)
self.SearchItemText.SetDefaultFontName()
self.SearchItemText.SetPosition(19, 33)
self.SearchItemText.SetFeather()
self.SearchItemText.SetText("Aranacak Eşya:")
self.SearchItemText.SetFontColor(1.0, 1.0, 1.0)
self.SearchItemText.SetOutline()
self.SearchItemText.Show()
def LoadFuckingScrollBar(self):
self.ScrollBar = ui.ScrollBar()
self.ScrollBar.SetParent(self.Board)
self.ScrollBar.SetPosition(140, 70)
self.ScrollBar.SetScrollBarSize(220)
self.ScrollBar.Show()
def CancelGuildName(self):
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
def SearchItem(self):
self.__RefreshFileList()
SearchName = str(self.SearchItemEditLine.GetText())
try:
lines = pack_open("locale/de/item_list.txt", "r").readlines()
except IOError:
import dbg
dbg.LogBox("Load Itemlist Error")
app.Abort()
for line in lines:
tokens = str(line).split("t")
if len(tokens) == 0 or not tokens[0]:
continue
ItemValue = str(tokens[0])
if str(ItemValue).find(" ") != -1:
ItemValue = str(ItemValue).replace(" ", "")
item.SelectItem(int(ItemValue))
Itemname = str(item.GetItemName())
if ItemValue and str(Itemname) != "":
if str(Itemname).find(str(SearchName)) != -1:
self.fileListBox.AppendItem(Item(Itemname))
def UpdateFileList(self):
self.__RefreshFileList()
try:
lines = pack_open("locale/de/item_list.txt", "r").readlines()
except IOError:
import dbg
dbg.LogBox("Load Itemlist Error")
app.Abort()
for line in lines:
tokens = str(line).split("t")
if len(tokens) == 0 or not tokens[0]:
continue
ItemValue = str(tokens[0])
if str(ItemValue).find(" ") != -1:
ItemValue = str(ItemValue).replace(" ", "")
item.SelectItem(int(ItemValue))
Itemname = str(item.GetItemName())
if ItemValue and str(Itemname) != "":
self.fileListBox.AppendItem(Item(Itemname))
def __RefreshFileList(self):
self.fileListBox.RemoveAllItems()
def SetBonis(self):
global ItemValue
global ChangedValue
SelectedIndex = self.fileListBox.GetSelectedItem()
SelectedIndex = SelectedIndex.GetText()
try:
lines = pack_open("locale/de/item_list.txt", "r").readlines()
except IOError:
import dbg
dbg.LogBox("Load Itemlist Error")
app.Abort()
for line in lines:
tokens = str(line).split("t")
if len(tokens) == 0 or not tokens[0]:
continue
Itemvalue = str(tokens[0])
if str(Itemvalue).find(" ") != -1:
Itemvalue = str(Itemvalue).replace(" ", "")
item.SelectItem(int(Itemvalue))
Itemname = str(item.GetItemName())
if str(Itemname) == str(SelectedIndex):
ItemValue = int(Itemvalue)
break
ChangedValue = "TRUE"
self.Close()
class CreateListDialog(ui.ThinBoard):
def __init__(self):
ui.ThinBoard.__init__(self)
self.isLoaded=0
self.selectEvent=None
self.fileListBox=None
self.SetCenterPosition()
self.SetSize(170, 305)
self.Show()
self.AddFlag("movable")
self.AddFlag("float")
def __del__(self):
ui.ThinBoard.__del__(self)
def Show(self):
if self.isLoaded==0:
self.isLoaded=1
self.__Load()
ui.ThinBoard.Show(self)
def Open(self):
self.Show()
self.SetCenterPosition()
self.SetTop()
self.UpdateFileList()
def Close(self):
self.Hide()
def OnPressEscapeKey(self):
self.Close()
return TRUE
def __CreateFileListBox(self):
fileListBox = ui.ListBoxEx()
fileListBox.SetParent(self)
fileListBox.SetPosition(15, 50)
fileListBox.Show()
return fileListBox
def __Load(self):
self.__Load_BindObject()
self.UpdateFileList()
def __Load_BindObject(self):
self.fileListBox = self.__CreateFileListBox()
self.LoadFuckingScrollBar()
self.LoadTextLines()
self.fileListBox.SetScrollBar(self.ScrollBar)
self.UpdateButton = ui.Button()
self.UpdateButton.SetParent(self)
self.UpdateButton.SetUpVisual("d:/ymir work/ui/public/Large_button_01.sub")
self.UpdateButton.SetOverVisual("d:/ymir work/ui/public/Large_button_02.sub")
self.UpdateButton.SetDownVisual("d:/ymir work/ui/public/Large_button_03.sub")
self.UpdateButton.SetText("Aktualisieren")
self.UpdateButton.SetPosition(15, 265)
self.UpdateButton.SetEvent(ui.__mem_func__(self.UpdateFileList))
self.UpdateButton.Show()
self.UpdateButton.Hide()
self.SelectBonus = ui.Button()
self.SelectBonus.SetParent(self)
self.SelectBonus.SetPosition(19, 265)
self.SelectBonus.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
self.SelectBonus.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
self.SelectBonus.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
self.SelectBonus.SetText("Tamam")
self.SelectBonus.SetEvent(ui.__mem_func__(self.SetBonis))
self.SelectBonus.Show()
self.CancelBonus = ui.Button()
self.CancelBonus.SetParent(self)
self.CancelBonus.SetPosition(89, 265)
self.CancelBonus.SetUpVisual("d:/ymir work/ui/public/Middle_Button_01.sub")
self.CancelBonus.SetOverVisual("d:/ymir work/ui/public/Middle_Button_02.sub")
self.CancelBonus.SetDownVisual("d:/ymir work/ui/public/Middle_Button_03.sub")
self.CancelBonus.SetText("Kapat")
self.CancelBonus.SetEvent(ui.__mem_func__(self.Close))
self.CancelBonus.Show()
def LoadTextLines(self):
self.copyright = ui.TextLine()
self.copyright.SetParent(self)
self.copyright.SetDefaultFontName()
self.copyright.SetPosition(50, 29)
self.copyright.SetFeather()
self.copyright.SetText("Efsun Listesi:")
self.copyright.SetFontColor(0.2, 0.2, 1.0)
self.copyright.SetOutline()
self.copyright.Show()
def LoadFuckingScrollBar(self):
self.ScrollBar = ui.ScrollBar()
self.ScrollBar.SetParent(self)
self.ScrollBar.SetPosition(140, 40)
self.ScrollBar.SetScrollBarSize(220)
self.ScrollBar.Show()
def CancelGuildName(self):
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
def UpdateFileList(self):
self.__RefreshFileList()
for BonusType in BonusListe:
if BonusType == "":
self.fileListBox.AppendItem(Item("..."))
elif BonusType != "":
self.fileListBox.AppendItem(Item(BonusType))
#chat.AppendChat(chat.CHAT_TYPE_INFO, str(BonusIDListe[BonusType]))
def __RefreshFileList(self):
self.fileListBox.RemoveAllItems()
def SetBonis(self):
global CreateBonus0
global CreateBonus1
global CreateBonus2
global CreateBonus3
global CreateBonus4
global CreateWhish0
global CreateWhish1
global CreateWhish2
global CreateWhish3
global CreateWhish4
SelectedIndex = self.fileListBox.GetSelectedItem()
SelectedIndex = SelectedIndex.GetText()
if str(SelectedIndex) != "keiner" and str(SelectedIndex) != "":
if CreateWhish0 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "1.Bonus " + str(SelectedIndex))
CreateBonus0 = BonusIDListe[str(SelectedIndex)]
CreateWhish0 = 0
elif CreateWhish1 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "2.Bonus " + str(SelectedIndex))
CreateBonus1 = int(BonusIDListe[SelectedIndex])
CreateWhish1 = 0
elif CreateWhish2 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "3.Bonus " + str(SelectedIndex))
CreateBonus2 = int(BonusIDListe[SelectedIndex])
CreateWhish2 = 0
elif CreateWhish3 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "4.Bonus " + str(SelectedIndex))
CreateBonus3 = int(BonusIDListe[SelectedIndex])
CreateWhish3 = 0
elif CreateWhish4 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "5.Bonus " + str(SelectedIndex))
CreateBonus4 = int(BonusIDListe[SelectedIndex])
CreateWhish4 = 0
elif str(SelectedIndex) == "keiner" and str(SelectedIndex) != "":
if CreateWhish0 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "1.Efsun başarıyla oluşturuldu.")
CreateBonus0 = 0
CreateWhish0 = 0
elif CreateWhish1 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "2.Efsun başarıyla oluşturuldu.")
CreateBonus1 = 0
CreateWhish1 = 0
elif CreateWhish2 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "3.Efsun başarıyla oluşturuldu.")
CreateBonus2 = 0
CreateWhish2 = 0
elif CreateWhish3 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "4.Efsun başarıyla oluşturuldu.")
CreateBonus3 = 0
CreateWhish3 = 0
elif CreateWhish4 == 1:
chat.AppendChat(chat.CHAT_TYPE_INFO, "5.Efsun başarıyla oluşturuldu.")
CreateBonus4 = 0
CreateWhish4 = 0
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Efsun seçmediniz!")
self.Close()
FILE_NAME_LEN = 40
class Item(ui.ListBoxEx.Item):
def __init__(self, fileName):
ui.ListBoxEx.Item.__init__(self)
self.canLoad=0
self.text=fileName
self.textLine=self.__CreateTextLine(fileName[:FILE_NAME_LEN])
def __del__(self):
ui.ListBoxEx.Item.__del__(self)
def GetText(self):
return self.text
def SetSize(self, width, height):
ui.ListBoxEx.Item.SetSize(self, 6*len(self.textLine.GetText()) + 4, height)
def __CreateTextLine(self, fileName):
textLine=ui.TextLine()
textLine.SetParent(self)
textLine.SetPosition(0, 0)
textLine.SetText(fileName)
textLine.Show()
return textLine
StartDialog = CreateItemDialog()
StartDialog.Show()
Bugün 33299 ziyaretçi (92093 klik) kişi burdaydı!