def SelectTab(self, Index):
global TabNumber
TabNumber = Index
self.StartOrStop(Index)
if Index == 0:
for iy in xrange(33, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(12, 33):
self.Gui[int(iy)].Show()
elif Index == 1:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(33, 53):
self.Gui[int(iy)].Show()
elif Index == 2:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(53, 73):
self.Gui[int(iy)].Show()
elif Index == 3:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(73, 93):
self.Gui[int(iy)].Show()
elif Index == 4:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(93, 113):
self.Gui[int(iy)].Show()
def WhichOneWillStop(self, Index):
if Index == 0:
self.ChangeState('Stop')
elif Index == 1:
self.ChangeState2('Stop')
elif Index == 2:
self.ChangeState3('Stop')
elif Index == 3:
self.ChangeState4('Stop')
elif Index == 4:
self.ChangeState5('Stop')
def DeleteAll(self, tabnumber):
if tabnumber == 0:
del self.SearchBoni[0]
def UpdateBonusValues(self):
TmpValues = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[16 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues.append([SearchValue, 0])
if TmpValues != self.SearchBoniValues:
self.SearchBoniValues = TmpValues
def UpdateBonusValues2(self):
TmpValues2 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[36 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues2.append([SearchValue, 0])
if TmpValues2 != self.SearchBoniValues2:
self.SearchBoniValues2 = TmpValues2
def UpdateBonusValues3(self):
TmpValues3 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[56 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues3.append([SearchValue, 0])
if TmpValues3 != self.SearchBoniValues3:
self.SearchBoniValues3 = TmpValues3
def UpdateBonusValues4(self):
TmpValues4 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[76 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues4.append([SearchValue, 0])
if TmpValues4 != self.SearchBoniValues4:
self.SearchBoniValues4 = TmpValues4
def UpdateBonusValues5(self):
TmpValues5 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[96 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues5.append([SearchValue, 0])
if TmpValues5 != self.SearchBoniValues5:
self.SearchBoniValues5 = TmpValues5
def UpdateBoni(self):
if self.State == 'Stop':
return
Values = []
Boni = []
Count = 0
for AttributeIndex in xrange(self.Count):
Bonus, Value = player.GetItemAttribute(self.Slot, AttributeIndex)
if Bonus == 0:
return
Count += 1
Values.append(Value)
Boni.append(Bonus)
if player.GetItemCount(self.SlotStack[0]) <= 0 and (self.Boni != Boni or self.Values != Values) or self.Boni != Boni or self.Values != Values or app.GetTime() >= self.LastProcessTimeStamp + 0.8:
self.LastProcessTimeStamp = app.GetTime()
self.Boni = Boni
self.Values = Values
self.ControllBoni(Boni, Values)
def UpdateBoni2(self):
if self.State2 == 'Stop':
return
Values2 = []
Boni2 = []
Count2 = 0
for AttributeIndex in xrange(self.Count2):
Bonus2, Value2 = player.GetItemAttribute(self.Slot2, AttributeIndex)
if Bonus2 == 0:
return
Count2 += 1
Values2.append(Value2)
Boni2.append(Bonus2)
if player.GetItemCount(self.SlotStack2[0]) <= 0 and (self.Boni2 != Boni2 or self.Values2 != Values2) or self.Boni2 != Boni2 or self.Values2 != Values2 or app.GetTime() >= self.LastProcessTimeStamp2 + 0.8:
self.LastProcessTimeStamp2 = app.GetTime()
self.Boni2 = Boni2
self.Values2 = Values2
self.ControllBoni2(Boni2, Values2)
def UpdateBoni3(self):
if self.State3 == 'Stop':
return
Values3 = []
Boni3 = []
Count3 = 0
for AttributeIndex in xrange(self.Count3):
Bonus3, Value3 = player.GetItemAttribute(self.Slot3, AttributeIndex)
if Bonus3 == 0:
return
Count3 += 1
Values3.append(Value3)
Boni3.append(Bonus3)
if player.GetItemCount(self.SlotStack3[0]) <= 0 and (self.Boni3 != Boni3 or self.Values3 != Values3) or self.Boni3 != Boni3 or self.Values3 != Values3 or app.GetTime() >= self.LastProcessTimeStamp3 + 0.8:
self.LastProcessTimeStamp3 = app.GetTime()
self.Boni3 = Boni3
self.Values3 = Values3
self.ControllBoni3(Boni3, Values3)
def UpdateBoni4(self):
if self.State4 == 'Stop':
return
Values4 = []
Boni4 = []
Count4 = 0
for AttributeIndex in xrange(self.Count4):
Bonus4, Value4 = player.GetItemAttribute(self.Slot4, AttributeIndex)
if Bonus4 == 0:
return
Count4 += 1
Values4.append(Value4)
Boni4.append(Bonus4)
if player.GetItemCount(self.SlotStack4[0]) <= 0 and (self.Boni4 != Boni4 or self.Values4 != Values4) or self.Boni4 != Boni4 or self.Values4 != Values4 or app.GetTime() >= self.LastProcessTimeStamp4 + 0.8:
self.LastProcessTimeStamp4 = app.GetTime()
self.Boni4 = Boni4
self.Values4 = Values4
self.ControllBoni4(Boni4, Values4)
def UpdateBoni5(self):
if self.State5 == 'Stop':
return
Values5 = []
Boni5 = []
Count5 = 0
for AttributeIndex in xrange(self.Count5):
Bonus5, Value5 = player.GetItemAttribute(self.Slot5, AttributeIndex)
if Bonus5 == 0:
return
Count5 += 1
Values5.append(Value5)
Boni5.append(Bonus5)
if player.GetItemCount(self.SlotStack5[0]) <= 0 and (self.Boni5 != Boni5 or self.Values5 != Values5) or self.Boni5 != Boni5 or self.Values5 != Values5 or app.GetTime() >= self.LastProcessTimeStamp5 + 0.8:
self.LastProcessTimeStamp5 = app.GetTime()
self.Boni5 = Boni5
self.Values5 = Values5
self.ControllBoni5(Boni5, Values5)
def ControllBoni(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni)):
try:
Index = Boni.index(self.SearchBoni[i][0])
if Values[Index] < self.SearchBoniValues[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni[i][1])
if Values[Index] < self.SearchBoniValues[i][1]:
Boni.index('-1')
self.State = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State == 'Stop':
return
self.SlotStack = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot)
break
def ControllBoni2(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni2)):
try:
Index = Boni.index(self.SearchBoni2[i][0])
if Values[Index] < self.SearchBoniValues2[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni2[i][1])
if Values[Index] < self.SearchBoniValues2[i][1]:
Boni.index('-1')
self.State2 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count2))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State2 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State2 == 'Stop':
return
self.SlotStack2 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot2)
break
def ControllBoni3(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni3)):
try:
Index = Boni.index(self.SearchBoni3[i][0])
if Values[Index] < self.SearchBoniValues3[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni3[i][1])
if Values[Index] < self.SearchBoniValues3[i][1]:
Boni.index('-1')
self.State3 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count3))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State3 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State3 == 'Stop':
return
self.SlotStack3 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot3)
break
def ControllBoni4(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni4)):
try:
Index = Boni.index(self.SearchBoni4[i][0])
if Values[Index] < self.SearchBoniValues4[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni4[i][1])
if Values[Index] < self.SearchBoniValues4[i][1]:
Boni.index('-1')
self.State4 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count4))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State4 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State4 == 'Stop':
return
self.SlotStack4 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot4)
break
def ControllBoni5(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni5)):
try:
Index = Boni.index(self.SearchBoni5[i][0])
if Values[Index] < self.SearchBoniValues5[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni5[i][1])
if Values[Index] < self.SearchBoniValues5[i][1]:
Boni.index('-1')
self.State5 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count5))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State5 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State5 == 'Stop':
return
self.SlotStack5 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot5)
break
def DefineBoni(self):
self.Values = []
self.Boni = []
self.Count = 0
for AttributeIndex in xrange(5):
Bonus, Value = player.GetItemAttribute(self.Slot, AttributeIndex)
if Bonus != 0:
self.Count += 1
self.Boni.append(Bonus)
self.Values.append(Value)
self.ControllBoni(self.Boni, self.Values)
def DefineBoni2(self):
self.Values2 = []
self.Boni2 = []
self.Count2 = 0
for AttributeIndex in xrange(5):
Bonus2, Value2 = player.GetItemAttribute(self.Slot2, AttributeIndex)
if Bonus2 != 0:
self.Count2 += 1
self.Boni2.append(Bonus2)
self.Values2.append(Value2)
self.ControllBoni2(self.Boni2, self.Values2)
def DefineBoni3(self):
self.Values3 = []
self.Boni3 = []
self.Count3 = 0
for AttributeIndex in xrange(5):
Bonus3, Value3 = player.GetItemAttribute(self.Slot3, AttributeIndex)
if Bonus3 != 0:
self.Count3 += 1
self.Boni3.append(Bonus3)
self.Values3.append(Value3)
self.ControllBoni3(self.Boni3, self.Values3)
def DefineBoni4(self):
self.Values4 = []
self.Boni4 = []
self.Count4 = 0
for AttributeIndex in xrange(5):
Bonus4, Value4 = player.GetItemAttribute(self.Slot4, AttributeIndex)
if Bonus4 != 0:
self.Count4 += 1
self.Boni4.append(Bonus4)
self.Values4.append(Value4)
self.ControllBoni4(self.Boni4, self.Values4)
def DefineBoni5(self):
self.Values5 = []
self.Boni5 = []
self.Count5 = 0
for AttributeIndex in xrange(5):
Bonus5, Value5 = player.GetItemAttribute(self.Slot5, AttributeIndex)
if Bonus5 != 0:
self.Count5 += 1
self.Boni5.append(Bonus5)
self.Values5.append(Value5)
self.ControllBoni5(self.Boni5, self.Values5)
def ChangeState(self, state):
if state == 'Start':
if self.SearchBoni == []:
chat.AppendChat(1, 'Lütfen bir efsun seçin.')
self.Slot = 0
self.Startmode = 1
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
itemVNum = player.GetItemIndex(Slot)
if itemVNum == self.SwitchValue:
self.SlotStack = [Slot, player.GetItemCount(Slot)]
break
def SelectTab(self, Index):
global TabNumber
TabNumber = Index
self.StartOrStop(Index)
if Index == 0:
for iy in xrange(33, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(12, 33):
self.Gui[int(iy)].Show()
elif Index == 1:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(33, 53):
self.Gui[int(iy)].Show()
elif Index == 2:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(53, 73):
self.Gui[int(iy)].Show()
elif Index == 3:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(73, 93):
self.Gui[int(iy)].Show()
elif Index == 4:
for iy in xrange(13, 113):
self.Gui[int(iy)].Hide()
for iy in xrange(93, 113):
self.Gui[int(iy)].Show()
def WhichOneWillStop(self, Index):
if Index == 0:
self.ChangeState('Stop')
elif Index == 1:
self.ChangeState2('Stop')
elif Index == 2:
self.ChangeState3('Stop')
elif Index == 3:
self.ChangeState4('Stop')
elif Index == 4:
self.ChangeState5('Stop')
def DeleteAll(self, tabnumber):
if tabnumber == 0:
del self.SearchBoni[0]
def UpdateBonusValues(self):
TmpValues = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[16 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues.append([SearchValue, 0])
if TmpValues != self.SearchBoniValues:
self.SearchBoniValues = TmpValues
def UpdateBonusValues2(self):
TmpValues2 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[36 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues2.append([SearchValue, 0])
if TmpValues2 != self.SearchBoniValues2:
self.SearchBoniValues2 = TmpValues2
def UpdateBonusValues3(self):
TmpValues3 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[56 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues3.append([SearchValue, 0])
if TmpValues3 != self.SearchBoniValues3:
self.SearchBoniValues3 = TmpValues3
def UpdateBonusValues4(self):
TmpValues4 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[76 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues4.append([SearchValue, 0])
if TmpValues4 != self.SearchBoniValues4:
self.SearchBoniValues4 = TmpValues4
def UpdateBonusValues5(self):
TmpValues5 = []
for Index in xrange(5):
try:
SearchValue = int(self.Gui[96 + Index * 4].GetText())
except:
SearchValue = 0
TmpValues5.append([SearchValue, 0])
if TmpValues5 != self.SearchBoniValues5:
self.SearchBoniValues5 = TmpValues5
def UpdateBoni(self):
if self.State == 'Stop':
return
Values = []
Boni = []
Count = 0
for AttributeIndex in xrange(self.Count):
Bonus, Value = player.GetItemAttribute(self.Slot, AttributeIndex)
if Bonus == 0:
return
Count += 1
Values.append(Value)
Boni.append(Bonus)
if player.GetItemCount(self.SlotStack[0]) <= 0 and (self.Boni != Boni or self.Values != Values) or self.Boni != Boni or self.Values != Values or app.GetTime() >= self.LastProcessTimeStamp + 0.8:
self.LastProcessTimeStamp = app.GetTime()
self.Boni = Boni
self.Values = Values
self.ControllBoni(Boni, Values)
def UpdateBoni2(self):
if self.State2 == 'Stop':
return
Values2 = []
Boni2 = []
Count2 = 0
for AttributeIndex in xrange(self.Count2):
Bonus2, Value2 = player.GetItemAttribute(self.Slot2, AttributeIndex)
if Bonus2 == 0:
return
Count2 += 1
Values2.append(Value2)
Boni2.append(Bonus2)
if player.GetItemCount(self.SlotStack2[0]) <= 0 and (self.Boni2 != Boni2 or self.Values2 != Values2) or self.Boni2 != Boni2 or self.Values2 != Values2 or app.GetTime() >= self.LastProcessTimeStamp2 + 0.8:
self.LastProcessTimeStamp2 = app.GetTime()
self.Boni2 = Boni2
self.Values2 = Values2
self.ControllBoni2(Boni2, Values2)
def UpdateBoni3(self):
if self.State3 == 'Stop':
return
Values3 = []
Boni3 = []
Count3 = 0
for AttributeIndex in xrange(self.Count3):
Bonus3, Value3 = player.GetItemAttribute(self.Slot3, AttributeIndex)
if Bonus3 == 0:
return
Count3 += 1
Values3.append(Value3)
Boni3.append(Bonus3)
if player.GetItemCount(self.SlotStack3[0]) <= 0 and (self.Boni3 != Boni3 or self.Values3 != Values3) or self.Boni3 != Boni3 or self.Values3 != Values3 or app.GetTime() >= self.LastProcessTimeStamp3 + 0.8:
self.LastProcessTimeStamp3 = app.GetTime()
self.Boni3 = Boni3
self.Values3 = Values3
self.ControllBoni3(Boni3, Values3)
def UpdateBoni4(self):
if self.State4 == 'Stop':
return
Values4 = []
Boni4 = []
Count4 = 0
for AttributeIndex in xrange(self.Count4):
Bonus4, Value4 = player.GetItemAttribute(self.Slot4, AttributeIndex)
if Bonus4 == 0:
return
Count4 += 1
Values4.append(Value4)
Boni4.append(Bonus4)
if player.GetItemCount(self.SlotStack4[0]) <= 0 and (self.Boni4 != Boni4 or self.Values4 != Values4) or self.Boni4 != Boni4 or self.Values4 != Values4 or app.GetTime() >= self.LastProcessTimeStamp4 + 0.8:
self.LastProcessTimeStamp4 = app.GetTime()
self.Boni4 = Boni4
self.Values4 = Values4
self.ControllBoni4(Boni4, Values4)
def UpdateBoni5(self):
if self.State5 == 'Stop':
return
Values5 = []
Boni5 = []
Count5 = 0
for AttributeIndex in xrange(self.Count5):
Bonus5, Value5 = player.GetItemAttribute(self.Slot5, AttributeIndex)
if Bonus5 == 0:
return
Count5 += 1
Values5.append(Value5)
Boni5.append(Bonus5)
if player.GetItemCount(self.SlotStack5[0]) <= 0 and (self.Boni5 != Boni5 or self.Values5 != Values5) or self.Boni5 != Boni5 or self.Values5 != Values5 or app.GetTime() >= self.LastProcessTimeStamp5 + 0.8:
self.LastProcessTimeStamp5 = app.GetTime()
self.Boni5 = Boni5
self.Values5 = Values5
self.ControllBoni5(Boni5, Values5)
def ControllBoni(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni)):
try:
Index = Boni.index(self.SearchBoni[i][0])
if Values[Index] < self.SearchBoniValues[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni[i][1])
if Values[Index] < self.SearchBoniValues[i][1]:
Boni.index('-1')
self.State = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State == 'Stop':
return
self.SlotStack = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot)
break
def ControllBoni2(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni2)):
try:
Index = Boni.index(self.SearchBoni2[i][0])
if Values[Index] < self.SearchBoniValues2[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni2[i][1])
if Values[Index] < self.SearchBoniValues2[i][1]:
Boni.index('-1')
self.State2 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count2))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State2 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State2 == 'Stop':
return
self.SlotStack2 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot2)
break
def ControllBoni3(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni3)):
try:
Index = Boni.index(self.SearchBoni3[i][0])
if Values[Index] < self.SearchBoniValues3[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni3[i][1])
if Values[Index] < self.SearchBoniValues3[i][1]:
Boni.index('-1')
self.State3 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count3))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State3 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State3 == 'Stop':
return
self.SlotStack3 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot3)
break
def ControllBoni4(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni4)):
try:
Index = Boni.index(self.SearchBoni4[i][0])
if Values[Index] < self.SearchBoniValues4[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni4[i][1])
if Values[Index] < self.SearchBoniValues4[i][1]:
Boni.index('-1')
self.State4 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count4))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State4 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State4 == 'Stop':
return
self.SlotStack4 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot4)
break
def ControllBoni5(self, Boni, Values):
try:
for i in xrange(len(self.SearchBoni5)):
try:
Index = Boni.index(self.SearchBoni5[i][0])
if Values[Index] < self.SearchBoniValues5[i][0]:
Boni.index('-1')
except:
Index = Boni.index(self.SearchBoni5[i][1])
if Values[Index] < self.SearchBoniValues5[i][1]:
Boni.index('-1')
self.State5 = 'Stop'
chat.AppendChat(1, 'Efsun Sayısı: ' + str(self.Count5))
chat.AppendChat(1, 'Efsunlar: ' + str(Boni))
chat.AppendChat(1, 'Efsun Değerleri: ' + str(Values))
except:
if player.GetItemCountByVnum(self.SwitchValue) < 3:
if shop.IsOpen():
for EachShopSlot in xrange(shop.SHOP_SLOT_COUNT):
ShopItemValue = shop.GetItemID(EachShopSlot)
if ShopItemValue == int(self.SwitchValue):
net.SendShopBuyPacket(EachShopSlot)
else:
chat.AppendChat(1, 'Efsun değiştirme nesnesi kalmadı.')
self.State5 = 'Stop'
return
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
ItemValue = player.GetItemIndex(Slot)
if ItemValue == self.SwitchValue:
if self.State5 == 'Stop':
return
self.SlotStack5 = [Slot, player.GetItemCount(Slot)]
net.SendItemUseToItemPacket(Slot, self.Slot5)
break
def DefineBoni(self):
self.Values = []
self.Boni = []
self.Count = 0
for AttributeIndex in xrange(5):
Bonus, Value = player.GetItemAttribute(self.Slot, AttributeIndex)
if Bonus != 0:
self.Count += 1
self.Boni.append(Bonus)
self.Values.append(Value)
self.ControllBoni(self.Boni, self.Values)
def DefineBoni2(self):
self.Values2 = []
self.Boni2 = []
self.Count2 = 0
for AttributeIndex in xrange(5):
Bonus2, Value2 = player.GetItemAttribute(self.Slot2, AttributeIndex)
if Bonus2 != 0:
self.Count2 += 1
self.Boni2.append(Bonus2)
self.Values2.append(Value2)
self.ControllBoni2(self.Boni2, self.Values2)
def DefineBoni3(self):
self.Values3 = []
self.Boni3 = []
self.Count3 = 0
for AttributeIndex in xrange(5):
Bonus3, Value3 = player.GetItemAttribute(self.Slot3, AttributeIndex)
if Bonus3 != 0:
self.Count3 += 1
self.Boni3.append(Bonus3)
self.Values3.append(Value3)
self.ControllBoni3(self.Boni3, self.Values3)
def DefineBoni4(self):
self.Values4 = []
self.Boni4 = []
self.Count4 = 0
for AttributeIndex in xrange(5):
Bonus4, Value4 = player.GetItemAttribute(self.Slot4, AttributeIndex)
if Bonus4 != 0:
self.Count4 += 1
self.Boni4.append(Bonus4)
self.Values4.append(Value4)
self.ControllBoni4(self.Boni4, self.Values4)
def DefineBoni5(self):
self.Values5 = []
self.Boni5 = []
self.Count5 = 0
for AttributeIndex in xrange(5):
Bonus5, Value5 = player.GetItemAttribute(self.Slot5, AttributeIndex)
if Bonus5 != 0:
self.Count5 += 1
self.Boni5.append(Bonus5)
self.Values5.append(Value5)
self.ControllBoni5(self.Boni5, self.Values5)
def ChangeState(self, state):
if state == 'Start':
if self.SearchBoni == []:
chat.AppendChat(1, 'Lütfen bir efsun seçin.')
self.Slot = 0
self.Startmode = 1
for Slot in xrange(player.INVENTORY_PAGE_SIZE * 5):
itemVNum = player.GetItemIndex(Slot)
if itemVNum == self.SwitchValue:
self.SlotStack = [Slot, player.GetItemCount(Slot)]
break
Is it possible for you to translate the Turkish or whatever texts to english?
Like i see, you added self.Gui[7].Hide() but that asumes a button more after the "Durdur" button that you dont have.
All over this is some of the worst Code, i have ever seen ...
Is it possible for you to translate the Turkish or whatever texts to english?
Like i see, you added self.Gui[7].Hide() but that asumes a button more after the "Durdur" button that you dont have.
All over this is some of the worst Code, i have ever seen ...
Well, is there a 5 or 7-slot *.py switchbot that you can recommend and run?
Help my pls ! Help my pls ! Help my pls ! 11/03/2010 - S4 League - 7 Replies Hey Leute ich weis man darf keine Fragen hier stellen aber pls kann mich niemand reporten weil vll könnte mir hier jemand weiter helfen ! Also ich habe einen Hack und der funktioniert ich muss nur Xtrap suspenden und wenn ich mich mit einem Acc einlogge kommt gleich dein Acc wurde gebannt ! :mad: !
Und könnte jemand da so einen hack erstellen das man nicht gebannt wird oder gibt es da eine Lösung ? Pls help my ! :handsdown: :handsdown: :handsdown: !