From 8305d545f5c9be49d93281a68666c6fa9f2fbe36 Mon Sep 17 00:00:00 2001 From: Mind Rapist Date: Sat, 27 Dec 2025 10:08:42 +0200 Subject: [PATCH] Fixed wrong pointers towards JPG files, applied script safeguards for auto potions --- assets/root/game.py | 50 +++++++++++++++------------------------ assets/root/uiexchange.py | 7 +++--- assets/root/uisafebox.py | 5 +--- 3 files changed, 23 insertions(+), 39 deletions(-) diff --git a/assets/root/game.py b/assets/root/game.py index dce69c98..8bebd17c 100644 --- a/assets/root/game.py +++ b/assets/root/game.py @@ -51,22 +51,10 @@ import stringCommander from _weakref import proxy -# TEXTTAIL_LIVINGTIME_CONTROL -#if localeInfo.IsJAPAN(): -# app.SetTextTailLivingTime(8.0) -# END_OF_TEXTTAIL_LIVINGTIME_CONTROL - # SCREENSHOT_CWDSAVE SCREENSHOT_CWDSAVE = False SCREENSHOT_DIR = None -if localeInfo.IsEUROPE(): - SCREENSHOT_CWDSAVE = True - -if localeInfo.IsCIBN10(): - SCREENSHOT_CWDSAVE = False - SCREENSHOT_DIR = "YT2W" - cameraDistance = 1550.0 cameraPitch = 27.0 cameraRotation = 0.0 @@ -117,7 +105,7 @@ class GameWindow(ui.ScriptWindow): self.playerGauge = uiPlayerGauge.PlayerGauge(self) self.playerGauge.Hide() - #wj 2014.1.2. ESCŰ�� ���� �� �켱������ DropQuestionDialog�� ������ �������. ������ ó���� itemDropQuestionDialog�� ����Ǿ� ���� �ʾ� ERROR�� �߻��Ͽ� init���� ����� ���ÿ� �ʱ�ȭ ��Ŵ. + #wj 2014.1.2. ESC키를 누를 시 우선적으로 DropQuestionDialog를 끄도록 만들었다. 하지만 처음에 itemDropQuestionDialog가 선언되어 있지 않아 ERROR가 발생하여 init에서 선언과 동시에 초기화 시킴. self.itemDropQuestionDialog = None self.__SetQuickSlotMode() @@ -226,7 +214,7 @@ class GameWindow(ui.ScriptWindow): exception.Abort("GameWindow.Open") # END_OF_START_GAME_ERROR_EXIT - # NPC�� ť��ý������� ���� �� �ִ� �����۵��� ����� ij�� + # NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱 # ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ] self.cubeInformation = {} self.currentCubeNPC = 0 @@ -314,10 +302,10 @@ class GameWindow(ui.ScriptWindow): def __BuildKeyDict(self): onPressKeyDict = {} - ##PressKey �� ������ �ִ� ���� ��� ����Ǵ� Ű�̴�. + ##PressKey 는 누르고 있는 동안 계속 적용되는 키이다. - ## ���� ����Ű �����Կ� �̿�ȴ�.(���� ���ڵ鵵 �� ���Կ� ����) - ## F12 �� Ŭ�� ����׿� Ű�̹Ƿ� ���� �ʴ� �� ����. + ## 숫자 단축키 퀵슬롯에 이용된다.(이후 숫자들도 퀵 슬롯용 예약) + ## F12 는 클라 디버그용 키이므로 쓰지 않는 게 좋다. onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1) onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2) onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3) @@ -337,7 +325,7 @@ class GameWindow(ui.ScriptWindow): onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen() onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack() - #ij���� �̵�Ű + #캐릭터 이동키 onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp() onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown() onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft() @@ -442,6 +430,7 @@ class GameWindow(ui.ScriptWindow): def __PressNumKey(self,num): if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): + if num >= 1 and num <= 9: if(chrmgr.IsPossibleEmoticon(-1)): chrmgr.SetEmoticon(-1,int(num)-1) @@ -518,13 +507,13 @@ class GameWindow(ui.ScriptWindow): self.pressNumber=ui.__mem_func__(self.__SelectQuickPage) def __PressQuickSlot(self, localSlotIndex): - if localeInfo.IsARABIC(): + if app.IsRTL(): if 0 <= localSlotIndex and localSlotIndex < 4: player.RequestUseLocalQuickSlot(3-localSlotIndex) else: player.RequestUseLocalQuickSlot(11-localSlotIndex) else: - player.RequestUseLocalQuickSlot(localSlotIndex) + player.RequestUseLocalQuickSlot(localSlotIndex) def __SelectQuickPage(self, pageIndex): self.quickSlotPageIndex = pageIndex @@ -583,12 +572,12 @@ class GameWindow(ui.ScriptWindow): self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT) self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100) - # ������Ʈ �׸��� ���� + # 오브젝트 그리는 개수 self.ObjectNum = ui.TextLine() self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT) self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120) - # �þ߰Ÿ� + # 시야거리 self.ViewDistance = ui.TextLine() self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT) self.ViewDistance.SetPosition(0, 0) @@ -1326,7 +1315,6 @@ class GameWindow(ui.ScriptWindow): if isActivated: net.SendItemUsePacket(attachedItemSlotPos) # MR-3: -- END OF -- Auto-deactivate auto potions before moving out - if chr.IsNPC(dstChrID): net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount) else: @@ -1343,7 +1331,7 @@ class GameWindow(ui.ScriptWindow): self.__DropMoney(attachedType, attachedMoney) def __DropMoney(self, attachedType, attachedMoney): - # PRIVATESHOP_DISABLE_ITEM_DROP - ���λ��� ���� �ִ� ���� ������ ���� ���� + # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지 if uiPrivateShopBuilder.IsBuildingPrivateShop(): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) return @@ -1365,7 +1353,7 @@ class GameWindow(ui.ScriptWindow): self.itemDropQuestionDialog = itemDropQuestionDialog def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount): - # PRIVATESHOP_DISABLE_ITEM_DROP - ���λ��� ���� �ִ� ���� ������ ���� ���� + # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지 if uiPrivateShopBuilder.IsBuildingPrivateShop(): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) return @@ -1497,7 +1485,7 @@ class GameWindow(ui.ScriptWindow): def UpdateDebugInfo(self): # - # ij���� ��ǥ �� FPS ��� + # 캐릭터 좌표 및 FPS 출력 (x, y, z) = player.GetMainCharacterPosition() nUpdateTime = app.GetUpdateTime() nUpdateFPS = app.GetUpdateFPS() @@ -1660,22 +1648,22 @@ class GameWindow(ui.ScriptWindow): def BINARY_Cube_Close(self): self.interface.CloseCubeWindow() - # ���ۿ� �ʿ��� ���, ����Ǵ� �ϼ�ǰ�� VNUM�� ���� ���� update + # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count): self.interface.UpdateCubeInfo(gold, itemVnum, count) def BINARY_Cube_Succeed(self, itemVnum, count): - print "ť�� ���� ����" + print "큐브 제작 성공" self.interface.SucceedCubeWork(itemVnum, count) pass def BINARY_Cube_Failed(self): - print "ť�� ���� ����" + print "큐브 제작 실패" self.interface.FailedCubeWork() pass def BINARY_Cube_ResultList(self, npcVNUM, listText): - # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 �̷������� "/" ���ڷ� ���е� ����Ʈ�� �� + # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 이런식으로 "/" 문자로 구분된 리스트를 줌 #print listText if npcVNUM == 0: @@ -1776,7 +1764,7 @@ class GameWindow(ui.ScriptWindow): # END_OF_CUBE - # ��ȥ�� + # 용혼석 def BINARY_Highlight_Item(self, inven_type, inven_pos): self.interface.Highligt_Item(inven_type, inven_pos) diff --git a/assets/root/uiexchange.py b/assets/root/uiexchange.py index ed23abc1..8a78027e 100644 --- a/assets/root/uiexchange.py +++ b/assets/root/uiexchange.py @@ -4,7 +4,7 @@ import net import localeInfo import chat import item -import constInfo + import ui import mouseModule import uiPickMoney @@ -116,6 +116,7 @@ class ExchangeDialog(ui.ScriptWindow): self.AcceptButton.Disable() def SelectOwnerEmptySlot(self, SlotIndex): + if False == mouseModule.mouseController.isAttached(): return @@ -123,13 +124,13 @@ class ExchangeDialog(ui.ScriptWindow): net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount()) else: attachedSlotType = mouseModule.mouseController.GetAttachedType() - if (player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType): attachedInvenType = player.SlotTypeToInvenType(attachedSlotType) SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber() DstSlotNumber = SlotIndex + itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber) # MR-3: Auto-deactivate auto potions before moving out @@ -143,13 +144,11 @@ class ExchangeDialog(ui.ScriptWindow): if isActivated: net.SendItemUsePacket(SrcSlotNumber) # MR-3: -- END OF -- Auto-deactivate auto potions before moving out - item.SelectItem(itemID) if item.IsAntiFlag(item.ANTIFLAG_GIVE): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE) mouseModule.mouseController.DeattachObject() - return net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber) diff --git a/assets/root/uisafebox.py b/assets/root/uisafebox.py index 496a52e9..a0db7e38 100644 --- a/assets/root/uisafebox.py +++ b/assets/root/uisafebox.py @@ -22,10 +22,7 @@ class PasswordDialog(ui.ScriptWindow): def __LoadDialog(self): try: pyScrLoader = ui.PythonScriptLoader() -# if localeInfo.IsEUROPE()and app.GetLocalePath() != "locale/ca"and app.GetLocalePath() != "locale/sg" : - pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "passworddialog.py") -# else: -# pyScrLoader.LoadScriptFile(self, "uiscript/passworddialog.py") + pyScrLoader.LoadScriptFile(self, "uiscript/passworddialog.py") except: import exception exception.Abort("PasswordDialog.__LoadDialog.LoadObject")