Fixed wrong pointers towards JPG files, applied script safeguards for auto potions

This commit is contained in:
Mind Rapist
2025-12-27 10:08:42 +02:00
parent 0440e53e87
commit 8305d545f5
3 changed files with 23 additions and 39 deletions

View File

@@ -51,22 +51,10 @@ import stringCommander
from _weakref import proxy from _weakref import proxy
# TEXTTAIL_LIVINGTIME_CONTROL
#if localeInfo.IsJAPAN():
# app.SetTextTailLivingTime(8.0)
# END_OF_TEXTTAIL_LIVINGTIME_CONTROL
# SCREENSHOT_CWDSAVE # SCREENSHOT_CWDSAVE
SCREENSHOT_CWDSAVE = False SCREENSHOT_CWDSAVE = False
SCREENSHOT_DIR = None SCREENSHOT_DIR = None
if localeInfo.IsEUROPE():
SCREENSHOT_CWDSAVE = True
if localeInfo.IsCIBN10():
SCREENSHOT_CWDSAVE = False
SCREENSHOT_DIR = "YT2W"
cameraDistance = 1550.0 cameraDistance = 1550.0
cameraPitch = 27.0 cameraPitch = 27.0
cameraRotation = 0.0 cameraRotation = 0.0
@@ -117,7 +105,7 @@ class GameWindow(ui.ScriptWindow):
self.playerGauge = uiPlayerGauge.PlayerGauge(self) self.playerGauge = uiPlayerGauge.PlayerGauge(self)
self.playerGauge.Hide() self.playerGauge.Hide()
#wj 2014.1.2. ESCŰ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><EFBFBD><ECBCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DropQuestionDialog<6F><67> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> itemDropQuestionDialog<6F><67> <20><><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾ<EFBFBD> ERROR<4F><52> <20>߻<EFBFBD><DFBB>Ͽ<EFBFBD> init<69><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20>ʱ<EFBFBD>ȭ <20><>Ŵ. #wj 2014.1.2. ESC키를 누를 시 우선적으로 DropQuestionDialog를 끄도록 만들었다. 하지만 처음에 itemDropQuestionDialog가 선언되어 있지 않아 ERROR가 발생하여 init에서 선언과 동시에 초기화 시킴.
self.itemDropQuestionDialog = None self.itemDropQuestionDialog = None
self.__SetQuickSlotMode() self.__SetQuickSlotMode()
@@ -226,7 +214,7 @@ class GameWindow(ui.ScriptWindow):
exception.Abort("GameWindow.Open") exception.Abort("GameWindow.Open")
# END_OF_START_GAME_ERROR_EXIT # END_OF_START_GAME_ERROR_EXIT
# NPC<EFBFBD><EFBFBD> ť<><C5A5>ý<EFBFBD><C3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>۵<EFBFBD><DBB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3> # NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱
# ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ] # ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
self.cubeInformation = {} self.cubeInformation = {}
self.currentCubeNPC = 0 self.currentCubeNPC = 0
@@ -314,10 +302,10 @@ class GameWindow(ui.ScriptWindow):
def __BuildKeyDict(self): def __BuildKeyDict(self):
onPressKeyDict = {} onPressKeyDict = {}
##PressKey <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>Ǵ<EFBFBD> Ű<>̴<EFBFBD>. ##PressKey 는 누르고 있는 동안 계속 적용되는 키이다.
## <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű <20><><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD> <20>̿<EFBFBD>ȴ<EFBFBD>.(<28><><EFBFBD><EFBFBD> <20><><EFBFBD>ڵ鵵 <20><> <20><><EFBFBD>Կ<EFBFBD> <20><><EFBFBD><EFBFBD>) ## 숫자 단축키 퀵슬롯에 이용된다.(이후 숫자들도 퀵 슬롯용 예약)
## F12 <EFBFBD><EFBFBD> Ŭ<><C5AC> <20><><EFBFBD><EFBFBD>׿<EFBFBD> Ű<>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>. ## F12 는 클라 디버그용 키이므로 쓰지 않는 게 좋다.
onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1) onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2) onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3) 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_SYSRQ] = lambda : self.SaveScreen()
onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack() onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
#ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̵<EFBFBD>Ű #캐릭터 이동키
onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp() onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown() onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft() onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
@@ -442,6 +430,7 @@ class GameWindow(ui.ScriptWindow):
def __PressNumKey(self,num): def __PressNumKey(self,num):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if num >= 1 and num <= 9: if num >= 1 and num <= 9:
if(chrmgr.IsPossibleEmoticon(-1)): if(chrmgr.IsPossibleEmoticon(-1)):
chrmgr.SetEmoticon(-1,int(num)-1) chrmgr.SetEmoticon(-1,int(num)-1)
@@ -518,13 +507,13 @@ class GameWindow(ui.ScriptWindow):
self.pressNumber=ui.__mem_func__(self.__SelectQuickPage) self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
def __PressQuickSlot(self, localSlotIndex): def __PressQuickSlot(self, localSlotIndex):
if localeInfo.IsARABIC(): if app.IsRTL():
if 0 <= localSlotIndex and localSlotIndex < 4: if 0 <= localSlotIndex and localSlotIndex < 4:
player.RequestUseLocalQuickSlot(3-localSlotIndex) player.RequestUseLocalQuickSlot(3-localSlotIndex)
else: else:
player.RequestUseLocalQuickSlot(11-localSlotIndex) player.RequestUseLocalQuickSlot(11-localSlotIndex)
else: else:
player.RequestUseLocalQuickSlot(localSlotIndex) player.RequestUseLocalQuickSlot(localSlotIndex)
def __SelectQuickPage(self, pageIndex): def __SelectQuickPage(self, pageIndex):
self.quickSlotPageIndex = pageIndex self.quickSlotPageIndex = pageIndex
@@ -583,12 +572,12 @@ class GameWindow(ui.ScriptWindow):
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT) self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100) self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>׸<EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> # 오브젝트 그리는 개수
self.ObjectNum = ui.TextLine() self.ObjectNum = ui.TextLine()
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT) self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120) self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
# <EFBFBD>þ߰Ÿ<EFBFBD> # 시야거리
self.ViewDistance = ui.TextLine() self.ViewDistance = ui.TextLine()
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT) self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
self.ViewDistance.SetPosition(0, 0) self.ViewDistance.SetPosition(0, 0)
@@ -1326,7 +1315,6 @@ class GameWindow(ui.ScriptWindow):
if isActivated: if isActivated:
net.SendItemUsePacket(attachedItemSlotPos) net.SendItemUsePacket(attachedItemSlotPos)
# MR-3: -- END OF -- Auto-deactivate auto potions before moving out # MR-3: -- END OF -- Auto-deactivate auto potions before moving out
if chr.IsNPC(dstChrID): if chr.IsNPC(dstChrID):
net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount) net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
else: else:
@@ -1343,7 +1331,7 @@ class GameWindow(ui.ScriptWindow):
self.__DropMoney(attachedType, attachedMoney) self.__DropMoney(attachedType, attachedMoney)
def __DropMoney(self, attachedType, attachedMoney): def __DropMoney(self, attachedType, attachedMoney):
# PRIVATESHOP_DISABLE_ITEM_DROP - <EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
if uiPrivateShopBuilder.IsBuildingPrivateShop(): if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return return
@@ -1365,7 +1353,7 @@ class GameWindow(ui.ScriptWindow):
self.itemDropQuestionDialog = itemDropQuestionDialog self.itemDropQuestionDialog = itemDropQuestionDialog
def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount): def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
# PRIVATESHOP_DISABLE_ITEM_DROP - <EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
if uiPrivateShopBuilder.IsBuildingPrivateShop(): if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return return
@@ -1497,7 +1485,7 @@ class GameWindow(ui.ScriptWindow):
def UpdateDebugInfo(self): def UpdateDebugInfo(self):
# #
# ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ǥ <20><> FPS <EFBFBD><EFBFBD><EFBFBD> # 캐릭터 좌표 및 FPS 출력
(x, y, z) = player.GetMainCharacterPosition() (x, y, z) = player.GetMainCharacterPosition()
nUpdateTime = app.GetUpdateTime() nUpdateTime = app.GetUpdateTime()
nUpdateFPS = app.GetUpdateFPS() nUpdateFPS = app.GetUpdateFPS()
@@ -1660,22 +1648,22 @@ class GameWindow(ui.ScriptWindow):
def BINARY_Cube_Close(self): def BINARY_Cube_Close(self):
self.interface.CloseCubeWindow() self.interface.CloseCubeWindow()
# <EFBFBD><EFBFBD><EFBFBD>ۿ<EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ϼ<EFBFBD>ǰ<EFBFBD><C7B0> VNUM<55><4D> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> update # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count): def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
self.interface.UpdateCubeInfo(gold, itemVnum, count) self.interface.UpdateCubeInfo(gold, itemVnum, count)
def BINARY_Cube_Succeed(self, itemVnum, count): def BINARY_Cube_Succeed(self, itemVnum, count):
print "ť<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" print "큐브 제작 성공"
self.interface.SucceedCubeWork(itemVnum, count) self.interface.SucceedCubeWork(itemVnum, count)
pass pass
def BINARY_Cube_Failed(self): def BINARY_Cube_Failed(self):
print "ť<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" print "큐브 제작 실패"
self.interface.FailedCubeWork() self.interface.FailedCubeWork()
pass pass
def BINARY_Cube_ResultList(self, npcVNUM, listText): def BINARY_Cube_ResultList(self, npcVNUM, listText):
# ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 <EFBFBD>̷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "/" <20><><EFBFBD>ڷ<EFBFBD> <20><><EFBFBD>е<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><> # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 이런식으로 "/" 문자로 구분된 리스트를 줌
#print listText #print listText
if npcVNUM == 0: if npcVNUM == 0:
@@ -1776,7 +1764,7 @@ class GameWindow(ui.ScriptWindow):
# END_OF_CUBE # END_OF_CUBE
# <EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD> # 용혼석
def BINARY_Highlight_Item(self, inven_type, inven_pos): def BINARY_Highlight_Item(self, inven_type, inven_pos):
self.interface.Highligt_Item(inven_type, inven_pos) self.interface.Highligt_Item(inven_type, inven_pos)

View File

@@ -4,7 +4,7 @@ import net
import localeInfo import localeInfo
import chat import chat
import item import item
import constInfo
import ui import ui
import mouseModule import mouseModule
import uiPickMoney import uiPickMoney
@@ -116,6 +116,7 @@ class ExchangeDialog(ui.ScriptWindow):
self.AcceptButton.Disable() self.AcceptButton.Disable()
def SelectOwnerEmptySlot(self, SlotIndex): def SelectOwnerEmptySlot(self, SlotIndex):
if False == mouseModule.mouseController.isAttached(): if False == mouseModule.mouseController.isAttached():
return return
@@ -123,13 +124,13 @@ class ExchangeDialog(ui.ScriptWindow):
net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount()) net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
else: else:
attachedSlotType = mouseModule.mouseController.GetAttachedType() attachedSlotType = mouseModule.mouseController.GetAttachedType()
if (player.SLOT_TYPE_INVENTORY == attachedSlotType if (player.SLOT_TYPE_INVENTORY == attachedSlotType
or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType): or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType):
attachedInvenType = player.SlotTypeToInvenType(attachedSlotType) attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber() SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
DstSlotNumber = SlotIndex DstSlotNumber = SlotIndex
itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber) itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
# MR-3: Auto-deactivate auto potions before moving out # MR-3: Auto-deactivate auto potions before moving out
@@ -143,13 +144,11 @@ class ExchangeDialog(ui.ScriptWindow):
if isActivated: if isActivated:
net.SendItemUsePacket(SrcSlotNumber) net.SendItemUsePacket(SrcSlotNumber)
# MR-3: -- END OF -- Auto-deactivate auto potions before moving out # MR-3: -- END OF -- Auto-deactivate auto potions before moving out
item.SelectItem(itemID) item.SelectItem(itemID)
if item.IsAntiFlag(item.ANTIFLAG_GIVE): if item.IsAntiFlag(item.ANTIFLAG_GIVE):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE) chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
mouseModule.mouseController.DeattachObject() mouseModule.mouseController.DeattachObject()
return return
net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber) net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)

View File

@@ -22,10 +22,7 @@ class PasswordDialog(ui.ScriptWindow):
def __LoadDialog(self): def __LoadDialog(self):
try: try:
pyScrLoader = ui.PythonScriptLoader() pyScrLoader = ui.PythonScriptLoader()
# if localeInfo.IsEUROPE()and app.GetLocalePath() != "locale/ca"and app.GetLocalePath() != "locale/sg" : pyScrLoader.LoadScriptFile(self, "uiscript/passworddialog.py")
pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "passworddialog.py")
# else:
# pyScrLoader.LoadScriptFile(self, "uiscript/passworddialog.py")
except: except:
import exception import exception
exception.Abort("PasswordDialog.__LoadDialog.LoadObject") exception.Abort("PasswordDialog.__LoadDialog.LoadObject")