tigerstefan 4 Posted November 13, 2015 Share Posted November 13, 2015 (edited) Hi all.I have a problem with my switchboot.an error.The switchboot works fine but in syserr: 1113 11:33:37401 :: Traceback (most recent call last): 1113 11:33:37401 :: File "uiswitch.py", line 160, in OnUpdate 1113 11:33:37401 :: File "uiswitch.py", line 151, in refresh 1113 11:33:37402 :: IndexError 1113 11:33:37402 :: : 1113 11:33:37402 :: list index out of range 1113 11:33:37402 :: 1113 11:33:37451 :: Traceback (most recent call last): 1113 11:33:37452 :: File "uiswitch.py", line 160, in OnUpdate 1113 11:33:37452 :: File "uiswitch.py", line 151, in refresh 1113 11:33:37452 :: IndexError 1113 11:33:37452 :: : 1113 11:33:37452 :: list index out of range 1113 11:33:37452 :: And: 1113 11:33:35565 :: Traceback (most recent call last): 1113 11:33:35565 :: File "uiswitch.py", line 160, in OnUpdate 1113 11:33:35565 :: File "uiswitch.py", line 140, in refresh 1113 11:33:35565 :: TypeError 1113 11:33:35565 :: : 1113 11:33:35565 :: an integer is required 1113 11:33:35565 :: 1113 11:33:35631 :: Traceback (most recent call last): 1113 11:33:35631 :: File "uiswitch.py", line 160, in OnUpdate 1113 11:33:35631 :: File "uiswitch.py", line 140, in refresh 1113 11:33:35632 :: TypeError 1113 11:33:35632 :: : 1113 11:33:35632 :: an integer is required 1113 11:33:35632 :: My uiswitch.py: import ui import player import mouseModule import net import app import chat import snd import item import player import chat import grp import uiScriptLocale import uiRefine import uiAttachMetin import uiCommon import locale import constInfo import ime import grpText import uiToolTip Low = "low-work/system/" class Switcher(ui.ScriptWindow): POSITIVE_COLOR = grp.GenerateColor(0.5411, 0.7254, 0.5568, 1.0) NEGATIVE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0) def __init__(self): import exception ui.ScriptWindow.__init__(self) def __del__(self): ui.ScriptWindow.__del__(self) def Show(self): constInfo.SWITCH_BONUS = 1 self.__LoadWindow() ui.ScriptWindow.Show(self) def Close(self): constInfo.SWITCH_BONUS = 0 self.Hide() def OnPressEscapeKey(self): self.Close() return TRUE def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, Low + "binari2.py") except: import exception exception.Abort("CostumeWindow.LoadWindow.LoadObject") self.TitleBar = self.GetChild("TitleBar") self.switchslot = self.GetChild("switchslot") self.bonusslot = [self.GetChild2("bonus1"), self.GetChild2("bonus2"), self.GetChild2("bonus3"), self.GetChild2("bonus4"), self.GetChild2("bonus5"), ] self.buttongira = self.GetChild("gira_bonus") self.buttongira.SetEvent(ui.__mem_func__(self.__gira_bonus)) self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close)) self.switchslot.SetSelectEmptySlotEvent(ui.__mem_func__(self.__OnSelectEmptySlot)) self.switchslot.SetSelectItemSlotEvent(ui.__mem_func__(self.__OnSelectItemSlot)) self.toolTipCostume = uiToolTip.ToolTip(190) self.toolTipCostume.SetTitle(item.GetItemName()) self.slotitem = None self.slotgira = None def __OnSelectItemSlot(self, selectedSlotPos): isAttached = mouseModule.mouseController.isAttached() if isAttached: attachedSlotType = mouseModule.mouseController.GetAttachedType() attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber() mouseModule.mouseController.DeattachObject() itemIndex = player.GetItemIndex(attachedSlotPos) itemCount = player.GetItemCount(attachedSlotPos) item.SelectItem(itemIndex) itemType = item.GetItemType() if selectedSlotPos == 0: self.slotitem = attachedSlotPos if item.ITEM_TYPE_WEAPON == itemType or item.ITEM_TYPE_ARMOR == itemType: self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, 0) attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): type = attrSlot[i][0] value = attrSlot[i][1] affectString = self.__GetAffectString(type, value) self.bonusslot[i].SetText(affectString) else: if selectedSlotPos == 0: self.switchslot.SetItemSlot(0, 0, 0) self.slotitem = None def __OnSelectEmptySlot(self, selectedSlotPos): isAttached = mouseModule.mouseController.isAttached() if isAttached: attachedSlotType = mouseModule.mouseController.GetAttachedType() attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber() mouseModule.mouseController.DeattachObject() itemIndex = player.GetItemIndex(attachedSlotPos) itemCount = player.GetItemCount(attachedSlotPos) item.SelectItem(itemIndex) itemType = item.GetItemType() if selectedSlotPos == 0: self.slotitem = attachedSlotPos if item.ITEM_TYPE_WEAPON == itemType or item.ITEM_TYPE_ARMOR == itemType: self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, 0) attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): type = attrSlot[i][0] value = attrSlot[i][1] affectString = self.__GetAffectString(type, value) self.bonusslot[i].SetText(affectString) if selectedSlotPos == 1 and itemIndex== 71084: self.slotgira = attachedSlotPos self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, itemCount) def __GetAffectString(self, affectType, affectValue): if 0 == affectType: return None if 0 == affectValue: return None try: return self.AFFECT_DICT[affectType](affectValue) except TypeError: return "UNKNOWN_VALUE[%s] %s" % (affectType, affectValue) except KeyError: return "UNKNOWN_TYPE[%s] %s" % (affectType, affectValue) def __gira_bonus(self): self.__Switch(self.slotitem,self.slotgira) def __Switch(self,dstSlotPos,srcSlotPos): net.SendItemUseToItemPacket(srcSlotPos,dstSlotPos) #self.refresh(dstSlotPos,srcSlotPos) def refresh(self,dstSlotPos,srcSlotPos): attrSlot = [player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] for i in xrange(5): self.bonusslot[i].SetText("") for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): type = attrSlot[i][0] value = attrSlot[i][1] affectString = self.__GetAffectString(type, value) if int(value) < 0: self.bonusslot[i].SetPackedFontColor(self.NEGATIVE_COLOR) else: self.bonusslot[i].SetPackedFontColor(self.POSITIVE_COLOR) self.bonusslot[i].SetText(affectString) itemIndex = player.GetItemIndex(srcSlotPos) itemCount = player.GetItemCount(srcSlotPos) self.switchslot.ClearSlot(1) self.switchslot.SetItemSlot(1, itemIndex, itemCount) def OnUpdate(self): self.refresh(self.slotitem,self.slotgira) AFFECT_DICT = { item.APPLY_MAX_HP : locale.TOOLTIP_MAX_HP, item.APPLY_MAX_SP : locale.TOOLTIP_MAX_SP, item.APPLY_CON : locale.TOOLTIP_CON, item.APPLY_INT : locale.TOOLTIP_INT, item.APPLY_STR : locale.TOOLTIP_STR, item.APPLY_DEX : locale.TOOLTIP_DEX, item.APPLY_ATT_SPEED : locale.TOOLTIP_ATT_SPEED, item.APPLY_MOV_SPEED : locale.TOOLTIP_MOV_SPEED, item.APPLY_CAST_SPEED : locale.TOOLTIP_CAST_SPEED, item.APPLY_HP_REGEN : locale.TOOLTIP_HP_REGEN, item.APPLY_SP_REGEN : locale.TOOLTIP_SP_REGEN, item.APPLY_POISON_PCT : locale.TOOLTIP_APPLY_POISON_PCT, item.APPLY_STUN_PCT : locale.TOOLTIP_APPLY_STUN_PCT, item.APPLY_SLOW_PCT : locale.TOOLTIP_APPLY_SLOW_PCT, item.APPLY_CRITICAL_PCT : locale.TOOLTIP_APPLY_CRITICAL_PCT, item.APPLY_PENETRATE_PCT : locale.TOOLTIP_APPLY_PENETRATE_PCT, item.APPLY_ATTBONUS_WARRIOR : locale.TOOLTIP_APPLY_ATTBONUS_WARRIOR, item.APPLY_ATTBONUS_ASSASSIN : locale.TOOLTIP_APPLY_ATTBONUS_ASSASSIN, item.APPLY_ATTBONUS_SURA : locale.TOOLTIP_APPLY_ATTBONUS_SURA, item.APPLY_ATTBONUS_SHAMAN : locale.TOOLTIP_APPLY_ATTBONUS_SHAMAN, item.APPLY_ATTBONUS_MONSTER : locale.TOOLTIP_APPLY_ATTBONUS_MONSTER, item.APPLY_ATTBONUS_HUMAN : locale.TOOLTIP_APPLY_ATTBONUS_HUMAN, item.APPLY_ATTBONUS_ANIMAL : locale.TOOLTIP_APPLY_ATTBONUS_ANIMAL, item.APPLY_ATTBONUS_ORC : locale.TOOLTIP_APPLY_ATTBONUS_ORC, item.APPLY_ATTBONUS_MILGYO : locale.TOOLTIP_APPLY_ATTBONUS_MILGYO, item.APPLY_ATTBONUS_UNDEAD : locale.TOOLTIP_APPLY_ATTBONUS_UNDEAD, item.APPLY_ATTBONUS_DEVIL : locale.TOOLTIP_APPLY_ATTBONUS_DEVIL, item.APPLY_STEAL_HP : locale.TOOLTIP_APPLY_STEAL_HP, item.APPLY_STEAL_SP : locale.TOOLTIP_APPLY_STEAL_SP, item.APPLY_MANA_BURN_PCT : locale.TOOLTIP_APPLY_MANA_BURN_PCT, item.APPLY_DAMAGE_SP_RECOVER : locale.TOOLTIP_APPLY_DAMAGE_SP_RECOVER, item.APPLY_BLOCK : locale.TOOLTIP_APPLY_BLOCK, item.APPLY_DODGE : locale.TOOLTIP_APPLY_DODGE, item.APPLY_RESIST_SWORD : locale.TOOLTIP_APPLY_RESIST_SWORD, item.APPLY_RESIST_TWOHAND : locale.TOOLTIP_APPLY_RESIST_TWOHAND, item.APPLY_RESIST_DAGGER : locale.TOOLTIP_APPLY_RESIST_DAGGER, item.APPLY_RESIST_BELL : locale.TOOLTIP_APPLY_RESIST_BELL, item.APPLY_RESIST_FAN : locale.TOOLTIP_APPLY_RESIST_FAN, item.APPLY_RESIST_BOW : locale.TOOLTIP_RESIST_BOW, item.APPLY_RESIST_FIRE : locale.TOOLTIP_RESIST_FIRE, item.APPLY_RESIST_ELEC : locale.TOOLTIP_RESIST_ELEC, item.APPLY_RESIST_MAGIC : locale.TOOLTIP_RESIST_MAGIC, item.APPLY_RESIST_WIND : locale.TOOLTIP_APPLY_RESIST_WIND, item.APPLY_REFLECT_MELEE : locale.TOOLTIP_APPLY_REFLECT_MELEE, item.APPLY_REFLECT_CURSE : locale.TOOLTIP_APPLY_REFLECT_CURSE, item.APPLY_POISON_REDUCE : locale.TOOLTIP_APPLY_POISON_REDUCE, item.APPLY_KILL_SP_RECOVER : locale.TOOLTIP_APPLY_KILL_SP_RECOVER, item.APPLY_EXP_DOUBLE_BONUS : locale.TOOLTIP_APPLY_EXP_DOUBLE_BONUS, item.APPLY_GOLD_DOUBLE_BONUS : locale.TOOLTIP_APPLY_GOLD_DOUBLE_BONUS, item.APPLY_ITEM_DROP_BONUS : locale.TOOLTIP_APPLY_ITEM_DROP_BONUS, item.APPLY_POTION_BONUS : locale.TOOLTIP_APPLY_POTION_BONUS, item.APPLY_KILL_HP_RECOVER : locale.TOOLTIP_APPLY_KILL_HP_RECOVER, item.APPLY_IMMUNE_STUN : locale.TOOLTIP_APPLY_IMMUNE_STUN, item.APPLY_IMMUNE_SLOW : locale.TOOLTIP_APPLY_IMMUNE_SLOW, item.APPLY_IMMUNE_FALL : locale.TOOLTIP_APPLY_IMMUNE_FALL, item.APPLY_BOW_DISTANCE : locale.TOOLTIP_BOW_DISTANCE, item.APPLY_DEF_GRADE_BONUS : locale.TOOLTIP_DEF_GRADE, item.APPLY_ATT_GRADE_BONUS : locale.TOOLTIP_ATT_GRADE, item.APPLY_MAGIC_ATT_GRADE : locale.TOOLTIP_MAGIC_ATT_GRADE, item.APPLY_MAGIC_DEF_GRADE : locale.TOOLTIP_MAGIC_DEF_GRADE, item.APPLY_MAX_STAMINA : locale.TOOLTIP_MAX_STAMINA, item.APPLY_MALL_ATTBONUS : locale.TOOLTIP_MALL_ATTBONUS, item.APPLY_MALL_DEFBONUS : locale.TOOLTIP_MALL_DEFBONUS, item.APPLY_MALL_EXPBONUS : locale.TOOLTIP_MALL_EXPBONUS, item.APPLY_MALL_ITEMBONUS : locale.TOOLTIP_MALL_ITEMBONUS, item.APPLY_MALL_GOLDBONUS : locale.TOOLTIP_MALL_GOLDBONUS, item.APPLY_SKILL_DAMAGE_BONUS : locale.TOOLTIP_SKILL_DAMAGE_BONUS, item.APPLY_NORMAL_HIT_DAMAGE_BONUS : locale.TOOLTIP_NORMAL_HIT_DAMAGE_BONUS, item.APPLY_SKILL_DEFEND_BONUS : locale.TOOLTIP_SKILL_DEFEND_BONUS, item.APPLY_NORMAL_HIT_DEFEND_BONUS : locale.TOOLTIP_NORMAL_HIT_DEFEND_BONUS, item.APPLY_PC_BANG_EXP_BONUS : locale.TOOLTIP_MALL_EXPBONUS_P_STATIC, item.APPLY_PC_BANG_DROP_BONUS : locale.TOOLTIP_MALL_ITEMBONUS_P_STATIC, item.APPLY_RESIST_WARRIOR : locale.TOOLTIP_APPLY_RESIST_WARRIOR, item.APPLY_RESIST_ASSASSIN : locale.TOOLTIP_APPLY_RESIST_ASSASSIN, item.APPLY_RESIST_SURA : locale.TOOLTIP_APPLY_RESIST_SURA, item.APPLY_RESIST_SHAMAN : locale.TOOLTIP_APPLY_RESIST_SHAMAN, item.APPLY_MAX_HP_PCT : locale.TOOLTIP_APPLY_MAX_HP_PCT, item.APPLY_MAX_SP_PCT : locale.TOOLTIP_APPLY_MAX_SP_PCT, item.APPLY_ENERGY : locale.TOOLTIP_ENERGY, item.APPLY_COSTUME_ATTR_BONUS : locale.TOOLTIP_COSTUME_ATTR_BONUS, } the syserr if i switch 30 times it gets at the size of 2.000KB tooooo big.. Helppppppp Edited November 13, 2015 by Shisui Addition of Spoiler TAG Link to comment Share on other sites More sharing options...
Developer Deliris 405 Posted November 13, 2015 Developer Share Posted November 13, 2015 import ui import player import mouseModule import net import app import chat import snd import item import player import chat import grp import uiScriptLocale import uiRefine import uiAttachMetin import uiCommon import locale import constInfo import ime import grpText import uiToolTip Low = "low-work/system/" class Switcher(ui.ScriptWindow): POSITIVE_COLOR = grp.GenerateColor(0.5411, 0.7254, 0.5568, 1.0) NEGATIVE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0) def __init__(self): import exception ui.ScriptWindow.__init__(self) def __del__(self): ui.ScriptWindow.__del__(self) def Show(self): constInfo.SWITCH_BONUS = 1 self.__LoadWindow() ui.ScriptWindow.Show(self) def Close(self): constInfo.SWITCH_BONUS = 0 self.Hide() def OnPressEscapeKey(self): self.Close() return TRUE def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, Low + "binari2.py") except: import exception exception.Abort("CostumeWindow.LoadWindow.LoadObject") self.TitleBar = self.GetChild("TitleBar") self.switchslot = self.GetChild("switchslot") self.bonusslot = [self.GetChild2("bonus1"), self.GetChild2("bonus2"), self.GetChild2("bonus3"), self.GetChild2("bonus4"), self.GetChild2("bonus5"), ] self.buttongira = self.GetChild("gira_bonus") self.buttongira.SetEvent(ui.__mem_func__(self.__gira_bonus)) self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close)) self.switchslot.SetSelectEmptySlotEvent(ui.__mem_func__(self.__OnSelectEmptySlot)) self.switchslot.SetSelectItemSlotEvent(ui.__mem_func__(self.__OnSelectItemSlot)) self.toolTipCostume = uiToolTip.ToolTip(190) self.toolTipCostume.SetTitle(item.GetItemName()) self.slotitem = None self.slotgira = None def __OnSelectItemSlot(self, selectedSlotPos): isAttached = mouseModule.mouseController.isAttached() if isAttached: attachedSlotType = mouseModule.mouseController.GetAttachedType() attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber() mouseModule.mouseController.DeattachObject() itemIndex = player.GetItemIndex(attachedSlotPos) itemCount = player.GetItemCount(attachedSlotPos) item.SelectItem(itemIndex) itemType = item.GetItemType() if selectedSlotPos == 0: self.slotitem = attachedSlotPos if item.ITEM_TYPE_WEAPON == itemType or item.ITEM_TYPE_ARMOR == itemType: self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, 0) attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): type = attrSlot[i][0] value = attrSlot[i][1] affectString = self.__GetAffectString(type, value) self.bonusslot[i].SetText(affectString) else: if selectedSlotPos == 0: self.switchslot.SetItemSlot(0, 0, 0) self.slotitem = None def __OnSelectEmptySlot(self, selectedSlotPos): isAttached = mouseModule.mouseController.isAttached() if isAttached: attachedSlotType = mouseModule.mouseController.GetAttachedType() attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber() mouseModule.mouseController.DeattachObject() itemIndex = player.GetItemIndex(attachedSlotPos) itemCount = player.GetItemCount(attachedSlotPos) item.SelectItem(itemIndex) itemType = item.GetItemType() if selectedSlotPos == 0: self.slotitem = attachedSlotPos if item.ITEM_TYPE_WEAPON == itemType or item.ITEM_TYPE_ARMOR == itemType: self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, 0) attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): type = attrSlot[i][0] value = attrSlot[i][1] affectString = self.__GetAffectString(type, value) self.bonusslot[i].SetText(affectString) if selectedSlotPos == 1 and itemIndex== 71084: self.slotgira = attachedSlotPos self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, itemCount) def __GetAffectString(self, affectType, affectValue): if 0 == affectType: return None if 0 == affectValue: return None try: return self.AFFECT_DICT[affectType](affectValue) except TypeError: return "UNKNOWN_VALUE[%s] %s" % (affectType, affectValue) except KeyError: return "UNKNOWN_TYPE[%s] %s" % (affectType, affectValue) def __gira_bonus(self): self.__Switch(self.slotitem,self.slotgira) def __Switch(self,dstSlotPos,srcSlotPos): net.SendItemUseToItemPacket(srcSlotPos,dstSlotPos) #self.refresh(dstSlotPos,srcSlotPos) def refresh(self,dstSlotPos,srcSlotPos): attrSlot = player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM) for i in xrange(5): self.bonusslot[i].SetText("") for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): type = attrSlot[i][0] value = attrSlot[i][1] affectString = self.__GetAffectString(type, value) if int(value) < 0: self.bonusslot[i].SetPackedFontColor(self.NEGATIVE_COLOR) else: self.bonusslot[i].SetPackedFontColor(self.POSITIVE_COLOR) self.bonusslot[i].SetText(affectString) itemIndex = player.GetItemIndex(srcSlotPos) itemCount = player.GetItemCount(srcSlotPos) self.switchslot.ClearSlot(1) self.switchslot.SetItemSlot(1, itemIndex, itemCount) def OnUpdate(self): self.refresh(self.slotitem,self.slotgira) AFFECT_DICT = { item.APPLY_MAX_HP : locale.TOOLTIP_MAX_HP, item.APPLY_MAX_SP : locale.TOOLTIP_MAX_SP, item.APPLY_CON : locale.TOOLTIP_CON, item.APPLY_INT : locale.TOOLTIP_INT, item.APPLY_STR : locale.TOOLTIP_STR, item.APPLY_DEX : locale.TOOLTIP_DEX, item.APPLY_ATT_SPEED : locale.TOOLTIP_ATT_SPEED, item.APPLY_MOV_SPEED : locale.TOOLTIP_MOV_SPEED, item.APPLY_CAST_SPEED : locale.TOOLTIP_CAST_SPEED, item.APPLY_HP_REGEN : locale.TOOLTIP_HP_REGEN, item.APPLY_SP_REGEN : locale.TOOLTIP_SP_REGEN, item.APPLY_POISON_PCT : locale.TOOLTIP_APPLY_POISON_PCT, item.APPLY_STUN_PCT : locale.TOOLTIP_APPLY_STUN_PCT, item.APPLY_SLOW_PCT : locale.TOOLTIP_APPLY_SLOW_PCT, item.APPLY_CRITICAL_PCT : locale.TOOLTIP_APPLY_CRITICAL_PCT, item.APPLY_PENETRATE_PCT : locale.TOOLTIP_APPLY_PENETRATE_PCT, item.APPLY_ATTBONUS_WARRIOR : locale.TOOLTIP_APPLY_ATTBONUS_WARRIOR, item.APPLY_ATTBONUS_ASSASSIN : locale.TOOLTIP_APPLY_ATTBONUS_ASSASSIN, item.APPLY_ATTBONUS_SURA : locale.TOOLTIP_APPLY_ATTBONUS_SURA, item.APPLY_ATTBONUS_SHAMAN : locale.TOOLTIP_APPLY_ATTBONUS_SHAMAN, item.APPLY_ATTBONUS_MONSTER : locale.TOOLTIP_APPLY_ATTBONUS_MONSTER, item.APPLY_ATTBONUS_HUMAN : locale.TOOLTIP_APPLY_ATTBONUS_HUMAN, item.APPLY_ATTBONUS_ANIMAL : locale.TOOLTIP_APPLY_ATTBONUS_ANIMAL, item.APPLY_ATTBONUS_ORC : locale.TOOLTIP_APPLY_ATTBONUS_ORC, item.APPLY_ATTBONUS_MILGYO : locale.TOOLTIP_APPLY_ATTBONUS_MILGYO, item.APPLY_ATTBONUS_UNDEAD : locale.TOOLTIP_APPLY_ATTBONUS_UNDEAD, item.APPLY_ATTBONUS_DEVIL : locale.TOOLTIP_APPLY_ATTBONUS_DEVIL, item.APPLY_STEAL_HP : locale.TOOLTIP_APPLY_STEAL_HP, item.APPLY_STEAL_SP : locale.TOOLTIP_APPLY_STEAL_SP, item.APPLY_MANA_BURN_PCT : locale.TOOLTIP_APPLY_MANA_BURN_PCT, item.APPLY_DAMAGE_SP_RECOVER : locale.TOOLTIP_APPLY_DAMAGE_SP_RECOVER, item.APPLY_BLOCK : locale.TOOLTIP_APPLY_BLOCK, item.APPLY_DODGE : locale.TOOLTIP_APPLY_DODGE, item.APPLY_RESIST_SWORD : locale.TOOLTIP_APPLY_RESIST_SWORD, item.APPLY_RESIST_TWOHAND : locale.TOOLTIP_APPLY_RESIST_TWOHAND, item.APPLY_RESIST_DAGGER : locale.TOOLTIP_APPLY_RESIST_DAGGER, item.APPLY_RESIST_BELL : locale.TOOLTIP_APPLY_RESIST_BELL, item.APPLY_RESIST_FAN : locale.TOOLTIP_APPLY_RESIST_FAN, item.APPLY_RESIST_BOW : locale.TOOLTIP_RESIST_BOW, item.APPLY_RESIST_FIRE : locale.TOOLTIP_RESIST_FIRE, item.APPLY_RESIST_ELEC : locale.TOOLTIP_RESIST_ELEC, item.APPLY_RESIST_MAGIC : locale.TOOLTIP_RESIST_MAGIC, item.APPLY_RESIST_WIND : locale.TOOLTIP_APPLY_RESIST_WIND, item.APPLY_REFLECT_MELEE : locale.TOOLTIP_APPLY_REFLECT_MELEE, item.APPLY_REFLECT_CURSE : locale.TOOLTIP_APPLY_REFLECT_CURSE, item.APPLY_POISON_REDUCE : locale.TOOLTIP_APPLY_POISON_REDUCE, item.APPLY_KILL_SP_RECOVER : locale.TOOLTIP_APPLY_KILL_SP_RECOVER, item.APPLY_EXP_DOUBLE_BONUS : locale.TOOLTIP_APPLY_EXP_DOUBLE_BONUS, item.APPLY_GOLD_DOUBLE_BONUS : locale.TOOLTIP_APPLY_GOLD_DOUBLE_BONUS, item.APPLY_ITEM_DROP_BONUS : locale.TOOLTIP_APPLY_ITEM_DROP_BONUS, item.APPLY_POTION_BONUS : locale.TOOLTIP_APPLY_POTION_BONUS, item.APPLY_KILL_HP_RECOVER : locale.TOOLTIP_APPLY_KILL_HP_RECOVER, item.APPLY_IMMUNE_STUN : locale.TOOLTIP_APPLY_IMMUNE_STUN, item.APPLY_IMMUNE_SLOW : locale.TOOLTIP_APPLY_IMMUNE_SLOW, item.APPLY_IMMUNE_FALL : locale.TOOLTIP_APPLY_IMMUNE_FALL, item.APPLY_BOW_DISTANCE : locale.TOOLTIP_BOW_DISTANCE, item.APPLY_DEF_GRADE_BONUS : locale.TOOLTIP_DEF_GRADE, item.APPLY_ATT_GRADE_BONUS : locale.TOOLTIP_ATT_GRADE, item.APPLY_MAGIC_ATT_GRADE : locale.TOOLTIP_MAGIC_ATT_GRADE, item.APPLY_MAGIC_DEF_GRADE : locale.TOOLTIP_MAGIC_DEF_GRADE, item.APPLY_MAX_STAMINA : locale.TOOLTIP_MAX_STAMINA, item.APPLY_MALL_ATTBONUS : locale.TOOLTIP_MALL_ATTBONUS, item.APPLY_MALL_DEFBONUS : locale.TOOLTIP_MALL_DEFBONUS, item.APPLY_MALL_EXPBONUS : locale.TOOLTIP_MALL_EXPBONUS, item.APPLY_MALL_ITEMBONUS : locale.TOOLTIP_MALL_ITEMBONUS, item.APPLY_MALL_GOLDBONUS : locale.TOOLTIP_MALL_GOLDBONUS, item.APPLY_SKILL_DAMAGE_BONUS : locale.TOOLTIP_SKILL_DAMAGE_BONUS, item.APPLY_NORMAL_HIT_DAMAGE_BONUS : locale.TOOLTIP_NORMAL_HIT_DAMAGE_BONUS, item.APPLY_SKILL_DEFEND_BONUS : locale.TOOLTIP_SKILL_DEFEND_BONUS, item.APPLY_NORMAL_HIT_DEFEND_BONUS : locale.TOOLTIP_NORMAL_HIT_DEFEND_BONUS, item.APPLY_PC_BANG_EXP_BONUS : locale.TOOLTIP_MALL_EXPBONUS_P_STATIC, item.APPLY_PC_BANG_DROP_BONUS : locale.TOOLTIP_MALL_ITEMBONUS_P_STATIC, item.APPLY_RESIST_WARRIOR : locale.TOOLTIP_APPLY_RESIST_WARRIOR, item.APPLY_RESIST_ASSASSIN : locale.TOOLTIP_APPLY_RESIST_ASSASSIN, item.APPLY_RESIST_SURA : locale.TOOLTIP_APPLY_RESIST_SURA, item.APPLY_RESIST_SHAMAN : locale.TOOLTIP_APPLY_RESIST_SHAMAN, item.APPLY_MAX_HP_PCT : locale.TOOLTIP_APPLY_MAX_HP_PCT, item.APPLY_MAX_SP_PCT : locale.TOOLTIP_APPLY_MAX_SP_PCT, item.APPLY_ENERGY : locale.TOOLTIP_ENERGY, item.APPLY_COSTUME_ATTR_BONUS : locale.TOOLTIP_COSTUME_ATTR_BONUS, } TRY NOW.. r Link to comment Share on other sites More sharing options...
tigerstefan 4 Posted November 14, 2015 Author Share Posted November 14, 2015 Spoiler 1115 01:35:26104 :: File "ui.py", line 1021, in CallEvent 1115 01:35:26104 :: File "ui.py", line 87, in __call__ 1115 01:35:26104 :: File "ui.py", line 69, in __call__ 1115 01:35:26104 :: File "uiInventory.py", line 581, in ClickManual 1115 01:35:26104 :: File "system.py", line 130, in __pack_import 1115 01:35:26104 :: File " 1115 01:35:26104 :: uiswitch.py 1115 01:35:26104 :: ", line 1115 01:35:26104 :: 140 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: attrSlot = player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM) 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26104 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: 1115 01:35:26105 :: ^ 1115 01:35:26105 :: SyntaxError 1115 01:35:26105 :: : 1115 01:35:26105 :: invalid syntax 1115 01:35:26105 :: 1115 01:35:28041 :: Traceback (most recent call last): 1115 01:35:28041 :: File "ui.py", line 1021, in CallEvent 1115 01:35:28042 :: File "ui.py", line 87, in __call__ 1115 01:35:28042 :: File "ui.py", line 69, in __call__ 1115 01:35:28042 :: File "uiInventory.py", line 581, in ClickManual 1115 01:35:28042 :: File "system.py", line 130, in __pack_import 1115 01:35:28043 :: File " 1115 01:35:28043 :: uiswitch.py 1115 01:35:28043 :: ", line 1115 01:35:28043 :: 140 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: attrSlot = player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM) 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28043 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: 1115 01:35:28044 :: ^ 1115 01:35:28044 :: SyntaxError 1115 01:35:28044 :: : 1115 01:35:28044 :: invalid syntax 1115 01:35:28044 :: 1 Link to comment Share on other sites More sharing options...
Former Staff Shisui 491 Posted November 14, 2015 Former Staff Share Posted November 14, 2015 Spoiler http://pastebin.com/buWk7i8P Copy from here RAW Paste Data Link to comment Share on other sites More sharing options...
tigerstefan 4 Posted November 15, 2015 Author Share Posted November 15, 2015 Spoiler 1115 12:04:25535 :: Traceback (most recent call last): 1115 12:04:25535 :: File "ui.py", line 1021, in CallEvent 1115 12:04:25535 :: File "ui.py", line 87, in __call__ 1115 12:04:25535 :: File "ui.py", line 69, in __call__ 1115 12:04:25536 :: File "uiInventory.py", line 581, in ClickManual 1115 12:04:25536 :: File "system.py", line 130, in __pack_import 1115 12:04:25536 :: File " 1115 12:04:25536 :: uiswitch.py 1115 12:04:25536 :: ", line 1115 12:04:25536 :: 133 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: attrSlot = player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM) 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25536 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: 1115 12:04:25537 :: ^ line 133 made like this attrSlot = [player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] then Spoiler 1115 12:08:01852 :: Traceback (most recent call last): 1115 12:08:01852 :: File "ui.py", line 1021, in CallEvent 1115 12:08:01852 :: File "ui.py", line 87, in __call__ 1115 12:08:01852 :: File "ui.py", line 69, in __call__ 1115 12:08:01852 :: File "uiInventory.py", line 581, in ClickManual 1115 12:08:01852 :: File "system.py", line 130, in __pack_import 1115 12:08:01853 :: File " 1115 12:08:01853 :: uiswitch.py 1115 12:08:01853 :: ", line 1115 12:08:01853 :: 154 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: AFFECT_DICT = 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: 1115 12:08:01853 :: ^ 1115 12:08:01853 :: SyntaxError 1115 12:08:01853 :: : 1115 12:08:01853 :: invalid syntax 1115 12:08:01853 :: made line 154 AFFECT_DICT = { then the same problem Spoiler 1115 12:23:54214 :: Traceback (most recent call last): 1115 12:23:54214 :: File "uiswitch.py", line 153, in OnUpdate 1115 12:23:54215 :: File "uiswitch.py", line 144, in refresh 1115 12:23:54215 :: IndexError 1115 12:23:54215 :: : 1115 12:23:54215 :: list index out of range 1115 12:23:54215 :: 1115 12:23:54216 :: Traceback (most recent call last): 1115 12:23:54216 :: File "uiswitch.py", line 153, in OnUpdate 1115 12:23:54216 :: File "uiswitch.py", line 144, in refresh 1115 12:23:54217 :: IndexError 1115 12:23:54217 :: : 1115 12:23:54217 :: list index out of range 1115 12:23:54217 :: 1115 12:32:27261 :: Traceback (most recent call last): 1115 12:32:27261 :: File "uiswitch.py", line 153, in OnUpdate 1115 12:32:27261 :: File "uiswitch.py", line 133, in refresh 1115 12:32:27261 :: TypeError 1115 12:32:27261 :: : 1115 12:32:27261 :: an integer is required 1115 12:32:27261 :: 1115 12:32:27278 :: Traceback (most recent call last): 1115 12:32:27278 :: File "uiswitch.py", line 153, in OnUpdate 1115 12:32:27278 :: File "uiswitch.py", line 133, in refresh 1115 12:32:27278 :: TypeError 1115 12:32:27278 :: : 1115 12:32:27278 :: an integer is required 1115 12:32:27278 :: Plz help i cant let it like this.Or at least a method to comment the error so it never apear in syserr like i made the other switch.With this except AttributeError: print("AttributeError encountered.") but dont know where to put it in this uiswitch. 1 Link to comment Share on other sites More sharing options...
Mr. Kasch 4 Posted November 15, 2015 Share Posted November 15, 2015 search: attrSlot = [player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] and paste: try: attrSlot = [player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)] except TypeError: return Link to comment Share on other sites More sharing options...
tigerstefan 4 Posted November 15, 2015 Author Share Posted November 15, 2015 the same error ooooooooo wone if it resolved i had 2 err:) pls this how to resolv.. Spoiler 1115 13:45:10986 :: Traceback (most recent call last): 1115 13:45:10986 :: File "uiswitch.py", line 156, in OnUpdate 1115 13:45:10986 :: File "uiswitch.py", line 147, in refresh 1115 13:45:10986 :: IndexError 1115 13:45:10986 :: : 1115 13:45:10986 :: list index out of range 1115 13:45:10986 :: 1115 13:45:11003 :: Traceback (most recent call last): 1115 13:45:11003 :: File "uiswitch.py", line 156, in OnUpdate 1115 13:45:11003 :: File "uiswitch.py", line 147, in refresh 1115 13:45:11003 :: IndexError 1115 13:45:11003 :: : 1115 13:45:11003 :: list index out of range 1115 13:45:11003 :: Link to comment Share on other sites More sharing options...
Premium Dr3Ame3r 33 Posted April 12, 2018 Premium Share Posted April 12, 2018 Old but the only thing you had to do was to: search : for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2): replace: for i in xrange(0, 5): Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now