Jump to content

Help with Transmutation-System


Recommended Posts

Hi guys, I mounted the projection transmutation system but I have this error in the client sysser.txt.
Can anyone help me with a fix?

 

Spoiler

0728 20:53:27529 :: Traceback (most recent call last):

0728 20:53:27530 ::   File "networkModule.py", line 239, in SetGamePhase

0728 20:53:27530 ::   File "game.py", line 99, in __init__

0728 20:53:27530 ::   File "interfaceModule.py", line 324, in MakeInterface

0728 20:53:27530 ::   File "interfaceModule.py", line 274, in __MakeChangeLookWindow

0728 20:53:27530 ::   File "uichangelook.py", line 69, in LoadWindow

0728 20:53:27530 :: TypeError
0728 20:53:27530 :: : 
0728 20:53:27530 :: not all arguments converted during string formatting
0728 20:53:27530 :: 

 

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

On 7/29/2021 at 7:40 AM, FlorinMarian said:

Publish your uichangelook.py.

Best regards, Florin.

Spoiler

import ui
import player
import uiCommon
import uiToolTip
import changelook
import localeInfo
import mouseModule

class Window(ui.ScriptWindow):
    def NumberToMoneyString(self, number):
        number = str(number)
        strNumber = "%s" % (','.join([number[::-1][k : k + 3][::-1] for k in xrange(len(number)+1, -1, -3)]))
        strNumber = strNumber[1:]
        return "%s" % (strNumber)

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.isLoaded = 0
        self.PositionOut = 0
        self.PositionStartX = 0
        self.PositionStartY = 0
        self.dialog = None

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

    def Destroy(self):
        self.ClearDictionary()
        self.titleBar = None
        self.titleName = None
        self.accept = None
        self.cancel = None
        self.slot = None
        self.cost = None
        self.PositionOut = 0
        self.PositionStartX = 0
        self.PositionStartY = 0
        self.dialog = None

    def LoadWindow(self):
        if self.isLoaded:
            return
        
        self.isLoaded = 1
        
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/changelookwindow.py")
            
        except:
            import exception
            exception.Abort("ChangeLookWindow.LoadDialog.LoadScript")
        
        try:
            self.titleBar = self.GetChild("TitleBar")
            self.titleName = self.GetChild("TitleName")
            self.accept = self.GetChild("AcceptButton")
            self.cancel = self.GetChild("CancelButton")
            self.cost = self.GetChild("Cost")
            self.slot = self.GetChild("ChangeLookSlot")
        except:
            import exception
            exception.Abort("ChangeLookWindow.LoadDialog.BindObject")
        
        self.titleBar.SetCloseEvent(ui.__mem_func__(self.OnClose))
        self.titleName.SetText(localeInfo.CHANGE_LOOK_TITLE)
        self.cancel.SetEvent(ui.__mem_func__(self.OnClose))
        self.accept.SetEvent(ui.__mem_func__(self.OnPressAccept))
        self.cost.SetText(localeInfo.CHANGE_LOOK_COST % (self.NumberToMoneyString(changelook.GetCost())))
        self.slot.SetSelectEmptySlotEvent(ui.__mem_func__(self.OnSelectEmptySlot))
        self.slot.SetUnselectItemSlotEvent(ui.__mem_func__(self.OnSelectItemSlot))
        self.slot.SetUseSlotEvent(ui.__mem_func__(self.OnSelectItemSlot))
        self.slot.SetOverInItemEvent(ui.__mem_func__(self.OnOverInItem))
        self.slot.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem))
        self.tooltipItem = None

    def SetItemToolTip(self, itemTooltip):
        self.tooltipItem = itemTooltip

    def IsOpened(self):
        if self.IsShow() and self.isLoaded:
            return True
        
        return False

    def Open(self):
        self.PositionOut = 0
        (self.PositionStartX, self.PositionStartY, z) = player.GetMainCharacterPosition()
        self.cost.SetText(localeInfo.CHANGE_LOOK_COST % (self.NumberToMoneyString(changelook.GetCost())))
        for i in xrange(changelook.WINDOW_MAX_MATERIALS):
            self.slot.ClearSlot(i)
        
        self.Show()

    def Close(self):
        if self.tooltipItem:
            self.tooltipItem.HideToolTip()
        
        self.OnCancelAccept()
        self.Hide()

    def OnClose(self):
        changelook.SendCloseRequest()

    def OnPressEscapeKey(self):
        self.OnClose()
        return True

    def OnPressAccept(self):
        (isHere, iCell) = changelook.GetAttachedItem(1)
        if not isHere:
            return
        
        dialog = uiCommon.QuestionDialog()
        dialog.SetText(localeInfo.CHANGE_LOOK_CHANGE_ITEM)
        dialog.SetAcceptEvent(ui.__mem_func__(self.OnAccept))
        dialog.SetCancelEvent(ui.__mem_func__(self.OnCancelAccept))
        dialog.Open()
        self.dialog = dialog

    def OnAccept(self):
        changelook.SendRefineRequest()
        self.OnCancelAccept()

    def OnCancelAccept(self):
        if self.dialog:
            self.dialog.Close()
        
        self.dialog = None
        return True

    def OnUpdate(self):
        LIMIT_RANGE = changelook.LIMIT_RANGE
        (x, y, z) = player.GetMainCharacterPosition()
        if abs(x - self.PositionStartX) >= LIMIT_RANGE or abs(y - self.PositionStartY) >= LIMIT_RANGE:
            if not self.PositionOut:
                self.PositionOut += 1
                self.OnClose()

    def OnSelectEmptySlot(self, selectedSlotPos):
        isAttached = mouseModule.mouseController.isAttached()
        if not isAttached:
            return
        
        attachedSlotType = mouseModule.mouseController.GetAttachedType()
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
        mouseModule.mouseController.DeattachObject()
        if attachedSlotType == player.SLOT_TYPE_INVENTORY and attachedInvenType == player.INVENTORY:
            changelook.Add(attachedInvenType, attachedSlotPos, selectedSlotPos)

    def OnSelectItemSlot(self, selectedSlotPos):
        mouseModule.mouseController.DeattachObject()
        changelook.Remove(selectedSlotPos)

    def OnOverInItem(self, selectedSlotPos):
        if self.tooltipItem:
            (isHere, iCell) = changelook.GetAttachedItem(selectedSlotPos)
            if isHere:
                self.tooltipItem.SetInventoryItem(iCell)

    def OnOverOutItem(self):
        if self.tooltipItem:
            self.tooltipItem.HideToolTip()

    def Refresh(self):
        for i in xrange(changelook.WINDOW_MAX_MATERIALS):
            self.slot.ClearSlot(i)
            (isHere, iCell) = changelook.GetAttachedItem(i)
            if isHere:
                self.slot.SetItemSlot(i, player.GetItemIndex(iCell), 1)

This my uichangelook.py @FlorinMarian

Edited by topolino1958
Link to comment
Share on other sites

  • 2 weeks later...
On 7/28/2021 at 9:01 PM, topolino1958 said:

Hi guys, I mounted the projection transmutation system but I have this error in the client sysser.txt.
Can anyone help me with a fix?

 

  Reveal hidden contents

0728 20:53:27529 :: Traceback (most recent call last):

0728 20:53:27530 ::   File "networkModule.py", line 239, in SetGamePhase

0728 20:53:27530 ::   File "game.py", line 99, in __init__

0728 20:53:27530 ::   File "interfaceModule.py", line 324, in MakeInterface

0728 20:53:27530 ::   File "interfaceModule.py", line 274, in __MakeChangeLookWindow

0728 20:53:27530 ::   File "uichangelook.py", line 69, in LoadWindow

0728 20:53:27530 :: TypeError
0728 20:53:27530 :: : 
0728 20:53:27530 :: not all arguments converted during string formatting
0728 20:53:27530 :: 

 

 

Guys after fixing the sysser.txt that I had posted above, now I have others someone knows how can you solve?

 

Spoiler

0810 22:50:49069 :: Traceback (most recent call last):

0810 22:50:49069 ::   File "game.py", line 2211, in ActChangeLook

0810 22:50:49069 :: AttributeError
0810 22:50:49069 :: : 
0810 22:50:49069 :: 'Interface' object has no attribute 'ActChangeLook'
0810 22:50:49069 :: 

 

Edited by topolino1958
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 3

      Crystal Metinstone

    2. 3

      Feeding game source to LLM

    3. 113

      Ulthar SF V2 (TMP4 Base)

    4. 3

      Feeding game source to LLM

    5. 0

      Target Information System

    6. 3

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.