Guest User

game.py

a guest
Nov 3rd, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 152.34 KB | None | 0 0
  1. import os
  2. import app
  3. import dbg
  4. import grp
  5. import item
  6. import background
  7. import chr
  8. import chrmgr
  9. import event
  10. import player
  11. import snd
  12. import chat
  13. import textTail
  14. import net
  15. import snd
  16. import net
  17. import effect
  18. import wndMgr
  19. import fly
  20. import systemSetting
  21. import quest
  22. import guild
  23. import skill
  24. import messenger
  25. import localeInfo
  26. import constInfo
  27. import exchange
  28. import ime
  29. import serverInfo
  30. import uiWarBoard
  31. import ui
  32. import uiCommon
  33. import uiPhaseCurtain
  34. import uiMapNameShower
  35. import uiAffectShower
  36. import uiPlayerGauge
  37. import uiCharacter
  38. import uiTarget
  39. import guildwarkillcounter
  40. # PRIVATE_SHOP_PRICE_LIST
  41. import uiPrivateShopBuilder
  42. # END_OF_PRIVATE_SHOP_PRICE_LIST
  43. import uiBonusPage
  44. import mouseModule
  45. import consoleModule
  46. import localeInfo
  47. import titan2_setari_module_jucatori
  48. import interfaceModule
  49. import uiswitchbot
  50. import debugInfo
  51. import stringCommander
  52.  
  53. from _weakref import proxy
  54.  
  55. # TEXTTAIL_LIVINGTIME_CONTROL
  56. #if localeInfo.IsJAPAN():
  57. # app.SetTextTailLivingTime(8.0)
  58. # END_OF_TEXTTAIL_LIVINGTIME_CONTROL
  59.  
  60. # SCREENSHOT_CWDSAVE
  61. SCREENSHOT_CWDSAVE = False
  62. SCREENSHOT_DIR = None
  63.  
  64. if localeInfo.IsEUROPE():
  65. SCREENSHOT_CWDSAVE = True
  66.  
  67. if localeInfo.IsCIBN10():
  68. SCREENSHOT_CWDSAVE = False
  69. SCREENSHOT_DIR = "YT2W"
  70.  
  71. cameraDistance = 1550.0
  72. cameraPitch = 27.0
  73. cameraRotation = 0.0
  74. cameraHeight = 100.0
  75.  
  76. testAlignment = 0
  77. BPisLoaded = 0
  78.  
  79. class GameWindow(ui.ScriptWindow):
  80. def __init__(self, stream):
  81. ui.ScriptWindow.__init__(self, "GAME")
  82. self.SetWindowName("game")
  83. net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
  84. player.SetGameWindow(self)
  85.  
  86. self.quickSlotPageIndex = 0
  87. self.lastPKModeSendedTime = 0
  88. self.pressNumber = None
  89.  
  90. self.guildWarQuestionDialog = None
  91. self.interface = None
  92. self.targetBoard = None
  93. if app.ENABLE_SHIP_DEFENSE:
  94. self.allyTargetBoard = None
  95. self.console = None
  96. self.mapNameShower = None
  97. self.affectShower = None
  98. self.playerGauge = None
  99. constInfo.wndWarBoard = uiWarBoard.WarBoardWindow()
  100. self.stream=stream
  101. self.interface = interfaceModule.Interface()
  102. self.interface.MakeInterface()
  103. self.interface.ShowDefaultWindows()
  104.  
  105. self.curtain = uiPhaseCurtain.PhaseCurtain()
  106. self.curtain.speed = 0.03
  107. self.curtain.Hide()
  108.  
  109. self.targetBoard = uiTarget.TargetBoard()
  110. self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
  111. self.targetBoard.Hide()
  112.  
  113. if app.ENABLE_SHIP_DEFENSE:
  114. self.allyTargetBoard = uiTarget.AllianceTargetBoard()
  115. self.allyTargetBoard.Hide()
  116. self.interface.SetAllianceTargetBoard(self.allyTargetBoard)
  117.  
  118. self.console = consoleModule.ConsoleWindow()
  119. self.console.BindGameClass(self)
  120. self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
  121. self.console.Hide()
  122.  
  123. self.mapNameShower = uiMapNameShower.MapNameShower()
  124. self.affectShower = uiAffectShower.AffectShower()
  125.  
  126. self.playerGauge = uiPlayerGauge.PlayerGauge(self)
  127. self.playerGauge.Hide()
  128.  
  129. self.guildScoreCounter = guildwarkillcounter.MessageQueue()
  130.  
  131. #wj 2014.1.2. ESC키를 누를 시 우선적으로 DropQuestionDialog를 끄도록 만들었다. 하지만 처음에 itemDropQuestionDialog가 선언되어 있지 않아 ERROR가 발생하여 init에서 선언과 동시에 초기화 시킴.
  132. self.itemDropQuestionDialog = None
  133.  
  134. self.__SetQuickSlotMode()
  135.  
  136. self.__ServerCommand_Build()
  137. self.__ProcessPreservedServerCommand()
  138.  
  139. self.pingLine = None
  140.  
  141. if app.ENABLE_FEATURES_OXEVENT:
  142. import uioxevent
  143. self.eventWindowLogin = uioxevent.OxEventManagerLogin()
  144. self.eventWindowManager = uioxevent.OxEventManager()
  145. self.eventWindow = uioxevent.OxEventWinners()
  146.  
  147. def __del__(self):
  148. player.SetGameWindow(0)
  149. net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
  150. ui.ScriptWindow.__del__(self)
  151.  
  152. def Open(self):
  153. app.SetFrameSkip(1)
  154.  
  155. self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
  156.  
  157. #EMOTE_SYSTEM_LOL
  158.  
  159. EmoteInterfaceWindow = ui.AniImageBox()
  160. EmoteInterfaceWindow.AppendImage("d:/ymir work/ui/emotes/emote_interface.tga")
  161. self.EmoteInterfaceWindow = EmoteInterfaceWindow
  162. self.EmoteInterfaceWindow.SetPosition(wndMgr.GetScreenWidth()/2-(206/2),(wndMgr.GetScreenHeight()/2-(206/2)))
  163. self.EmoteInterfaceWindow.SetSize(206, 206)
  164. self.EmoteInterfaceWindow.AddFlag("float")
  165. self.EmoteInterfaceWindow.AddFlag("movable")
  166.  
  167. self.EmoteInterfaceClose = ui.Button()
  168. self.EmoteInterfaceClose.SetParent(self.EmoteInterfaceWindow)
  169. self.EmoteInterfaceClose.SetPosition(70, 67)
  170. self.EmoteInterfaceClose.SetUpVisual("d:/ymir work/ui/emotes/close_interface_x_norm.tga")
  171. self.EmoteInterfaceClose.SetOverVisual("d:/ymir work/ui/emotes/close_interface_x_hover.tga")
  172. self.EmoteInterfaceClose.SetDownVisual("d:/ymir work/ui/emotes/close_interface_x_norm.tga")
  173. self.EmoteInterfaceClose.SetEvent(self.__hideemoteinterface)
  174.  
  175. self.Emote_System_Activate = ui.Button()
  176. self.Emote_System_Activate.SetParent(self.EmoteInterfaceWindow)
  177. self.Emote_System_Activate.SetTop()
  178. self.Emote_System_Activate.SetPosition(0, 0)
  179. self.Emote_System_Activate.SetUpVisual("d:/ymir work/ui/emotes/emote_buton_norm.tga")
  180. self.Emote_System_Activate.SetOverVisual("d:/ymir work/ui/emotes/emote_buton_hover.tga")
  181. self.Emote_System_Activate.SetDownVisual("d:/ymir work/ui/emotes/emote_buton_norm.tga")
  182. self.Emote_System_Activate.SetEvent(self.__activare_emote_system)
  183.  
  184. ActiveEmoticonStateForInterface = ui.ImageBox()
  185. self.ActiveEmoticonStateForInterface = ActiveEmoticonStateForInterface
  186. self.ActiveEmoticonStateForInterface.SetPosition(23, 23)
  187. self.ActiveEmoticonStateForInterface.SetSize(0, 0)
  188.  
  189. #Second interface
  190.  
  191. EmoteInventoryWindow = ui.AniImageBox()
  192. EmoteInventoryWindow.AppendImage("d:/ymir work/ui/emotes/emote_inventory.tga")
  193. self.EmoteInventoryWindow = EmoteInventoryWindow
  194. self.EmoteInventoryWindow.SetPosition(wndMgr.GetScreenWidth()/2-(300/2),(wndMgr.GetScreenHeight()/2-(350/2)))
  195. self.EmoteInventoryWindow.SetSize(300, 369)
  196. self.EmoteInventoryWindow.AddFlag("float")
  197. self.EmoteInventoryWindow.AddFlag("movable")
  198.  
  199. self.EmoteInventoryClose = ui.Button()
  200. self.EmoteInventoryClose.SetParent(self.EmoteInventoryWindow)
  201. self.EmoteInventoryClose.SetPosition(285, 10)
  202. self.EmoteInventoryClose.SetUpVisual("d:/ymir work/ui/emotes/close_button.tga")
  203. self.EmoteInventoryClose.SetOverVisual("d:/ymir work/ui/emotes/close_button.tga")
  204. self.EmoteInventoryClose.SetDownVisual("d:/ymir work/ui/emotes/close_button.tga")
  205. self.EmoteInventoryClose.SetEvent(self.__hideemoteinventory)
  206.  
  207. self.ScrollBarFirstPage = ui.Button()
  208. self.ScrollBarFirstPage.SetParent(self.EmoteInventoryWindow)
  209. self.ScrollBarFirstPage.SetPosition(286, 88)
  210. self.ScrollBarFirstPage.SetUpVisual("d:/ymir work/ui/emotes/scrollbar_top.tga")
  211. self.ScrollBarFirstPage.SetOverVisual("d:/ymir work/ui/emotes/scrollbar_top_hover.tga")
  212. self.ScrollBarFirstPage.SetDownVisual("d:/ymir work/ui/emotes/scrollbar_top.tga")
  213. self.ScrollBarFirstPage.SetEvent(self.__emoteinventory_page2)
  214.  
  215. self.ScrollBarSecondPage = ui.Button()
  216. self.ScrollBarSecondPage.SetParent(self.EmoteInventoryWindow)
  217. self.ScrollBarSecondPage.SetPosition(286, 252)
  218. self.ScrollBarSecondPage.SetUpVisual("d:/ymir work/ui/emotes/scrollbar_bottom.tga")
  219. self.ScrollBarSecondPage.SetOverVisual("d:/ymir work/ui/emotes/scrollbar_bottom_hover.tga")
  220. self.ScrollBarSecondPage.SetDownVisual("d:/ymir work/ui/emotes/scrollbar_bottom.tga")
  221. self.ScrollBarSecondPage.SetEvent(self.__emoteinventory_page1)
  222.  
  223. ## -- PAGE 1 -- ##
  224.  
  225.  
  226. self.Emote4_4 = ui.Button()
  227. self.Emote4_4.SetParent(self.EmoteInventoryWindow)
  228. self.Emote4_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10+60+10)
  229. self.Emote4_4.SetUpVisual("d:/ymir work/ui/emotes/list/4_4_norm.tga")
  230. self.Emote4_4.SetOverVisual("d:/ymir work/ui/emotes/list/4_4_hover.tga")
  231. self.Emote4_4.SetDownVisual("d:/ymir work/ui/emotes/list/4_4_norm.tga")
  232. self.Emote4_4.SetEvent(self.__activare_emote_4_4)
  233.  
  234. ActiveEmoticonStateLocked_4_4 = ui.ImageBox()
  235. self.ActiveEmoticonStateLocked_4_4 = ActiveEmoticonStateLocked_4_4
  236. self.ActiveEmoticonStateLocked_4_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10+60+10)
  237. self.ActiveEmoticonStateLocked_4_4.SetSize(0, 0)
  238.  
  239. self.Emote4_3 = ui.Button()
  240. self.Emote4_3.SetParent(self.EmoteInventoryWindow)
  241. self.Emote4_3.SetPosition(10+60+10+60+10, 88+60+10+60+10+60+10)
  242. self.Emote4_3.SetUpVisual("d:/ymir work/ui/emotes/list/4_3_norm.tga")
  243. self.Emote4_3.SetOverVisual("d:/ymir work/ui/emotes/list/4_3_hover.tga")
  244. self.Emote4_3.SetDownVisual("d:/ymir work/ui/emotes/list/4_3_norm.tga")
  245. self.Emote4_3.SetEvent(self.__activare_emote_4_3)
  246.  
  247. ActiveEmoticonStateLocked_4_3 = ui.ImageBox()
  248. self.ActiveEmoticonStateLocked_4_3 = ActiveEmoticonStateLocked_4_3
  249. self.ActiveEmoticonStateLocked_4_3.SetPosition(10+60+10+60+10, 88+60+10+60+10+60+10)
  250. self.ActiveEmoticonStateLocked_4_3.SetSize(0, 0)
  251.  
  252. self.Emote4_2 = ui.Button()
  253. self.Emote4_2.SetParent(self.EmoteInventoryWindow)
  254. self.Emote4_2.SetPosition(10+60+10, 88+60+10+60+10+60+10)
  255. self.Emote4_2.SetUpVisual("d:/ymir work/ui/emotes/list/4_2_norm.tga")
  256. self.Emote4_2.SetOverVisual("d:/ymir work/ui/emotes/list/4_2_hover.tga")
  257. self.Emote4_2.SetDownVisual("d:/ymir work/ui/emotes/list/4_2_norm.tga")
  258. self.Emote4_2.SetEvent(self.__activare_emote_4_2)
  259.  
  260. ActiveEmoticonStateLocked_4_2 = ui.ImageBox()
  261. self.ActiveEmoticonStateLocked_4_2 = ActiveEmoticonStateLocked_4_2
  262. self.ActiveEmoticonStateLocked_4_2.SetPosition(10+60+10, 88+60+10+60+10+60+10)
  263. self.ActiveEmoticonStateLocked_4_2.SetSize(0, 0)
  264.  
  265. self.Emote4_1 = ui.Button()
  266. self.Emote4_1.SetParent(self.EmoteInventoryWindow)
  267. self.Emote4_1.SetPosition(10, 88+60+10+60+10+60+10)
  268. self.Emote4_1.SetUpVisual("d:/ymir work/ui/emotes/list/4_1_norm.tga")
  269. self.Emote4_1.SetOverVisual("d:/ymir work/ui/emotes/list/4_1_hover.tga")
  270. self.Emote4_1.SetDownVisual("d:/ymir work/ui/emotes/list/4_1_norm.tga")
  271. self.Emote4_1.SetEvent(self.__activare_emote_4_1)
  272.  
  273. ActiveEmoticonStateLocked_4_1 = ui.ImageBox()
  274. self.ActiveEmoticonStateLocked_4_1 = ActiveEmoticonStateLocked_4_1
  275. self.ActiveEmoticonStateLocked_4_1.SetPosition(10, 88+60+10+60+10+60+10)
  276. self.ActiveEmoticonStateLocked_4_1.SetSize(0, 0)
  277.  
  278. self.Emote3_4 = ui.Button()
  279. self.Emote3_4.SetParent(self.EmoteInventoryWindow)
  280. self.Emote3_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10)
  281. self.Emote3_4.SetUpVisual("d:/ymir work/ui/emotes/list/3_4_norm.tga")
  282. self.Emote3_4.SetOverVisual("d:/ymir work/ui/emotes/list/3_4_hover.tga")
  283. self.Emote3_4.SetDownVisual("d:/ymir work/ui/emotes/list/3_4_norm.tga")
  284. self.Emote3_4.SetEvent(self.__activare_emote_3_4)
  285.  
  286. ActiveEmoticonStateLocked_3_4 = ui.ImageBox()
  287. self.ActiveEmoticonStateLocked_3_4 = ActiveEmoticonStateLocked_3_4
  288. self.ActiveEmoticonStateLocked_3_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10)
  289. self.ActiveEmoticonStateLocked_3_4.SetSize(0, 0)
  290.  
  291. self.Emote3_3 = ui.Button()
  292. self.Emote3_3.SetParent(self.EmoteInventoryWindow)
  293. self.Emote3_3.SetPosition(10+60+10+60+10, 88+60+10+60+10)
  294. self.Emote3_3.SetUpVisual("d:/ymir work/ui/emotes/list/3_3_norm.tga")
  295. self.Emote3_3.SetOverVisual("d:/ymir work/ui/emotes/list/3_3_hover.tga")
  296. self.Emote3_3.SetDownVisual("d:/ymir work/ui/emotes/list/3_3_norm.tga")
  297. self.Emote3_3.SetEvent(self.__activare_emote_3_3)
  298.  
  299. ActiveEmoticonStateLocked_3_3 = ui.ImageBox()
  300. self.ActiveEmoticonStateLocked_3_3 = ActiveEmoticonStateLocked_3_3
  301. self.ActiveEmoticonStateLocked_3_3.SetPosition(10+60+10+60+10, 88+60+10+60+10)
  302. self.ActiveEmoticonStateLocked_3_3.SetSize(0, 0)
  303.  
  304.  
  305. self.Emote3_2 = ui.Button()
  306. self.Emote3_2.SetParent(self.EmoteInventoryWindow)
  307. self.Emote3_2.SetPosition(10+60+10, 88+60+10+60+10)
  308. self.Emote3_2.SetUpVisual("d:/ymir work/ui/emotes/list/3_2_norm.tga")
  309. self.Emote3_2.SetOverVisual("d:/ymir work/ui/emotes/list/3_2_hover.tga")
  310. self.Emote3_2.SetDownVisual("d:/ymir work/ui/emotes/list/3_2_norm.tga")
  311. self.Emote3_2.SetEvent(self.__activare_emote_3_2)
  312.  
  313. ActiveEmoticonStateLocked_3_2 = ui.ImageBox()
  314. self.ActiveEmoticonStateLocked_3_2 = ActiveEmoticonStateLocked_3_2
  315. self.ActiveEmoticonStateLocked_3_2.SetPosition(10+60+10, 88+60+10+60+10)
  316. self.ActiveEmoticonStateLocked_3_2.SetSize(0, 0)
  317.  
  318. self.Emote3_1 = ui.Button()
  319. self.Emote3_1.SetParent(self.EmoteInventoryWindow)
  320. self.Emote3_1.SetPosition(10, 88+60+10+60+10)
  321. self.Emote3_1.SetUpVisual("d:/ymir work/ui/emotes/list/3_1_norm.tga")
  322. self.Emote3_1.SetOverVisual("d:/ymir work/ui/emotes/list/3_1_hover.tga")
  323. self.Emote3_1.SetDownVisual("d:/ymir work/ui/emotes/list/3_1_norm.tga")
  324. self.Emote3_1.SetEvent(self.__activare_emote_3_1)
  325.  
  326. ActiveEmoticonStateLocked_3_1 = ui.ImageBox()
  327. self.ActiveEmoticonStateLocked_3_1 = ActiveEmoticonStateLocked_3_1
  328. self.ActiveEmoticonStateLocked_3_1.SetPosition(10, 88+60+10+60+10)
  329. self.ActiveEmoticonStateLocked_3_1.SetSize(0, 0)
  330.  
  331. self.Emote2_4 = ui.Button()
  332. self.Emote2_4.SetParent(self.EmoteInventoryWindow)
  333. self.Emote2_4.SetPosition(10+60+10+60+10+60+10, 88+60+10)
  334. self.Emote2_4.SetUpVisual("d:/ymir work/ui/emotes/list/2_4_norm.tga")
  335. self.Emote2_4.SetOverVisual("d:/ymir work/ui/emotes/list/2_4_hover.tga")
  336. self.Emote2_4.SetDownVisual("d:/ymir work/ui/emotes/list/2_4_norm.tga")
  337. self.Emote2_4.SetEvent(self.__activare_emote_2_4)
  338.  
  339. ActiveEmoticonStateLocked_2_4 = ui.ImageBox()
  340. self.ActiveEmoticonStateLocked_2_4 = ActiveEmoticonStateLocked_2_4
  341. self.ActiveEmoticonStateLocked_2_4.SetPosition(10+60+10+60+10+60+10, 88+60+10)
  342. self.ActiveEmoticonStateLocked_2_4.SetSize(0, 0)
  343.  
  344.  
  345. self.Emote2_3 = ui.Button()
  346. self.Emote2_3.SetParent(self.EmoteInventoryWindow)
  347. self.Emote2_3.SetPosition(10+60+10+60+10, 88+60+10)
  348. self.Emote2_3.SetUpVisual("d:/ymir work/ui/emotes/list/2_3_norm.tga")
  349. self.Emote2_3.SetOverVisual("d:/ymir work/ui/emotes/list/2_3_hover.tga")
  350. self.Emote2_3.SetDownVisual("d:/ymir work/ui/emotes/list/2_3_norm.tga")
  351. self.Emote2_3.SetEvent(self.__activare_emote_2_3)
  352.  
  353. ActiveEmoticonStateLocked_2_3 = ui.ImageBox()
  354. self.ActiveEmoticonStateLocked_2_3 = ActiveEmoticonStateLocked_2_3
  355. self.ActiveEmoticonStateLocked_2_3.SetPosition(10+60+10+60+10, 88+60+10)
  356. self.ActiveEmoticonStateLocked_2_3.SetSize(0, 0)
  357.  
  358. self.Emote2_2 = ui.Button()
  359. self.Emote2_2.SetParent(self.EmoteInventoryWindow)
  360. self.Emote2_2.SetPosition(10+60+10, 88+60+10)
  361. self.Emote2_2.SetUpVisual("d:/ymir work/ui/emotes/list/2_2_norm.tga")
  362. self.Emote2_2.SetOverVisual("d:/ymir work/ui/emotes/list/2_2_hover.tga")
  363. self.Emote2_2.SetDownVisual("d:/ymir work/ui/emotes/list/2_2_norm.tga")
  364. self.Emote2_2.SetEvent(self.__activare_emote_2_2)
  365.  
  366. ActiveEmoticonStateLocked_2_2 = ui.ImageBox()
  367. self.ActiveEmoticonStateLocked_2_2 = ActiveEmoticonStateLocked_2_2
  368. self.ActiveEmoticonStateLocked_2_2.SetPosition(10+60+10, 88+60+10)
  369. self.ActiveEmoticonStateLocked_2_2.SetSize(0, 0)
  370.  
  371. self.Emote2_1 = ui.Button()
  372. self.Emote2_1.SetParent(self.EmoteInventoryWindow)
  373. self.Emote2_1.SetPosition(10, 88+60+10)
  374. self.Emote2_1.SetUpVisual("d:/ymir work/ui/emotes/list/2_1_norm.tga")
  375. self.Emote2_1.SetOverVisual("d:/ymir work/ui/emotes/list/2_1_hover.tga")
  376. self.Emote2_1.SetDownVisual("d:/ymir work/ui/emotes/list/2_1_norm.tga")
  377. self.Emote2_1.SetEvent(self.__activare_emote_2_1)
  378.  
  379. ActiveEmoticonStateLocked_2_1 = ui.ImageBox()
  380. self.ActiveEmoticonStateLocked_2_1 = ActiveEmoticonStateLocked_2_1
  381. self.ActiveEmoticonStateLocked_2_1.SetPosition(10, 88+60+10)
  382. self.ActiveEmoticonStateLocked_2_1.SetSize(0, 0)
  383.  
  384. self.Emote1_4 = ui.Button()
  385. self.Emote1_4.SetParent(self.EmoteInventoryWindow)
  386. self.Emote1_4.SetPosition(10+60+10+60+10+60+10, 88)
  387. self.Emote1_4.SetUpVisual("d:/ymir work/ui/emotes/list/1_4_norm.tga")
  388. self.Emote1_4.SetOverVisual("d:/ymir work/ui/emotes/list/1_4_hover.tga")
  389. self.Emote1_4.SetDownVisual("d:/ymir work/ui/emotes/list/1_4_norm.tga")
  390. self.Emote1_4.SetEvent(self.__activare_emote_1_4)
  391.  
  392. ActiveEmoticonStateLocked_1_4 = ui.ImageBox()
  393. self.ActiveEmoticonStateLocked_1_4 = ActiveEmoticonStateLocked_1_4
  394. self.ActiveEmoticonStateLocked_1_4.SetPosition(10+60+10+60+10+60+10, 88)
  395. self.ActiveEmoticonStateLocked_1_4.SetSize(0, 0)
  396.  
  397. self.Emote1_3 = ui.Button()
  398. self.Emote1_3.SetParent(self.EmoteInventoryWindow)
  399. self.Emote1_3.SetPosition(10+60+10+60+10, 88)
  400. self.Emote1_3.SetUpVisual("d:/ymir work/ui/emotes/list/1_3_norm.tga")
  401. self.Emote1_3.SetOverVisual("d:/ymir work/ui/emotes/list/1_3_hover.tga")
  402. self.Emote1_3.SetDownVisual("d:/ymir work/ui/emotes/list/1_3_norm.tga")
  403. self.Emote1_3.SetEvent(self.__activare_emote_1_3)
  404.  
  405. ActiveEmoticonStateLocked_1_3 = ui.ImageBox()
  406. self.ActiveEmoticonStateLocked_1_3 = ActiveEmoticonStateLocked_1_3
  407. self.ActiveEmoticonStateLocked_1_3.SetPosition(10+60+10+60+10, 88)
  408. self.ActiveEmoticonStateLocked_1_3.SetSize(0, 0)
  409.  
  410. self.Emote1_2 = ui.Button()
  411. self.Emote1_2.SetParent(self.EmoteInventoryWindow)
  412. self.Emote1_2.SetPosition(10+60+10, 88)
  413. self.Emote1_2.SetUpVisual("d:/ymir work/ui/emotes/list/1_2_norm.tga")
  414. self.Emote1_2.SetOverVisual("d:/ymir work/ui/emotes/list/1_2_hover.tga")
  415. self.Emote1_2.SetDownVisual("d:/ymir work/ui/emotes/list/1_2_norm.tga")
  416. self.Emote1_2.SetEvent(self.__activare_emote_1_2)
  417.  
  418. ActiveEmoticonStateLocked_1_2 = ui.ImageBox()
  419. self.ActiveEmoticonStateLocked_1_2 = ActiveEmoticonStateLocked_1_2
  420. self.ActiveEmoticonStateLocked_1_2.SetPosition(10+60+10, 88)
  421. self.ActiveEmoticonStateLocked_1_2.SetSize(0, 0)
  422.  
  423. self.Emote1_1 = ui.Button()
  424. self.Emote1_1.SetParent(self.EmoteInventoryWindow)
  425. self.Emote1_1.SetPosition(10, 88)
  426. self.Emote1_1.SetUpVisual("d:/ymir work/ui/emotes/list/1_1_norm.tga")
  427. self.Emote1_1.SetOverVisual("d:/ymir work/ui/emotes/list/1_1_hover.tga")
  428. self.Emote1_1.SetDownVisual("d:/ymir work/ui/emotes/list/1_1_norm.tga")
  429. self.Emote1_1.SetEvent(self.__activare_emote_1_1)
  430.  
  431.  
  432. ActiveEmoticonStateLocked_1_1 = ui.ImageBox()
  433. self.ActiveEmoticonStateLocked_1_1 = ActiveEmoticonStateLocked_1_1
  434. self.ActiveEmoticonStateLocked_1_1.SetPosition(10, 88)
  435. self.ActiveEmoticonStateLocked_1_1.SetSize(0, 0)
  436.  
  437. ## Page 2 ##
  438.  
  439. self.Emote8_4 = ui.Button()
  440. self.Emote8_4.SetParent(self.EmoteInventoryWindow)
  441. self.Emote8_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10+60+10)
  442. self.Emote8_4.SetUpVisual("d:/ymir work/ui/emotes/list/8_4_norm.tga")
  443. self.Emote8_4.SetOverVisual("d:/ymir work/ui/emotes/list/8_4_hover.tga")
  444. self.Emote8_4.SetDownVisual("d:/ymir work/ui/emotes/list/8_4_norm.tga")
  445. self.Emote8_4.SetEvent(self.__activare_emote_8_4)
  446.  
  447. ActiveEmoticonStateLocked_8_4 = ui.ImageBox()
  448. self.ActiveEmoticonStateLocked_8_4 = ActiveEmoticonStateLocked_8_4
  449. self.ActiveEmoticonStateLocked_8_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10+60+10)
  450. self.ActiveEmoticonStateLocked_8_4.SetSize(0, 0)
  451.  
  452. self.Emote8_3 = ui.Button()
  453. self.Emote8_3.SetParent(self.EmoteInventoryWindow)
  454. self.Emote8_3.SetPosition(10+60+10+60+10, 88+60+10+60+10+60+10)
  455. self.Emote8_3.SetUpVisual("d:/ymir work/ui/emotes/list/8_3_norm.tga")
  456. self.Emote8_3.SetOverVisual("d:/ymir work/ui/emotes/list/8_3_hover.tga")
  457. self.Emote8_3.SetDownVisual("d:/ymir work/ui/emotes/list/8_3_norm.tga")
  458. self.Emote8_3.SetEvent(self.__activare_emote_8_3)
  459.  
  460. ActiveEmoticonStateLocked_8_3 = ui.ImageBox()
  461. self.ActiveEmoticonStateLocked_8_3 = ActiveEmoticonStateLocked_8_3
  462. self.ActiveEmoticonStateLocked_8_3.SetPosition(10+60+10+60+10, 88+60+10+60+10+60+10)
  463. self.ActiveEmoticonStateLocked_8_3.SetSize(0, 0)
  464.  
  465. self.Emote8_2 = ui.Button()
  466. self.Emote8_2.SetParent(self.EmoteInventoryWindow)
  467. self.Emote8_2.SetPosition(10+60+10, 88+60+10+60+10+60+10)
  468. self.Emote8_2.SetUpVisual("d:/ymir work/ui/emotes/list/8_2_norm.tga")
  469. self.Emote8_2.SetOverVisual("d:/ymir work/ui/emotes/list/8_2_hover.tga")
  470. self.Emote8_2.SetDownVisual("d:/ymir work/ui/emotes/list/8_2_norm.tga")
  471. self.Emote8_2.SetEvent(self.__activare_emote_8_2)
  472.  
  473. ActiveEmoticonStateLocked_8_2 = ui.ImageBox()
  474. self.ActiveEmoticonStateLocked_8_2 = ActiveEmoticonStateLocked_8_2
  475. self.ActiveEmoticonStateLocked_8_2.SetPosition(10+60+10, 88+60+10+60+10+60+10)
  476. self.ActiveEmoticonStateLocked_8_2.SetSize(0, 0)
  477.  
  478. self.Emote8_1 = ui.Button()
  479. self.Emote8_1.SetParent(self.EmoteInventoryWindow)
  480. self.Emote8_1.SetPosition(10, 88+60+10+60+10+60+10)
  481. self.Emote8_1.SetUpVisual("d:/ymir work/ui/emotes/list/8_1_norm.tga")
  482. self.Emote8_1.SetOverVisual("d:/ymir work/ui/emotes/list/8_1_hover.tga")
  483. self.Emote8_1.SetDownVisual("d:/ymir work/ui/emotes/list/8_1_norm.tga")
  484. self.Emote8_1.SetEvent(self.__activare_emote_8_1)
  485.  
  486. ActiveEmoticonStateLocked_8_1 = ui.ImageBox()
  487. self.ActiveEmoticonStateLocked_8_1 = ActiveEmoticonStateLocked_8_1
  488. self.ActiveEmoticonStateLocked_8_1.SetPosition(10, 88+60+10+60+10+60+10)
  489. self.ActiveEmoticonStateLocked_8_1.SetSize(0, 0)
  490.  
  491. self.Emote7_4 = ui.Button()
  492. self.Emote7_4.SetParent(self.EmoteInventoryWindow)
  493. self.Emote7_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10)
  494. self.Emote7_4.SetUpVisual("d:/ymir work/ui/emotes/list/7_4_norm.tga")
  495. self.Emote7_4.SetOverVisual("d:/ymir work/ui/emotes/list/7_4_hover.tga")
  496. self.Emote7_4.SetDownVisual("d:/ymir work/ui/emotes/list/7_4_norm.tga")
  497. self.Emote7_4.SetEvent(self.__activare_emote_7_4)
  498.  
  499. ActiveEmoticonStateLocked_7_4 = ui.ImageBox()
  500. self.ActiveEmoticonStateLocked_7_4 = ActiveEmoticonStateLocked_7_4
  501. self.ActiveEmoticonStateLocked_7_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10)
  502. self.ActiveEmoticonStateLocked_7_4.SetSize(0, 0)
  503.  
  504. self.Emote7_3 = ui.Button()
  505. self.Emote7_3.SetParent(self.EmoteInventoryWindow)
  506. self.Emote7_3.SetPosition(10+60+10+60+10, 88+60+10+60+10)
  507. self.Emote7_3.SetUpVisual("d:/ymir work/ui/emotes/list/7_3_norm.tga")
  508. self.Emote7_3.SetOverVisual("d:/ymir work/ui/emotes/list/7_3_hover.tga")
  509. self.Emote7_3.SetDownVisual("d:/ymir work/ui/emotes/list/7_3_norm.tga")
  510. self.Emote7_3.SetEvent(self.__activare_emote_7_3)
  511.  
  512. ActiveEmoticonStateLocked_7_3 = ui.ImageBox()
  513. self.ActiveEmoticonStateLocked_7_3 = ActiveEmoticonStateLocked_7_3
  514. self.ActiveEmoticonStateLocked_7_3.SetPosition(10+60+10+60+10, 88+60+10+60+10)
  515. self.ActiveEmoticonStateLocked_7_3.SetSize(0, 0)
  516.  
  517.  
  518. self.Emote7_2 = ui.Button()
  519. self.Emote7_2.SetParent(self.EmoteInventoryWindow)
  520. self.Emote7_2.SetPosition(10+60+10, 88+60+10+60+10)
  521. self.Emote7_2.SetUpVisual("d:/ymir work/ui/emotes/list/7_2_norm.tga")
  522. self.Emote7_2.SetOverVisual("d:/ymir work/ui/emotes/list/7_2_hover.tga")
  523. self.Emote7_2.SetDownVisual("d:/ymir work/ui/emotes/list/7_2_norm.tga")
  524. self.Emote7_2.SetEvent(self.__activare_emote_7_2)
  525.  
  526. ActiveEmoticonStateLocked_7_2 = ui.ImageBox()
  527. self.ActiveEmoticonStateLocked_7_2 = ActiveEmoticonStateLocked_7_2
  528. self.ActiveEmoticonStateLocked_7_2.SetPosition(10+60+10, 88+60+10+60+10)
  529. self.ActiveEmoticonStateLocked_7_2.SetSize(0, 0)
  530.  
  531. self.Emote7_1 = ui.Button()
  532. self.Emote7_1.SetParent(self.EmoteInventoryWindow)
  533. self.Emote7_1.SetPosition(10, 88+60+10+60+10)
  534. self.Emote7_1.SetUpVisual("d:/ymir work/ui/emotes/list/7_1_norm.tga")
  535. self.Emote7_1.SetOverVisual("d:/ymir work/ui/emotes/list/7_1_hover.tga")
  536. self.Emote7_1.SetDownVisual("d:/ymir work/ui/emotes/list/7_1_norm.tga")
  537. self.Emote7_1.SetEvent(self.__activare_emote_7_1)
  538.  
  539. ActiveEmoticonStateLocked_7_1 = ui.ImageBox()
  540. self.ActiveEmoticonStateLocked_7_1 = ActiveEmoticonStateLocked_7_1
  541. self.ActiveEmoticonStateLocked_7_1.SetPosition(10, 88+60+10+60+10)
  542. self.ActiveEmoticonStateLocked_7_1.SetSize(0, 0)
  543.  
  544. self.Emote6_4 = ui.Button()
  545. self.Emote6_4.SetParent(self.EmoteInventoryWindow)
  546. self.Emote6_4.SetPosition(10+60+10+60+10+60+10, 88+60+10)
  547. self.Emote6_4.SetUpVisual("d:/ymir work/ui/emotes/list/6_4_norm.tga")
  548. self.Emote6_4.SetOverVisual("d:/ymir work/ui/emotes/list/6_4_hover.tga")
  549. self.Emote6_4.SetDownVisual("d:/ymir work/ui/emotes/list/6_4_norm.tga")
  550. self.Emote6_4.SetEvent(self.__activare_emote_6_4)
  551.  
  552. ActiveEmoticonStateLocked_6_4 = ui.ImageBox()
  553. self.ActiveEmoticonStateLocked_6_4 = ActiveEmoticonStateLocked_6_4
  554. self.ActiveEmoticonStateLocked_6_4.SetPosition(10+60+10+60+10+60+10, 88+60+10)
  555. self.ActiveEmoticonStateLocked_6_4.SetSize(0, 0)
  556.  
  557.  
  558. self.Emote6_3 = ui.Button()
  559. self.Emote6_3.SetParent(self.EmoteInventoryWindow)
  560. self.Emote6_3.SetPosition(10+60+10+60+10, 88+60+10)
  561. self.Emote6_3.SetUpVisual("d:/ymir work/ui/emotes/list/6_3_norm.tga")
  562. self.Emote6_3.SetOverVisual("d:/ymir work/ui/emotes/list/6_3_hover.tga")
  563. self.Emote6_3.SetDownVisual("d:/ymir work/ui/emotes/list/6_3_norm.tga")
  564. self.Emote6_3.SetEvent(self.__activare_emote_6_3)
  565.  
  566. ActiveEmoticonStateLocked_6_3 = ui.ImageBox()
  567. self.ActiveEmoticonStateLocked_6_3 = ActiveEmoticonStateLocked_6_3
  568. self.ActiveEmoticonStateLocked_6_3.SetPosition(10+60+10+60+10, 88+60+10)
  569. self.ActiveEmoticonStateLocked_6_3.SetSize(0, 0)
  570.  
  571. self.Emote6_2 = ui.Button()
  572. self.Emote6_2.SetParent(self.EmoteInventoryWindow)
  573. self.Emote6_2.SetPosition(10+60+10, 88+60+10)
  574. self.Emote6_2.SetUpVisual("d:/ymir work/ui/emotes/list/6_2_norm.tga")
  575. self.Emote6_2.SetOverVisual("d:/ymir work/ui/emotes/list/6_2_hover.tga")
  576. self.Emote6_2.SetDownVisual("d:/ymir work/ui/emotes/list/6_2_norm.tga")
  577. self.Emote6_2.SetEvent(self.__activare_emote_6_2)
  578.  
  579. ActiveEmoticonStateLocked_6_2 = ui.ImageBox()
  580. self.ActiveEmoticonStateLocked_6_2 = ActiveEmoticonStateLocked_6_2
  581. self.ActiveEmoticonStateLocked_6_2.SetPosition(10+60+10, 88+60+10)
  582. self.ActiveEmoticonStateLocked_6_2.SetSize(0, 0)
  583.  
  584. self.Emote6_1 = ui.Button()
  585. self.Emote6_1.SetParent(self.EmoteInventoryWindow)
  586. self.Emote6_1.SetPosition(10, 88+60+10)
  587. self.Emote6_1.SetUpVisual("d:/ymir work/ui/emotes/list/6_1_norm.tga")
  588. self.Emote6_1.SetOverVisual("d:/ymir work/ui/emotes/list/6_1_hover.tga")
  589. self.Emote6_1.SetDownVisual("d:/ymir work/ui/emotes/list/6_1_norm.tga")
  590. self.Emote6_1.SetEvent(self.__activare_emote_6_1)
  591.  
  592. ActiveEmoticonStateLocked_6_1 = ui.ImageBox()
  593. self.ActiveEmoticonStateLocked_6_1 = ActiveEmoticonStateLocked_6_1
  594. self.ActiveEmoticonStateLocked_6_1.SetPosition(10, 88+60+10)
  595. self.ActiveEmoticonStateLocked_6_1.SetSize(0, 0)
  596.  
  597. self.Emote5_4 = ui.Button()
  598. self.Emote5_4.SetParent(self.EmoteInventoryWindow)
  599. self.Emote5_4.SetPosition(10+60+10+60+10+60+10, 88)
  600. self.Emote5_4.SetUpVisual("d:/ymir work/ui/emotes/list/5_4_norm.tga")
  601. self.Emote5_4.SetOverVisual("d:/ymir work/ui/emotes/list/5_4_hover.tga")
  602. self.Emote5_4.SetDownVisual("d:/ymir work/ui/emotes/list/5_4_norm.tga")
  603. self.Emote5_4.SetEvent(self.__activare_emote_5_4)
  604.  
  605. ActiveEmoticonStateLocked_5_4 = ui.ImageBox()
  606. self.ActiveEmoticonStateLocked_5_4 = ActiveEmoticonStateLocked_5_4
  607. self.ActiveEmoticonStateLocked_5_4.SetPosition(10+60+10+60+10+60+10, 88)
  608. self.ActiveEmoticonStateLocked_5_4.SetSize(0, 0)
  609.  
  610. self.Emote5_3 = ui.Button()
  611. self.Emote5_3.SetParent(self.EmoteInventoryWindow)
  612. self.Emote5_3.SetPosition(10+60+10+60+10, 88)
  613. self.Emote5_3.SetUpVisual("d:/ymir work/ui/emotes/list/5_3_norm.tga")
  614. self.Emote5_3.SetOverVisual("d:/ymir work/ui/emotes/list/5_3_hover.tga")
  615. self.Emote5_3.SetDownVisual("d:/ymir work/ui/emotes/list/5_3_norm.tga")
  616. self.Emote5_3.SetEvent(self.__activare_emote_5_3)
  617.  
  618. ActiveEmoticonStateLocked_5_3 = ui.ImageBox()
  619. self.ActiveEmoticonStateLocked_5_3 = ActiveEmoticonStateLocked_5_3
  620. self.ActiveEmoticonStateLocked_5_3.SetPosition(10+60+10+60+10, 88)
  621. self.ActiveEmoticonStateLocked_5_3.SetSize(0, 0)
  622.  
  623. self.Emote5_2 = ui.Button()
  624. self.Emote5_2.SetParent(self.EmoteInventoryWindow)
  625. self.Emote5_2.SetPosition(10+60+10, 88)
  626. self.Emote5_2.SetUpVisual("d:/ymir work/ui/emotes/list/5_2_norm.tga")
  627. self.Emote5_2.SetOverVisual("d:/ymir work/ui/emotes/list/5_2_hover.tga")
  628. self.Emote5_2.SetDownVisual("d:/ymir work/ui/emotes/list/5_2_norm.tga")
  629. self.Emote5_2.SetEvent(self.__activare_emote_5_2)
  630.  
  631. ActiveEmoticonStateLocked_5_2 = ui.ImageBox()
  632. self.ActiveEmoticonStateLocked_5_2 = ActiveEmoticonStateLocked_5_2
  633. self.ActiveEmoticonStateLocked_5_2.SetPosition(10+60+10, 88)
  634. self.ActiveEmoticonStateLocked_5_2.SetSize(0, 0)
  635.  
  636. self.Emote5_1 = ui.Button()
  637. self.Emote5_1.SetParent(self.EmoteInventoryWindow)
  638. self.Emote5_1.SetPosition(10, 88)
  639. self.Emote5_1.SetUpVisual("d:/ymir work/ui/emotes/list/5_1_norm.tga")
  640. self.Emote5_1.SetOverVisual("d:/ymir work/ui/emotes/list/5_1_hover.tga")
  641. self.Emote5_1.SetDownVisual("d:/ymir work/ui/emotes/list/5_1_norm.tga")
  642. self.Emote5_1.SetEvent(self.__activare_emote_5_1)
  643.  
  644.  
  645. ActiveEmoticonStateLocked_5_1 = ui.ImageBox()
  646. self.ActiveEmoticonStateLocked_5_1 = ActiveEmoticonStateLocked_5_1
  647. self.ActiveEmoticonStateLocked_5_1.SetPosition(10, 88)
  648. self.ActiveEmoticonStateLocked_5_1.SetSize(0, 0)
  649.  
  650. ## END OF PAGE 2 ##
  651.  
  652. ActiveEmoticonState = ui.ImageBox()
  653. self.ActiveEmoticonState = ActiveEmoticonState
  654. self.ActiveEmoticonState.SetPosition(10, 10)
  655. self.ActiveEmoticonState.SetSize(60, 60)
  656.  
  657. # - > This one is active emote
  658.  
  659. self.SubTitleEmote = ui.TextLine()
  660. self.SubTitleEmote.SetParent(self.EmoteInventoryWindow)
  661. self.SubTitleEmote.SetPosition(10+60+10, 10+30)
  662. self.SubTitleEmote.SetFontName(localeInfo.UI_DEF_FONT)
  663. self.SubTitleEmote.Show()
  664. self.SubTitleEmote.SetText("Select any unlocked emote from below")
  665.  
  666. self.SubTitleEmote_2 = ui.TextLine()
  667. self.SubTitleEmote_2.SetParent(self.EmoteInventoryWindow)
  668. self.SubTitleEmote_2.SetPosition(10+60+10, 10+32+12)
  669. self.SubTitleEmote_2.SetFontName(localeInfo.UI_DEF_FONT)
  670. self.SubTitleEmote_2.Show()
  671. self.SubTitleEmote_2.SetText("to set it as active emote.")
  672.  
  673. self.ActiveEmote = ui.Button()
  674. self.ActiveEmote.SetParent(self.EmoteInventoryWindow)
  675. self.ActiveEmote.SetPosition(10, 10)
  676. self.ActiveEmote.SetUpVisual("d:/ymir work/ui/emotes/active_emote.tga")
  677. self.ActiveEmote.SetOverVisual("d:/ymir work/ui/emotes/active_emote.tga")
  678. self.ActiveEmote.SetDownVisual("d:/ymir work/ui/emotes/active_emote.tga")
  679. self.ActiveEmote.SetEvent(self.__hideemoteinventory)
  680.  
  681. self.EmoteInfo = ui.Button()
  682. self.EmoteInfo.SetParent(self.EmoteInventoryWindow)
  683. self.EmoteInfo.SetPosition(128, 22)
  684. self.EmoteInfo.SetUpVisual("d:/ymir work/ui/emotes/emote_info_norm.tga")
  685. self.EmoteInfo.SetOverVisual("d:/ymir work/ui/emotes/emote_info_hover.tga")
  686. self.EmoteInfo.SetDownVisual("d:/ymir work/ui/emotes/emote_info_norm.tga")
  687.  
  688. #EMOTE_SYSTEM_LOL
  689. self.quickSlotPageIndex = 0
  690. self.PickingCharacterIndex = -1
  691. self.PickingItemIndex = -1
  692. self.consoleEnable = False
  693. self.isShowDebugInfo = False
  694. self.ShowNameFlag = False
  695.  
  696. self.litere_event = ui.Button()
  697. self.litere_event.SetParent(self)
  698. self.litere_event.SetPosition(wndMgr.GetScreenWidth()-350,15)
  699. self.litere_event.SetUpVisual("d:/ymir work/ui/eventlitere/letters.tga")
  700. self.litere_event.SetOverVisual("d:/ymir work/ui/eventlitere/letters.tga")
  701. self.litere_event.SetDownVisual("d:/ymir work/ui/eventlitere/letters.tga")
  702. self.litere_event.SetEvent(lambda : net.SendChatPacket("/letters_open"))
  703.  
  704. self.enableXMasBoom = False
  705. self.startTimeXMasBoom = 0.0
  706. self.indexXMasBoom = 0
  707.  
  708. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  709.  
  710. app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
  711.  
  712. constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
  713. constInfo.SET_DEFAULT_CHRNAME_COLOR()
  714. constInfo.SET_DEFAULT_FOG_LEVEL()
  715. constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
  716. constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
  717. constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
  718.  
  719. # TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  720. constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
  721. # END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  722.  
  723. import event
  724. event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
  725.  
  726. textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
  727.  
  728. if constInfo.PVPMODE_TEST_ENABLE:
  729. self.testPKMode = ui.TextLine()
  730. self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
  731. self.testPKMode.SetPosition(0, 15)
  732. self.testPKMode.SetWindowHorizontalAlignCenter()
  733. self.testPKMode.SetHorizontalAlignCenter()
  734. self.testPKMode.SetFeather()
  735. self.testPKMode.SetOutline()
  736. self.testPKMode.Show()
  737.  
  738. self.testAlignment = ui.TextLine()
  739. self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
  740. self.testAlignment.SetPosition(0, 35)
  741. self.testAlignment.SetWindowHorizontalAlignCenter()
  742. self.testAlignment.SetHorizontalAlignCenter()
  743. self.testAlignment.SetFeather()
  744. self.testAlignment.SetOutline()
  745. self.testAlignment.Show()
  746.  
  747. self.__BuildKeyDict()
  748. self.__BuildDebugInfo()
  749.  
  750. # PRIVATE_SHOP_PRICE_LIST
  751. uiPrivateShopBuilder.Clear()
  752. # END_OF_PRIVATE_SHOP_PRICE_LIST
  753.  
  754. # UNKNOWN_UPDATE
  755. exchange.InitTrading()
  756. # END_OF_UNKNOWN_UPDATE
  757.  
  758.  
  759. ## Sound
  760. self.__SetQuickSlotMode()
  761. self.__SelectQuickPage(self.quickSlotPageIndex)
  762.  
  763. self.SetFocus()
  764. self.Show()
  765. app.ShowCursor()
  766.  
  767. net.SendEnterGamePacket()
  768.  
  769. # START_GAME_ERROR_EXIT
  770. try:
  771. self.StartGame()
  772. except:
  773. import exception
  774. exception.Abort("GameWindow.Open")
  775. # END_OF_START_GAME_ERROR_EXIT
  776.  
  777. # NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱
  778. # ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
  779. self.cubeInformation = {}
  780. self.currentCubeNPC = 0
  781.  
  782. def Close(self):
  783. self.Hide()
  784.  
  785. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  786. (cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
  787.  
  788. self.onPressKeyDict = None
  789. self.onClickKeyDict = None
  790.  
  791. chat.Close()
  792. snd.StopAllSound()
  793. grp.InitScreenEffect()
  794. chr.Destroy()
  795. textTail.Clear()
  796. quest.Clear()
  797. background.Destroy()
  798. guild.Destroy()
  799. messenger.Destroy()
  800. skill.ClearSkillData()
  801. wndMgr.Unlock()
  802. mouseModule.mouseController.DeattachObject()
  803.  
  804. if self.guildWarQuestionDialog:
  805. self.guildWarQuestionDialog.Close()
  806.  
  807. self.guildNameBoard = None
  808. self.partyRequestQuestionDialog = None
  809. self.partyInviteQuestionDialog = None
  810. self.guildInviteQuestionDialog = None
  811. self.guildWarQuestionDialog = None
  812. self.messengerAddFriendQuestion = None
  813.  
  814. # UNKNOWN_UPDATE
  815. self.itemDropQuestionDialog = None
  816. # END_OF_UNKNOWN_UPDATE
  817.  
  818. # QUEST_CONFIRM
  819. self.confirmDialog = None
  820. # END_OF_QUEST_CONFIRM
  821.  
  822. self.PrintCoord = None
  823. self.FrameRate = None
  824. self.Pitch = None
  825. self.Splat = None
  826. self.TextureNum = None
  827. self.ObjectNum = None
  828. self.ViewDistance = None
  829. self.PrintMousePos = None
  830.  
  831. self.ClearDictionary()
  832.  
  833. self.playerGauge = None
  834. self.mapNameShower = None
  835. self.affectShower = None
  836.  
  837. if self.console:
  838. self.console.BindGameClass(0)
  839. self.console.Close()
  840. self.console=None
  841.  
  842. if self.targetBoard:
  843. self.targetBoard.Destroy()
  844. self.targetBoard = None
  845.  
  846. if app.ENABLE_SHIP_DEFENSE:
  847. if self.allyTargetBoard:
  848. self.allyTargetBoard.Destroy()
  849. self.allyTargetBoard = None
  850.  
  851. if app.ENABLE_FEATURES_OXEVENT:
  852. if self.eventWindowLogin:
  853. self.eventWindowLogin.Hide()
  854.  
  855. if self.eventWindowManager:
  856. self.eventWindowManager.Hide()
  857.  
  858. if self.eventWindow:
  859. self.eventWindow.Hide()
  860.  
  861. if self.interface:
  862. self.interface.HideAllWindows()
  863. self.interface.Close()
  864. self.interface=None
  865.  
  866. player.ClearSkillDict()
  867. player.ResetCameraRotation()
  868.  
  869. self.KillFocus()
  870. app.HideCursor()
  871. #EMOTE_SYSTEM_LOL
  872. if self.EmoteInventoryWindow:
  873. constInfo.def_emotesystem_interface = 0
  874. self.EmoteInterfaceWindow.Hide()
  875. self.EmoteInterfaceClose.Hide()
  876. self.ActiveEmoticonStateForInterface.Hide()
  877. self.Emote_System_Activate.Hide()
  878.  
  879. if self.EmoteInventoryWindow:
  880. constInfo.def_emotesystem = 0
  881. self.EmoteInventoryWindow.Hide()
  882. self.EmoteInventoryClose.Hide()
  883. self.ScrollBarFirstPage.Hide()
  884. self.ActiveEmote.Hide()
  885. self.Emote1_1.Hide()
  886. self.Emote1_2.Hide()
  887. self.Emote1_3.Hide()
  888. self.Emote1_4.Hide()
  889. self.Emote2_1.Hide()
  890. self.Emote2_2.Hide()
  891. self.Emote2_3.Hide()
  892. self.Emote2_4.Hide()
  893. self.Emote3_1.Hide()
  894. self.Emote3_2.Hide()
  895. self.Emote3_3.Hide()
  896. self.Emote3_4.Hide()
  897. self.Emote4_1.Hide()
  898. self.Emote4_2.Hide()
  899. self.Emote4_3.Hide()
  900. self.Emote4_4.Hide()
  901. self.ActiveEmoticonState.Hide()
  902. self.ActiveEmoticonStateLocked_1_1.Hide()
  903. self.ActiveEmoticonStateLocked_1_2.Hide()
  904. self.ActiveEmoticonStateLocked_1_3.Hide()
  905. self.ActiveEmoticonStateLocked_1_4.Hide()
  906. self.ActiveEmoticonStateLocked_2_1.Hide()
  907. self.ActiveEmoticonStateLocked_2_2.Hide()
  908. self.ActiveEmoticonStateLocked_2_3.Hide()
  909. self.ActiveEmoticonStateLocked_2_4.Hide()
  910. self.ActiveEmoticonStateLocked_3_1.Hide()
  911. self.ActiveEmoticonStateLocked_3_2.Hide()
  912. self.ActiveEmoticonStateLocked_3_3.Hide()
  913. self.ActiveEmoticonStateLocked_3_4.Hide()
  914. self.ActiveEmoticonStateLocked_4_1.Hide()
  915. self.ActiveEmoticonStateLocked_4_2.Hide()
  916. self.ActiveEmoticonStateLocked_4_3.Hide()
  917. self.ActiveEmoticonStateLocked_4_4.Hide()
  918. self.SubTitleEmote.Hide()
  919. self.SubTitleEmote_2.Hide()
  920. self.EmoteInfo.Hide()
  921. self.EmoteInventoryWindow=None
  922. #EMOTE_SYSTEM_LOL
  923.  
  924. print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
  925.  
  926. def __BuildKeyDict(self):
  927. onPressKeyDict = {}
  928.  
  929. onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
  930. onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
  931. onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
  932. onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
  933. onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
  934. onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
  935. onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
  936. onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
  937. onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
  938. onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
  939. onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
  940. onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
  941. onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
  942. #EMOTE_SYSTEM_LOL
  943. onPressKeyDict[app.DIK_ESC] = lambda : self.__hideemoteinventory()
  944. onPressKeyDict[app.DIK_Y] = lambda : self.__showemoteinventory()
  945. onPressKeyDict[app.DIK_K] = lambda : self.__showemoteinterface()
  946. #EMOTE_SYSTEM_LOL
  947. onPressKeyDict[app.DIK_F5] = lambda : self.interface.ToggleSwitchbotWindow()
  948. onPressKeyDict[app.DIK_F6] = lambda : self.__BonusPage()
  949.  
  950. onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
  951. onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
  952. onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
  953. onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
  954.  
  955. onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
  956. onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
  957. onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
  958. onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
  959. onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
  960. onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
  961. onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
  962. onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
  963.  
  964. onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
  965. onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
  966. onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
  967. onPressKeyDict[app.DIK_G] = self.__PressGKey
  968. onPressKeyDict[app.DIK_Q] = self.__PressQKey
  969.  
  970. onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
  971. onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
  972. onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
  973. onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
  974. onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
  975. onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
  976. onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
  977. onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItem()
  978. onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
  979. onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
  980. onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
  981. onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
  982. onPressKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
  983. onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
  984. onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
  985. onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
  986. onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole()
  987. onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
  988.  
  989. onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
  990. onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
  991. onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
  992. onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
  993.  
  994. self.onPressKeyDict = onPressKeyDict
  995.  
  996. onClickKeyDict = {}
  997. onClickKeyDict[app.DIK_K] = lambda : self.__hideemoteinterface()
  998. #EMOTE_SYSTEM_LOL
  999. onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
  1000. onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
  1001. onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
  1002. onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
  1003. onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
  1004.  
  1005. onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
  1006. onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
  1007. onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
  1008. onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
  1009. onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
  1010. onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
  1011. onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  1012. onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  1013. onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
  1014. onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
  1015. onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  1016. onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  1017. onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  1018. onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  1019. onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  1020. onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  1021. onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
  1022. onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
  1023. onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
  1024.  
  1025. self.onClickKeyDict=onClickKeyDict
  1026.  
  1027. def __PressNumKey(self,num):
  1028. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1029.  
  1030. if num >= 1 and num <= 9:
  1031. if(chrmgr.IsPossibleEmoticon(-1)):
  1032. chrmgr.SetEmoticon(-1,int(num)-1)
  1033. net.SendEmoticon(int(num)-1)
  1034. else:
  1035. if num >= 1 and num <= 4:
  1036. self.pressNumber(num-1)
  1037.  
  1038. def __ClickBKey(self):
  1039. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1040. return
  1041. else:
  1042. if constInfo.PVPMODE_ACCELKEY_ENABLE:
  1043. self.ChangePKMode()
  1044.  
  1045.  
  1046. def __PressJKey(self):
  1047. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1048. if player.IsMountingHorse():
  1049. net.SendChatPacket("/unmount")
  1050. else:
  1051. #net.SendChatPacket("/user_horse_ride")
  1052. if not uiPrivateShopBuilder.IsBuildingPrivateShop():
  1053. for i in xrange(player.INVENTORY_PAGE_SIZE):
  1054. if player.GetItemIndex(i) in (71114, 71116, 71118, 71120):
  1055. net.SendItemUsePacket(i)
  1056. break
  1057. def __PressHKey(self):
  1058. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1059. net.SendChatPacket("/user_horse_ride")
  1060.  
  1061. def __PressBKey(self):
  1062. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1063. net.SendChatPacket("/user_horse_back")
  1064. else:
  1065. state = "EMOTICON"
  1066. self.interface.ToggleCharacterWindow(state)
  1067.  
  1068. def __PressFKey(self):
  1069. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1070. net.SendChatPacket("/user_horse_feed")
  1071. else:
  1072. app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  1073.  
  1074. def __PressGKey(self):
  1075. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1076. net.SendChatPacket("/ride")
  1077. else:
  1078. if self.ShowNameFlag:
  1079. self.interface.ToggleGuildWindow()
  1080. else:
  1081. app.PitchCamera(app.CAMERA_TO_POSITIVE)
  1082.  
  1083. def __ReleaseGKey(self):
  1084. app.PitchCamera(app.CAMERA_STOP)
  1085.  
  1086. def __PressQKey(self):
  1087. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1088. if 0==interfaceModule.IsQBHide:
  1089. interfaceModule.IsQBHide = 1
  1090. self.interface.HideAllQuestButton()
  1091. else:
  1092. interfaceModule.IsQBHide = 0
  1093. self.interface.ShowAllQuestButton()
  1094. else:
  1095. app.RotateCamera(app.CAMERA_TO_NEGATIVE)
  1096.  
  1097. def __SetQuickSlotMode(self):
  1098. self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
  1099.  
  1100. def __SetQuickPageMode(self):
  1101. self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
  1102.  
  1103. def __PressQuickSlot(self, localSlotIndex):
  1104. if localeInfo.IsARABIC():
  1105. if 0 <= localSlotIndex and localSlotIndex < 4:
  1106. player.RequestUseLocalQuickSlot(3-localSlotIndex)
  1107. else:
  1108. player.RequestUseLocalQuickSlot(11-localSlotIndex)
  1109. else:
  1110. player.RequestUseLocalQuickSlot(localSlotIndex)
  1111.  
  1112. if app.ENABLE_FEATURES_OXEVENT:
  1113. def __PressQuickSlot(self, localSlotIndex):
  1114.  
  1115. def GetPath():
  1116. return "lib\item_proto_list.py"
  1117.  
  1118. def MaxRange():
  1119. return 100500
  1120.  
  1121. def InitCheckName(name):
  1122. return (name != "" and name != "Fiere")
  1123.  
  1124. def InitLoadingProto():
  1125. self.listKeys = []
  1126. self.dict = {}
  1127.  
  1128. fileName = open(GetPath(), 'w+')
  1129.  
  1130. for key in xrange(MaxRange()):
  1131. item.SelectItem(key)
  1132. stringName = item.GetItemName(key)
  1133.  
  1134. self.dict['vnum'] = key
  1135. self.dict['name'] = stringName
  1136.  
  1137. if InitCheckName(self.dict['name']):
  1138. self.listKeys.append({
  1139. 'vnum': self.dict['vnum'], 'name': self.dict['name']
  1140. })
  1141.  
  1142. fileName.write("DICT=[\n")
  1143.  
  1144. for key in self.listKeys:
  1145. fileName.write(str(key) + ",\n")
  1146.  
  1147. fileName.write("\n]")
  1148. chat.AppendChat(chat.CHAT_TYPE_INFO, "%d articole adaugate in lib\item_proto_list.py." % (len(self.listKeys)))
  1149.  
  1150. def IsAdmin():
  1151. return (str(player.GetName())[0] == "[")
  1152.  
  1153. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1154. if localSlotIndex in [4, 5, 6, 7] and IsAdmin():
  1155. InitLoadingProto()
  1156. else:
  1157. player.RequestUseLocalQuickSlot(localSlotIndex)
  1158. else:
  1159. def __PressQuickSlot(self, localSlotIndex):
  1160.  
  1161. if localeInfo.IsARABIC():
  1162. if 0 <= localSlotIndex and localSlotIndex < 4:
  1163. player.RequestUseLocalQuickSlot(3-localSlotIndex)
  1164. else:
  1165. player.RequestUseLocalQuickSlot(11-localSlotIndex)
  1166. else:
  1167. player.RequestUseLocalQuickSlot(localSlotIndex)
  1168.  
  1169. def __SelectQuickPage(self, pageIndex):
  1170. self.quickSlotPageIndex = pageIndex
  1171. player.SetQuickPage(pageIndex)
  1172.  
  1173. def ToggleDebugInfo(self):
  1174. self.isShowDebugInfo = not self.isShowDebugInfo
  1175.  
  1176. if self.isShowDebugInfo:
  1177. self.PrintCoord.Show()
  1178. self.FrameRate.Show()
  1179. self.Pitch.Show()
  1180. self.Splat.Show()
  1181. self.TextureNum.Show()
  1182. self.ObjectNum.Show()
  1183. self.ViewDistance.Show()
  1184. self.PrintMousePos.Show()
  1185. else:
  1186. self.PrintCoord.Hide()
  1187. self.FrameRate.Hide()
  1188. self.Pitch.Hide()
  1189. self.Splat.Hide()
  1190. self.TextureNum.Hide()
  1191. self.ObjectNum.Hide()
  1192. self.ViewDistance.Hide()
  1193. self.PrintMousePos.Hide()
  1194.  
  1195. def __BuildDebugInfo(self):
  1196. ## Character Position Coordinate
  1197. self.PrintCoord = ui.TextLine()
  1198. self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
  1199. self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0)
  1200.  
  1201. ## Frame Rate
  1202. self.FrameRate = ui.TextLine()
  1203. self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
  1204. self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
  1205.  
  1206. ## Camera Pitch
  1207. self.Pitch = ui.TextLine()
  1208. self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
  1209. self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
  1210.  
  1211. ## Splat
  1212. self.Splat = ui.TextLine()
  1213. self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
  1214. self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
  1215.  
  1216. ##
  1217. self.PrintMousePos = ui.TextLine()
  1218. self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
  1219. self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
  1220.  
  1221. # TextureNum
  1222. self.TextureNum = ui.TextLine()
  1223. self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
  1224. self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
  1225.  
  1226. # 오브젝트 그리는 개수
  1227. self.ObjectNum = ui.TextLine()
  1228. self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
  1229. self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
  1230.  
  1231. # 시야거리
  1232. self.ViewDistance = ui.TextLine()
  1233. self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
  1234. self.ViewDistance.SetPosition(0, 0)
  1235.  
  1236. def __NotifyError(self, msg):
  1237. chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
  1238.  
  1239. def ChangePKMode(self):
  1240.  
  1241. if not app.IsPressed(app.DIK_LCONTROL):
  1242. return
  1243.  
  1244. if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
  1245. self.__NotifyError(localeInfo.OPTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
  1246. return
  1247.  
  1248. curTime = app.GetTime()
  1249. if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
  1250. return
  1251.  
  1252. self.lastPKModeSendedTime = curTime
  1253.  
  1254. curPKMode = player.GetPKMode()
  1255. nextPKMode = curPKMode + 1
  1256. if nextPKMode == player.PK_MODE_PROTECT:
  1257. if 0 == player.GetGuildID():
  1258. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
  1259. nextPKMode = 0
  1260. else:
  1261. nextPKMode = player.PK_MODE_GUILD
  1262.  
  1263. elif nextPKMode == player.PK_MODE_MAX_NUM:
  1264. nextPKMode = 0
  1265.  
  1266. net.SendChatPacket("/PKMode " + str(nextPKMode))
  1267. print "/PKMode " + str(nextPKMode)
  1268.  
  1269. def OnChangePKMode(self):
  1270.  
  1271. self.interface.OnChangePKMode()
  1272.  
  1273. try:
  1274. self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
  1275. except KeyError:
  1276. print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
  1277.  
  1278. if constInfo.PVPMODE_TEST_ENABLE:
  1279. curPKMode = player.GetPKMode()
  1280. alignment, grade = chr.testGetPKData()
  1281. self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
  1282. self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
  1283. self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
  1284.  
  1285.  
  1286. def StartGame(self):
  1287. self.RefreshInventory()
  1288. self.RefreshEquipment()
  1289. self.RefreshCharacter()
  1290. self.RefreshSkill()
  1291.  
  1292. if app.ENABLE_ENVIRONMENT_EFFECT_OPTION:
  1293. systemSetting.SetNightModeOption(systemSetting.GetNightModeOption())
  1294. systemSetting.SetSnowModeOption(systemSetting.GetSnowModeOption())
  1295. systemSetting.SetSnowTextureModeOption(systemSetting.GetSnowTextureModeOption())
  1296.  
  1297. if app.ENABLE_ENVIRONMENT_EFFECT_OPTION:
  1298. def BINARY_Recv_Night_Mode(self, mode):
  1299. self.__DayMode_Update(mode)
  1300.  
  1301. # Refresh
  1302. def CheckGameButton(self):
  1303. if self.interface:
  1304. self.interface.CheckGameButton()
  1305.  
  1306. def RefreshAlignment(self):
  1307. self.interface.RefreshAlignment()
  1308.  
  1309. def RefreshStatus(self):
  1310. self.CheckGameButton()
  1311.  
  1312. if self.interface:
  1313. self.interface.RefreshStatus()
  1314.  
  1315. if self.playerGauge:
  1316. self.playerGauge.RefreshGauge()
  1317.  
  1318. def RefreshStamina(self):
  1319. self.interface.RefreshStamina()
  1320.  
  1321. def RefreshSkill(self):
  1322. self.CheckGameButton()
  1323. if self.interface:
  1324. self.interface.RefreshSkill()
  1325.  
  1326. def RefreshQuest(self):
  1327. self.interface.RefreshQuest()
  1328.  
  1329. def RefreshMessenger(self):
  1330. self.interface.RefreshMessenger()
  1331.  
  1332. def RefreshGuildInfoPage(self):
  1333. self.interface.RefreshGuildInfoPage()
  1334.  
  1335. def RefreshGuildBoardPage(self):
  1336. self.interface.RefreshGuildBoardPage()
  1337.  
  1338. def RefreshGuildMemberPage(self):
  1339. self.interface.RefreshGuildMemberPage()
  1340.  
  1341. def RefreshGuildMemberPageGradeComboBox(self):
  1342. self.interface.RefreshGuildMemberPageGradeComboBox()
  1343.  
  1344. def RefreshGuildSkillPage(self):
  1345. self.interface.RefreshGuildSkillPage()
  1346.  
  1347. def RefreshGuildGradePage(self):
  1348. self.interface.RefreshGuildGradePage()
  1349.  
  1350. def RefreshMobile(self):
  1351. if self.interface:
  1352. self.interface.RefreshMobile()
  1353.  
  1354. def OnMobileAuthority(self):
  1355. self.interface.OnMobileAuthority()
  1356.  
  1357. def OnBlockMode(self, mode):
  1358. self.interface.OnBlockMode(mode)
  1359.  
  1360. def GetInputOn(self):
  1361. constInfo.INPUT_IGNORE = 1
  1362.  
  1363. def GetInputOff(self):
  1364. constInfo.INPUT_IGNORE = 0
  1365.  
  1366. def GetInputValue(self):
  1367. net.SendQuestInputStringPacket(str(constInfo.VID))
  1368.  
  1369. def OpenQuestWindow(self, skin, idx):
  1370. if constInfo.INPUT_IGNORE == 1:
  1371. return
  1372. else:
  1373. self.interface.OpenQuestWindow(skin, idx)
  1374.  
  1375. def AskGuildName(self):
  1376.  
  1377. guildNameBoard = uiCommon.InputDialog()
  1378. guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
  1379. guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
  1380. guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
  1381. guildNameBoard.Open()
  1382.  
  1383. self.guildNameBoard = guildNameBoard
  1384.  
  1385. def ConfirmGuildName(self):
  1386. guildName = self.guildNameBoard.GetText()
  1387. if not guildName:
  1388. return
  1389.  
  1390. if net.IsInsultIn(guildName):
  1391. self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
  1392. return
  1393.  
  1394. net.SendAnswerMakeGuildPacket(guildName)
  1395. self.guildNameBoard.Close()
  1396. self.guildNameBoard = None
  1397. return True
  1398.  
  1399. def CancelGuildName(self):
  1400. self.guildNameBoard.Close()
  1401. self.guildNameBoard = None
  1402. return True
  1403.  
  1404. def PopupMessage(self, msg):
  1405. self.stream.popupWindow.Close()
  1406. self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
  1407.  
  1408. def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type=0):
  1409. self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
  1410.  
  1411. def AppendMaterialToRefineDialog(self, vnum, count):
  1412. self.interface.AppendMaterialToRefineDialog(vnum, count)
  1413.  
  1414. def RunUseSkillEvent(self, slotIndex, coolTime):
  1415. self.interface.OnUseSkill(slotIndex, coolTime)
  1416.  
  1417. def ClearAffects(self):
  1418. self.affectShower.ClearAffects()
  1419.  
  1420. def SetAffect(self, affect):
  1421. self.affectShower.SetAffect(affect)
  1422.  
  1423. def ResetAffect(self, affect):
  1424. self.affectShower.ResetAffect(affect)
  1425.  
  1426. def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
  1427. self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
  1428.  
  1429. def BINARY_NEW_RemoveAffect(self, type, pointIdx):
  1430. self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
  1431.  
  1432. def ActivateSkillSlot(self, slotIndex):
  1433. if self.interface:
  1434. self.interface.OnActivateSkill(slotIndex)
  1435.  
  1436. def DeactivateSkillSlot(self, slotIndex):
  1437. if self.interface:
  1438. self.interface.OnDeactivateSkill(slotIndex)
  1439.  
  1440. def RefreshEquipment(self):
  1441. if self.interface:
  1442. self.interface.RefreshInventory()
  1443.  
  1444. def RefreshInventory(self):
  1445. if self.interface:
  1446. self.interface.RefreshInventory()
  1447.  
  1448. def RefreshCharacter(self):
  1449. if self.interface:
  1450. self.interface.RefreshCharacter()
  1451.  
  1452. if app.RENEWAL_DEAD_PACKET:
  1453. def OnGameOver(self, d_time):
  1454. self.CloseTargetBoard()
  1455. self.OpenRestartDialog(d_time)
  1456. else:
  1457. def OnGameOver(self):
  1458. self.CloseTargetBoard()
  1459. self.OpenRestartDialog()
  1460.  
  1461. if app.RENEWAL_DEAD_PACKET:
  1462. def OpenRestartDialog(self, d_time):
  1463. self.interface.OpenRestartDialog(d_time)
  1464. else:
  1465. def OpenRestartDialog(self):
  1466. self.interface.OpenRestartDialog()
  1467.  
  1468. def ChangeCurrentSkill(self, skillSlotNumber):
  1469. self.interface.OnChangeCurrentSkill(skillSlotNumber)
  1470.  
  1471. ## TargetBoard
  1472. def SetPCTargetBoard(self, vid, name):
  1473. self.targetBoard.Open(vid, name)
  1474.  
  1475. if app.IsPressed(app.DIK_LCONTROL):
  1476.  
  1477. if not player.IsSameEmpire(vid):
  1478. return
  1479.  
  1480. if player.IsMainCharacterIndex(vid):
  1481. return
  1482. elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
  1483. return
  1484.  
  1485. self.interface.OpenWhisperDialog(name)
  1486.  
  1487.  
  1488. def RefreshTargetBoardByVID(self, vid):
  1489. self.targetBoard.RefreshByVID(vid)
  1490.  
  1491. def RefreshTargetBoardByName(self, name):
  1492. self.targetBoard.RefreshByName(name)
  1493.  
  1494. def __RefreshTargetBoard(self):
  1495. self.targetBoard.Refresh()
  1496.  
  1497. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  1498. def SetHPTargetBoard(self, vid, hpPercentage, iMinHP, iMaxHP):
  1499. if vid != self.targetBoard.GetTargetVID():
  1500. self.targetBoard.ResetTargetBoard()
  1501. self.targetBoard.SetEnemyVID(vid)
  1502.  
  1503. self.targetBoard.SetHP(hpPercentage, iMinHP, iMaxHP)
  1504. self.targetBoard.Show()
  1505. else:
  1506. def SetHPTargetBoard(self, vid, hpPercentage):
  1507. if vid != self.targetBoard.GetTargetVID():
  1508. self.targetBoard.ResetTargetBoard()
  1509. self.targetBoard.SetEnemyVID(vid)
  1510.  
  1511. self.targetBoard.SetHP(hpPercentage)
  1512. self.targetBoard.Show()
  1513.  
  1514. if app.ENABLE_SHIP_DEFENSE:
  1515. def SetHPAllianceTargetBoard(self, vid, hp, hpMax):
  1516. if self.interface.IsHideUiMode == True:
  1517. return
  1518.  
  1519. if not vid:
  1520. self.allyTargetBoard.Close()
  1521. return
  1522.  
  1523. if vid != self.allyTargetBoard.GetTargetVID():
  1524. self.allyTargetBoard.ResetTargetBoard()
  1525. self.allyTargetBoard.SetTarget(vid)
  1526.  
  1527. self.allyTargetBoard.SetHP(hp, hpMax)
  1528. self.allyTargetBoard.Show()
  1529.  
  1530. def CloseTargetBoardIfDifferent(self, vid):
  1531. if vid != self.targetBoard.GetTargetVID():
  1532. self.targetBoard.Close()
  1533.  
  1534. def CloseTargetBoard(self):
  1535. self.targetBoard.Close()
  1536.  
  1537. def OpenEquipmentDialog(self, vid):
  1538. self.interface.OpenEquipmentDialog(vid)
  1539.  
  1540. def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
  1541. self.interface.SetEquipmentDialogItem(vid, slotIndex, vnum, count)
  1542.  
  1543. def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
  1544. self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
  1545.  
  1546. def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
  1547. self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
  1548.  
  1549. # SHOW_LOCAL_MAP_NAME
  1550. def ShowMapName(self, mapName, x, y):
  1551.  
  1552. if self.mapNameShower:
  1553. self.mapNameShower.ShowMapName(mapName, x, y)
  1554.  
  1555. if self.interface:
  1556. self.interface.SetMapName(mapName)
  1557. # END_OF_SHOW_LOCAL_MAP_NAME
  1558.  
  1559. def BINARY_OpenAtlasWindow(self):
  1560. self.interface.BINARY_OpenAtlasWindow()
  1561.  
  1562. ## Chat
  1563. def OnRecvWhisper(self, mode, name, line):
  1564. if mode == chat.WHISPER_TYPE_GM:
  1565. self.interface.RegisterGameMasterName(name)
  1566. chat.AppendWhisper(mode, name, line)
  1567. self.interface.RecvWhisper(name)
  1568.  
  1569. def OnRecvWhisperSystemMessage(self, mode, name, line):
  1570. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
  1571. self.interface.RecvWhisper(name)
  1572.  
  1573. def OnRecvWhisperError(self, mode, name, line):
  1574. if localeInfo.WHISPER_ERROR.has_key(mode):
  1575. if app.OFFLINE_MESSAGE:
  1576. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, name + " nu este online. Lasa un mesaj offline folosind prefixul #. e.x: #Salut")
  1577. else:
  1578. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
  1579. else:
  1580. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
  1581. self.interface.RecvWhisper(name)
  1582.  
  1583. def RecvWhisper(self, name):
  1584. self.interface.RecvWhisper(name)
  1585.  
  1586. def OnPickMoney(self, money):
  1587. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (money))
  1588.  
  1589. def OnShopError(self, type):
  1590. try:
  1591. self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
  1592. except KeyError:
  1593. self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
  1594.  
  1595. def OnSafeBoxError(self):
  1596. self.PopupMessage(localeInfo.SAFEBOX_ERROR)
  1597.  
  1598. def OnFishingSuccess(self, isFish, fishName):
  1599. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
  1600.  
  1601. # ADD_FISHING_MESSAGE
  1602. def OnFishingNotifyUnknown(self):
  1603. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
  1604.  
  1605. def OnFishingWrongPlace(self):
  1606. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
  1607. # END_OF_ADD_FISHING_MESSAGE
  1608.  
  1609. def OnFishingNotify(self, isFish, fishName):
  1610. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
  1611.  
  1612. def OnFishingFailure(self):
  1613. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
  1614.  
  1615. def OnCannotPickItem(self):
  1616. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
  1617.  
  1618. # MINING
  1619. def OnCannotMining(self):
  1620. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
  1621. # END_OF_MINING
  1622.  
  1623. def OnCannotUseSkill(self, vid, type):
  1624. if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
  1625. textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
  1626.  
  1627. if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
  1628. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
  1629.  
  1630. def OnCannotShotError(self, vid, type):
  1631. textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
  1632.  
  1633. ## PointReset
  1634. def StartPointReset(self):
  1635. self.interface.OpenPointResetDialog()
  1636.  
  1637. ## Shop
  1638. def StartShop(self, vid, count = 0):
  1639. if app.ENABLE_SHOP_SEEN:
  1640. self.interface.OpenShopDialog(vid, count)
  1641. else:
  1642. self.interface.OpenShopDialog(vid)
  1643.  
  1644. def EndShop(self):
  1645. self.interface.CloseShopDialog()
  1646.  
  1647. def RefreshShop(self):
  1648. self.interface.RefreshShopDialog()
  1649.  
  1650. def SetShopSellingPrice(self, Price):
  1651. pass
  1652.  
  1653. def StartDice(self):
  1654. self.interface.StartDice()
  1655.  
  1656. def EndDice(self):
  1657. self.interface.EndDice()
  1658.  
  1659. def RefreshDice(self):
  1660. self.interface.RefreshDice()
  1661.  
  1662. # def __DiceHasDone(self, myNumber, targetNumber):
  1663. # self.interface.AddDiceNumber(myNumber, targetNumber)
  1664.  
  1665. def __DiceHasDone(self, myNumberFinal, targetNumberFinal, myNumber1, myNumber2, targetNumber1, targetNumber2):
  1666. self.interface.AddDiceNumber(myNumberFinal, targetNumberFinal, myNumber1, myNumber2, targetNumber1, targetNumber2)
  1667.  
  1668. ## Exchange
  1669. def StartExchange(self):
  1670. self.interface.StartExchange()
  1671.  
  1672. def EndExchange(self):
  1673. self.interface.EndExchange()
  1674.  
  1675. def RefreshExchange(self):
  1676. self.interface.RefreshExchange()
  1677.  
  1678. ## Party
  1679. def RecvPartyInviteQuestion(self, leaderVID, leaderName):
  1680. partyInviteQuestionDialog = uiCommon.QuestionDialog()
  1681. partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
  1682. partyInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerPartyInvite(arg))
  1683. partyInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerPartyInvite(arg))
  1684. partyInviteQuestionDialog.Open()
  1685. partyInviteQuestionDialog.partyLeaderVID = leaderVID
  1686. self.partyInviteQuestionDialog = partyInviteQuestionDialog
  1687.  
  1688. def AnswerPartyInvite(self, answer):
  1689.  
  1690. if not self.partyInviteQuestionDialog:
  1691. return
  1692.  
  1693. partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
  1694.  
  1695. distance = player.GetCharacterDistance(partyLeaderVID)
  1696. if distance < 0.0 or distance > 5000:
  1697. answer = False
  1698.  
  1699. net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
  1700.  
  1701. self.partyInviteQuestionDialog.Close()
  1702. self.partyInviteQuestionDialog = None
  1703.  
  1704. def AddPartyMember(self, pid, name):
  1705. self.interface.AddPartyMember(pid, name)
  1706.  
  1707. def UpdatePartyMemberInfo(self, pid):
  1708. self.interface.UpdatePartyMemberInfo(pid)
  1709.  
  1710. def RemovePartyMember(self, pid):
  1711. self.interface.RemovePartyMember(pid)
  1712. self.__RefreshTargetBoard()
  1713.  
  1714. def LinkPartyMember(self, pid, vid):
  1715. self.interface.LinkPartyMember(pid, vid)
  1716.  
  1717. def UnlinkPartyMember(self, pid):
  1718. self.interface.UnlinkPartyMember(pid)
  1719.  
  1720. def UnlinkAllPartyMember(self):
  1721. self.interface.UnlinkAllPartyMember()
  1722.  
  1723. def ExitParty(self):
  1724. self.interface.ExitParty()
  1725. self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
  1726.  
  1727. def ChangePartyParameter(self, distributionMode):
  1728. self.interface.ChangePartyParameter(distributionMode)
  1729.  
  1730. ## Messenger
  1731. def OnMessengerAddFriendQuestion(self, name):
  1732. messengerAddFriendQuestion = uiCommon.QuestionDialog2()
  1733. messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))
  1734. messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
  1735. messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
  1736. messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
  1737. messengerAddFriendQuestion.Open()
  1738. messengerAddFriendQuestion.name = name
  1739. self.messengerAddFriendQuestion = messengerAddFriendQuestion
  1740.  
  1741. def OnAcceptAddFriend(self):
  1742. name = self.messengerAddFriendQuestion.name
  1743. net.SendChatPacket("/messenger_auth y " + name)
  1744. self.OnCloseAddFriendQuestionDialog()
  1745. return True
  1746.  
  1747. def OnDenyAddFriend(self):
  1748. name = self.messengerAddFriendQuestion.name
  1749. net.SendChatPacket("/messenger_auth n " + name)
  1750. self.OnCloseAddFriendQuestionDialog()
  1751. return True
  1752.  
  1753. def OnCloseAddFriendQuestionDialog(self):
  1754. self.messengerAddFriendQuestion.Close()
  1755. self.messengerAddFriendQuestion = None
  1756. return True
  1757.  
  1758. ## SafeBox
  1759. def OpenSafeboxWindow(self, size):
  1760. self.interface.OpenSafeboxWindow(size)
  1761.  
  1762. def RefreshSafebox(self):
  1763. self.interface.RefreshSafebox()
  1764.  
  1765. def RefreshSafeboxMoney(self):
  1766. self.interface.RefreshSafeboxMoney()
  1767.  
  1768. # ITEM_MALL
  1769. def OpenMallWindow(self, size):
  1770. self.interface.OpenMallWindow(size)
  1771.  
  1772. def RefreshMall(self):
  1773. self.interface.RefreshMall()
  1774. # END_OF_ITEM_MALL
  1775.  
  1776. ## Guild
  1777. def RecvGuildInviteQuestion(self, guildID, guildName):
  1778. guildInviteQuestionDialog = uiCommon.QuestionDialog()
  1779. guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
  1780. guildInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerGuildInvite(arg))
  1781. guildInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerGuildInvite(arg))
  1782. guildInviteQuestionDialog.Open()
  1783. guildInviteQuestionDialog.guildID = guildID
  1784. self.guildInviteQuestionDialog = guildInviteQuestionDialog
  1785.  
  1786. def AnswerGuildInvite(self, answer):
  1787.  
  1788. if not self.guildInviteQuestionDialog:
  1789. return
  1790.  
  1791. guildLeaderVID = self.guildInviteQuestionDialog.guildID
  1792. net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
  1793.  
  1794. self.guildInviteQuestionDialog.Close()
  1795. self.guildInviteQuestionDialog = None
  1796.  
  1797.  
  1798. def DeleteGuild(self):
  1799. self.interface.DeleteGuild()
  1800.  
  1801. ## Clock
  1802. def ShowClock(self, second):
  1803. self.interface.ShowClock(second)
  1804.  
  1805. def HideClock(self):
  1806. self.interface.HideClock()
  1807.  
  1808. ## Emotion
  1809. def BINARY_ActEmotion(self, emotionIndex):
  1810. if self.interface.wndCharacter:
  1811. self.interface.wndCharacter.ActEmotion(emotionIndex)
  1812.  
  1813. ###############################################################################################
  1814. ###############################################################################################
  1815. ## Keyboard Functions
  1816.  
  1817. def CheckFocus(self):
  1818. if False == self.IsFocus():
  1819. if True == self.interface.IsOpenChat():
  1820. self.interface.ToggleChat()
  1821.  
  1822. self.SetFocus()
  1823.  
  1824. def SaveScreen(self):
  1825. print "save screen"
  1826.  
  1827. # SCREENSHOT_CWDSAVE
  1828. if SCREENSHOT_CWDSAVE:
  1829. if not os.path.exists(os.getcwd()+os.sep+"photo"):
  1830. os.mkdir(os.getcwd()+os.sep+"photo")
  1831.  
  1832. (succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"photo"+os.sep)
  1833. elif SCREENSHOT_DIR:
  1834. (succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
  1835. else:
  1836. (succeeded, name) = grp.SaveScreenShot()
  1837. # END_OF_SCREENSHOT_CWDSAVE
  1838.  
  1839. if succeeded:
  1840. pass
  1841. """
  1842. chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
  1843. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
  1844. """
  1845. else:
  1846. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
  1847.  
  1848. def ShowConsole(self):
  1849. if debugInfo.IsDebugMode() or True == self.consoleEnable:
  1850. player.EndKeyWalkingImmediately()
  1851. self.console.OpenWindow()
  1852.  
  1853. def ShowName(self):
  1854. self.ShowNameFlag = True
  1855. self.playerGauge.EnableShowAlways()
  1856. player.SetQuickPage(self.quickSlotPageIndex+1)
  1857.  
  1858. # ADD_ALWAYS_SHOW_NAME
  1859. def __IsShowName(self):
  1860.  
  1861. if systemSetting.IsAlwaysShowName():
  1862. return True
  1863.  
  1864. if self.ShowNameFlag:
  1865. return True
  1866.  
  1867. return False
  1868. # END_OF_ADD_ALWAYS_SHOW_NAME
  1869.  
  1870. def HideName(self):
  1871. self.ShowNameFlag = False
  1872. self.playerGauge.DisableShowAlways()
  1873. player.SetQuickPage(self.quickSlotPageIndex)
  1874.  
  1875. def ShowMouseImage(self):
  1876. self.interface.ShowMouseImage()
  1877.  
  1878. def HideMouseImage(self):
  1879. self.interface.HideMouseImage()
  1880.  
  1881. def StartAttack(self):
  1882. player.SetAttackKeyState(True)
  1883.  
  1884. def EndAttack(self):
  1885. player.SetAttackKeyState(False)
  1886.  
  1887. def MoveUp(self):
  1888. player.SetSingleDIKKeyState(app.DIK_UP, True)
  1889.  
  1890. def MoveDown(self):
  1891. player.SetSingleDIKKeyState(app.DIK_DOWN, True)
  1892.  
  1893. def MoveLeft(self):
  1894. player.SetSingleDIKKeyState(app.DIK_LEFT, True)
  1895.  
  1896. def MoveRight(self):
  1897. player.SetSingleDIKKeyState(app.DIK_RIGHT, True)
  1898.  
  1899. def StopUp(self):
  1900. player.SetSingleDIKKeyState(app.DIK_UP, False)
  1901.  
  1902. def StopDown(self):
  1903. player.SetSingleDIKKeyState(app.DIK_DOWN, False)
  1904.  
  1905. def StopLeft(self):
  1906. player.SetSingleDIKKeyState(app.DIK_LEFT, False)
  1907.  
  1908. def StopRight(self):
  1909. player.SetSingleDIKKeyState(app.DIK_RIGHT, False)
  1910.  
  1911. def PickUpItem(self):
  1912. player.PickCloseItem()
  1913. # net.SendChatPacket("/cersetor")
  1914.  
  1915. def OnKeyDown(self, key):
  1916. if self.interface.wndWeb and self.interface.wndWeb.IsShow():
  1917. return
  1918.  
  1919. if key == app.DIK_ESC:
  1920. self.RequestDropItem(False)
  1921. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1922.  
  1923. if key == app.DIK_TAB and constInfo.wndWarBoard:
  1924. if constInfo.BOARD_WAR == 0:
  1925. constInfo.BOARD_WAR = 1
  1926. if not constInfo.wndWarBoard.Open():
  1927. self.wndWarBoard.Open()
  1928. else:
  1929. constInfo.BOARD_WAR = 0
  1930. if not constInfo.wndWarBoard.Close():
  1931. self.wndWarBoard.Close()
  1932. return True
  1933.  
  1934. try:
  1935. self.onPressKeyDict[key]()
  1936. except KeyError:
  1937. pass
  1938. except:
  1939. raise
  1940.  
  1941. return TRUE
  1942.  
  1943. def OnKeyUp(self, key):
  1944. try:
  1945. self.onClickKeyDict[key]()
  1946. except KeyError:
  1947. pass
  1948. except:
  1949. raise
  1950. return TRUE
  1951.  
  1952. def OnMouseLeftButtonDown(self):
  1953. if self.interface.BUILD_OnMouseLeftButtonDown():
  1954. return
  1955.  
  1956. if mouseModule.mouseController.isAttached():
  1957. self.CheckFocus()
  1958. else:
  1959. hyperlink = ui.GetHyperlink()
  1960. if hyperlink:
  1961. return
  1962. else:
  1963. self.CheckFocus()
  1964. player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
  1965.  
  1966. return True
  1967.  
  1968. def OnMouseLeftButtonUp(self):
  1969.  
  1970. if self.interface.BUILD_OnMouseLeftButtonUp():
  1971. return
  1972.  
  1973. if mouseModule.mouseController.isAttached():
  1974.  
  1975. attachedType = mouseModule.mouseController.GetAttachedType()
  1976. attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  1977. attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  1978. attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
  1979.  
  1980. ## QuickSlot
  1981. if player.SLOT_TYPE_QUICK_SLOT == attachedType:
  1982. player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
  1983.  
  1984. ## Inventory
  1985. elif player.SLOT_TYPE_INVENTORY == attachedType:
  1986.  
  1987. if player.ITEM_MONEY == attachedItemIndex:
  1988. self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
  1989. else:
  1990. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1991.  
  1992. mouseModule.mouseController.DeattachObject()
  1993.  
  1994. else:
  1995. hyperlink = ui.GetHyperlink()
  1996. if hyperlink:
  1997. if app.IsPressed(app.DIK_LALT):
  1998. link = chat.GetLinkFromHyperlink(hyperlink)
  1999. ime.PasteString(link)
  2000. else:
  2001. self.interface.MakeHyperlinkTooltip(hyperlink)
  2002. return
  2003. else:
  2004. player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
  2005.  
  2006. #player.EndMouseWalking()
  2007. return True
  2008.  
  2009. def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
  2010. if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  2011. attachedInvenType = player.SlotTypeToInvenType(attachedType)
  2012. if True == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  2013. if player.IsEquipmentSlot(attachedItemSlotPos) and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType:
  2014. self.stream.popupWindow.Close()
  2015. self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  2016. else:
  2017. if chr.IsNPC(dstChrID):
  2018. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  2019. else:
  2020. net.SendExchangeStartPacket(dstChrID)
  2021. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  2022. else:
  2023. self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
  2024.  
  2025. def __PutMoney(self, attachedType, attachedMoney, dstChrID):
  2026. if True == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
  2027. net.SendExchangeStartPacket(dstChrID)
  2028. net.SendExchangeElkAddPacket(attachedMoney)
  2029. else:
  2030. self.__DropMoney(attachedType, attachedMoney)
  2031.  
  2032. def __DropMoney(self, attachedType, attachedMoney):
  2033. # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
  2034. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2035. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2036. return
  2037. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2038.  
  2039. if attachedMoney>=1000:
  2040. self.stream.popupWindow.Close()
  2041. self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
  2042. return
  2043.  
  2044. itemDropQuestionDialog = uiCommon.QuestionDialog()
  2045. itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
  2046. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  2047. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  2048. itemDropQuestionDialog.Open()
  2049. itemDropQuestionDialog.dropType = attachedType
  2050. itemDropQuestionDialog.dropCount = attachedMoney
  2051. itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
  2052. self.itemDropQuestionDialog = itemDropQuestionDialog
  2053.  
  2054. def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
  2055. # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
  2056. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2057. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2058. return
  2059. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2060.  
  2061. if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
  2062. self.stream.popupWindow.Close()
  2063. self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  2064.  
  2065. else:
  2066. if player.SLOT_TYPE_INVENTORY == attachedType:
  2067. dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
  2068.  
  2069. item.SelectItem(dropItemIndex)
  2070. dropItemName = item.GetItemName()
  2071.  
  2072. ## Question Text
  2073. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  2074.  
  2075. ## Dialog
  2076. itemDropQuestionDialog = uiCommon.QuestionDialog()
  2077. itemDropQuestionDialog.SetText(questionText)
  2078. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  2079. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  2080. itemDropQuestionDialog.Open()
  2081. itemDropQuestionDialog.dropType = attachedType
  2082. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  2083. itemDropQuestionDialog.dropCount = attachedItemCount
  2084. self.itemDropQuestionDialog = itemDropQuestionDialog
  2085.  
  2086. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  2087. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  2088. dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
  2089.  
  2090. item.SelectItem(dropItemIndex)
  2091. dropItemName = item.GetItemName()
  2092.  
  2093. ## Question Text
  2094. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  2095.  
  2096. ## Dialog
  2097. itemDropQuestionDialog = uiCommon.QuestionDialog()
  2098. itemDropQuestionDialog.SetText(questionText)
  2099. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  2100. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  2101. itemDropQuestionDialog.Open()
  2102. itemDropQuestionDialog.dropType = attachedType
  2103. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  2104. itemDropQuestionDialog.dropCount = attachedItemCount
  2105. self.itemDropQuestionDialog = itemDropQuestionDialog
  2106.  
  2107. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  2108.  
  2109. def RequestDropItem(self, answer):
  2110. if not self.itemDropQuestionDialog:
  2111. return
  2112.  
  2113. if answer:
  2114. dropType = self.itemDropQuestionDialog.dropType
  2115. dropCount = self.itemDropQuestionDialog.dropCount
  2116. dropNumber = self.itemDropQuestionDialog.dropNumber
  2117.  
  2118. if player.SLOT_TYPE_INVENTORY == dropType:
  2119. if dropNumber == player.ITEM_MONEY:
  2120. net.SendGoldDropPacketNew(dropCount)
  2121. #snd.PlaySound("sound/ui/money.wav")
  2122. else:
  2123. # PRIVATESHOP_DISABLE_ITEM_DROP
  2124. self.__SendDropItemPacket(dropNumber, dropCount)
  2125. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2126. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  2127. # PRIVATESHOP_DISABLE_ITEM_DROP
  2128. self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  2129. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2130.  
  2131. self.itemDropQuestionDialog.Close()
  2132. self.itemDropQuestionDialog = None
  2133.  
  2134. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  2135.  
  2136. # PRIVATESHOP_DISABLE_ITEM_DROP
  2137. def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  2138. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2139. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2140. return
  2141.  
  2142. net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
  2143. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2144.  
  2145. def OnMouseRightButtonDown(self):
  2146.  
  2147. self.CheckFocus()
  2148.  
  2149. if True == mouseModule.mouseController.isAttached():
  2150. mouseModule.mouseController.DeattachObject()
  2151.  
  2152. else:
  2153. player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
  2154.  
  2155. return True
  2156.  
  2157. def OnMouseRightButtonUp(self):
  2158. if True == mouseModule.mouseController.isAttached():
  2159. return True
  2160.  
  2161. player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
  2162. return True
  2163.  
  2164. def OnMouseMiddleButtonDown(self):
  2165. player.SetMouseMiddleButtonState(player.MBS_PRESS)
  2166.  
  2167. def OnMouseMiddleButtonUp(self):
  2168. player.SetMouseMiddleButtonState(player.MBS_CLICK)
  2169.  
  2170. def OnUpdate(self):
  2171. app.UpdateGame()
  2172.  
  2173. if self.mapNameShower.IsShow():
  2174. self.mapNameShower.Update()
  2175.  
  2176. if self.isShowDebugInfo:
  2177. self.UpdateDebugInfo()
  2178.  
  2179. if self.enableXMasBoom:
  2180. self.__XMasBoom_Update()
  2181.  
  2182. if 1 == constInfo.AUTO_PICK_UP:
  2183. self.PickUpItem()
  2184.  
  2185. if constInfo.E_LITERE_STATUS == 1:
  2186. self.litere_event.Show()
  2187. else:
  2188. self.litere_event.Hide()
  2189.  
  2190. self.interface.BUILD_OnUpdate()
  2191.  
  2192. def UpdateDebugInfo(self):
  2193. #
  2194. # 캐릭터 좌표 및 FPS 출력
  2195. (x, y, z) = player.GetMainCharacterPosition()
  2196. nUpdateTime = app.GetUpdateTime()
  2197. nUpdateFPS = app.GetUpdateFPS()
  2198. nRenderFPS = app.GetRenderFPS()
  2199. nFaceCount = app.GetFaceCount()
  2200. fFaceSpeed = app.GetFaceSpeed()
  2201. nST=background.GetRenderShadowTime()
  2202. (fAveRT, nCurRT) = app.GetRenderTime()
  2203. (iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
  2204. (iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
  2205. if iPatch == 0:
  2206. iPatch = 1
  2207.  
  2208. #(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()
  2209.  
  2210. self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
  2211. xMouse, yMouse = wndMgr.GetMousePosition()
  2212. self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
  2213.  
  2214. self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
  2215.  
  2216. if fAveRT>1.0:
  2217. self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
  2218.  
  2219. self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
  2220. #self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
  2221. #self.TextureNum.SetText("TN : %s" % (sTextureNum))
  2222. #self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
  2223. self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
  2224.  
  2225. def OnRender(self):
  2226. app.RenderGame()
  2227.  
  2228. if self.console.Console.collision:
  2229. background.RenderCollision()
  2230. chr.RenderCollision()
  2231.  
  2232. (x, y) = app.GetCursorPosition()
  2233.  
  2234. ########################
  2235. # Picking
  2236. ########################
  2237. textTail.UpdateAllTextTail()
  2238.  
  2239. if True == wndMgr.IsPickedWindow(self.hWnd):
  2240.  
  2241. self.PickingCharacterIndex = chr.Pick()
  2242.  
  2243. if -1 != self.PickingCharacterIndex:
  2244. textTail.ShowCharacterTextTail(self.PickingCharacterIndex)
  2245. if 0 != self.targetBoard.GetTargetVID():
  2246. textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
  2247.  
  2248. # ADD_ALWAYS_SHOW_NAME
  2249. if not self.__IsShowName():
  2250. self.PickingItemIndex = item.Pick()
  2251. if -1 != self.PickingItemIndex:
  2252. textTail.ShowItemTextTail(self.PickingItemIndex)
  2253. # END_OF_ADD_ALWAYS_SHOW_NAME
  2254.  
  2255. ## Show all name in the range
  2256.  
  2257. # ADD_ALWAYS_SHOW_NAME
  2258. if self.__IsShowName():
  2259. textTail.ShowAllTextTail()
  2260. self.PickingItemIndex = textTail.Pick(x, y)
  2261. # END_OF_ADD_ALWAYS_SHOW_NAME
  2262.  
  2263. textTail.UpdateShowingTextTail()
  2264. textTail.ArrangeTextTail()
  2265. if -1 != self.PickingItemIndex:
  2266. textTail.SelectItemName(self.PickingItemIndex)
  2267.  
  2268. grp.PopState()
  2269. grp.SetInterfaceRenderState()
  2270.  
  2271. textTail.Render()
  2272. textTail.HideAllTextTail()
  2273.  
  2274. def OnPressEscapeKey(self):
  2275.  
  2276. if constInfo.wndWarBoard.IsShow():
  2277. constInfo.wndWarBoard.Close()
  2278. return
  2279.  
  2280. if app.TARGET == app.GetCursor():
  2281. app.SetCursor(app.NORMAL)
  2282.  
  2283. elif True == mouseModule.mouseController.isAttached():
  2284. mouseModule.mouseController.DeattachObject()
  2285.  
  2286. else:
  2287. self.interface.OpenSystemDialog()
  2288.  
  2289. return True
  2290.  
  2291. def OnIMEReturn(self):
  2292. if app.IsPressed(app.DIK_LSHIFT):
  2293. self.interface.OpenWhisperDialogWithoutTarget()
  2294. else:
  2295. self.interface.ToggleChat()
  2296. return True
  2297.  
  2298. def OnPressExitKey(self):
  2299. self.interface.ToggleSystemDialog()
  2300. return True
  2301.  
  2302. ## BINARY CALLBACK
  2303. ######################################################################################
  2304.  
  2305. # EXCHANGE
  2306. # if app.WJ_ENABLE_TRADABLE_ICON:
  2307. # def BINARY_AddItemToExchange(self, inven_type, inven_pos, display_pos):
  2308. # if inven_type == player.INVENTORY:
  2309. # self.interface.CantTradableItemExchange(display_pos, inven_pos)
  2310. # END_OF_EXCHANGE
  2311.  
  2312. # WEDDING
  2313. def BINARY_LoverInfo(self, name, lovePoint):
  2314. if self.interface.wndMessenger:
  2315. self.interface.wndMessenger.OnAddLover(name, lovePoint)
  2316. if self.affectShower:
  2317. self.affectShower.SetLoverInfo(name, lovePoint)
  2318.  
  2319. def BINARY_UpdateLovePoint(self, lovePoint):
  2320. if self.interface.wndMessenger:
  2321. self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
  2322. if self.affectShower:
  2323. self.affectShower.OnUpdateLovePoint(lovePoint)
  2324. # END_OF_WEDDING
  2325.  
  2326. # QUEST_CONFIRM
  2327. def BINARY_OnQuestConfirm(self, msg, timeout, pid):
  2328. confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
  2329. confirmDialog.Open(msg, timeout)
  2330. confirmDialog.SetAcceptEvent(lambda answer=True, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  2331. confirmDialog.SetCancelEvent(lambda answer=False, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  2332. self.confirmDialog = confirmDialog
  2333. # END_OF_QUEST_CONFIRM
  2334.  
  2335. # GIFT command
  2336. def Gift_Show(self):
  2337. self.interface.ShowGift()
  2338.  
  2339. # CUBE
  2340. def BINARY_Cube_Open(self, npcVNUM):
  2341. self.currentCubeNPC = npcVNUM
  2342.  
  2343. self.interface.OpenCubeWindow()
  2344.  
  2345.  
  2346. if npcVNUM not in self.cubeInformation:
  2347. net.SendChatPacket("/cube r_info")
  2348. else:
  2349. cubeInfoList = self.cubeInformation[npcVNUM]
  2350.  
  2351. i = 0
  2352. for cubeInfo in cubeInfoList:
  2353. self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
  2354.  
  2355. j = 0
  2356. for materialList in cubeInfo["materialList"]:
  2357. for materialInfo in materialList:
  2358. itemVnum, itemCount = materialInfo
  2359. self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
  2360. j = j + 1
  2361.  
  2362. i = i + 1
  2363.  
  2364. self.interface.wndCube.Refresh()
  2365.  
  2366. def BINARY_Cube_Close(self):
  2367. self.interface.CloseCubeWindow()
  2368.  
  2369. # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
  2370. def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
  2371. self.interface.UpdateCubeInfo(gold, itemVnum, count)
  2372.  
  2373. def BINARY_Cube_Succeed(self, itemVnum, count):
  2374. print "큐브 제작 성공"
  2375. self.interface.SucceedCubeWork(itemVnum, count)
  2376. pass
  2377.  
  2378. def BINARY_Cube_Failed(self):
  2379. print "큐브 제작 실패"
  2380. self.interface.FailedCubeWork()
  2381. pass
  2382.  
  2383. def BINARY_Cube_ResultList(self, npcVNUM, listText):
  2384. # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 이런식으로 "/" 문자로 구분된 리스트를 줌
  2385. #print listText
  2386.  
  2387. if npcVNUM == 0:
  2388. npcVNUM = self.currentCubeNPC
  2389.  
  2390. self.cubeInformation[npcVNUM] = []
  2391.  
  2392. try:
  2393. for eachInfoText in listText.split("/"):
  2394. eachInfo = eachInfoText.split(",")
  2395. itemVnum = int(eachInfo[0])
  2396. itemCount = int(eachInfo[1])
  2397.  
  2398. self.cubeInformation[npcVNUM].append({"vnum": itemVnum, "count": itemCount})
  2399. self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
  2400.  
  2401. resultCount = len(self.cubeInformation[npcVNUM])
  2402. requestCount = 7
  2403. modCount = resultCount % requestCount
  2404. splitCount = resultCount / requestCount
  2405. for i in xrange(splitCount):
  2406. #print("/cube r_info %d %d" % (i * requestCount, requestCount))
  2407. net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
  2408.  
  2409. if 0 < modCount:
  2410. #print("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  2411. net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  2412.  
  2413. except RuntimeError, msg:
  2414. dbg.TraceError(msg)
  2415. return 0
  2416.  
  2417. pass
  2418.  
  2419. def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
  2420. # Material Text Format : 125,1|126,2|127,2|123,5&555,5&555,4/120000
  2421. try:
  2422. #print listText
  2423.  
  2424. if 3 > len(listText):
  2425. dbg.TraceError("Wrong Cube Material Infomation")
  2426. return 0
  2427.  
  2428.  
  2429.  
  2430. eachResultList = listText.split("@")
  2431.  
  2432. cubeInfo = self.cubeInformation[self.currentCubeNPC]
  2433.  
  2434. itemIndex = 0
  2435. for eachResultText in eachResultList:
  2436. cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
  2437. materialList = cubeInfo[startIndex + itemIndex]["materialList"]
  2438.  
  2439. gold = 0
  2440. splitResult = eachResultText.split("/")
  2441. if 1 < len(splitResult):
  2442. gold = int(splitResult[1])
  2443.  
  2444. #print "splitResult : ", splitResult
  2445. eachMaterialList = splitResult[0].split("&")
  2446.  
  2447. i = 0
  2448. for eachMaterialText in eachMaterialList:
  2449. complicatedList = eachMaterialText.split("|")
  2450.  
  2451. if 0 < len(complicatedList):
  2452. for complicatedText in complicatedList:
  2453. (itemVnum, itemCount) = complicatedText.split(",")
  2454. itemVnum = int(itemVnum)
  2455. itemCount = int(itemCount)
  2456. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2457.  
  2458. materialList[i].append((itemVnum, itemCount))
  2459.  
  2460. else:
  2461. itemVnum, itemCount = eachMaterialText.split(",")
  2462. itemVnum = int(itemVnum)
  2463. itemCount = int(itemCount)
  2464. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2465.  
  2466. materialList[i].append((itemVnum, itemCount))
  2467.  
  2468. i = i + 1
  2469.  
  2470.  
  2471.  
  2472. itemIndex = itemIndex + 1
  2473.  
  2474. self.interface.wndCube.Refresh()
  2475.  
  2476.  
  2477. except RuntimeError, msg:
  2478. dbg.TraceError(msg)
  2479. return 0
  2480.  
  2481. pass
  2482.  
  2483. # END_OF_CUBE
  2484.  
  2485. # 용혼석
  2486. def BINARY_Highlight_Item(self, inven_type, inven_pos):
  2487. self.interface.Highligt_Item(inven_type, inven_pos)
  2488.  
  2489. def BINARY_SetBigMessage(self, message):
  2490. self.interface.bigBoard.SetTip(message)
  2491.  
  2492. def BINARY_SetTipMessage(self, message):
  2493. self.interface.tipBoard.SetTip(message)
  2494.  
  2495. def BINARY_AppendNotifyMessage(self, type):
  2496. if not type in localeInfo.NOTIFY_MESSAGE:
  2497. return
  2498. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NOTIFY_MESSAGE[type])
  2499.  
  2500. def BINARY_Guild_EnterGuildArea(self, areaID):
  2501. self.interface.BULID_EnterGuildArea(areaID)
  2502.  
  2503. def BINARY_Guild_ExitGuildArea(self, areaID):
  2504. self.interface.BULID_ExitGuildArea(areaID)
  2505.  
  2506. def BINARY_GuildWar_OnSendDeclare(self, guildID):
  2507. pass
  2508.  
  2509. if app.ENABLE_IMPROVED_DECLARE_WAR:
  2510. def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType, guildmaxscore, guildminlevel, guildmaxuser, binekkullanimi):
  2511. mainCharacterName = player.GetMainCharacterName()
  2512. masterName = guild.GetGuildMasterName()
  2513. if mainCharacterName == masterName:
  2514. self.__GuildWar_OpenAskDialog(guildID, warType, guildmaxscore, guildminlevel, guildmaxuser, binekkullanimi)
  2515. else:
  2516. def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
  2517. mainCharacterName = player.GetMainCharacterName()
  2518. masterName = guild.GetGuildMasterName()
  2519. if mainCharacterName == masterName:
  2520. self.__GuildWar_OpenAskDialog(guildID, warType)
  2521.  
  2522. def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
  2523. self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
  2524.  
  2525. def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
  2526. self.interface.OnStartGuildWar(guildSelf, guildOpp)
  2527.  
  2528. def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
  2529. self.interface.OnEndGuildWar(guildSelf, guildOpp)
  2530.  
  2531. def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
  2532. self.interface.BINARY_SetObserverMode(isEnable)
  2533.  
  2534. def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
  2535. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2536.  
  2537. def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
  2538. guildID1 = int(guildID1)
  2539. guildID2 = int(guildID2)
  2540. memberCount1 = int(memberCount1)
  2541. memberCount2 = int(memberCount2)
  2542. observerCount = int(observerCount)
  2543.  
  2544. self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
  2545. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2546.  
  2547. def __GuildWar_ProcessKillInput(self, killerName, killerRace, victimName, victimRace):
  2548. self.guildScoreCounter.OnMessage(killerName, killerRace, victimName, victimRace)
  2549.  
  2550. if app.ENABLE_IMPROVED_DECLARE_WAR:
  2551. def __GuildWar_OpenAskDialog(self, guildID, warType, guildmaxscore, guildminlevel, guildmaxuser, binekkullanimi):
  2552.  
  2553. guildName = guild.GetGuildName(guildID)
  2554.  
  2555. # REMOVED_GUILD_BUG_FIX
  2556. if "Noname" == guildName:
  2557. return
  2558. # END_OF_REMOVED_GUILD_BUG_FIX
  2559.  
  2560. import uiGuild
  2561. questionDialog = uiGuild.AcceptGuildWarDialog()
  2562. questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
  2563. questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
  2564. questionDialog.Open(guildName, warType, guildmaxscore, guildminlevel, guildmaxuser, binekkullanimi)
  2565.  
  2566. self.guildWarQuestionDialog = questionDialog
  2567. else:
  2568. def __GuildWar_OpenAskDialog(self, guildID, warType):
  2569.  
  2570. guildName = guild.GetGuildName(guildID)
  2571.  
  2572. # REMOVED_GUILD_BUG_FIX
  2573. if "Noname" == guildName:
  2574. return
  2575. # END_OF_REMOVED_GUILD_BUG_FIX
  2576.  
  2577. import uiGuild
  2578. questionDialog = uiGuild.AcceptGuildWarDialog()
  2579. questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
  2580. questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
  2581. questionDialog.Open(guildName, warType)
  2582.  
  2583. self.guildWarQuestionDialog = questionDialog
  2584.  
  2585. def __GuildWar_CloseAskDialog(self):
  2586. self.guildWarQuestionDialog.Close()
  2587. self.guildWarQuestionDialog = None
  2588.  
  2589. def __GuildWar_OnAccept(self):
  2590.  
  2591. guildName = self.guildWarQuestionDialog.GetGuildName()
  2592.  
  2593. net.SendChatPacket("/war " + guildName)
  2594. self.__GuildWar_CloseAskDialog()
  2595.  
  2596. return 1
  2597.  
  2598. def __GuildWar_OnDecline(self):
  2599.  
  2600. guildName = self.guildWarQuestionDialog.GetGuildName()
  2601.  
  2602. net.SendChatPacket("/nowar " + guildName)
  2603. self.__GuildWar_CloseAskDialog()
  2604.  
  2605. return 1
  2606.  
  2607. def __ServerCommand_Build(self):
  2608. serverCommandList={
  2609. "DiceDone" : self.__DiceHasDone,
  2610. "ConsoleEnable" : self.__Console_Enable,
  2611. "DayMode" : self.__DayMode_Update,
  2612. "PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
  2613. "CloseRestartWindow" : self.__RestartDialog_Close,
  2614. "OpenPrivateShop" : self.__PrivateShop_Open,
  2615. "PartyHealReady" : self.PartyHealReady,
  2616. "ShowMeSafeboxPassword" : self.AskSafeboxPassword,
  2617. "CloseSafebox" : self.CommandCloseSafebox,
  2618.  
  2619. 'PARTY_E' : self._PartyEmotionsCMD,
  2620. "requestWarpToCharcater" : self.__RequestWarpToCharacter,
  2621. #EMOTE_SYSTEM_LOL
  2622. "ShowEmoteInventory" : self.__showemoteinventory,
  2623. "HideEmoteInventory" : self.__hideemoteinventory,
  2624. "ShowEmoteInterface" : self.__showemoteinterface,
  2625. "HideEmoteInterface" : self.__hideemoteinterface,
  2626. "emote_system_index" :self.__emote_system_questindex,
  2627.  
  2628. "emote_1_1_index" :self.__emote_1_1_questindex,
  2629. "emote_1_2_index" :self.__emote_1_2_questindex,
  2630. "emote_1_3_index" :self.__emote_1_3_questindex,
  2631. "emote_1_4_index" :self.__emote_1_4_questindex,
  2632. "emote_2_1_index" :self.__emote_2_1_questindex,
  2633. "emote_2_2_index" :self.__emote_2_2_questindex,
  2634. "emote_2_3_index" :self.__emote_2_3_questindex,
  2635. "emote_2_4_index" :self.__emote_2_4_questindex,
  2636. "emote_3_1_index" :self.__emote_3_1_questindex,
  2637. "emote_3_2_index" :self.__emote_3_2_questindex,
  2638. "emote_3_3_index" :self.__emote_3_3_questindex,
  2639. "emote_3_4_index" :self.__emote_3_4_questindex,
  2640. "emote_4_1_index" :self.__emote_4_1_questindex,
  2641. "emote_4_2_index" :self.__emote_4_2_questindex,
  2642. "emote_4_3_index" :self.__emote_4_3_questindex,
  2643. "emote_4_4_index" :self.__emote_4_4_questindex,
  2644. "emote_5_1_index" :self.__emote_5_1_questindex,
  2645. "emote_5_2_index" :self.__emote_5_2_questindex,
  2646. "emote_5_3_index" :self.__emote_5_3_questindex,
  2647. "emote_5_4_index" :self.__emote_5_4_questindex,
  2648. "emote_6_1_index" :self.__emote_6_1_questindex,
  2649. "emote_6_2_index" :self.__emote_6_2_questindex,
  2650. "emote_6_3_index" :self.__emote_6_3_questindex,
  2651. "emote_6_4_index" :self.__emote_6_4_questindex,
  2652. "emote_7_1_index" :self.__emote_7_1_questindex,
  2653. "emote_7_2_index" :self.__emote_7_2_questindex,
  2654. "emote_7_3_index" :self.__emote_7_3_questindex,
  2655. "emote_7_4_index" :self.__emote_7_4_questindex,
  2656. "emote_8_1_index" :self.__emote_8_1_questindex,
  2657. "emote_8_2_index" :self.__emote_8_2_questindex,
  2658. "emote_8_3_index" :self.__emote_8_3_questindex,
  2659. "emote_8_4_index" :self.__emote_8_4_questindex,
  2660.  
  2661. "EmoteSystemThisOne" :self.__EmoteSystemThisOne,
  2662.  
  2663. "ActiveEmoticonStateLocked_1_1" : self.__ActiveEmoticonStateLocked_1_1,
  2664. "ActiveEmoticonStateLocked_1_2" : self.__ActiveEmoticonStateLocked_1_2,
  2665. "ActiveEmoticonStateLocked_1_3" : self.__ActiveEmoticonStateLocked_1_3,
  2666. "ActiveEmoticonStateLocked_1_4" : self.__ActiveEmoticonStateLocked_1_4,
  2667. "ActiveEmoticonStateLocked_2_1" : self.__ActiveEmoticonStateLocked_2_1,
  2668. "ActiveEmoticonStateLocked_2_2" : self.__ActiveEmoticonStateLocked_2_2,
  2669. "ActiveEmoticonStateLocked_2_3" : self.__ActiveEmoticonStateLocked_2_3,
  2670. "ActiveEmoticonStateLocked_2_4" : self.__ActiveEmoticonStateLocked_2_4,
  2671. "ActiveEmoticonStateLocked_3_1" : self.__ActiveEmoticonStateLocked_3_1,
  2672. "ActiveEmoticonStateLocked_3_2" : self.__ActiveEmoticonStateLocked_3_2,
  2673. "ActiveEmoticonStateLocked_3_3" : self.__ActiveEmoticonStateLocked_3_3,
  2674. "ActiveEmoticonStateLocked_3_4" : self.__ActiveEmoticonStateLocked_3_4,
  2675. "ActiveEmoticonStateLocked_4_1" : self.__ActiveEmoticonStateLocked_4_1,
  2676. "ActiveEmoticonStateLocked_4_2" : self.__ActiveEmoticonStateLocked_4_2,
  2677. "ActiveEmoticonStateLocked_4_3" : self.__ActiveEmoticonStateLocked_4_3,
  2678. "ActiveEmoticonStateLocked_4_4" : self.__ActiveEmoticonStateLocked_4_4,
  2679. "ActiveEmoticonStateLocked_5_1" : self.__ActiveEmoticonStateLocked_5_1,
  2680. "ActiveEmoticonStateLocked_5_2" : self.__ActiveEmoticonStateLocked_5_2,
  2681. "ActiveEmoticonStateLocked_5_3" : self.__ActiveEmoticonStateLocked_5_3,
  2682. "ActiveEmoticonStateLocked_5_4" : self.__ActiveEmoticonStateLocked_5_4,
  2683. "ActiveEmoticonStateLocked_6_1" : self.__ActiveEmoticonStateLocked_6_1,
  2684. "ActiveEmoticonStateLocked_6_2" : self.__ActiveEmoticonStateLocked_6_2,
  2685. "ActiveEmoticonStateLocked_6_3" : self.__ActiveEmoticonStateLocked_6_3,
  2686. "ActiveEmoticonStateLocked_6_4" : self.__ActiveEmoticonStateLocked_6_4,
  2687. "ActiveEmoticonStateLocked_7_1" : self.__ActiveEmoticonStateLocked_7_1,
  2688. "ActiveEmoticonStateLocked_7_2" : self.__ActiveEmoticonStateLocked_7_2,
  2689. "ActiveEmoticonStateLocked_7_3" : self.__ActiveEmoticonStateLocked_7_3,
  2690. "ActiveEmoticonStateLocked_7_4" : self.__ActiveEmoticonStateLocked_7_4,
  2691. "ActiveEmoticonStateLocked_8_1" : self.__ActiveEmoticonStateLocked_8_1,
  2692. "ActiveEmoticonStateLocked_8_2" : self.__ActiveEmoticonStateLocked_8_2,
  2693. "ActiveEmoticonStateLocked_8_3" : self.__ActiveEmoticonStateLocked_8_3,
  2694. "ActiveEmoticonStateLocked_8_4" : self.__ActiveEmoticonStateLocked_8_4,
  2695.  
  2696. "ActiveEmoticonState" : self.__ActiveEmoticonState,
  2697. "ActiveEmoticonStateForInterface" : self.__ActiveEmoticonStateForInterface,
  2698. "starting_emote.tga" : self.__emote_system_none,
  2699.  
  2700. "1_1_active.tga" : self.__emote_system_1,
  2701. "1_2_active.tga" : self.__emote_system_2,
  2702. "1_3_active.tga" : self.__emote_system_3,
  2703. "1_4_active.tga" : self.__emote_system_4,
  2704. "2_1_active.tga" : self.__emote_system_5,
  2705. "2_2_active.tga" : self.__emote_system_6,
  2706. "2_3_active.tga" : self.__emote_system_7,
  2707. "2_4_active.tga" : self.__emote_system_8,
  2708. "3_1_active.tga" : self.__emote_system_9,
  2709. "3_2_active.tga" : self.__emote_system_10,
  2710. "3_3_active.tga" : self.__emote_system_11,
  2711. "3_4_active.tga" : self.__emote_system_12,
  2712. "4_1_active.tga" : self.__emote_system_13,
  2713. "4_2_active.tga" : self.__emote_system_14,
  2714. "4_3_active.tga" : self.__emote_system_15,
  2715. "4_4_active.tga" : self.__emote_system_16,
  2716. "5_1_active.tga" : self.__emote_system_17,
  2717. "5_2_active.tga" : self.__emote_system_18,
  2718. "5_3_active.tga" : self.__emote_system_19,
  2719. "5_4_active.tga" : self.__emote_system_20,
  2720. "6_1_active.tga" : self.__emote_system_21,
  2721. "6_2_active.tga" : self.__emote_system_22,
  2722. "6_3_active.tga" : self.__emote_system_23,
  2723. "6_4_active.tga" : self.__emote_system_24,
  2724. "7_1_active.tga" : self.__emote_system_25,
  2725. "7_2_active.tga" : self.__emote_system_26,
  2726. "7_3_active.tga" : self.__emote_system_27,
  2727. "7_4_active.tga" : self.__emote_system_28,
  2728. "8_1_active.tga" : self.__emote_system_29,
  2729. "8_2_active.tga" : self.__emote_system_30,
  2730. "8_3_active.tga" : self.__emote_system_31,
  2731. "8_4_active.tga" : self.__emote_system_32,
  2732. #EMOTE_SYSTEM_LOL
  2733. "CloseMall" : self.CommandCloseMall,
  2734. "ShowMeMallPassword" : self.AskMallPassword,
  2735. "item_mall" : self.__ItemMall_Open,
  2736.  
  2737. "warboard" : self.__WarBoard,
  2738. "CanOpenWarBoard" : self.CanOpenWarBoard,
  2739. "CantOpenWarBoard" : self.CantOpenWarBoard,
  2740.  
  2741. "RefineSuceeded" : self.RefineSuceededMessage,
  2742. "RefineFailed" : self.RefineFailedMessage,
  2743. "xmas_snow" : self.__XMasSnow_Enable,
  2744. "xmas_boom" : self.__XMasBoom_Enable,
  2745. "xmas_song" : self.__XMasSong_Enable,
  2746. "xmas_tree" : self.__XMasTree_Enable,
  2747. "newyear_boom" : self.__XMasBoom_Enable,
  2748. "PartyRequest" : self.__PartyRequestQuestion,
  2749. "PartyRequestDenied" : self.__PartyRequestDenied,
  2750. "horse_state" : self.__Horse_UpdateState,
  2751. "hide_horse_state" : self.__Horse_HideState,
  2752. "WarUC" : self.__GuildWar_UpdateMemberCount,
  2753. "GW_Kill_Update" : self.__GuildWar_ProcessKillInput,
  2754. "test_server" : self.__EnableTestServerFlag,
  2755. "mall" : self.__InGameShop_Show,
  2756. "SELECT_JOB" : self.SelectJob,
  2757. "open_notice_info" : self.__open_notice_info,
  2758. "write_notice_info" : self.__write_notice_info,
  2759. "gildia" : self.Gildia,
  2760. "index_gildie" : self.IndexGildie,
  2761. "otworz_gildie" : self.OtworzGildie,
  2762.  
  2763. "get_input_value" : self.GetInputValue,
  2764. "get_input_start" : self.GetInputOn,
  2765. "get_input_end" : self.GetInputOff,
  2766. "getinputbegin" : self.__Inputget1,
  2767. "getinputend" : self.__Inputget2,
  2768.  
  2769. "lonca_lider_q" : self.lonca_lider_q,
  2770. "lider_ekle" : self.lider_ekle,
  2771. "lider_sifirla" : self.lider_sifirla,
  2772.  
  2773. "gecmis_q" : self.lonca_gecmis_q,
  2774. "lonca_gecmis_ekle" : self.lonca_gecmis_ekle,
  2775. "gecmistemizle" : self.gecmistemizle,
  2776. "isim_ver" : self.isim_ver,
  2777.  
  2778. "lover_login" : self.__LoginLover,
  2779. "lover_logout" : self.__LogoutLover,
  2780. "lover_near" : self.__LoverNear,
  2781. "lover_far" : self.__LoverFar,
  2782. "lover_divorce" : self.__LoverDivorce,
  2783.  
  2784. "eveniment_litere" :self.send_status,
  2785. "letters_drop" :self.SDropLitere,
  2786. "OpenLetterWindow" :self.interface.ShowBoardEvent,
  2787.  
  2788. "MyShopPriceList" : self.__PrivateShop_PriceList,
  2789. "OFFMSG" : self.RecvOfflineMessage,
  2790.  
  2791. "loncatoplantisi" : self.loncatoplantisi,
  2792.  
  2793. }
  2794.  
  2795. self.serverCommander=stringCommander.Analyzer()
  2796. for serverCommandItem in serverCommandList.items():
  2797. self.serverCommander.SAFE_RegisterCallBack(
  2798. serverCommandItem[0], serverCommandItem[1]
  2799. )
  2800.  
  2801. def BINARY_ServerCommand_Run(self, line):
  2802. #dbg.TraceError(line)
  2803. try:
  2804. #print " BINARY_ServerCommand_Run", line
  2805. return self.serverCommander.Run(line)
  2806. except RuntimeError, msg:
  2807. dbg.TraceError(msg)
  2808. return 0
  2809.  
  2810. def loncatoplantisi(self):
  2811. import uiCommon
  2812. import constInfo
  2813. questionDialogtoplanti=uiCommon.QuestionDialog()
  2814. questionDialogtoplanti.SetText("Liderul breslei te-a chemat la el. Accepti?")
  2815. questionDialogtoplanti.SetAcceptEvent(lambda arg=TRUE: self.loncatoplantievet())
  2816. questionDialogtoplanti.SetCancelEvent(lambda arg=FALSE: self.loncatoplantihayir())
  2817. questionDialogtoplanti.Open()
  2818. self.questionDialogtoplanti=questionDialogtoplanti
  2819. return
  2820.  
  2821. def loncatoplantievet(self):
  2822. net.SendChatPacket("/loncatoplantievet")
  2823. self.questionDialogtoplanti.Close()
  2824. def loncatoplantihayir(self):
  2825. self.questionDialogtoplanti.Close()
  2826.  
  2827. def __ProcessPreservedServerCommand(self):
  2828. try:
  2829. command = net.GetPreservedServerCommand()
  2830. while command:
  2831. print " __ProcessPreservedServerCommand", command
  2832. self.serverCommander.Run(command)
  2833. command = net.GetPreservedServerCommand()
  2834. except RuntimeError, msg:
  2835. dbg.TraceError(msg)
  2836. return 0
  2837.  
  2838. def PartyHealReady(self):
  2839. self.interface.PartyHealReady()
  2840.  
  2841. def AskSafeboxPassword(self):
  2842. self.interface.AskSafeboxPassword()
  2843.  
  2844. # ITEM_MALL
  2845. def AskMallPassword(self):
  2846. self.interface.AskMallPassword()
  2847.  
  2848. def __ItemMall_Open(self):
  2849. self.interface.OpenItemMall();
  2850.  
  2851. def CommandCloseMall(self):
  2852. self.interface.CommandCloseMall()
  2853. # END_OF_ITEM_MALL
  2854.  
  2855. def RefineSuceededMessage(self):
  2856. #snd.PlaySound("sound/ui/make_soket.wav")
  2857. self.PopupMessage(localeInfo.REFINE_SUCCESS)
  2858.  
  2859. def RefineFailedMessage(self):
  2860. #snd.PlaySound("sound/ui/jaeryun_fail.wav")
  2861. self.PopupMessage(localeInfo.REFINE_FAILURE)
  2862.  
  2863. def CommandCloseSafebox(self):
  2864. self.interface.CommandCloseSafebox()
  2865.  
  2866. # PRIVATE_SHOP_PRICE_LIST
  2867. def __PrivateShop_PriceList(self, itemVNum, itemPrice):
  2868. uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
  2869. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2870.  
  2871. def __Horse_HideState(self):
  2872. self.affectShower.SetHorseState(0, 0, 0)
  2873.  
  2874. def __Horse_UpdateState(self, level, health, battery):
  2875. self.affectShower.SetHorseState(int(level), int(health), int(battery))
  2876.  
  2877. def __IsXMasMap(self):
  2878. mapDict = ( "metin2_map_n_flame_01",
  2879. "metin2_map_n_desert_01",
  2880. "metin2_map_spiderdungeon",
  2881. "metin2_map_deviltower1", )
  2882.  
  2883. if background.GetCurrentMapName() in mapDict:
  2884. return False
  2885.  
  2886. return True
  2887.  
  2888. def __XMasSnow_Enable(self, mode):
  2889.  
  2890. self.__XMasSong_Enable(mode)
  2891.  
  2892. if "1"==mode:
  2893.  
  2894. if not self.__IsXMasMap():
  2895. return
  2896.  
  2897. print "XMAS_SNOW ON"
  2898. background.EnableSnow(1)
  2899.  
  2900. else:
  2901. print "XMAS_SNOW OFF"
  2902. background.EnableSnow(0)
  2903.  
  2904. def __XMasBoom_Enable(self, mode):
  2905. if "1"==mode:
  2906.  
  2907. if not self.__IsXMasMap():
  2908. return
  2909.  
  2910. print "XMAS_BOOM ON"
  2911. self.__DayMode_Update("dark")
  2912. self.enableXMasBoom = True
  2913. self.startTimeXMasBoom = app.GetTime()
  2914. else:
  2915. print "XMAS_BOOM OFF"
  2916. self.__DayMode_Update("light")
  2917. self.enableXMasBoom = False
  2918.  
  2919. def __XMasTree_Enable(self, grade):
  2920.  
  2921. print "XMAS_TREE ", grade
  2922. background.SetXMasTree(int(grade))
  2923.  
  2924. def __XMasSong_Enable(self, mode):
  2925. if "1"==mode:
  2926. print "XMAS_SONG ON"
  2927.  
  2928. XMAS_BGM = "xmas.mp3"
  2929.  
  2930.  
  2931. else:
  2932. print "XMAS_SONG OFF"
  2933.  
  2934. def __RestartDialog_Close(self):
  2935. self.interface.CloseRestartDialog()
  2936.  
  2937. def __Console_Enable(self):
  2938. constInfo.CONSOLE_ENABLE = True
  2939. self.consoleEnable = True
  2940. app.EnableSpecialCameraMode()
  2941. ui.EnablePaste(True)
  2942.  
  2943. ## PrivateShop
  2944. def __PrivateShop_Open(self):
  2945. self.interface.OpenPrivateShopInputNameDialog()
  2946.  
  2947. def BINARY_PrivateShop_Appear(self, vid, text):
  2948. self.interface.AppearPrivateShop(vid, text)
  2949.  
  2950. def BINARY_PrivateShop_Disappear(self, vid):
  2951. self.interface.DisappearPrivateShop(vid)
  2952.  
  2953. ## DayMode
  2954. def __PRESERVE_DayMode_Update(self, mode):
  2955. if "light"==mode:
  2956. background.SetEnvironmentData(0)
  2957. elif "dark"==mode:
  2958.  
  2959. if not self.__IsXMasMap():
  2960. return
  2961.  
  2962. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  2963. background.SetEnvironmentData(1)
  2964.  
  2965. def __DayMode_Update(self, mode):
  2966. if "light"==mode:
  2967. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
  2968. elif "dark"==mode:
  2969.  
  2970. if not self.__IsXMasMap():
  2971. return
  2972.  
  2973. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
  2974.  
  2975. def __DayMode_OnCompleteChangeToLight(self):
  2976. background.SetEnvironmentData(0)
  2977. self.curtain.FadeIn()
  2978.  
  2979. def __DayMode_OnCompleteChangeToDark(self):
  2980. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  2981. background.SetEnvironmentData(1)
  2982. self.curtain.FadeIn()
  2983.  
  2984. ## XMasBoom
  2985. def __XMasBoom_Update(self):
  2986.  
  2987. self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
  2988. if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
  2989. return
  2990.  
  2991. boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
  2992. boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
  2993.  
  2994. if app.GetTime() - self.startTimeXMasBoom > boomTime:
  2995.  
  2996. self.indexXMasBoom += 1
  2997.  
  2998. for i in xrange(boomCount):
  2999. self.__XMasBoom_Boom()
  3000.  
  3001. def __XMasBoom_Boom(self):
  3002. x, y, z = player.GetMainCharacterPosition()
  3003. randX = app.GetRandom(-150, 150)
  3004. randY = app.GetRandom(-150, 150)
  3005.  
  3006. #snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
  3007.  
  3008. if app.ENABLE_DAMAGE_TOP:
  3009. def BINARY_DamageTopOpen(self):
  3010. if self.interface:
  3011. self.interface.DamageTopOpen()
  3012.  
  3013. def BINARY_DamageTopRefresh(self):
  3014. if self.interface:
  3015. self.interface.DamageTopRefresh()
  3016.  
  3017. def BINARY_DamageTopAddMember(self, type, position, name, level, empire, victim, damage):
  3018. if self.interface:
  3019. self.interface.DamageTopAddMember(type, position, name, level, empire, victim, damage)
  3020.  
  3021. def __PartyRequestQuestion(self, vid):
  3022. vid = int(vid)
  3023. partyRequestQuestionDialog = uiCommon.QuestionDialog()
  3024. partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
  3025. partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  3026. partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  3027. partyRequestQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerPartyRequest(arg))
  3028. partyRequestQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerPartyRequest(arg))
  3029. partyRequestQuestionDialog.Open()
  3030. partyRequestQuestionDialog.vid = vid
  3031. self.partyRequestQuestionDialog = partyRequestQuestionDialog
  3032.  
  3033. def __AnswerPartyRequest(self, answer):
  3034. if not self.partyRequestQuestionDialog:
  3035. return
  3036.  
  3037. vid = self.partyRequestQuestionDialog.vid
  3038.  
  3039. if answer:
  3040. net.SendChatPacket("/party_request_accept " + str(vid))
  3041. else:
  3042. net.SendChatPacket("/party_request_deny " + str(vid))
  3043.  
  3044. self.partyRequestQuestionDialog.Close()
  3045. self.partyRequestQuestionDialog = None
  3046.  
  3047. if app.ENABLE_REFINE_MSG_ADD:
  3048. def BINARY_RefineFailedTypeMessage(self, type):
  3049. REFINE_FAILURE_DICT = {
  3050. player.REFINE_FAIL_GRADE_DOWN: localeInfo.REFINE_FAILURE_GRADE_DOWN,
  3051. player.REFINE_FAIL_DEL_ITEM: localeInfo.REFINE_FAILURE_DEL_ITEM,
  3052. player.REFINE_FAIL_KEEP_GRADE: localeInfo.REFINE_FAILURE_KEEP_GRADE,
  3053. player.REFINE_FAIL_MAX: localeInfo.REFINE_FAILURE
  3054. }
  3055.  
  3056. snd.PlaySound("sound/ui/jaeryun_fail.wav")
  3057. self.PopupMessage(REFINE_FAILURE_DICT.get(type, player.REFINE_FAIL_MAX))
  3058.  
  3059. def __PartyRequestDenied(self):
  3060. self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
  3061.  
  3062. def __EnableTestServerFlag(self):
  3063. app.EnableTestServerFlag()
  3064.  
  3065. def __InGameShop_Show(self, url):
  3066. if constInfo.IN_GAME_SHOP_ENABLE:
  3067. self.interface.OpenWebWindow(url)
  3068.  
  3069. def __open_notice_info(self):
  3070. self.interface.RegisterGameMasterName("EREN2 - BOT")
  3071. self.interface.RecvWhisper("EREN2 - BOT")
  3072.  
  3073. def __write_notice_info(self,text):
  3074. chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, "EREN2 - BOT", text.replace("_", " "))
  3075. # WEDDING
  3076. def __LoginLover(self):
  3077. if self.interface.wndMessenger:
  3078. self.interface.wndMessenger.OnLoginLover()
  3079.  
  3080. def __LogoutLover(self):
  3081. if self.interface.wndMessenger:
  3082. self.interface.wndMessenger.OnLogoutLover()
  3083. if self.affectShower:
  3084. self.affectShower.HideLoverState()
  3085.  
  3086. def __LoverNear(self):
  3087. if self.affectShower:
  3088. self.affectShower.ShowLoverState()
  3089.  
  3090. def __LoverFar(self):
  3091. if self.affectShower:
  3092. self.affectShower.HideLoverState()
  3093.  
  3094. if app.ENABLE_FEATURES_OXEVENT:
  3095. def BINARY_OxEvent_Append(self, event, participantsCount, observersCount):
  3096. import oxevent
  3097. tokens = int(event)
  3098.  
  3099. if tokens == oxevent.APPEND_WINNERS:
  3100. self.eventWindow.Append()
  3101.  
  3102. elif tokens == oxevent.APPEND_REFRESH:
  3103. self.eventWindowManager.RefreshCounter(participantsCount, observersCount)
  3104.  
  3105. elif tokens == oxevent.APPEND_WINDOW:
  3106. self.eventWindowManager.Show()
  3107.  
  3108. def __LoverDivorce(self):
  3109. if self.interface.wndMessenger:
  3110. self.interface.wndMessenger.ClearLoverInfo()
  3111. if self.affectShower:
  3112. self.affectShower.ClearLoverState()
  3113.  
  3114. # END_OF_WEDDING
  3115.  
  3116. if app.ENABLE_SEND_TARGET_INFO:
  3117. def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
  3118. if not raceNum in constInfo.MONSTER_INFO_DATA:
  3119. constInfo.MONSTER_INFO_DATA.update({raceNum : {}})
  3120. constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
  3121. curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
  3122.  
  3123. isUpgradeable = False
  3124. isMetin = False
  3125. item.SelectItem(itemVnum)
  3126. if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
  3127. isUpgradeable = True
  3128. elif item.GetItemType() == item.ITEM_TYPE_METIN:
  3129. isMetin = True
  3130.  
  3131. for curItem in curList:
  3132. if isUpgradeable:
  3133. if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
  3134. if not (itemVnum in curItem["vnum_list"]):
  3135. curItem["vnum_list"].append(itemVnum)
  3136. return
  3137. elif isMetin:
  3138. if curItem.has_key("vnum_list"):
  3139. baseVnum = curItem["vnum_list"][0]
  3140. if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
  3141. if not (itemVnum in curItem["vnum_list"]):
  3142. curItem["vnum_list"].append(itemVnum)
  3143. return
  3144. else:
  3145. if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
  3146. return
  3147.  
  3148. if isUpgradeable or isMetin:
  3149. curList.append({"vnum_list":[itemVnum], "count":itemCount})
  3150. else:
  3151. curList.append({"vnum":itemVnum, "count":itemCount})
  3152.  
  3153. def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
  3154. self.targetBoard.RefreshMonsterInfoBoard()
  3155.  
  3156. if app.ENABLE_CHANGELOOK_SYSTEM:
  3157. def ActChangeLook(self, iAct):
  3158. if self.interface:
  3159. self.interface.ActChangeLook(iAct)
  3160.  
  3161. def AlertChangeLook(self):
  3162. self.PopupMessage(localeInfo.CHANGE_LOOK_DEL_ITEM)
  3163.  
  3164. def ToggleSwitchbotWindow(self):
  3165. switch = uiswitchbot.SwitchbotWindow()
  3166. switch.__LoadWindow()
  3167.  
  3168. def __BonusPage(self):
  3169. self.firewall = uiBonusPage.BonusPage()
  3170. if constInfo.BonusPage == 0:
  3171. constInfo.BonusPage = 1
  3172. self.firewall.Show()
  3173. else:
  3174. constInfo.BonusPage = 0
  3175. self.firewall.Hide()
  3176.  
  3177. def Gildia(self, nazwa, lider, ajdi, online_count):
  3178. import uiguild
  3179. self.dodawanie = uiguild.DostepneGildie()
  3180. self.dodawanie.Dodaj(nazwa, lider, ajdi, online_count)
  3181.  
  3182. def IndexGildie(self, indeks):
  3183. import constInfo
  3184. constInfo.IndexGildie = indeks
  3185.  
  3186. def OtworzGildie(self):
  3187. import uiGuild
  3188. inputDialog = uiGuild.DostepneGildie()
  3189. inputDialog.Open()
  3190.  
  3191. def lonca_lider_q(self,qid):
  3192. constInfo.lonca_lider_q = int(qid)
  3193.  
  3194. def lider_ekle(self, isim, lonca):
  3195. import constInfo
  3196. constInfo.lider_list.append("#"+isim+"#"+lonca)
  3197.  
  3198. def lider_sifirla(self):
  3199. import constInfo
  3200. constInfo.lider_list = []
  3201.  
  3202. def lonca_gecmis_q(self, id):
  3203. constInfo.lonca_gecmis_q = int(id)
  3204.  
  3205. def lonca_gecmis_ekle(self, isim):
  3206. import constInfo
  3207. constInfo.lonca_gecmis_list.append(isim)
  3208.  
  3209.  
  3210. def gecmistemizle(self):
  3211. import constInfo
  3212. constInfo.lonca_gecmis_list = []
  3213.  
  3214. def isim_ver(self):
  3215. import constInfo
  3216. net.SendQuestInputStringPacket(str(constInfo.lonca_gecmis_isim))
  3217.  
  3218. if app.ENABLE_INVENTORY_PROTECT_SYSTEM:
  3219. def BINARY_Inventory_State(self, case):
  3220. self.interface.AskInventoryPassword(case)
  3221.  
  3222. def BINARY_Inventory_Lock(self):
  3223. self.interface.InventoryLock()
  3224.  
  3225. def BINARY_Inventory_Unlock(self):
  3226. self.interface.InventoryUnlock()
  3227.  
  3228. def BINARY_OpenKeyboardSettings(self):
  3229. if self.dlgKeyboardSettings.IsShow():
  3230. self.dlgKeyboardSettings.Close()
  3231. else:
  3232. self.dlgKeyboardSettings.Open()
  3233.  
  3234. def SelectJob(self, cmd):
  3235. import uiselectjob
  3236. cmd = cmd.split('#')
  3237. if cmd[0] == 'QID':
  3238. constInfo.SelectJob['QID'] = int(cmd[1])
  3239. elif cmd[0] == 'INPUT':
  3240. constInfo.INPUT_IGNORE = int(cmd[1])
  3241. elif cmd[0] == 'SEND':
  3242. net.SendQuestInputStringPacket(str(constInfo.SelectJob['QCMD']))
  3243. constInfo.SelectJob['QCMD'] = ''
  3244. elif cmd[0] == 'OPEN':
  3245. self.job_select = uiselectjob.JobSelectWindow()
  3246. self.job_select.Open()
  3247. elif cmd[0] == 'CLOSE':
  3248. self.job_select = uiselectjob.JobSelectWindow()
  3249. self.job_select.RealClose()
  3250.  
  3251. def __WarBoard(self, input):
  3252. constInfo.wndWarBoard.Handle(input)
  3253.  
  3254. def CanOpenWarBoard(self):
  3255. constInfo.CanOpen = 1
  3256.  
  3257. def CantOpenWarBoard(self):
  3258. constInfo.CanOpen = 0
  3259.  
  3260. if app.ENABLE_SHOW_CHEST_DROP:
  3261. def BINARY_AddChestDropInfo(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
  3262. if self.interface:
  3263. self.interface.AddChestDropInfo(chestVnum, pageIndex, slotIndex, itemVnum, itemCount)
  3264.  
  3265. def BINARY_RefreshChestDropInfo(self, chestVnum):
  3266. if self.interface:
  3267. self.interface.RefreshChestDropInfo(chestVnum)
  3268.  
  3269. if app.ENABLE_FISH_EVENT:
  3270. def MiniGameFishEvent(self, isEnable, lasUseCount):
  3271. if self.interface:
  3272. self.interface.SetFishEventStatus(isEnable)
  3273. self.interface.MiniGameFishCount(lasUseCount)
  3274. self.interface.IntegrationEventBanner()
  3275.  
  3276. def MiniGameFishUse(self, shape, useCount):
  3277. self.interface.MiniGameFishUse(shape, useCount)
  3278.  
  3279. def MiniGameFishAdd(self, pos, shape):
  3280. self.interface.MiniGameFishAdd(pos, shape)
  3281.  
  3282. def MiniGameFishReward(self, vnum):
  3283. self.interface.MiniGameFishReward(vnum)
  3284.  
  3285. def RecvOfflineMessage(self, x):
  3286. txt = str(x)
  3287. nick = txt.split("_")[0]
  3288. zamanex = txt.split("_")[1]
  3289. mesaj = txt.split("_")[2]
  3290. mesaj = mesaj.replace("$", " ")
  3291.  
  3292. import datetime
  3293. zaman = datetime.datetime.fromtimestamp(int(zamanex)).strftime('%d-%m-%Y %H:%M:%S')
  3294.  
  3295. chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, nick, "[Mesaj offline-%s]: %s" % (zaman, mesaj))
  3296. self.interface.RecvWhisper(nick)
  3297.  
  3298. def SDropLitere(self, item_vnum, item_count, index, size):
  3299. constInfo.drop_letters[int(index)]={"iVnum":int(item_vnum),"iCount":int(item_count)}
  3300. constInfo.vnums_letters = int(size)
  3301.  
  3302. def send_status(self, status):
  3303. constInfo.E_LITERE_STATUS = int(status)
  3304.  
  3305. def __RequestWarpToCharacter(self, name):
  3306. import uiCommon
  3307. questionDialogWarp=uiCommon.QuestionDialog()
  3308. questionDialogWarp.SetText(localeInfo.REQUEST_WARP_TO_CHARACTER % (name))
  3309. questionDialogWarp.SetAcceptEvent(lambda arg=TRUE: self.WarpAcceptEvent(name))
  3310. questionDialogWarp.SetCancelEvent(lambda arg=FALSE: self.WarpCancelEvent())
  3311. questionDialogWarp.Open()
  3312. self.questionDialogWarp=questionDialogWarp
  3313. return
  3314.  
  3315. def WarpAcceptEvent(self, name):
  3316. net.SendMessengerSummonByNamePacket(name)
  3317. self.questionDialogWarp.Close()
  3318.  
  3319. def WarpCancelEvent(self):
  3320. self.questionDialogWarp.Close()
  3321.  
  3322. if app.ENABLE_SWITCHBOT:
  3323. def RefreshSwitchbotWindow(self):
  3324. self.interface.RefreshSwitchbotWindow()
  3325.  
  3326. def RefreshSwitchbotItem(self, slot):
  3327. self.interface.RefreshSwitchbotItem(slot)
  3328.  
  3329. def _PartyEmotionsCMD(self, command):
  3330. cmd = command.split('/')
  3331.  
  3332. if cmd[0] == 'QID':
  3333. constInfo.PARTY_E['qid'] = int(cmd[1])
  3334.  
  3335. def __Inputget1(self):
  3336. constInfo.INPUT_IGNORE = 1
  3337.  
  3338. def __Inputget2(self):
  3339. constInfo.INPUT_IGNORE = 0
  3340.  
  3341.  
  3342. def __hideemoteinventory(self):
  3343. constInfo.def_emotesystem = 0
  3344. self.EmoteInventoryWindow.Hide()
  3345. self.EmoteInventoryClose.Hide()
  3346. self.ScrollBarFirstPage.Hide()
  3347. self.ActiveEmote.Hide()
  3348. self.Emote1_1.Hide()
  3349. self.Emote1_2.Hide()
  3350. self.Emote1_3.Hide()
  3351. self.Emote1_4.Hide()
  3352. self.Emote2_1.Hide()
  3353. self.Emote2_2.Hide()
  3354. self.Emote2_3.Hide()
  3355. self.Emote2_4.Hide()
  3356. self.Emote3_1.Hide()
  3357. self.Emote3_2.Hide()
  3358. self.Emote3_3.Hide()
  3359. self.Emote3_4.Hide()
  3360. self.Emote4_1.Hide()
  3361. self.Emote4_2.Hide()
  3362. self.Emote4_3.Hide()
  3363. self.Emote4_4.Hide()
  3364. self.ActiveEmoticonState.Hide()
  3365. self.ActiveEmoticonStateLocked_1_1.Hide()
  3366. self.ActiveEmoticonStateLocked_1_2.Hide()
  3367. self.ActiveEmoticonStateLocked_1_3.Hide()
  3368. self.ActiveEmoticonStateLocked_1_4.Hide()
  3369. self.ActiveEmoticonStateLocked_2_1.Hide()
  3370. self.ActiveEmoticonStateLocked_2_2.Hide()
  3371. self.ActiveEmoticonStateLocked_2_3.Hide()
  3372. self.ActiveEmoticonStateLocked_2_4.Hide()
  3373. self.ActiveEmoticonStateLocked_3_1.Hide()
  3374. self.ActiveEmoticonStateLocked_3_2.Hide()
  3375. self.ActiveEmoticonStateLocked_3_3.Hide()
  3376. self.ActiveEmoticonStateLocked_3_4.Hide()
  3377. self.ActiveEmoticonStateLocked_4_1.Hide()
  3378. self.ActiveEmoticonStateLocked_4_2.Hide()
  3379. self.ActiveEmoticonStateLocked_4_3.Hide()
  3380. self.ActiveEmoticonStateLocked_4_4.Hide()
  3381. self.SubTitleEmote.Hide()
  3382. self.SubTitleEmote_2.Hide()
  3383. self.EmoteInfo.Hide()
  3384.  
  3385. def __showemoteinventory(self):
  3386. if constInfo.def_emotesystem == 0:
  3387. constInfo.def_emotesystem = 1
  3388. #Hide second page element in case of swaping pages
  3389. self.Emote5_1.Hide()
  3390. self.Emote5_2.Hide()
  3391. self.Emote5_3.Hide()
  3392. self.Emote5_4.Hide()
  3393. self.Emote6_1.Hide()
  3394. self.Emote6_2.Hide()
  3395. self.Emote6_3.Hide()
  3396. self.Emote6_4.Hide()
  3397. self.Emote7_1.Hide()
  3398. self.Emote7_2.Hide()
  3399. self.Emote7_3.Hide()
  3400. self.Emote7_4.Hide()
  3401. self.Emote8_1.Hide()
  3402. self.Emote8_2.Hide()
  3403. self.Emote8_3.Hide()
  3404. self.Emote8_4.Hide()
  3405. self.ActiveEmoticonStateLocked_5_1.Hide()
  3406. self.ActiveEmoticonStateLocked_5_2.Hide()
  3407. self.ActiveEmoticonStateLocked_5_3.Hide()
  3408. self.ActiveEmoticonStateLocked_5_4.Hide()
  3409. self.ActiveEmoticonStateLocked_6_1.Hide()
  3410. self.ActiveEmoticonStateLocked_6_2.Hide()
  3411. self.ActiveEmoticonStateLocked_6_3.Hide()
  3412. self.ActiveEmoticonStateLocked_6_4.Hide()
  3413. self.ActiveEmoticonStateLocked_7_1.Hide()
  3414. self.ActiveEmoticonStateLocked_7_2.Hide()
  3415. self.ActiveEmoticonStateLocked_7_3.Hide()
  3416. self.ActiveEmoticonStateLocked_7_4.Hide()
  3417. self.ActiveEmoticonStateLocked_8_1.Hide()
  3418. self.ActiveEmoticonStateLocked_8_2.Hide()
  3419. self.ActiveEmoticonStateLocked_8_3.Hide()
  3420. self.ActiveEmoticonStateLocked_8_4.Hide()
  3421.  
  3422. #Show scrollbar for second page
  3423. self.ScrollBarSecondPage.Hide()
  3424.  
  3425. self.EmoteInventoryWindow.Show()
  3426. self.EmoteInventoryClose.Show()
  3427. self.ScrollBarFirstPage.Show()
  3428. self.ActiveEmote.Show()
  3429. self.ActiveEmoticonState.Show()
  3430. self.Emote1_1.Show()
  3431. self.Emote1_2.Show()
  3432. self.Emote1_3.Show()
  3433. self.Emote1_4.Show()
  3434. self.Emote2_1.Show()
  3435. self.Emote2_2.Show()
  3436. self.Emote2_3.Show()
  3437. self.Emote2_4.Show()
  3438. self.Emote3_1.Show()
  3439. self.Emote3_2.Show()
  3440. self.Emote3_3.Show()
  3441. self.Emote3_4.Show()
  3442. self.Emote4_1.Show()
  3443. self.Emote4_2.Show()
  3444. self.Emote4_3.Show()
  3445. self.Emote4_4.Show()
  3446. self.ActiveEmoticonStateLocked_1_1.Show()
  3447. self.ActiveEmoticonStateLocked_1_2.Show()
  3448. self.ActiveEmoticonStateLocked_1_3.Show()
  3449. self.ActiveEmoticonStateLocked_1_4.Show()
  3450. self.ActiveEmoticonStateLocked_2_1.Show()
  3451. self.ActiveEmoticonStateLocked_2_2.Show()
  3452. self.ActiveEmoticonStateLocked_2_3.Show()
  3453. self.ActiveEmoticonStateLocked_2_4.Show()
  3454. self.ActiveEmoticonStateLocked_3_1.Show()
  3455. self.ActiveEmoticonStateLocked_3_2.Show()
  3456. self.ActiveEmoticonStateLocked_3_3.Show()
  3457. self.ActiveEmoticonStateLocked_3_4.Show()
  3458. self.ActiveEmoticonStateLocked_4_1.Show()
  3459. self.ActiveEmoticonStateLocked_4_2.Show()
  3460. self.ActiveEmoticonStateLocked_4_3.Show()
  3461. self.ActiveEmoticonStateLocked_4_4.Show()
  3462. self.SubTitleEmote.Show()
  3463. self.SubTitleEmote_2.Show()
  3464. self.EmoteInfo.Show()
  3465.  
  3466. elif constInfo.def_emotesystem == 1:
  3467. constInfo.def_emotesystem = 0
  3468. self.EmoteInventoryWindow.Hide()
  3469. self.EmoteInventoryClose.Hide()
  3470. self.ScrollBarFirstPage.Hide()
  3471. self.ActiveEmote.Hide()
  3472. self.Emote1_1.Hide()
  3473. self.Emote1_2.Hide()
  3474. self.Emote1_3.Hide()
  3475. self.Emote1_4.Hide()
  3476. self.Emote2_1.Hide()
  3477. self.Emote2_2.Hide()
  3478. self.Emote2_3.Hide()
  3479. self.Emote2_4.Hide()
  3480. self.Emote3_1.Hide()
  3481. self.Emote3_2.Hide()
  3482. self.Emote3_3.Hide()
  3483. self.Emote3_4.Hide()
  3484. self.Emote4_1.Hide()
  3485. self.Emote4_2.Hide()
  3486. self.Emote4_3.Hide()
  3487. self.Emote4_4.Hide()
  3488. self.ActiveEmoticonState.Hide()
  3489. self.ActiveEmoticonStateLocked_1_1.Hide()
  3490. self.ActiveEmoticonStateLocked_1_2.Hide()
  3491. self.ActiveEmoticonStateLocked_1_3.Hide()
  3492. self.ActiveEmoticonStateLocked_1_4.Hide()
  3493. self.ActiveEmoticonStateLocked_2_1.Hide()
  3494. self.ActiveEmoticonStateLocked_2_2.Hide()
  3495. self.ActiveEmoticonStateLocked_2_3.Hide()
  3496. self.ActiveEmoticonStateLocked_2_4.Hide()
  3497. self.ActiveEmoticonStateLocked_3_1.Hide()
  3498. self.ActiveEmoticonStateLocked_3_2.Hide()
  3499. self.ActiveEmoticonStateLocked_3_3.Hide()
  3500. self.ActiveEmoticonStateLocked_3_4.Hide()
  3501. self.ActiveEmoticonStateLocked_4_1.Hide()
  3502. self.ActiveEmoticonStateLocked_4_2.Hide()
  3503. self.ActiveEmoticonStateLocked_4_3.Hide()
  3504. self.ActiveEmoticonStateLocked_4_4.Hide()
  3505. self.SubTitleEmote.Hide()
  3506. self.SubTitleEmote_2.Hide()
  3507. self.EmoteInfo.Hide()
  3508.  
  3509. #Hide second page element in case of swaping pages
  3510. self.Emote5_1.Hide()
  3511. self.Emote5_2.Hide()
  3512. self.Emote5_3.Hide()
  3513. self.Emote5_4.Hide()
  3514. self.Emote6_1.Hide()
  3515. self.Emote6_2.Hide()
  3516. self.Emote6_3.Hide()
  3517. self.Emote6_4.Hide()
  3518. self.Emote7_1.Hide()
  3519. self.Emote7_2.Hide()
  3520. self.Emote7_3.Hide()
  3521. self.Emote7_4.Hide()
  3522. self.Emote8_1.Hide()
  3523. self.Emote8_2.Hide()
  3524. self.Emote8_3.Hide()
  3525. self.Emote8_4.Hide()
  3526. self.ActiveEmoticonStateLocked_5_1.Hide()
  3527. self.ActiveEmoticonStateLocked_5_2.Hide()
  3528. self.ActiveEmoticonStateLocked_5_3.Hide()
  3529. self.ActiveEmoticonStateLocked_5_4.Hide()
  3530. self.ActiveEmoticonStateLocked_6_1.Hide()
  3531. self.ActiveEmoticonStateLocked_6_2.Hide()
  3532. self.ActiveEmoticonStateLocked_6_3.Hide()
  3533. self.ActiveEmoticonStateLocked_6_4.Hide()
  3534. self.ActiveEmoticonStateLocked_7_1.Hide()
  3535. self.ActiveEmoticonStateLocked_7_2.Hide()
  3536. self.ActiveEmoticonStateLocked_7_3.Hide()
  3537. self.ActiveEmoticonStateLocked_7_4.Hide()
  3538. self.ActiveEmoticonStateLocked_8_1.Hide()
  3539. self.ActiveEmoticonStateLocked_8_2.Hide()
  3540. self.ActiveEmoticonStateLocked_8_3.Hide()
  3541. self.ActiveEmoticonStateLocked_8_4.Hide()
  3542.  
  3543. #
  3544.  
  3545. ## Page 2 of Inventory
  3546. def __emoteinventory_page2(self):
  3547. #Hide scrollbar for first page
  3548. self.ScrollBarFirstPage.Hide()
  3549.  
  3550. #Show scrollbar for second page
  3551. self.ScrollBarSecondPage.Show()
  3552.  
  3553. #Hide first page elements
  3554. self.Emote1_1.Hide()
  3555. self.Emote1_2.Hide()
  3556. self.Emote1_3.Hide()
  3557. self.Emote1_4.Hide()
  3558. self.Emote2_1.Hide()
  3559. self.Emote2_2.Hide()
  3560. self.Emote2_3.Hide()
  3561. self.Emote2_4.Hide()
  3562. self.Emote3_1.Hide()
  3563. self.Emote3_2.Hide()
  3564. self.Emote3_3.Hide()
  3565. self.Emote3_4.Hide()
  3566. self.Emote4_1.Hide()
  3567. self.Emote4_2.Hide()
  3568. self.Emote4_3.Hide()
  3569. self.Emote4_4.Hide()
  3570. self.ActiveEmoticonStateLocked_1_1.Hide()
  3571. self.ActiveEmoticonStateLocked_1_2.Hide()
  3572. self.ActiveEmoticonStateLocked_1_3.Hide()
  3573. self.ActiveEmoticonStateLocked_1_4.Hide()
  3574. self.ActiveEmoticonStateLocked_2_1.Hide()
  3575. self.ActiveEmoticonStateLocked_2_2.Hide()
  3576. self.ActiveEmoticonStateLocked_2_3.Hide()
  3577. self.ActiveEmoticonStateLocked_2_4.Hide()
  3578. self.ActiveEmoticonStateLocked_3_1.Hide()
  3579. self.ActiveEmoticonStateLocked_3_2.Hide()
  3580. self.ActiveEmoticonStateLocked_3_3.Hide()
  3581. self.ActiveEmoticonStateLocked_3_4.Hide()
  3582. self.ActiveEmoticonStateLocked_4_1.Hide()
  3583. self.ActiveEmoticonStateLocked_4_2.Hide()
  3584. self.ActiveEmoticonStateLocked_4_3.Hide()
  3585. self.ActiveEmoticonStateLocked_4_4.Hide()
  3586.  
  3587. #Show page2 elements
  3588. self.Emote5_1.Show()
  3589. self.Emote5_2.Show()
  3590. self.Emote5_3.Show()
  3591. self.Emote5_4.Show()
  3592. self.Emote6_1.Show()
  3593. self.Emote6_2.Show()
  3594. self.Emote6_3.Show()
  3595. self.Emote6_4.Show()
  3596. self.Emote7_1.Show()
  3597. self.Emote7_2.Show()
  3598. self.Emote7_3.Show()
  3599. self.Emote7_4.Show()
  3600. self.Emote8_1.Show()
  3601. self.Emote8_2.Show()
  3602. self.Emote8_3.Show()
  3603. self.Emote8_4.Show()
  3604. self.ActiveEmoticonStateLocked_5_1.Show()
  3605. self.ActiveEmoticonStateLocked_5_2.Show()
  3606. self.ActiveEmoticonStateLocked_5_3.Show()
  3607. self.ActiveEmoticonStateLocked_5_4.Show()
  3608. self.ActiveEmoticonStateLocked_6_1.Show()
  3609. self.ActiveEmoticonStateLocked_6_2.Show()
  3610. self.ActiveEmoticonStateLocked_6_3.Show()
  3611. self.ActiveEmoticonStateLocked_6_4.Show()
  3612. self.ActiveEmoticonStateLocked_7_1.Show()
  3613. self.ActiveEmoticonStateLocked_7_2.Show()
  3614. self.ActiveEmoticonStateLocked_7_3.Show()
  3615. self.ActiveEmoticonStateLocked_7_4.Show()
  3616. self.ActiveEmoticonStateLocked_8_1.Show()
  3617. self.ActiveEmoticonStateLocked_8_2.Show()
  3618. self.ActiveEmoticonStateLocked_8_3.Show()
  3619. self.ActiveEmoticonStateLocked_8_4.Show()
  3620.  
  3621. # Page 1 return from second
  3622. def __emoteinventory_page1(self):
  3623. #Hide second page element in case of swaping pages
  3624. self.Emote5_1.Hide()
  3625. self.Emote5_2.Hide()
  3626. self.Emote5_3.Hide()
  3627. self.Emote5_4.Hide()
  3628. self.Emote6_1.Hide()
  3629. self.Emote6_2.Hide()
  3630. self.Emote6_3.Hide()
  3631. self.Emote6_4.Hide()
  3632. self.Emote7_1.Hide()
  3633. self.Emote7_2.Hide()
  3634. self.Emote7_3.Hide()
  3635. self.Emote7_4.Hide()
  3636. self.Emote8_1.Hide()
  3637. self.Emote8_2.Hide()
  3638. self.Emote8_3.Hide()
  3639. self.Emote8_4.Hide()
  3640. self.ActiveEmoticonStateLocked_5_1.Hide()
  3641. self.ActiveEmoticonStateLocked_5_2.Hide()
  3642. self.ActiveEmoticonStateLocked_5_3.Hide()
  3643. self.ActiveEmoticonStateLocked_5_4.Hide()
  3644. self.ActiveEmoticonStateLocked_6_1.Hide()
  3645. self.ActiveEmoticonStateLocked_6_2.Hide()
  3646. self.ActiveEmoticonStateLocked_6_3.Hide()
  3647. self.ActiveEmoticonStateLocked_6_4.Hide()
  3648. self.ActiveEmoticonStateLocked_7_1.Hide()
  3649. self.ActiveEmoticonStateLocked_7_2.Hide()
  3650. self.ActiveEmoticonStateLocked_7_3.Hide()
  3651. self.ActiveEmoticonStateLocked_7_4.Hide()
  3652. self.ActiveEmoticonStateLocked_8_1.Hide()
  3653. self.ActiveEmoticonStateLocked_8_2.Hide()
  3654. self.ActiveEmoticonStateLocked_8_3.Hide()
  3655. self.ActiveEmoticonStateLocked_8_4.Hide()
  3656.  
  3657. #Show scrollbar for second page
  3658. self.ScrollBarSecondPage.Hide()
  3659.  
  3660. self.EmoteInventoryWindow.Show()
  3661. self.EmoteInventoryClose.Show()
  3662. self.ScrollBarFirstPage.Show()
  3663. self.ActiveEmote.Show()
  3664. self.ActiveEmoticonState.Show()
  3665. self.Emote1_1.Show()
  3666. self.Emote1_2.Show()
  3667. self.Emote1_3.Show()
  3668. self.Emote1_4.Show()
  3669. self.Emote2_1.Show()
  3670. self.Emote2_2.Show()
  3671. self.Emote2_3.Show()
  3672. self.Emote2_4.Show()
  3673. self.Emote3_1.Show()
  3674. self.Emote3_2.Show()
  3675. self.Emote3_3.Show()
  3676. self.Emote3_4.Show()
  3677. self.Emote4_1.Show()
  3678. self.Emote4_2.Show()
  3679. self.Emote4_3.Show()
  3680. self.Emote4_4.Show()
  3681. self.ActiveEmoticonStateLocked_1_1.Show()
  3682. self.ActiveEmoticonStateLocked_1_2.Show()
  3683. self.ActiveEmoticonStateLocked_1_3.Show()
  3684. self.ActiveEmoticonStateLocked_1_4.Show()
  3685. self.ActiveEmoticonStateLocked_2_1.Show()
  3686. self.ActiveEmoticonStateLocked_2_2.Show()
  3687. self.ActiveEmoticonStateLocked_2_3.Show()
  3688. self.ActiveEmoticonStateLocked_2_4.Show()
  3689. self.ActiveEmoticonStateLocked_3_1.Show()
  3690. self.ActiveEmoticonStateLocked_3_2.Show()
  3691. self.ActiveEmoticonStateLocked_3_3.Show()
  3692. self.ActiveEmoticonStateLocked_3_4.Show()
  3693. self.ActiveEmoticonStateLocked_4_1.Show()
  3694. self.ActiveEmoticonStateLocked_4_2.Show()
  3695. self.ActiveEmoticonStateLocked_4_3.Show()
  3696. self.ActiveEmoticonStateLocked_4_4.Show()
  3697. self.SubTitleEmote.Show()
  3698. self.SubTitleEmote_2.Show()
  3699. self.EmoteInfo.Show()
  3700.  
  3701.  
  3702. def __hideemoteinterface(self):
  3703. constInfo.def_emotesystem_interface = 0
  3704. self.EmoteInterfaceWindow.Hide()
  3705. self.EmoteInterfaceClose.Hide()
  3706. self.ActiveEmoticonStateForInterface.Hide()
  3707. self.Emote_System_Activate.Hide()
  3708.  
  3709.  
  3710. def __showemoteinterface(self):
  3711. if constInfo.def_emotesystem_interface == 0:
  3712. constInfo.def_emotesystem_interface = 1
  3713. self.EmoteInterfaceWindow.Show()
  3714. self.EmoteInterfaceClose.Show()
  3715. self.ActiveEmoticonStateForInterface.Show()
  3716. self.Emote_System_Activate.Show()
  3717.  
  3718. elif constInfo.def_emotesystem_interface == 1:
  3719. constInfo.def_emotesystem_interface = 0
  3720. self.EmoteInterfaceWindow.Hide()
  3721. self.EmoteInterfaceClose.Hide()
  3722. self.ActiveEmoticonStateForInterface.Hide()
  3723. self.Emote_System_Activate.Hide()
  3724. #
  3725.  
  3726.  
  3727.  
  3728. def __emote_system_questindex(self, value15):
  3729. constInfo.EMOTE_SYSTEM_QUESTINDEX = int(value15)
  3730.  
  3731. def __activare_emote_system(self):
  3732. activare_emote_system = constInfo.EMOTE_SYSTEM_QUESTINDEX
  3733. event.QuestButtonClick(activare_emote_system)
  3734. ##
  3735.  
  3736. def __emote_1_1_questindex(self, value16):
  3737. constInfo.EMOTE_1_1_QUESTINDEX = int(value16)
  3738.  
  3739. def __activare_emote_1_1(self):
  3740. activare_emote_1_1 = constInfo.EMOTE_1_1_QUESTINDEX
  3741. event.QuestButtonClick(activare_emote_1_1)
  3742.  
  3743. def __emote_1_2_questindex(self, value17):
  3744. constInfo.EMOTE_1_2_QUESTINDEX = int(value17)
  3745.  
  3746. def __activare_emote_1_2(self):
  3747. activare_emote_1_2 = constInfo.EMOTE_1_2_QUESTINDEX
  3748. event.QuestButtonClick(activare_emote_1_2)
  3749.  
  3750. def __emote_1_3_questindex(self, value18):
  3751. constInfo.EMOTE_1_3_QUESTINDEX = int(value18)
  3752.  
  3753. def __activare_emote_1_3(self):
  3754. activare_emote_1_3 = constInfo.EMOTE_1_3_QUESTINDEX
  3755. event.QuestButtonClick(activare_emote_1_3)
  3756.  
  3757. def __emote_1_4_questindex(self, value19):
  3758. constInfo.EMOTE_1_4_QUESTINDEX = int(value19)
  3759.  
  3760. def __activare_emote_1_4(self):
  3761. activare_emote_1_4 = constInfo.EMOTE_1_4_QUESTINDEX
  3762. event.QuestButtonClick(activare_emote_1_4)
  3763.  
  3764. def __emote_2_1_questindex(self, value20):
  3765. constInfo.EMOTE_2_1_QUESTINDEX = int(value20)
  3766.  
  3767. def __activare_emote_2_1(self):
  3768. activare_emote_2_1 = constInfo.EMOTE_2_1_QUESTINDEX
  3769. event.QuestButtonClick(activare_emote_2_1)
  3770.  
  3771. def __emote_2_2_questindex(self, value21):
  3772. constInfo.EMOTE_2_2_QUESTINDEX = int(value21)
  3773.  
  3774. def __activare_emote_2_2(self):
  3775. activare_emote_2_2 = constInfo.EMOTE_2_2_QUESTINDEX
  3776. event.QuestButtonClick(activare_emote_2_2)
  3777.  
  3778. def __emote_2_3_questindex(self, value22):
  3779. constInfo.EMOTE_2_3_QUESTINDEX = int(value22)
  3780.  
  3781. def __activare_emote_2_3(self):
  3782. activare_emote_2_3 = constInfo.EMOTE_2_3_QUESTINDEX
  3783. event.QuestButtonClick(activare_emote_2_3)
  3784.  
  3785. def __emote_2_4_questindex(self, value23):
  3786. constInfo.EMOTE_2_4_QUESTINDEX = int(value23)
  3787.  
  3788. def __activare_emote_2_4(self):
  3789. activare_emote_2_4 = constInfo.EMOTE_2_4_QUESTINDEX
  3790. event.QuestButtonClick(activare_emote_2_4)
  3791.  
  3792. def __emote_3_1_questindex(self, value24):
  3793. constInfo.EMOTE_3_1_QUESTINDEX = int(value24)
  3794.  
  3795. def __activare_emote_3_1(self):
  3796. activare_emote_3_1 = constInfo.EMOTE_3_1_QUESTINDEX
  3797. event.QuestButtonClick(activare_emote_3_1)
  3798.  
  3799. def __emote_3_2_questindex(self, value25):
  3800. constInfo.EMOTE_3_2_QUESTINDEX = int(value25)
  3801.  
  3802. def __activare_emote_3_2(self):
  3803. activare_emote_3_2 = constInfo.EMOTE_3_2_QUESTINDEX
  3804. event.QuestButtonClick(activare_emote_3_2)
  3805.  
  3806. def __emote_3_3_questindex(self, value26):
  3807. constInfo.EMOTE_3_3_QUESTINDEX = int(value26)
  3808.  
  3809. def __activare_emote_3_3(self):
  3810. activare_emote_3_3 = constInfo.EMOTE_3_3_QUESTINDEX
  3811. event.QuestButtonClick(activare_emote_3_3)
  3812.  
  3813. def __emote_3_4_questindex(self, value27):
  3814. constInfo.EMOTE_3_4_QUESTINDEX = int(value27)
  3815.  
  3816. def __activare_emote_3_4(self):
  3817. activare_emote_3_4 = constInfo.EMOTE_3_4_QUESTINDEX
  3818. event.QuestButtonClick(activare_emote_3_4)
  3819.  
  3820. def __emote_4_1_questindex(self, value28):
  3821. constInfo.EMOTE_4_1_QUESTINDEX = int(value28)
  3822.  
  3823. def __activare_emote_4_1(self):
  3824. activare_emote_4_1 = constInfo.EMOTE_4_1_QUESTINDEX
  3825. event.QuestButtonClick(activare_emote_4_1)
  3826.  
  3827. def __emote_4_2_questindex(self, value29):
  3828. constInfo.EMOTE_4_2_QUESTINDEX = int(value29)
  3829.  
  3830. def __activare_emote_4_2(self):
  3831. activare_emote_4_2 = constInfo.EMOTE_4_2_QUESTINDEX
  3832. event.QuestButtonClick(activare_emote_4_2)
  3833.  
  3834. def __emote_4_3_questindex(self, value30):
  3835. constInfo.EMOTE_4_3_QUESTINDEX = int(value30)
  3836.  
  3837. def __activare_emote_4_3(self):
  3838. activare_emote_4_3 = constInfo.EMOTE_4_3_QUESTINDEX
  3839. event.QuestButtonClick(activare_emote_4_3)
  3840.  
  3841. def __emote_4_4_questindex(self, value31):
  3842. constInfo.EMOTE_4_4_QUESTINDEX = int(value31)
  3843.  
  3844. def __activare_emote_4_4(self):
  3845. activare_emote_4_4 = constInfo.EMOTE_4_4_QUESTINDEX
  3846. event.QuestButtonClick(activare_emote_4_4)
  3847.  
  3848. def __emote_5_1_questindex(self, value32):
  3849. constInfo.EMOTE_5_1_QUESTINDEX = int(value32)
  3850.  
  3851. def __activare_emote_5_1(self):
  3852. activare_emote_5_1 = constInfo.EMOTE_5_1_QUESTINDEX
  3853. event.QuestButtonClick(activare_emote_5_1)
  3854.  
  3855. def __emote_5_2_questindex(self, value33):
  3856. constInfo.EMOTE_5_2_QUESTINDEX = int(value33)
  3857.  
  3858. def __activare_emote_5_2(self):
  3859. activare_emote_5_2 = constInfo.EMOTE_5_2_QUESTINDEX
  3860. event.QuestButtonClick(activare_emote_5_2)
  3861.  
  3862. def __emote_5_3_questindex(self, value34):
  3863. constInfo.EMOTE_5_3_QUESTINDEX = int(value34)
  3864.  
  3865. def __activare_emote_5_3(self):
  3866. activare_emote_5_3 = constInfo.EMOTE_5_3_QUESTINDEX
  3867. event.QuestButtonClick(activare_emote_5_3)
  3868.  
  3869. def __emote_5_4_questindex(self, value35):
  3870. constInfo.EMOTE_5_4_QUESTINDEX = int(value35)
  3871.  
  3872. def __activare_emote_5_4(self):
  3873. activare_emote_5_4 = constInfo.EMOTE_5_4_QUESTINDEX
  3874. event.QuestButtonClick(activare_emote_5_4)
  3875.  
  3876. def __emote_6_1_questindex(self, value36):
  3877. constInfo.EMOTE_6_1_QUESTINDEX = int(value36)
  3878.  
  3879. def __activare_emote_6_1(self):
  3880. activare_emote_6_1 = constInfo.EMOTE_6_1_QUESTINDEX
  3881. event.QuestButtonClick(activare_emote_6_1)
  3882.  
  3883. def __emote_6_2_questindex(self, value37):
  3884. constInfo.EMOTE_6_2_QUESTINDEX = int(value37)
  3885.  
  3886. def __activare_emote_6_2(self):
  3887. activare_emote_6_2 = constInfo.EMOTE_6_2_QUESTINDEX
  3888. event.QuestButtonClick(activare_emote_6_2)
  3889.  
  3890. def __emote_6_3_questindex(self, value38):
  3891. constInfo.EMOTE_6_3_QUESTINDEX = int(value38)
  3892.  
  3893. def __activare_emote_6_3(self):
  3894. activare_emote_6_3 = constInfo.EMOTE_6_3_QUESTINDEX
  3895. event.QuestButtonClick(activare_emote_6_3)
  3896.  
  3897. def __emote_6_4_questindex(self, value39):
  3898. constInfo.EMOTE_6_4_QUESTINDEX = int(value39)
  3899.  
  3900. def __activare_emote_6_4(self):
  3901. activare_emote_6_4 = constInfo.EMOTE_6_4_QUESTINDEX
  3902. event.QuestButtonClick(activare_emote_6_4)
  3903.  
  3904. def __emote_7_1_questindex(self, value40):
  3905. constInfo.EMOTE_7_1_QUESTINDEX = int(value40)
  3906.  
  3907. def __activare_emote_7_1(self):
  3908. activare_emote_7_1 = constInfo.EMOTE_7_1_QUESTINDEX
  3909. event.QuestButtonClick(activare_emote_7_1)
  3910.  
  3911. def __emote_7_2_questindex(self, value41):
  3912. constInfo.EMOTE_7_2_QUESTINDEX = int(value41)
  3913.  
  3914. def __activare_emote_7_2(self):
  3915. activare_emote_7_2 = constInfo.EMOTE_7_2_QUESTINDEX
  3916. event.QuestButtonClick(activare_emote_7_2)
  3917.  
  3918. def __emote_7_3_questindex(self, value42):
  3919. constInfo.EMOTE_7_3_QUESTINDEX = int(value42)
  3920.  
  3921. def __activare_emote_7_3(self):
  3922. activare_emote_7_3 = constInfo.EMOTE_7_3_QUESTINDEX
  3923. event.QuestButtonClick(activare_emote_7_3)
  3924.  
  3925. def __emote_7_4_questindex(self, value43):
  3926. constInfo.EMOTE_7_4_QUESTINDEX = int(value43)
  3927.  
  3928. def __activare_emote_7_4(self):
  3929. activare_emote_7_4 = constInfo.EMOTE_7_4_QUESTINDEX
  3930. event.QuestButtonClick(activare_emote_7_4)
  3931.  
  3932. def __emote_8_1_questindex(self, value44):
  3933. constInfo.EMOTE_8_1_QUESTINDEX = int(value44)
  3934.  
  3935. def __activare_emote_8_1(self):
  3936. activare_emote_8_1 = constInfo.EMOTE_8_1_QUESTINDEX
  3937. event.QuestButtonClick(activare_emote_8_1)
  3938.  
  3939. def __emote_8_2_questindex(self, value45):
  3940. constInfo.EMOTE_8_2_QUESTINDEX = int(value45)
  3941.  
  3942. def __activare_emote_8_2(self):
  3943. activare_emote_8_2 = constInfo.EMOTE_8_2_QUESTINDEX
  3944. event.QuestButtonClick(activare_emote_8_2)
  3945.  
  3946. def __emote_8_3_questindex(self, value46):
  3947. constInfo.EMOTE_8_3_QUESTINDEX = int(value46)
  3948.  
  3949. def __activare_emote_8_3(self):
  3950. activare_emote_8_3 = constInfo.EMOTE_8_3_QUESTINDEX
  3951. event.QuestButtonClick(activare_emote_8_3)
  3952.  
  3953. def __emote_8_4_questindex(self, value47):
  3954. constInfo.EMOTE_8_4_QUESTINDEX = int(value47)
  3955.  
  3956. def __activare_emote_8_4(self):
  3957. activare_emote_8_4 = constInfo.EMOTE_8_4_QUESTINDEX
  3958. event.QuestButtonClick(activare_emote_8_4)
  3959.  
  3960. def __ActiveEmoticonStateLocked_8_4(self, ActiveEmoticonStateLocked_8_4):
  3961. self.ActiveEmoticonStateLocked_8_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_8_4)
  3962. self.ActiveEmoticonStateLocked_8_4.SetParent(self.EmoteInventoryWindow)
  3963. self.ActiveEmoticonStateLocked_8_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10+60+10)
  3964. self.ActiveEmoticonStateLocked_8_4.SetSize(0, 0)
  3965.  
  3966. def __ActiveEmoticonStateLocked_8_3(self, ActiveEmoticonStateLocked_8_3):
  3967. self.ActiveEmoticonStateLocked_8_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_8_3)
  3968. self.ActiveEmoticonStateLocked_8_3.SetParent(self.EmoteInventoryWindow)
  3969. self.ActiveEmoticonStateLocked_8_3.SetPosition(10+60+10+60+10, 88+60+10+60+10+60+10)
  3970. self.ActiveEmoticonStateLocked_8_3.SetSize(0, 0)
  3971.  
  3972. def __ActiveEmoticonStateLocked_8_2(self, ActiveEmoticonStateLocked_8_2):
  3973. self.ActiveEmoticonStateLocked_8_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_8_2)
  3974. self.ActiveEmoticonStateLocked_8_2.SetParent(self.EmoteInventoryWindow)
  3975. self.ActiveEmoticonStateLocked_8_2.SetPosition(10+60+10, 88+60+10+60+10+60+10)
  3976. self.ActiveEmoticonStateLocked_8_2.SetSize(0, 0)
  3977.  
  3978. def __ActiveEmoticonStateLocked_8_1(self, ActiveEmoticonStateLocked_8_1):
  3979. self.ActiveEmoticonStateLocked_8_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_8_1)
  3980. self.ActiveEmoticonStateLocked_8_1.SetParent(self.EmoteInventoryWindow)
  3981. self.ActiveEmoticonStateLocked_8_1.SetPosition(10, 88+60+10+60+10+60+10)
  3982. self.ActiveEmoticonStateLocked_8_1.SetSize(0, 0)
  3983.  
  3984. def __ActiveEmoticonStateLocked_7_4(self, ActiveEmoticonStateLocked_7_4):
  3985. self.ActiveEmoticonStateLocked_7_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_7_4)
  3986. self.ActiveEmoticonStateLocked_7_4.SetParent(self.EmoteInventoryWindow)
  3987. self.ActiveEmoticonStateLocked_7_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10)
  3988. self.ActiveEmoticonStateLocked_7_4.SetSize(0, 0)
  3989.  
  3990. def __ActiveEmoticonStateLocked_7_3(self, ActiveEmoticonStateLocked_7_3):
  3991. self.ActiveEmoticonStateLocked_7_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_7_3)
  3992. self.ActiveEmoticonStateLocked_7_3.SetParent(self.EmoteInventoryWindow)
  3993. self.ActiveEmoticonStateLocked_7_3.SetPosition(10+60+10+60+10, 88+60+10+60+10)
  3994. self.ActiveEmoticonStateLocked_7_3.SetSize(0, 0)
  3995.  
  3996. def __ActiveEmoticonStateLocked_7_2(self, ActiveEmoticonStateLocked_7_2):
  3997. self.ActiveEmoticonStateLocked_7_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_7_2)
  3998. self.ActiveEmoticonStateLocked_7_2.SetParent(self.EmoteInventoryWindow)
  3999. self.ActiveEmoticonStateLocked_7_2.SetPosition(10+60+10, 88+60+10+60+10)
  4000. self.ActiveEmoticonStateLocked_7_2.SetSize(0, 0)
  4001.  
  4002. def __ActiveEmoticonStateLocked_7_1(self, ActiveEmoticonStateLocked_7_1):
  4003. self.ActiveEmoticonStateLocked_7_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_7_1)
  4004. self.ActiveEmoticonStateLocked_7_1.SetParent(self.EmoteInventoryWindow)
  4005. self.ActiveEmoticonStateLocked_7_1.SetPosition(10, 88+60+10+60+10)
  4006. self.ActiveEmoticonStateLocked_7_1.SetSize(0, 0)
  4007.  
  4008. def __ActiveEmoticonStateLocked_6_4(self, ActiveEmoticonStateLocked_6_4):
  4009. self.ActiveEmoticonStateLocked_6_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_6_4)
  4010. self.ActiveEmoticonStateLocked_6_4.SetParent(self.EmoteInventoryWindow)
  4011. self.ActiveEmoticonStateLocked_6_4.SetPosition(10+60+10+60+10+60+10, 88+60+10)
  4012. self.ActiveEmoticonStateLocked_6_4.SetSize(0, 0)
  4013.  
  4014. def __ActiveEmoticonStateLocked_6_3(self, ActiveEmoticonStateLocked_6_3):
  4015. self.ActiveEmoticonStateLocked_6_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_6_3)
  4016. self.ActiveEmoticonStateLocked_6_3.SetParent(self.EmoteInventoryWindow)
  4017. self.ActiveEmoticonStateLocked_6_3.SetPosition(10+60+10+60+10, 88+60+10)
  4018. self.ActiveEmoticonStateLocked_6_3.SetSize(0, 0)
  4019.  
  4020. def __ActiveEmoticonStateLocked_6_2(self, ActiveEmoticonStateLocked_6_2):
  4021. self.ActiveEmoticonStateLocked_6_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_6_2)
  4022. self.ActiveEmoticonStateLocked_6_2.SetParent(self.EmoteInventoryWindow)
  4023. self.ActiveEmoticonStateLocked_6_2.SetPosition(10+60+10, 88+60+10)
  4024. self.ActiveEmoticonStateLocked_6_2.SetSize(0, 0)
  4025.  
  4026. def __ActiveEmoticonStateLocked_6_1(self, ActiveEmoticonStateLocked_6_1):
  4027. self.ActiveEmoticonStateLocked_6_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_6_1)
  4028. self.ActiveEmoticonStateLocked_6_1.SetParent(self.EmoteInventoryWindow)
  4029. self.ActiveEmoticonStateLocked_6_1.SetPosition(10, 88+60+10)
  4030. self.ActiveEmoticonStateLocked_6_1.SetSize(0, 0)
  4031.  
  4032. def __ActiveEmoticonStateLocked_5_4(self, ActiveEmoticonStateLocked_5_4):
  4033. self.ActiveEmoticonStateLocked_5_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_5_4)
  4034. self.ActiveEmoticonStateLocked_5_4.SetParent(self.EmoteInventoryWindow)
  4035. self.ActiveEmoticonStateLocked_5_4.SetPosition(10+60+10+60+10+60+10, 88)
  4036. self.ActiveEmoticonStateLocked_5_4.SetSize(0, 0)
  4037.  
  4038. def __ActiveEmoticonStateLocked_5_3(self, ActiveEmoticonStateLocked_5_3):
  4039. self.ActiveEmoticonStateLocked_5_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_5_3)
  4040. self.ActiveEmoticonStateLocked_5_3.SetParent(self.EmoteInventoryWindow)
  4041. self.ActiveEmoticonStateLocked_5_3.SetPosition(10+60+10+60+10, 88)
  4042. self.ActiveEmoticonStateLocked_5_3.SetSize(0, 0)
  4043.  
  4044. def __ActiveEmoticonStateLocked_5_2(self, ActiveEmoticonStateLocked_5_2):
  4045. self.ActiveEmoticonStateLocked_5_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_5_2)
  4046. self.ActiveEmoticonStateLocked_5_2.SetParent(self.EmoteInventoryWindow)
  4047. self.ActiveEmoticonStateLocked_5_2.SetPosition(10+60+10, 88)
  4048. self.ActiveEmoticonStateLocked_5_2.SetSize(0, 0)
  4049.  
  4050. def __ActiveEmoticonStateLocked_5_1(self, ActiveEmoticonStateLocked_5_1):
  4051. self.ActiveEmoticonStateLocked_5_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_5_1)
  4052. self.ActiveEmoticonStateLocked_5_1.SetParent(self.EmoteInventoryWindow)
  4053. self.ActiveEmoticonStateLocked_5_1.SetPosition(10, 88)
  4054. self.ActiveEmoticonStateLocked_5_1.SetSize(0, 0)
  4055.  
  4056. def __ActiveEmoticonStateLocked_4_4(self, ActiveEmoticonStateLocked_4_4):
  4057. self.ActiveEmoticonStateLocked_4_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_4_4)
  4058. self.ActiveEmoticonStateLocked_4_4.SetParent(self.EmoteInventoryWindow)
  4059. self.ActiveEmoticonStateLocked_4_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10+60+10)
  4060. self.ActiveEmoticonStateLocked_4_4.SetSize(0, 0)
  4061.  
  4062. def __ActiveEmoticonStateLocked_4_3(self, ActiveEmoticonStateLocked_4_3):
  4063. self.ActiveEmoticonStateLocked_4_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_4_3)
  4064. self.ActiveEmoticonStateLocked_4_3.SetParent(self.EmoteInventoryWindow)
  4065. self.ActiveEmoticonStateLocked_4_3.SetPosition(10+60+10+60+10, 88+60+10+60+10+60+10)
  4066. self.ActiveEmoticonStateLocked_4_3.SetSize(0, 0)
  4067.  
  4068. def __ActiveEmoticonStateLocked_4_2(self, ActiveEmoticonStateLocked_4_2):
  4069. self.ActiveEmoticonStateLocked_4_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_4_2)
  4070. self.ActiveEmoticonStateLocked_4_2.SetParent(self.EmoteInventoryWindow)
  4071. self.ActiveEmoticonStateLocked_4_2.SetPosition(10+60+10, 88+60+10+60+10+60+10)
  4072. self.ActiveEmoticonStateLocked_4_2.SetSize(0, 0)
  4073.  
  4074. def __ActiveEmoticonStateLocked_4_1(self, ActiveEmoticonStateLocked_4_1):
  4075. self.ActiveEmoticonStateLocked_4_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_4_1)
  4076. self.ActiveEmoticonStateLocked_4_1.SetParent(self.EmoteInventoryWindow)
  4077. self.ActiveEmoticonStateLocked_4_1.SetPosition(10, 88+60+10+60+10+60+10)
  4078. self.ActiveEmoticonStateLocked_4_1.SetSize(0, 0)
  4079.  
  4080. def __ActiveEmoticonStateLocked_3_4(self, ActiveEmoticonStateLocked_3_4):
  4081. self.ActiveEmoticonStateLocked_3_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_3_4)
  4082. self.ActiveEmoticonStateLocked_3_4.SetParent(self.EmoteInventoryWindow)
  4083. self.ActiveEmoticonStateLocked_3_4.SetPosition(10+60+10+60+10+60+10, 88+60+10+60+10)
  4084. self.ActiveEmoticonStateLocked_3_4.SetSize(0, 0)
  4085.  
  4086. def __ActiveEmoticonStateLocked_3_3(self, ActiveEmoticonStateLocked_3_3):
  4087. self.ActiveEmoticonStateLocked_3_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_3_3)
  4088. self.ActiveEmoticonStateLocked_3_3.SetParent(self.EmoteInventoryWindow)
  4089. self.ActiveEmoticonStateLocked_3_3.SetPosition(10+60+10+60+10, 88+60+10+60+10)
  4090. self.ActiveEmoticonStateLocked_3_3.SetSize(0, 0)
  4091.  
  4092. def __ActiveEmoticonStateLocked_3_2(self, ActiveEmoticonStateLocked_3_2):
  4093. self.ActiveEmoticonStateLocked_3_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_3_2)
  4094. self.ActiveEmoticonStateLocked_3_2.SetParent(self.EmoteInventoryWindow)
  4095. self.ActiveEmoticonStateLocked_3_2.SetPosition(10+60+10, 88+60+10+60+10)
  4096. self.ActiveEmoticonStateLocked_3_2.SetSize(0, 0)
  4097.  
  4098. def __ActiveEmoticonStateLocked_3_1(self, ActiveEmoticonStateLocked_3_1):
  4099. self.ActiveEmoticonStateLocked_3_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_3_1)
  4100. self.ActiveEmoticonStateLocked_3_1.SetParent(self.EmoteInventoryWindow)
  4101. self.ActiveEmoticonStateLocked_3_1.SetPosition(10, 88+60+10+60+10)
  4102. self.ActiveEmoticonStateLocked_3_1.SetSize(0, 0)
  4103.  
  4104. def __ActiveEmoticonStateLocked_2_4(self, ActiveEmoticonStateLocked_2_4):
  4105. self.ActiveEmoticonStateLocked_2_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_2_4)
  4106. self.ActiveEmoticonStateLocked_2_4.SetParent(self.EmoteInventoryWindow)
  4107. self.ActiveEmoticonStateLocked_2_4.SetPosition(10+60+10+60+10+60+10, 88+60+10)
  4108. self.ActiveEmoticonStateLocked_2_4.SetSize(0, 0)
  4109.  
  4110. def __ActiveEmoticonStateLocked_2_3(self, ActiveEmoticonStateLocked_2_3):
  4111. self.ActiveEmoticonStateLocked_2_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_2_3)
  4112. self.ActiveEmoticonStateLocked_2_3.SetParent(self.EmoteInventoryWindow)
  4113. self.ActiveEmoticonStateLocked_2_3.SetPosition(10+60+10+60+10, 88+60+10)
  4114. self.ActiveEmoticonStateLocked_2_3.SetSize(0, 0)
  4115.  
  4116. def __ActiveEmoticonStateLocked_2_2(self, ActiveEmoticonStateLocked_2_2):
  4117. self.ActiveEmoticonStateLocked_2_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_2_2)
  4118. self.ActiveEmoticonStateLocked_2_2.SetParent(self.EmoteInventoryWindow)
  4119. self.ActiveEmoticonStateLocked_2_2.SetPosition(10+60+10, 88+60+10)
  4120. self.ActiveEmoticonStateLocked_2_2.SetSize(0, 0)
  4121.  
  4122. def __ActiveEmoticonStateLocked_2_1(self, ActiveEmoticonStateLocked_2_1):
  4123. self.ActiveEmoticonStateLocked_2_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_2_1)
  4124. self.ActiveEmoticonStateLocked_2_1.SetParent(self.EmoteInventoryWindow)
  4125. self.ActiveEmoticonStateLocked_2_1.SetPosition(10, 88+60+10)
  4126. self.ActiveEmoticonStateLocked_2_1.SetSize(0, 0)
  4127.  
  4128. def __ActiveEmoticonStateLocked_1_4(self, ActiveEmoticonStateLocked_1_4):
  4129. self.ActiveEmoticonStateLocked_1_4.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_1_4)
  4130. self.ActiveEmoticonStateLocked_1_4.SetParent(self.EmoteInventoryWindow)
  4131. self.ActiveEmoticonStateLocked_1_4.SetPosition(10+60+10+60+10+60+10, 88)
  4132. self.ActiveEmoticonStateLocked_1_4.SetSize(0, 0)
  4133.  
  4134. def __ActiveEmoticonStateLocked_1_3(self, ActiveEmoticonStateLocked_1_3):
  4135. self.ActiveEmoticonStateLocked_1_3.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_1_3)
  4136. self.ActiveEmoticonStateLocked_1_3.SetParent(self.EmoteInventoryWindow)
  4137. self.ActiveEmoticonStateLocked_1_3.SetPosition(10+60+10+60+10, 88)
  4138. self.ActiveEmoticonStateLocked_1_3.SetSize(0, 0)
  4139.  
  4140. def __ActiveEmoticonStateLocked_1_2(self, ActiveEmoticonStateLocked_1_2):
  4141. self.ActiveEmoticonStateLocked_1_2.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_1_2)
  4142. self.ActiveEmoticonStateLocked_1_2.SetParent(self.EmoteInventoryWindow)
  4143. self.ActiveEmoticonStateLocked_1_2.SetPosition(10+60+10, 88)
  4144. self.ActiveEmoticonStateLocked_1_2.SetSize(0, 0)
  4145.  
  4146. def __ActiveEmoticonStateLocked_1_1(self, ActiveEmoticonStateLocked_1_1):
  4147. self.ActiveEmoticonStateLocked_1_1.LoadImage("d:/ymir work/ui/emotes/" + ActiveEmoticonStateLocked_1_1)
  4148. self.ActiveEmoticonStateLocked_1_1.SetParent(self.EmoteInventoryWindow)
  4149. self.ActiveEmoticonStateLocked_1_1.SetPosition(10, 88)
  4150. self.ActiveEmoticonStateLocked_1_1.SetSize(0, 0)
  4151.  
  4152. def __ActiveEmoticonState(self, ActiveEmoticonState):
  4153. self.ActiveEmoticonState.LoadImage("d:/ymir work/ui/emotes/list/" + ActiveEmoticonState)
  4154. self.ActiveEmoticonState.SetParent(self.EmoteInventoryWindow)
  4155. self.ActiveEmoticonState.SetPosition(10, 10)
  4156.  
  4157. def __ActiveEmoticonStateForInterface(self, ActiveEmoticonStateForInterface):
  4158. self.ActiveEmoticonStateForInterface.LoadImage("d:/ymir work/ui/emotes/list/" + ActiveEmoticonStateForInterface)
  4159. self.ActiveEmoticonStateForInterface.SetParent(self.EmoteInterfaceWindow)
  4160. self.ActiveEmoticonStateForInterface.SetSize(0, 0)
  4161. self.ActiveEmoticonStateForInterface.SetPosition(23, 23)
  4162.  
  4163. def __emote_system_none(self):
  4164. net.SendChatPacket("(starting_emote.tga)")
  4165.  
  4166. def __emote_system_1(self):
  4167. net.SendChatPacket("(1_1_active.tga)")
  4168.  
  4169. def __emote_system_2(self):
  4170. net.SendChatPacket("(1_2_active.tga)")
  4171.  
  4172. def __emote_system_3(self):
  4173. # snd.PlaySound("d:/ymir work/ui/emotes/sound/riven.wav")
  4174. net.SendChatPacket("(1_3_active.tga)")
  4175.  
  4176. def __emote_system_4(self):
  4177. net.SendChatPacket("(1_4_active.tga)")
  4178.  
  4179. def __emote_system_5(self):
  4180. net.SendChatPacket("(2_1_active.tga)")
  4181.  
  4182. def __emote_system_6(self):
  4183. net.SendChatPacket("(2_2_active.tga)")
  4184.  
  4185. def __emote_system_7(self):
  4186. net.SendChatPacket("(2_3_active.tga)")
  4187.  
  4188. def __emote_system_8(self):
  4189. net.SendChatPacket("(2_4_active.tga)")
  4190.  
  4191. def __emote_system_9(self):
  4192. net.SendChatPacket("(3_1_active.tga)")
  4193.  
  4194. def __emote_system_10(self):
  4195. net.SendChatPacket("(3_2_active.tga)")
  4196.  
  4197. def __emote_system_11(self):
  4198. net.SendChatPacket("(3_3_active.tga)")
  4199.  
  4200. def __emote_system_12(self):
  4201. net.SendChatPacket("(3_4_active.tga)")
  4202.  
  4203. def __emote_system_13(self):
  4204. net.SendChatPacket("(4_1_active.tga)")
  4205.  
  4206. def __emote_system_14(self):
  4207. net.SendChatPacket("(4_2_active.tga)")
  4208.  
  4209. def __emote_system_15(self):
  4210. net.SendChatPacket("(4_3_active.tga)")
  4211.  
  4212. def __emote_system_16(self):
  4213. net.SendChatPacket("(4_4_active.tga)")
  4214.  
  4215. def __emote_system_17(self):
  4216. net.SendChatPacket("(5_1_active.tga)")
  4217.  
  4218. def __emote_system_18(self):
  4219. net.SendChatPacket("(5_2_active.tga)")
  4220.  
  4221. def __emote_system_19(self):
  4222. net.SendChatPacket("(5_3_active.tga)")
  4223.  
  4224. def __emote_system_20(self):
  4225. net.SendChatPacket("(5_4_active.tga)")
  4226.  
  4227. def __emote_system_21(self):
  4228. net.SendChatPacket("(6_1_active.tga)")
  4229.  
  4230. def __emote_system_22(self):
  4231. net.SendChatPacket("(6_2_active.tga)")
  4232.  
  4233. def __emote_system_23(self):
  4234. net.SendChatPacket("(6_3_active.tga)")
  4235.  
  4236. def __emote_system_24(self):
  4237. net.SendChatPacket("(6_4_active.tga)")
  4238.  
  4239. def __emote_system_25(self):
  4240. net.SendChatPacket("(7_1_active.tga)")
  4241.  
  4242. def __emote_system_26(self):
  4243. net.SendChatPacket("(7_2_active.tga)")
  4244.  
  4245. def __emote_system_27(self):
  4246. net.SendChatPacket("(7_3_active.tga)")
  4247.  
  4248. def __emote_system_28(self):
  4249. net.SendChatPacket("(7_4_active.tga)")
  4250.  
  4251. def __emote_system_29(self):
  4252. net.SendChatPacket("(8_1_active.tga)")
  4253.  
  4254. def __emote_system_30(self):
  4255. net.SendChatPacket("(8_2_active.tga)")
  4256.  
  4257. def __emote_system_31(self):
  4258. net.SendChatPacket("(8_3_active.tga)")
  4259.  
  4260. def __emote_system_32(self):
  4261. net.SendChatPacket("(8_4_active.tga)")
  4262.  
  4263. def __EmoteSystemThisOne (self, EmoteSystemThisOne):
  4264. net.SendChatPacket("(" + EmoteSystemThisOne + ")")
  4265. ## Close Emote interface after usage ->
  4266. self.EmoteInterfaceWindow.Hide()
  4267. self.EmoteInterfaceClose.Hide()
  4268. self.ActiveEmoticonStateForInterface.Hide()
  4269. self.Emote_System_Activate.Hide()
  4270. #EMOTE_SYSTEM_LOL
Advertisement
Add Comment
Please, Sign In to add comment