Guest User

game modificat

a guest
May 14th, 2020
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 190.23 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 player
  10. import chat
  11. import translate
  12. import textTail
  13. import event
  14. import uibonuspage
  15. import uipetsystem
  16. import snd
  17. import net
  18. import effect
  19. import wndMgr
  20. import fly
  21. import systemSetting
  22. import quest
  23. import guild
  24. import skill
  25. import messenger
  26. if app.ENABLE_ADMIN_BAN_MANAGER:
  27. import uiadmintool
  28. import uimarbleshop
  29. import localeInfo
  30. import constInfo
  31. import exchange
  32. import uiHealth
  33. import ime
  34. import constInfo2
  35. import mounting
  36. import ui
  37. import uiCommon
  38. import uiPhaseCurtain
  39. import uiMapNameShower
  40. import uiAffectShower
  41. import uiPlayerGauge
  42. import uiCharacter
  43. import uiTarget
  44. import uiTaskbar
  45. import uiteleport
  46. import uiguildstorage
  47. import schicksalrad
  48. # PRIVATE_SHOP_PRICE_LIST
  49. import uiPrivateShopBuilder
  50. # END_OF_PRIVATE_SHOP_PRICE_LIST
  51. import time
  52. # 5Lv Oto Bec Sistemi
  53. import savbec
  54. import surabec
  55. import ninjabec
  56. import samanbec
  57. import lycanbec
  58. import BKTrade
  59. import serverInfo
  60. import mouseModule
  61. import consoleModule
  62. import localeInfo
  63. import gameInfo
  64. import uibkoku
  65. import uiruhtasi
  66. import uinpcekran
  67. import uibiyolog
  68. import uimarbleshop
  69.  
  70. import playerSettingModule
  71. import interfaceModule
  72.  
  73. import musicInfo
  74. import debugInfo
  75. import stringCommander
  76. import uiPrivateShopSearch
  77.  
  78. #AKIRA_EVENT_SYSTEM
  79. import uiAkiraEvent
  80. #END_OF_AKIRA_EVENT_SYSTEM
  81. if app.ENABLE_SUPPORT_SYSTEM:
  82. import uisupportsystem
  83. if app.ENABLE_SWITCHER_MIJAGO:
  84. from switchbot import Bot
  85. import oyunicisiralama
  86. import loncasiralama
  87. import record
  88. import loncatanit
  89. import uilider
  90. import otoavinfo
  91. import uikeyboard
  92. if app.ENABLE_COSTUME_AURA:
  93. import UiRefineAura
  94.  
  95. from _weakref import proxy
  96.  
  97. # TEXTTAIL_LIVINGTIME_CONTROL
  98. #if localeInfo.IsJAPAN():
  99. # app.SetTextTailLivingTime(8.0)
  100. # END_OF_TEXTTAIL_LIVINGTIME_CONTROL
  101.  
  102.  
  103. # SCREENSHOT_CWDSAVE
  104. SCREENSHOT_CWDSAVE = FALSE
  105. SCREENSHOT_DIR = None
  106. import binascii
  107.  
  108. import guildwarkillcounter
  109. import uiGuild
  110.  
  111. if localeInfo.IsEUROPE():
  112. SCREENSHOT_CWDSAVE = TRUE
  113.  
  114. if localeInfo.IsCIBN10():
  115. SCREENSHOT_CWDSAVE = FALSE
  116. SCREENSHOT_DIR = "YT2W"
  117.  
  118. if app.WJ_OFFLINESHOP_SYSTEM:
  119. import uiOfflineShopBuilder
  120. import uiOfflineShop
  121.  
  122. cameraDistance = 1550.0
  123. cameraPitch = 27.0
  124. cameraRotation = 0.0
  125. cameraHeight = 100.0
  126.  
  127. testAlignment = 0
  128. BPisLodaded={0:0}
  129. pet_gui_activado = 0
  130. bonuspp = 0
  131.  
  132. class GameWindow(ui.ScriptWindow):
  133. def __init__(self, stream):
  134.  
  135. ui.ScriptWindow.__init__(self, "GAME")
  136. self.SetWindowName("game")
  137. net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
  138. player.SetGameWindow(self)
  139.  
  140. self.quickSlotPageIndex = 0
  141. if app.ENABLE_SWITCHER_MIJAGO:
  142. self.switchbot = Bot()
  143. self.switchbot.Hide()
  144. self.lastPKModeSendedTime = 0
  145. self.LastBoniSwitcherId = 0
  146. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  147. self.newquickSlotPageIndex = 0
  148. self.pressNewNumber = None
  149.  
  150. self.pressNumber = None
  151. self.npcekran = None
  152. self.npcekran = uinpcekran.NPCEkran()
  153. self.npcekran.Hide()
  154. if (app.WJ_COMBAT_ZONE):
  155. import uicombatzone
  156. self.wndCombatZone = uicombatzone.CombatZoneWindow()
  157.  
  158. self.guildWarQuestionDialog = None
  159. self.interface = None
  160. self.targetBoard = None
  161. self.console = None
  162. self.mapNameShower = None
  163. self.affectShower = None
  164. self.playerGauge = None
  165. self.endTime = 0
  166. self.PrivateShopSearch = None
  167. self.petInventoryWnd = None
  168. self.boniSwitcherWnd = []
  169. constInfo.BONI_SWITCHER_LOAD = FALSE
  170. self.itemShopWnd = None
  171. #import uiBoniSwitcher
  172. #for i in xrange(constInfo.SWITCHER_COUNT):
  173. #self.boniSwitcherWnd.append(uiBoniSwitcher.BoniSwitcherDialog(i))
  174. #self.boniSwitcherWnd[i].SetChangeBonusSwitcherEvent(self.__BoniSwitcherShow)
  175. #self.boniSwitcherWnd[i].GAMESetBoniSwitcherCheckEvent(self.__BoniSwitcherCheckEvent)
  176. if app.ENABLE_COSTUME_AURA:
  177. self.RefineAura = UiRefineAura.RefineAura()
  178.  
  179. self.stream=stream
  180. self.interface = interfaceModule.Interface()
  181. self.interface.SetStream(self.stream)
  182. self.interface.MakeInterface()
  183. self.interface.SetOpenBoniSwitcherEvent(self.__BoniSwitcherShow)
  184. self.interface.ShowDefaultWindows()
  185. self.stream.isAutoSelect = 0
  186.  
  187. self.curtain = uiPhaseCurtain.PhaseCurtain()
  188. self.curtain.speed = 0.03
  189. self.curtain.Hide()
  190.  
  191. self.BKTradeSys = BKTrade.BKTrade()
  192. self.BKTradeSys.Close()
  193.  
  194. self.oyunicisiralama = oyunicisiralama.oyunicisirala()
  195. self.loncasiralama = loncasiralama.loncasiralama()
  196. self.recordscreen = record.recordwindow()
  197. self.loncanitanit = loncatanit.loncatanit()
  198.  
  199. self.GuildStorageWindow = uiguildstorage.GuildStorage()
  200.  
  201. self.targetBoard = uiTarget.TargetBoard()
  202. self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
  203. self.targetBoard.Hide()
  204.  
  205. #AKIRA_EVENT_SYSTEM
  206. self.akiraEventButton = uiAkiraEvent.AkiraEventButton()
  207. self.akiraEventButton.LoadWindow()
  208. self.akiraEventButton.Hide()
  209. #END_OF_AKIRA_EVENT_SYSTEM
  210.  
  211. self.petmain = uipetsystem.PetSystemMain()
  212. self.petmini = uipetsystem.PetSystemMini()
  213.  
  214. self.console = consoleModule.ConsoleWindow()
  215. self.console.BindGameClass(self)
  216. self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
  217. self.console.Hide()
  218.  
  219. if app.ENABLE_SUPPORT_SYSTEM:
  220. self.supportpg = uisupportsystem.SupportMainGui()
  221.  
  222. self.mapNameShower = uiMapNameShower.MapNameShower()
  223. self.LoncaGecmisi = uiGuild.LoncaGecmisUI()
  224. self.LoncaGecmisi.Hide()
  225. self.affectShower = uiAffectShower.AffectShower()
  226. if app.ENABLE_MAINTENANCE_SYSTEM:
  227. import uimaintenance
  228. self.wndMaintenance = uimaintenance.MaintenanceClass()
  229. if app.ENABLE_TICKET_SYSTEM:
  230. import uiticket
  231. self.wndTicket = uiticket.TicketBoard()
  232. self.wndTicketStaff = uiticket.TicketBoardAdmin()
  233. self.wndTicketReply = uiticket.TicketBoardInformationsID()
  234. if app.ENABLE_REBORN_SYSTEM:
  235. import uiReborn
  236. self.wndReborn = uiReborn.RebornClass()
  237. if app.ENABLE_ADMIN_BAN_MANAGER:
  238. self.wndAdminTool = uiadmintool.AdminTool()
  239. self.wndMarbleShop = uimarbleshop.MarbleShopWindow()
  240. # if app.ENABLE_TITLE_SYSTEM:
  241. # import title_system
  242. # self.wndTitleSystem = title_system.Title_System()
  243.  
  244. self.playerGauge = uiPlayerGauge.PlayerGauge(self)
  245. self.playerGauge.Hide()
  246.  
  247. self.guildScoreCounter = guildwarkillcounter.MessageQueue()
  248.  
  249. self.bkoku = uibkoku.BKOku()
  250. self.bkoku.Hide()
  251. self.ruhtasi = uiruhtasi.RuhTasi()
  252. self.ruhtasi.Hide()
  253. self.biyoekran = uibiyolog.BiyologEkran()
  254. self.biyoekran.Hide()
  255. #wj 2014.1.2. ESC키를 누를 시 우선적으로 DropQuestionDialog를 끄도록 만들었다. 하지만 처음에 itemDropQuestionDialog가 선언되어 있지 않아 ERROR가 발생하여 init에서 선언과 동시에 초기화 시킴.
  256. self.itemDropQuestionDialog = None
  257.  
  258. self.__SetQuickSlotMode()
  259. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  260. self.__SetNewQuickSlotMode()
  261.  
  262. self.__ServerCommand_Build()
  263. self.__ProcessPreservedServerCommand()
  264. self.teleport = uiteleport.TeleportWindow()
  265. self.MountingSystem = mounting.MountWindow()
  266. self.SchicksalRad = schicksalrad.RadDesSchicksals()
  267.  
  268. # Daily Gift
  269. import dailygift
  270. self.wnddailygift = dailygift.DailyGift()
  271. # End
  272.  
  273. def __del__(self):
  274. player.SetGameWindow(0)
  275. net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
  276. ui.ScriptWindow.__del__(self)
  277.  
  278. def Open(self):
  279. app.SetFrameSkip(1)
  280.  
  281. self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
  282. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  283. self.newquickSlotPageIndex = 0
  284.  
  285. Espacio = ui.AniImageBox()
  286. Espacio.SetWindowHorizontalAlignLeft()
  287. Espacio.SetWindowVerticalAlignTop()
  288. Espacio.AppendImage("d:/ymir work/ui/pattern/medallas/espacio.dds")
  289. self.Espacio = Espacio
  290.  
  291. self.Espacio.SetPosition(10, 80)
  292.  
  293. self.contador_usuarios_guerra = ui.TextLine()
  294. self.contador_usuarios_guerra.SetWindowHorizontalAlignLeft()
  295. self.contador_usuarios_guerra.SetWindowVerticalAlignTop()
  296. self.contador_usuarios_guerra.SetDefaultFontName()
  297. self.contador_usuarios_guerra.SetPosition(24+8, 37+2 +40)
  298. self.contador_usuarios_guerra.SetText("0")
  299. self.contador_usuarios_guerra.SetOutline()
  300.  
  301. self.muertos_guerra = ui.TextLine()
  302. self.muertos_guerra.SetWindowHorizontalAlignLeft()
  303. self.muertos_guerra.SetWindowVerticalAlignTop()
  304. self.muertos_guerra.SetDefaultFontName()
  305. self.muertos_guerra.SetPosition(24+8, 47+2+40)
  306. self.muertos_guerra.SetText("0")
  307. self.muertos_guerra.SetOutline()
  308.  
  309. self.caido_guerra = ui.TextLine()
  310. self.caido_guerra.SetWindowHorizontalAlignLeft()
  311. self.caido_guerra.SetWindowVerticalAlignTop()
  312. self.caido_guerra.SetDefaultFontName()
  313. self.caido_guerra.SetPosition(24+8, 57+2+40)
  314. self.caido_guerra.SetText("0")
  315. self.caido_guerra.SetOutline()
  316.  
  317. self.usuarios_guerra = ui.TextLine()
  318. self.usuarios_guerra.SetWindowHorizontalAlignLeft()
  319. self.usuarios_guerra.SetWindowVerticalAlignTop()
  320. self.usuarios_guerra.SetDefaultFontName()
  321. self.usuarios_guerra.SetPosition(10+8, 37+2+40)
  322. self.usuarios_guerra.SetText("U:")
  323. self.usuarios_guerra.SetOutline()
  324.  
  325. self.ranking_guerra = ui.TextLine()
  326. self.ranking_guerra.SetWindowHorizontalAlignLeft()
  327. self.ranking_guerra.SetWindowVerticalAlignTop()
  328. self.ranking_guerra.SetDefaultFontName()
  329. self.ranking_guerra.SetPosition(10+8, 47+2+40)
  330. self.ranking_guerra.SetText("R:")
  331. self.ranking_guerra.SetOutline()
  332.  
  333. self.ranking_caido = ui.TextLine()
  334. self.ranking_caido.SetWindowHorizontalAlignLeft()
  335. self.ranking_caido.SetWindowVerticalAlignTop()
  336. self.ranking_caido.SetDefaultFontName()
  337. self.ranking_caido.SetPosition(10 +8, 57 +2+40)
  338. self.ranking_caido.SetText("M:")
  339. self.ranking_caido.SetOutline()
  340.  
  341. Medallas_gui = ui.AniImageBox()
  342. Medallas_gui.SetWindowHorizontalAlignLeft()
  343. Medallas_gui.SetWindowVerticalAlignTop()
  344. Medallas_gui.AppendImage("d:/ymir work/ui/pattern/medallas/espacio.dds")
  345. self.Medallas_gui = Medallas_gui
  346.  
  347. self.Medallas_gui.SetPosition(10, 40)
  348.  
  349. self.muertes = ui.TextLine()
  350. self.muertes.SetWindowHorizontalAlignLeft()
  351. self.muertes.SetWindowVerticalAlignTop()
  352. self.muertes.SetDefaultFontName()
  353. self.muertes.SetPosition(24, 51)
  354. self.muertes.SetText("0")
  355. self.muertes.SetOutline()
  356.  
  357. self.primera_muerte = ui.AniImageBox()
  358. self.primera_muerte.SetWindowHorizontalAlignLeft()
  359. self.primera_muerte.SetWindowVerticalAlignTop()
  360. self.primera_muerte.AppendImage("d:/ymir work/ui/pattern/medallas/1.dds")
  361. self.primera_muerte.SetPosition(43, 40)
  362.  
  363. self.doble_muerte = ui.AniImageBox()
  364. self.doble_muerte.SetWindowHorizontalAlignLeft()
  365. self.doble_muerte.SetWindowVerticalAlignTop()
  366. self.doble_muerte.AppendImage("d:/ymir work/ui/pattern/medallas/2.dds")
  367. self.doble_muerte.SetPosition(43 + 33, 40)
  368.  
  369. self.triple_muerte = ui.AniImageBox()
  370. self.triple_muerte.SetWindowHorizontalAlignLeft()
  371. self.triple_muerte.SetWindowVerticalAlignTop()
  372. self.triple_muerte.AppendImage("d:/ymir work/ui/pattern/medallas/3.dds")
  373. self.triple_muerte.SetPosition(43 + 33 + 33, 40)
  374.  
  375. self.exterminio = ui.AniImageBox()
  376. self.exterminio.SetWindowHorizontalAlignLeft()
  377. self.exterminio.SetWindowVerticalAlignTop()
  378. self.exterminio.AppendImage("d:/ymir work/ui/pattern/medallas/4.dds")
  379. self.exterminio.SetPosition(43+ 33+ 33 + 33, 40)
  380.  
  381. self.muertacular = ui.AniImageBox()
  382. self.muertacular.SetWindowHorizontalAlignLeft()
  383. self.muertacular.SetWindowVerticalAlignTop()
  384. self.muertacular.AppendImage("d:/ymir work/ui/pattern/medallas/5.dds")
  385. self.muertacular.SetPosition(43+ 33+ 33+ 33 + 33, 40)
  386.  
  387. self.bestialidad = ui.AniImageBox()
  388. self.bestialidad.SetWindowHorizontalAlignLeft()
  389. self.bestialidad.SetWindowVerticalAlignTop()
  390. self.bestialidad.AppendImage("d:/ymir work/ui/pattern/medallas/6.dds")
  391. self.bestialidad.SetPosition(43+ 33+ 33+ 33+ 33 + 33, 40)
  392.  
  393. self.salvajada = ui.AniImageBox()
  394. self.salvajada.SetWindowHorizontalAlignLeft()
  395. self.salvajada.SetWindowVerticalAlignTop()
  396. self.salvajada.AppendImage("d:/ymir work/ui/pattern/medallas/7.dds")
  397. self.salvajada.SetPosition(43+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  398.  
  399. self.catastrofe = ui.AniImageBox()
  400. self.catastrofe.SetWindowHorizontalAlignLeft()
  401. self.catastrofe.SetWindowVerticalAlignTop()
  402. self.catastrofe.AppendImage("d:/ymir work/ui/pattern/medallas/8.dds")
  403. self.catastrofe.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  404.  
  405. self.apocalipsis = ui.AniImageBox()
  406. self.apocalipsis.SetWindowHorizontalAlignLeft()
  407. self.apocalipsis.SetWindowVerticalAlignTop()
  408. self.apocalipsis.AppendImage("d:/ymir work/ui/pattern/medallas/9.dds")
  409. self.apocalipsis.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  410.  
  411. self.lluvia_muertos = ui.AniImageBox()
  412. self.lluvia_muertos.SetWindowHorizontalAlignLeft()
  413. self.lluvia_muertos.SetWindowVerticalAlignTop()
  414. self.lluvia_muertos.AppendImage("d:/ymir work/ui/pattern/medallas/10.dds")
  415. self.lluvia_muertos.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  416.  
  417. self.super_increible = ui.AniImageBox()
  418. self.super_increible.SetWindowHorizontalAlignLeft()
  419. self.super_increible.SetWindowVerticalAlignTop()
  420. self.super_increible.AppendImage("d:/ymir work/ui/pattern/medallas/11.dds")
  421. self.super_increible.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  422.  
  423. #Fin menu
  424.  
  425. self.quickSlotPageIndex = 0
  426. self.PickingCharacterIndex = -1
  427. self.PickingItemIndex = -1
  428. self.consoleEnable = TRUE
  429. self.isShowDebugInfo = TRUE
  430. self.ShowNameFlag = TRUE
  431.  
  432. self.enableXMasBoom = FALSE
  433. self.startTimeXMasBoom = 0.0
  434. self.indexXMasBoom = 0
  435.  
  436. # Daily Gift
  437. self.daily_reward = ui.Button()
  438. self.daily_reward.SetParent(self)
  439. self.daily_reward.SetPosition(wndMgr.GetScreenWidth()-75,20)
  440. self.daily_reward.SetUpVisual("icon/item/50244.tga")
  441. self.daily_reward.SetOverVisual("icon/item/50244.tga")
  442. self.daily_reward.SetDownVisual("icon/item/50244.tga")
  443. self.daily_reward.SetToolTipText("Daily Rewards")
  444. self.daily_reward.SetEvent(lambda : self.ManagerGiftSystem("Show|"))
  445. #
  446.  
  447. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  448.  
  449. app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
  450.  
  451. constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
  452. constInfo.SET_DEFAULT_CHRNAME_COLOR()
  453. constInfo.SET_DEFAULT_FOG_LEVEL()
  454. constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
  455. constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
  456. constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
  457.  
  458. # TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  459. constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
  460. # END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  461.  
  462. import event
  463. event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
  464.  
  465. textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
  466.  
  467. if constInfo.PVPMODE_TEST_ENABLE:
  468. self.testPKMode = ui.TextLine()
  469. self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
  470. self.testPKMode.SetPosition(0, 15)
  471. self.testPKMode.SetWindowHorizontalAlignCenter()
  472. self.testPKMode.SetHorizontalAlignCenter()
  473. self.testPKMode.SetFeather()
  474. self.testPKMode.SetOutline()
  475. self.testPKMode.Show()
  476.  
  477. self.testAlignment = ui.TextLine()
  478. self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
  479. self.testAlignment.SetPosition(0, 35)
  480. self.testAlignment.SetWindowHorizontalAlignCenter()
  481. self.testAlignment.SetHorizontalAlignCenter()
  482. self.testAlignment.SetFeather()
  483. self.testAlignment.SetOutline()
  484. self.testAlignment.Show()
  485.  
  486. self.__BuildKeyDict()
  487. self.__BuildDebugInfo()
  488.  
  489. # PRIVATE_SHOP_PRICE_LIST
  490. uiPrivateShopBuilder.Clear()
  491. # END_OF_PRIVATE_SHOP_PRICE_LIST
  492.  
  493. if app.WJ_OFFLINESHOP_SYSTEM:
  494. uiOfflineShopBuilder.Clear()
  495.  
  496. # UNKNOWN_UPDATE
  497. exchange.InitTrading()
  498. # END_OF_UNKNOWN_UPDATE
  499.  
  500.  
  501. ## Sound
  502. snd.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
  503. snd.SetSoundVolume(systemSetting.GetSoundVolume())
  504.  
  505. netFieldMusicFileName = net.GetFieldMusicFileName()
  506. if netFieldMusicFileName:
  507. snd.FadeInMusic("BGM/" + netFieldMusicFileName)
  508. elif musicInfo.fieldMusic != "":
  509. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  510.  
  511. self.__SetQuickSlotMode()
  512. self.__SelectQuickPage(self.quickSlotPageIndex)
  513.  
  514. self.SetFocus()
  515. self.Show()
  516. app.ShowCursor()
  517.  
  518. net.SendEnterGamePacket()
  519.  
  520. if app.WJ_SECURITY_SYSTEM:
  521. if constInfo.open_security == 0:
  522. net.SendChatPacket("/open_security")
  523. constInfo.open_security = 1
  524.  
  525. if app.PARTY_MATCH:
  526. constInfo.KILITLE = 0
  527.  
  528. # START_GAME_ERROR_EXIT
  529. try:
  530. self.StartGame()
  531. except:
  532. import exception
  533. exception.Abort("GameWindow.Open")
  534. # END_OF_START_GAME_ERROR_EXIT
  535.  
  536. # NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱
  537. # ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
  538. self.cubeInformation = {}
  539. self.currentCubeNPC = 0
  540. if app.ENABLE_FOG_FIX:
  541. if systemSetting.IsFogMode():
  542. background.SetEnvironmentFog(True)
  543. else:
  544. background.SetEnvironmentFog(False)
  545.  
  546. for i in xrange(10):
  547. if systemSetting.IsSnowTexturesMode():
  548. if background.GetCurrentMapName():
  549. snow_maps = [
  550. "metin2_map_a1",
  551. "metin2_map_b1",
  552. "metin2_map_c1"
  553. ]
  554. snow_maps_textures = {
  555. "metin2_map_a1" : "textureset\metin2_a1_desert.txt",
  556. "metin2_map_b1" : "textureset\metin2_b1_desert.txt",
  557. "metin2_map_c1" : "textureset\metin2_c1_desert.txt", }
  558. if str(background.GetCurrentMapName()) in snow_maps:
  559. background.TextureChange(snow_maps_textures[str(background.GetCurrentMapName())])
  560.  
  561. def Close(self):
  562. self.Hide()
  563. #AKIRA_EVENT_SYSTEM
  564. self.akiraEventButton.Hide()
  565. #END_OF_AKIRA_EVENT_SYSTEM
  566.  
  567. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  568. (cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
  569.  
  570. if musicInfo.fieldMusic != "":
  571. snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)
  572.  
  573. self.onPressKeyDict = None
  574. self.onClickKeyDict = None
  575. if app.ENABLE_COSTUME_AURA:
  576. self.RefineAura.Hide()
  577. uiPrivateShopBuilder.Clear()
  578.  
  579. chat.Close()
  580. # self.menu_bg.Hide()
  581. # self.Dezactivare_Menu.Hide()
  582. # self.Activare_Menu.Hide()
  583. # self.menu_bg2.Hide()
  584. # self.Dezactivare_Menu2.Hide()
  585. # self.Activare_Menu2.Hide()
  586. snd.StopAllSound()
  587. grp.InitScreenEffect()
  588. chr.Destroy()
  589. textTail.Clear()
  590. quest.Clear()
  591. background.Destroy()
  592. guild.Destroy()
  593. messenger.Destroy()
  594. skill.ClearSkillData()
  595. wndMgr.Unlock()
  596. mouseModule.mouseController.DeattachObject()
  597.  
  598. if self.guildWarQuestionDialog:
  599. self.guildWarQuestionDialog.Close()
  600.  
  601. if self.oyunicisiralama.IsShow():
  602. self.oyunicisiralama.Open()
  603.  
  604. if self.loncasiralama.IsShow():
  605. self.loncasiralama.Open()
  606.  
  607. if self.recordscreen.IsShow():
  608. self.recordscreen.Open()
  609.  
  610. if self.loncanitanit.IsShow():
  611. self.loncanitanit.Open()
  612.  
  613. self.guildNameBoard = None
  614. self.partyRequestQuestionDialog = None
  615. self.warPlayerCheckQuestionDialog = None
  616. self.partyInviteQuestionDialog = None
  617. self.guildInviteQuestionDialog = None
  618. self.guildWarQuestionDialog = None
  619. self.messengerAddFriendQuestion = None
  620.  
  621. # UNKNOWN_UPDATE
  622. self.itemDropQuestionDialog = None
  623. # END_OF_UNKNOWN_UPDATE
  624.  
  625. # QUEST_CONFIRM
  626. self.confirmDialog = None
  627. # END_OF_QUEST_CONFIRM
  628. if app.TOURNAMENT_PVP_SYSTEM:
  629. constInfo.TOURNAMENT_WINDOW_IS_SHOWED = 0
  630.  
  631.  
  632. self.PrintCoord = None
  633. self.FrameRate = None
  634. self.Pitch = None
  635. self.Splat = None
  636. self.TextureNum = None
  637. self.ObjectNum = None
  638. self.ViewDistance = None
  639. self.PrintMousePos = None
  640.  
  641. self.ClearDictionary()
  642.  
  643. if app.ENABLE_SUPPORT_SYSTEM:
  644. self.supportpg.Close()
  645.  
  646. self.petmain.Close()
  647. self.petmini.Close()
  648.  
  649. self.playerGauge = None
  650. self.mapNameShower = None
  651. self.LoncaGecmisi = None
  652. self.affectShower = None
  653.  
  654. #uiPrivateShopBuilder.Clear()
  655.  
  656. if self.SchicksalRad.IsShow():
  657. self.SchicksalRad.Open()
  658.  
  659. if self.MountingSystem.IsShow():
  660. self.MountingSystem.Open()
  661.  
  662. if self.console:
  663. self.console.BindGameClass(0)
  664. self.console.Close()
  665. self.console=None
  666.  
  667. if self.ruhtasi:
  668. self.ruhtasi.Destroy()
  669. self.ruhtasi = None
  670.  
  671. if self.bkoku:
  672. self.bkoku.Destroy()
  673. self.bkoku = None
  674.  
  675. if self.npcekran:
  676. self.npcekran.Destroy()
  677. self.npcekran = None
  678.  
  679. if self.targetBoard:
  680. self.targetBoard.Destroy()
  681. self.targetBoard = None
  682. if app.ENABLE_TICKET_SYSTEM:
  683. if self.wndTicket:
  684. self.wndTicket.Hide()
  685.  
  686. if self.wndTicketReply:
  687. self.wndTicketReply.Hide()
  688.  
  689. if self.wndTicketStaff:
  690. self.wndTicketStaff.Hide()
  691. if (app.WJ_COMBAT_ZONE):
  692. if self.wndCombatZone:
  693. self.wndCombatZone.Close()
  694. if app.ENABLE_ADMIN_BAN_MANAGER:
  695. if self.wndAdminTool:
  696. self.wndAdminTool.Hide()
  697. if self.wndMarbleShop:
  698. self.wndMarbleShop.Hide()
  699. # if app.ENABLE_TITLE_SYSTEM:
  700. # self.wndTitleSystem.Close()
  701. if app.ENABLE_REBORN_SYSTEM:
  702. if self.wndReborn.IsShow():
  703. self.wndReborn.Hide()
  704.  
  705. if app.ENABLE_MAINTENANCE_SYSTEM:
  706. if self.wndMaintenance.IsShow():
  707. self.wndMaintenance.Hide()
  708.  
  709. if self.itemShopWnd:
  710. self.itemShopWnd.Destroy()
  711. self.itemShopWnd = None
  712. if self.interface:
  713. self.interface.HideAllWindows()
  714. self.interface.Close()
  715. self.interface=None
  716.  
  717. for i in xrange(len(self.boniSwitcherWnd)):
  718. if self.boniSwitcherWnd[i]:
  719. self.boniSwitcherWnd[i].Destroy()
  720. self.boniSwitcherWnd[i] = None
  721. if self.petInventoryWnd:
  722. self.petInventoryWnd.Destroy()
  723. self.petInventoryWnd = None
  724. player.ClearSkillDict()
  725. player.ResetCameraRotation()
  726.  
  727. self.KillFocus()
  728. app.HideCursor()
  729.  
  730. print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
  731.  
  732. def biyoodulac(self, gorev, af1, afv1, af2, afv2, af3, afv3):
  733. self.biyoekran.Show()
  734. self.biyoekran.SetBaslik(str(gorev))
  735. self.biyoekran.SetOdul(af1,afv1,af2,afv2,af3,afv3)
  736.  
  737. def biyologekrankapa(self):
  738. self.biyoekran.Close()
  739.  
  740. def biyolog(self, bioitem, verilen, toplam, kalansure):
  741. self.interface.SetBiyolog(bioitem, verilen, toplam, kalansure)
  742.  
  743. def ruhcac(self):
  744. self.ruhtasi.Show()
  745.  
  746. def bkac(self):
  747. self.bkoku.Show()
  748.  
  749. def npcac(self):
  750. self.npcekran.Show()
  751.  
  752. def __BuildKeyDict(self):
  753. onPressKeyDict = {}
  754.  
  755. ##PressKey 는 누르고 있는 동안 계속 적용되는 키이다.
  756.  
  757. ## 숫자 단축키 퀵슬롯에 이용된다.(이후 숫자들도 퀵 슬롯용 예약)
  758. ## F12 는 클라 디버그용 키이므로 쓰지 않는 게 좋다.
  759. onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
  760. onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
  761. onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
  762. onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
  763. onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
  764. onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
  765. onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
  766. onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
  767. onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
  768. onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
  769. onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
  770. onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
  771. onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
  772.  
  773. #if app.ENABLE_SWITCHER_MIJAGO:
  774. # onPressKeyDict[app.DIK_F5] = lambda : self.__toggleSwitchbot()
  775. #if app.ENABLE_TITLE_SYSTEM:
  776. # onPressKeyDict[app.DIK_F5] = lambda : self.OpenTitleSystem()
  777. #onPressKeyDict[app.DIK_F5] = lambda : self.npcac()#UZAKTAN NPC
  778. #onPressKeyDict[app.DIK_F6] = lambda : self.recordac()#BOSS SIRALAMA
  779. #onPressKeyDict[app.DIK_F6] = lambda : self.siralamaopen()#OYUNCU SIRALAMA
  780. #onPressKeyDict[app.DIK_F7] = lambda : self.loncasiralamaopen()#LONCA SIRALAMA
  781. #onPressKeyDict[app.DIK_F8] = lambda : self.lonca_tanitim()#LONCA TANITIMI
  782. #if app.ENABLE_ADMIN_BAN_MANAGER:
  783. # onPressKeyDict[app.DIK_F9] = lambda : self.OpenAdminTool()
  784. #onPressKeyDict[app.DIK_TAB] = lambda : self.LoncaIstatistikOpen()
  785.  
  786. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  787. onPressKeyDict[app.DIK_5] = lambda : self.__PressNumNewKey(5)
  788. onPressKeyDict[app.DIK_6] = lambda : self.__PressNumNewKey(6)
  789. onPressKeyDict[app.DIK_7] = lambda : self.__PressNumNewKey(7)
  790. onPressKeyDict[app.DIK_8] = lambda : self.__PressNumNewKey(8)
  791.  
  792. onPressKeyDict[app.DIK_F5] = lambda : self.__PressNewQuickSlot(4)
  793. onPressKeyDict[app.DIK_F6] = lambda : self.__PressNewQuickSlot(5)
  794. onPressKeyDict[app.DIK_F7] = lambda : self.__PressNewQuickSlot(6)
  795. onPressKeyDict[app.DIK_F8] = lambda : self.__PressNewQuickSlot(7)
  796.  
  797. onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
  798. onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
  799. onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
  800. onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
  801.  
  802. #캐릭터 이동키
  803. onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
  804. onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
  805. onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
  806. onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
  807. onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
  808. onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
  809. onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
  810. onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
  811.  
  812. onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
  813. onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
  814. #onPressKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  815. onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
  816. onPressKeyDict[app.DIK_G] = self.__PressGKey
  817. onPressKeyDict[app.DIK_Q] = self.__PressQKey
  818.  
  819. onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
  820. onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
  821. onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
  822. onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
  823. onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
  824. onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
  825. onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
  826. onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItem()
  827. onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItem()
  828. #onPressKeyDict[app.DIK_X] = lambda: self.interface.ToggleBonusWindow()
  829. onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
  830. onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
  831. #onPressKeyDict[app.DIK_B] = lambda state = "EMOTICON": self.interface.ToggleCharacterWindow(state)
  832. onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
  833. onPressKeyDict[app.DIK_O] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
  834. onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
  835. onPressKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
  836. #onPressKeyDict[app.DIK_H] = lambda : self.interface.OpenHelpWindow()
  837. onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
  838. onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
  839. onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
  840. #onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole() # "`" key
  841. onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
  842.  
  843. onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
  844. onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
  845. onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
  846. onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
  847.  
  848. if app.WJ_SPLIT_INVENTORY_SYSTEM:
  849. onPressKeyDict[app.DIK_K] = lambda : self.__PressExtendedInventory()
  850.  
  851. #onPressKeyDict[app.DIK_B] = lambda : self.test()
  852. #onPressKeyDict[app.DIK_X] = lambda : self.OtomatikAv()
  853.  
  854. # CUBE_TEST
  855. #onPressKeyDict[app.DIK_K] = lambda : self.interface.OpenCubeWindow()
  856. # CUBE_TEST_END
  857.  
  858. self.onPressKeyDict = onPressKeyDict
  859.  
  860. onClickKeyDict = {}
  861. onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
  862. onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
  863. onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
  864. onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
  865. onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
  866.  
  867. onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
  868. onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
  869. onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
  870. onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
  871. onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
  872. onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
  873. onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  874. onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  875. onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
  876. onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
  877. onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  878. onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  879. onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  880. onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  881. onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  882. onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  883. onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
  884. onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
  885. onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
  886. onClickKeyDict[app.DIK_P] = lambda: self.OpenPetMainGui()
  887. if app.ENABLE_SUPPORT_SYSTEM:
  888. onClickKeyDict[app.DIK_Y] = lambda: self.OpenSupportGui()
  889.  
  890. #if constInfo.PVPMODE_ACCELKEY_ENABLE:
  891. # onClickKeyDict[app.DIK_B] = lambda: self.ChangePKMode()
  892.  
  893. self.onClickKeyDict=onClickKeyDict
  894.  
  895. if app.WJ_SPLIT_INVENTORY_SYSTEM:
  896. def __PressExtendedInventory(self):
  897. if self.interface:
  898. self.interface.ToggleExtendedInventoryWindow()
  899.  
  900. def __PressNumKey(self,num):
  901. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  902.  
  903. if num >= 1 and num <= 9:
  904. if(chrmgr.IsPossibleEmoticon(-1)):
  905. chrmgr.SetEmoticon(-1,int(num)-1)
  906. net.SendEmoticon(int(num)-1)
  907. else:
  908. if num >= 1 and num <= 4:
  909. self.pressNumber(num-1)
  910.  
  911. def __ClickBKey(self):
  912. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  913. return
  914. else:
  915. if constInfo.PVPMODE_ACCELKEY_ENABLE:
  916. self.ChangePKMode()
  917.  
  918.  
  919. def __PressJKey(self):
  920. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  921. if player.IsMountingHorse():
  922. net.SendChatPacket("/unmount")
  923. else:
  924. if not uiPrivateShopBuilder.IsBuildingPrivateShop() or not uiOfflineShopBuilder.IsBuildingOfflineShop():
  925. if app.ENABLE_MOUNT_SYSTEM:
  926. for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
  927. index = player.GetItemIndex(i)
  928. if index:
  929. item.SelectItem(index)
  930. subType = item.GetItemSubType()
  931. if subType == item.USE_MOUNT:
  932. allow = 0
  933. net.SendItemUsePacket(i)
  934. break
  935. else:
  936. for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
  937. if player.GetItemIndex(i) in (52043, 52044, 52045, 71164, 71165, 71166, 71167, 71168, 52091, 52092, 52093, 52094, 52095, 52096, 52097, 52098, 71161, 71131, 52033, 52005, 52019, 71176, 71177):
  938. net.SendItemUsePacket(i)
  939. break
  940. def __PressHKey(self):
  941. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  942. net.SendChatPacket("/user_horse_ride")
  943. else:
  944. self.interface.OpenHelpWindow()
  945.  
  946. def __PressBKey(self):
  947. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  948. net.SendChatPacket("/user_horse_back")
  949. else:
  950. state = "EMOTICON"
  951. self.interface.ToggleCharacterWindow(state)
  952.  
  953. def __PressFKey(self):
  954. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  955. net.SendChatPacket("/user_horse_feed")
  956. else:
  957. app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  958.  
  959. def __PressGKey(self):
  960. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  961. net.SendChatPacket("/user_mount_ride")
  962. else:
  963. if self.ShowNameFlag:
  964. self.interface.ToggleGuildWindow()
  965. else:
  966. app.PitchCamera(app.CAMERA_TO_POSITIVE)
  967.  
  968. """def __PressGKey(self):
  969. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  970. if player.IsMountingHorse():
  971. net.SendChatPacket("/ride")
  972. else:
  973. if not uiPrivateShopBuilder.IsBuildingPrivateShop():
  974. if app.ENABLE_MOUNT_SYSTEM:
  975. for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
  976. index = player.GetItemIndex(i)
  977. if index:
  978. item.SelectItem(index)
  979. subType = item.GetItemSubType()
  980. if subType == item.USE_MOUNT:
  981. allow = 0
  982. net.SendItemUsePacket(i)
  983. break
  984. else:
  985. for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
  986. if player.GetItemIndex(i) in (52043, 52044, 52045, 71164, 71165, 71166, 71167, 71168, 52091, 52092, 52093, 52094, 52095, 52096, 52097, 52098, 71161, 71131, 52033, 52005, 52019, 71176, 71177):
  987. net.SendItemUsePacket(i)
  988. break
  989. else:
  990. app.PitchCamera(app.CAMERA_TO_POSITIVE)"""
  991.  
  992. def __ReleaseGKey(self):
  993. app.PitchCamera(app.CAMERA_STOP)
  994.  
  995. # if app.ENABLE_TITLE_SYSTEM:
  996. # def OpenTitleSystem(self):
  997. # self.wndTitleSystem.OpenWindow()
  998.  
  999. if app.ENABLE_ADMIN_BAN_MANAGER:
  1000. def OpenAdminTool(self):
  1001. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL): # Open window with CTRL + F5
  1002. if self.wndAdminTool.IsShow():
  1003. self.wndAdminTool.Hide()
  1004. else:
  1005. self.wndAdminTool.Show()
  1006.  
  1007. def __PressQKey(self):
  1008. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1009. if 0==interfaceModule.IsQBHide:
  1010. interfaceModule.IsQBHide = 1
  1011. self.interface.HideAllQuestButton()
  1012. else:
  1013. interfaceModule.IsQBHide = 0
  1014. self.interface.ShowAllQuestButton()
  1015. else:
  1016. app.RotateCamera(app.CAMERA_TO_NEGATIVE)
  1017.  
  1018. def __PressJKey(self):
  1019. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1020. if player.IsmountingHorse():
  1021. net.SendChatPacket("/unmount")
  1022. else:
  1023. self.teleport.Open()
  1024.  
  1025. def __SetQuickSlotMode(self):
  1026. self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
  1027.  
  1028. def __SetQuickPageMode(self):
  1029. self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
  1030.  
  1031. def __PressQuickSlot(self, localSlotIndex):
  1032. if localeInfo.IsARABIC():
  1033. if 0 <= localSlotIndex and localSlotIndex < 4:
  1034. player.RequestUseLocalQuickSlot(3-localSlotIndex)
  1035. else:
  1036. player.RequestUseLocalQuickSlot(11-localSlotIndex)
  1037. else:
  1038. player.RequestUseLocalQuickSlot(localSlotIndex)
  1039.  
  1040. def __SelectQuickPage(self, pageIndex):
  1041. self.quickSlotPageIndex = pageIndex
  1042. player.SetQuickPage(pageIndex)
  1043.  
  1044. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  1045. def __PressNumNewKey(self, key):
  1046. if key > 8:
  1047. return
  1048. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1049.  
  1050. if key >= 5 and key <= 8:
  1051. if(chrmgr.IsPossibleEmoticon(- 1)):
  1052. chrmgr.SetEmoticon(- 1, int(key) - 1)
  1053. net.SendEmoticon(int(key) - 1)
  1054. else:
  1055. self.pressNewNumber((key - 1) - 4)
  1056.  
  1057. def __SetNewQuickSlotMode(self):
  1058. self.pressNewNumber = ui.__mem_func__(self.__PressNewQuickSlot)
  1059.  
  1060. def __SetNewQuickPageMode(self):
  1061. self.pressNewNumber = ui.__mem_func__(self.__SelectNewQuickPage)
  1062.  
  1063. def __PressNewQuickSlot(self, localSlotIndex):
  1064. player.RequestUseLocalNewQuickSlot(localSlotIndex)
  1065.  
  1066. def __SelectNewQuickPage(self, pageIndex):
  1067. self.newquickSlotPageIndex = pageIndex
  1068. player.SetNewQuickPage(pageIndex)
  1069.  
  1070. def ToggleDebugInfo(self):
  1071. self.isShowDebugInfo = not self.isShowDebugInfo
  1072.  
  1073. if self.isShowDebugInfo:
  1074. self.PrintCoord.Show()
  1075. self.FrameRate.Show()
  1076. self.Pitch.Show()
  1077. self.Splat.Show()
  1078. self.TextureNum.Show()
  1079. self.ObjectNum.Show()
  1080. self.ViewDistance.Show()
  1081. self.PrintMousePos.Show()
  1082. else:
  1083. self.PrintCoord.Hide()
  1084. self.FrameRate.Hide()
  1085. self.Pitch.Hide()
  1086. self.Splat.Hide()
  1087. self.TextureNum.Hide()
  1088. self.ObjectNum.Hide()
  1089. self.ViewDistance.Hide()
  1090. self.PrintMousePos.Hide()
  1091.  
  1092. def __BuildDebugInfo(self):
  1093. ## Character Position Coordinate
  1094. self.PrintCoord = ui.TextLine()
  1095. self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
  1096. self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0)
  1097.  
  1098. ## Frame Rate
  1099. self.FrameRate = ui.TextLine()
  1100. self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
  1101. self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
  1102.  
  1103. ## Camera Pitch
  1104. self.Pitch = ui.TextLine()
  1105. self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
  1106. self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
  1107.  
  1108. ## Splat
  1109. self.Splat = ui.TextLine()
  1110. self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
  1111. self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
  1112.  
  1113. ##
  1114. self.PrintMousePos = ui.TextLine()
  1115. self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
  1116. self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
  1117.  
  1118. # TextureNum
  1119. self.TextureNum = ui.TextLine()
  1120. self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
  1121. self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
  1122.  
  1123. # 오브젝트 그리는 개수
  1124. self.ObjectNum = ui.TextLine()
  1125. self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
  1126. self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
  1127.  
  1128. # 시야거리
  1129. self.ViewDistance = ui.TextLine()
  1130. self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
  1131. self.ViewDistance.SetPosition(0, 0)
  1132.  
  1133. def __NotifyError(self, msg):
  1134. chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
  1135.  
  1136. def ChangePKMode(self):
  1137.  
  1138. if not app.IsPressed(app.DIK_LCONTROL):
  1139. return
  1140.  
  1141. if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
  1142. self.__NotifyError(localeInfo.OPTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
  1143. return
  1144.  
  1145. curTime = app.GetTime()
  1146. if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
  1147. return
  1148.  
  1149. self.lastPKModeSendedTime = curTime
  1150.  
  1151. curPKMode = player.GetPKMode()
  1152. nextPKMode = curPKMode + 1
  1153. if nextPKMode == player.PK_MODE_PROTECT:
  1154. if 0 == player.GetGuildID():
  1155. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
  1156. nextPKMode = 0
  1157. else:
  1158. nextPKMode = player.PK_MODE_GUILD
  1159.  
  1160. elif nextPKMode == player.PK_MODE_MAX_NUM:
  1161. nextPKMode = 0
  1162.  
  1163. net.SendChatPacket("/PKMode " + str(nextPKMode))
  1164. print "/PKMode " + str(nextPKMode)
  1165.  
  1166. def OnChangePKMode(self):
  1167.  
  1168. self.interface.OnChangePKMode()
  1169.  
  1170. try:
  1171. self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
  1172. except KeyError:
  1173. print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
  1174.  
  1175. if constInfo.PVPMODE_TEST_ENABLE:
  1176. curPKMode = player.GetPKMode()
  1177. alignment, grade = chr.testGetPKData()
  1178. self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
  1179. self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
  1180. self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
  1181.  
  1182. ###############################################################################################
  1183. ###############################################################################################
  1184. ## Game Callback Functions
  1185.  
  1186. # Start
  1187. def StartGame(self):
  1188. self.RefreshInventory()
  1189. self.RefreshEquipment()
  1190. self.RefreshCharacter()
  1191. self.RefreshSkill()
  1192. szNameValue = "[%s]" % (player.GetName())
  1193. app.SetTitle(szNameValue)
  1194.  
  1195. # Refresh
  1196. def CheckGameButton(self):
  1197. if self.interface:
  1198. self.interface.CheckGameButton()
  1199.  
  1200. def RefreshAlignment(self):
  1201. self.interface.RefreshAlignment()
  1202.  
  1203. if app.WJ_SHOW_ALL_CHANNEL:
  1204. def BINARY_OnChannelPacket(self, channel):
  1205. import net
  1206. server_name = net.GetServerInfo().split(" - ")[0]
  1207. net.SetServerInfo((localeInfo.TEXT_CHANNEL % (server_name, channel)).strip())
  1208. if self.interface:
  1209. self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo())
  1210.  
  1211. def RefreshStatus(self):
  1212. self.CheckGameButton()
  1213.  
  1214. if self.interface:
  1215. self.interface.RefreshStatus()
  1216.  
  1217. if self.playerGauge:
  1218. self.playerGauge.RefreshGauge()
  1219.  
  1220. def RefreshStamina(self):
  1221. self.interface.RefreshStamina()
  1222.  
  1223. def RefreshSkill(self):
  1224. self.CheckGameButton()
  1225. if self.interface:
  1226. self.interface.RefreshSkill()
  1227.  
  1228. def RefreshQuest(self):
  1229. self.interface.RefreshQuest()
  1230.  
  1231. def RefreshMessenger(self):
  1232. self.interface.RefreshMessenger()
  1233.  
  1234. def RefreshGuildInfoPage(self):
  1235. self.interface.RefreshGuildInfoPage()
  1236.  
  1237. def RefreshGuildBoardPage(self):
  1238. self.interface.RefreshGuildBoardPage()
  1239.  
  1240. def RefreshGuildMemberPage(self):
  1241. self.interface.RefreshGuildMemberPage()
  1242.  
  1243. def RefreshGuildMemberPageGradeComboBox(self):
  1244. self.interface.RefreshGuildMemberPageGradeComboBox()
  1245.  
  1246. def RefreshGuildSkillPage(self):
  1247. self.interface.RefreshGuildSkillPage()
  1248.  
  1249. def RefreshGuildGradePage(self):
  1250. self.interface.RefreshGuildGradePage()
  1251.  
  1252. def RefreshMobile(self):
  1253. if self.interface:
  1254. self.interface.RefreshMobile()
  1255.  
  1256. def OnMobileAuthority(self):
  1257. self.interface.OnMobileAuthority()
  1258.  
  1259. def OnBlockMode(self, mode):
  1260. self.interface.OnBlockMode(mode)
  1261.  
  1262. def OpenQuestWindow(self, skin, idx):
  1263. if constInfo.CApiSetHide == 1:
  1264. net.SendQuestInputStringPacket(str(constInfo.SendString))
  1265. constInfo.CApiSetHide = 0
  1266. return
  1267.  
  1268. if constInfo.INPUT_IGNORE == 1:
  1269. return
  1270.  
  1271. self.interface.OpenQuestWindow(skin, idx)
  1272.  
  1273. def Mozart(self, data):
  1274. dane = data.split("|")
  1275. constInfo.PLAYER_NAME = str(dane[0])
  1276. constInfo.PLAYER_HP = int(dane[1])
  1277. constInfo.PLAYER_MAX_HP = int(dane[2])
  1278. constInfo.PLAYER_SP = int(dane[3])
  1279. constInfo.PLAYER_MAX_SP = int(dane[4])
  1280.  
  1281. def Tabulejtor(self, id):
  1282. constInfo.STHX = int(id)
  1283.  
  1284. def GetInputOn(self):
  1285. constInfo.INPUT_IGNORE = 1
  1286.  
  1287. def GetInputOff(self):
  1288. constInfo.INPUT_IGNORE = 0
  1289.  
  1290. def GetInputValue(self):
  1291. net.SendQuestInputStringPacket(str(constInfo.VID))
  1292.  
  1293. def OpenQuestWindow(self, skin, idx):
  1294. if constInfo.INPUT_IGNORE == 1:
  1295. return
  1296. else:
  1297. self.interface.OpenQuestWindow(skin, idx)
  1298.  
  1299.  
  1300. def __teleporttahtasi(self):
  1301. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1302. return
  1303. import uiisinlanma
  1304. self.isinlanmaxd = uiisinlanma.Isinlanma()
  1305. self.isinlanmaxd.Show()
  1306.  
  1307. def AskGuildName(self):
  1308.  
  1309. guildNameBoard = uiCommon.InputDialog()
  1310. guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
  1311. guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
  1312. guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
  1313. guildNameBoard.Open()
  1314.  
  1315. self.guildNameBoard = guildNameBoard
  1316.  
  1317. def ConfirmGuildName(self):
  1318. guildName = self.guildNameBoard.GetText()
  1319. if not guildName:
  1320. return
  1321.  
  1322. if net.IsInsultIn(guildName):
  1323. self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
  1324. return
  1325.  
  1326. net.SendAnswerMakeGuildPacket(guildName)
  1327. self.guildNameBoard.Close()
  1328. self.guildNameBoard = None
  1329. return TRUE
  1330.  
  1331. def CancelGuildName(self):
  1332. self.guildNameBoard.Close()
  1333. self.guildNameBoard = None
  1334. return TRUE
  1335.  
  1336. ## Refine
  1337. def PopupMessage(self, msg):
  1338. self.stream.popupWindow.Close()
  1339. self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
  1340.  
  1341. def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type=0):
  1342. self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
  1343.  
  1344. def AppendMaterialToRefineDialog(self, vnum, count):
  1345. self.interface.AppendMaterialToRefineDialog(vnum, count)
  1346.  
  1347. def RunUseSkillEvent(self, slotIndex, coolTime):
  1348. self.interface.OnUseSkill(slotIndex, coolTime)
  1349.  
  1350. def ClearAffects(self):
  1351. self.affectShower.ClearAffects()
  1352.  
  1353. def SetAffect(self, affect):
  1354. self.affectShower.SetAffect(affect)
  1355.  
  1356. def ResetAffect(self, affect):
  1357. self.affectShower.ResetAffect(affect)
  1358.  
  1359. # UNKNOWN_UPDATE
  1360. def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
  1361. #chat.AppendChat(chat.CHAT_TYPE_INFO, "type: %s | pointIdx: %s | value: %s | duration: %s" % (str(type), str(pointIdx), str(value), str(duration)))
  1362. self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
  1363. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  1364. self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
  1365. elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
  1366. self.BINARY_DragonSoulGiveQuilification()
  1367.  
  1368. def BINARY_NEW_RemoveAffect(self, type, pointIdx):
  1369. self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
  1370. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  1371. self.interface.DragonSoulDeactivate()
  1372.  
  1373.  
  1374.  
  1375. # END_OF_UNKNOWN_UPDATE
  1376.  
  1377. def ActivateSkillSlot(self, slotIndex):
  1378. if self.interface:
  1379. self.interface.OnActivateSkill(slotIndex)
  1380.  
  1381. def DeactivateSkillSlot(self, slotIndex):
  1382. if self.interface:
  1383. self.interface.OnDeactivateSkill(slotIndex)
  1384.  
  1385. def RefreshEquipment(self):
  1386. if self.interface:
  1387. self.interface.RefreshInventory()
  1388.  
  1389. def RefreshInventory(self):
  1390. if self.interface:
  1391. self.interface.RefreshInventory()
  1392.  
  1393. def RefreshCharacter(self):
  1394. if self.interface:
  1395. self.interface.RefreshCharacter()
  1396.  
  1397. def OnGameOver(self):
  1398. self.CloseTargetBoard()
  1399. self.OpenRestartDialog()
  1400.  
  1401. def OpenRestartDialog(self):
  1402. self.interface.OpenRestartDialog()
  1403.  
  1404. def ChangeCurrentSkill(self, skillSlotNumber):
  1405. self.interface.OnChangeCurrentSkill(skillSlotNumber)
  1406.  
  1407. if app.WJ_SHOW_STROKE_INFO:
  1408. def RegisterStroke(self, targetVID, value):
  1409. self.targetBoard.RegisterStroke(targetVID, value)
  1410.  
  1411. ## TargetBoard
  1412. def SetPCTargetBoard(self, vid, name):
  1413. self.targetBoard.Open(vid, name)
  1414.  
  1415. if app.IsPressed(app.DIK_LCONTROL):
  1416.  
  1417. if not player.IsSameEmpire(vid):
  1418. return
  1419.  
  1420. if player.IsMainCharacterIndex(vid):
  1421. return
  1422. elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
  1423. return
  1424.  
  1425. self.interface.OpenWhisperDialog(name)
  1426.  
  1427.  
  1428. def RefreshTargetBoardByVID(self, vid):
  1429. self.targetBoard.RefreshByVID(vid)
  1430.  
  1431. def RefreshTargetBoardByName(self, name):
  1432. self.targetBoard.RefreshByName(name)
  1433.  
  1434. def __RefreshTargetBoard(self):
  1435. self.targetBoard.Refresh()
  1436.  
  1437. if app.ENABLE_VIEW_TARGET_DECIMAL_HP and app.ENABLE_VIEW_ELEMENT:
  1438. def SetHPTargetBoard(self, vid, hpPercentage, iMinHP, iMaxHP, bElement):
  1439. if vid != self.targetBoard.GetTargetVID():
  1440. self.targetBoard.ResetTargetBoard()
  1441. self.targetBoard.SetEnemyVID(vid)
  1442.  
  1443. self.targetBoard.SetHP(hpPercentage, iMinHP, iMaxHP)
  1444. self.targetBoard.SetElementImage(bElement)
  1445. self.targetBoard.Show()
  1446. else:
  1447. def SetHPTargetBoard(self, vid, hpPercentage):
  1448. if vid != self.targetBoard.GetTargetVID():
  1449. self.targetBoard.ResetTargetBoard()
  1450. self.targetBoard.SetEnemyVID(vid)
  1451.  
  1452. self.targetBoard.SetHP(hpPercentage)
  1453. self.targetBoard.Show()
  1454.  
  1455. def CloseTargetBoardIfDifferent(self, vid):
  1456. if vid != self.targetBoard.GetTargetVID():
  1457. self.targetBoard.Close()
  1458.  
  1459. def CloseTargetBoard(self):
  1460. self.targetBoard.Close()
  1461.  
  1462. ## View Equipment
  1463. def OpenEquipmentDialog(self, vid):
  1464. self.interface.OpenEquipmentDialog(vid)
  1465.  
  1466. def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
  1467. self.interface.SetEquipmentDialogItem(vid, slotIndex, vnum, count)
  1468.  
  1469. def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
  1470. self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
  1471.  
  1472. def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
  1473. self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
  1474.  
  1475. # SHOW_LOCAL_MAP_NAME
  1476. def ShowMapName(self, mapName, x, y):
  1477.  
  1478. if self.mapNameShower:
  1479. self.mapNameShower.ShowMapName(mapName, x, y)
  1480.  
  1481. if self.interface:
  1482. self.interface.SetMapName(mapName)
  1483. # END_OF_SHOW_LOCAL_MAP_NAME
  1484.  
  1485. def BINARY_OpenAtlasWindow(self):
  1486. self.interface.BINARY_OpenAtlasWindow()
  1487.  
  1488. ## Chat
  1489. def OnRecvWhisper(self, mode, name, line):
  1490. if mode == chat.WHISPER_TYPE_GM:
  1491. self.interface.RegisterGameMasterName(name)
  1492. chat.AppendWhisper(mode, name, line)
  1493. self.interface.RecvWhisper(name)
  1494.  
  1495. def OnRecvWhisperSystemMessage(self, mode, name, line):
  1496. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
  1497. self.interface.RecvWhisper(name)
  1498.  
  1499. def OnRecvWhisperError(self, mode, name, line):
  1500. if localeInfo.WHISPER_ERROR.has_key(mode):
  1501. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
  1502. else:
  1503. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
  1504. self.interface.RecvWhisper(name)
  1505.  
  1506. def RecvWhisper(self, name):
  1507. self.interface.RecvWhisper(name)
  1508.  
  1509. #def OnPickMoney(self, money):
  1510. #chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (money))
  1511. #chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PrettyNumber(money) + localeInfo.GAME_PICK_MONEY)
  1512.  
  1513. #YangDrop
  1514. def OnPickMoney(self, money):
  1515. if constInfo.YangDrop == 1:
  1516. #chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (money))
  1517. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PrettyNumber(money) + localeInfo.GAME_PICK_MONEY)
  1518. else:
  1519. return
  1520. #YangDrop
  1521.  
  1522. if app.ENABLE_CHEQUE_SYSTEM:
  1523. def OnPickCheque(self, cheque):
  1524. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHEQUE_SYSTEM_PICK_WON % (cheque))
  1525.  
  1526. def OnShopError(self, type):
  1527. try:
  1528. self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
  1529. except KeyError:
  1530. self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
  1531.  
  1532. def OnSafeBoxError(self):
  1533. self.PopupMessage(localeInfo.SAFEBOX_ERROR)
  1534.  
  1535. def OnFishingSuccess(self, isFish, fishName):
  1536. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
  1537.  
  1538. # ADD_FISHING_MESSAGE
  1539. def OnFishingNotifyUnknown(self):
  1540. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
  1541.  
  1542. def OnFishingWrongPlace(self):
  1543. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
  1544. # END_OF_ADD_FISHING_MESSAGE
  1545.  
  1546. def OnFishingNotify(self, isFish, fishName):
  1547. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
  1548.  
  1549. def OnFishingFailure(self):
  1550. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
  1551.  
  1552. def OnCannotPickItem(self):
  1553. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
  1554.  
  1555. # MINING
  1556. def OnCannotMining(self):
  1557. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
  1558. # END_OF_MINING
  1559.  
  1560. def OnCannotUseSkill(self, vid, type):
  1561. if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
  1562. textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
  1563.  
  1564. if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
  1565. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
  1566.  
  1567. def OnCannotShotError(self, vid, type):
  1568. textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
  1569.  
  1570. ## PointReset
  1571. def StartPointReset(self):
  1572. self.interface.OpenPointResetDialog()
  1573.  
  1574. ## Shop
  1575. if (app.WJ_COMBAT_ZONE):
  1576. def StartShop(self, vid, points, curLimit, maxLimit):
  1577. self.interface.OpenShopDialog(vid, points, curLimit, maxLimit)
  1578. else:
  1579. def StartShop(self, vid):
  1580. self.interface.OpenShopDialog(vid)
  1581.  
  1582. def EndShop(self):
  1583. self.interface.CloseShopDialog()
  1584.  
  1585. def RefreshShop(self):
  1586. self.interface.RefreshShopDialog()
  1587.  
  1588. def SetShopSellingPrice(self, Price):
  1589. pass
  1590.  
  1591. if app.WJ_OFFLINESHOP_SYSTEM:
  1592. def StartOfflineShop(self, vid):
  1593. if(vid == constInfo.MARKED_SHOP_VID):
  1594. background.DeletePrivateShopPos()
  1595. constInfo.MARKED_SHOP_VID = 0
  1596. self.interface.OpenOfflineShopDialog(vid)
  1597.  
  1598. def EndOfflineShop(self):
  1599. self.interface.CloseOfflineShopDialog()
  1600.  
  1601. def RefreshOfflineShop(self):
  1602. self.interface.RefreshOfflineShopDialog()
  1603.  
  1604. ## Exchange
  1605. def StartExchange(self):
  1606. self.interface.StartExchange()
  1607.  
  1608. def EndExchange(self):
  1609. self.interface.EndExchange()
  1610.  
  1611. def RefreshExchange(self):
  1612. self.interface.RefreshExchange()
  1613.  
  1614. ## Party
  1615. def RecvPartyInviteQuestion(self, leaderVID, leaderName):
  1616. partyInviteQuestionDialog = uiCommon.QuestionDialog()
  1617. partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
  1618. partyInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
  1619. partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
  1620. partyInviteQuestionDialog.Open()
  1621. partyInviteQuestionDialog.partyLeaderVID = leaderVID
  1622. self.partyInviteQuestionDialog = partyInviteQuestionDialog
  1623.  
  1624. def AnswerPartyInvite(self, answer):
  1625.  
  1626. if not self.partyInviteQuestionDialog:
  1627. return
  1628.  
  1629. partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
  1630.  
  1631. distance = player.GetCharacterDistance(partyLeaderVID)
  1632. if distance < 0.0 or distance > 5000:
  1633. answer = FALSE
  1634.  
  1635. net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
  1636.  
  1637. self.partyInviteQuestionDialog.Close()
  1638. self.partyInviteQuestionDialog = None
  1639.  
  1640. def AddPartyMember(self, pid, name):
  1641. self.interface.AddPartyMember(pid, name)
  1642.  
  1643. def UpdatePartyMemberInfo(self, pid):
  1644. self.interface.UpdatePartyMemberInfo(pid)
  1645.  
  1646. def RemovePartyMember(self, pid):
  1647. self.interface.RemovePartyMember(pid)
  1648. self.__RefreshTargetBoard()
  1649.  
  1650. def LinkPartyMember(self, pid, vid):
  1651. self.interface.LinkPartyMember(pid, vid)
  1652.  
  1653. def UnlinkPartyMember(self, pid):
  1654. self.interface.UnlinkPartyMember(pid)
  1655.  
  1656. def UnlinkAllPartyMember(self):
  1657. self.interface.UnlinkAllPartyMember()
  1658.  
  1659. def ExitParty(self):
  1660. self.interface.ExitParty()
  1661. self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
  1662.  
  1663. def ChangePartyParameter(self, distributionMode):
  1664. self.interface.ChangePartyParameter(distributionMode)
  1665.  
  1666. ## Messenger
  1667. def OnMessengerAddFriendQuestion(self, name):
  1668. messengerAddFriendQuestion = uiCommon.QuestionDialog2()
  1669. messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))
  1670. messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
  1671. messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
  1672. messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
  1673. messengerAddFriendQuestion.Open()
  1674. messengerAddFriendQuestion.name = name
  1675. self.messengerAddFriendQuestion = messengerAddFriendQuestion
  1676.  
  1677. def OnAcceptAddFriend(self):
  1678. name = self.messengerAddFriendQuestion.name
  1679. net.SendChatPacket("/messenger_auth y " + name)
  1680. self.OnCloseAddFriendQuestionDialog()
  1681. return TRUE
  1682.  
  1683. def OnDenyAddFriend(self):
  1684. name = self.messengerAddFriendQuestion.name
  1685. net.SendChatPacket("/messenger_auth n " + name)
  1686. self.OnCloseAddFriendQuestionDialog()
  1687. return TRUE
  1688.  
  1689. def OnCloseAddFriendQuestionDialog(self):
  1690. self.messengerAddFriendQuestion.Close()
  1691. self.messengerAddFriendQuestion = None
  1692. return TRUE
  1693.  
  1694. ## SafeBox
  1695. def OpenSafeboxWindow(self, size):
  1696. self.interface.OpenSafeboxWindow(size)
  1697.  
  1698. def RefreshSafebox(self):
  1699. self.interface.RefreshSafebox()
  1700.  
  1701. def RefreshSafeboxMoney(self):
  1702. self.interface.RefreshSafeboxMoney()
  1703.  
  1704. # ITEM_MALL
  1705. def OpenMallWindow(self, size):
  1706. self.interface.OpenMallWindow(size)
  1707.  
  1708. def RefreshMall(self):
  1709. self.interface.RefreshMall()
  1710. # END_OF_ITEM_MALL
  1711.  
  1712. ## Guild
  1713. def RecvGuildInviteQuestion(self, guildID, guildName):
  1714. guildInviteQuestionDialog = uiCommon.QuestionDialog()
  1715. guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
  1716. guildInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
  1717. guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
  1718. guildInviteQuestionDialog.Open()
  1719. guildInviteQuestionDialog.guildID = guildID
  1720. self.guildInviteQuestionDialog = guildInviteQuestionDialog
  1721.  
  1722. def AnswerGuildInvite(self, answer):
  1723.  
  1724. if not self.guildInviteQuestionDialog:
  1725. return
  1726.  
  1727. guildLeaderVID = self.guildInviteQuestionDialog.guildID
  1728. net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
  1729.  
  1730. self.guildInviteQuestionDialog.Close()
  1731. self.guildInviteQuestionDialog = None
  1732.  
  1733.  
  1734. def DeleteGuild(self):
  1735. self.interface.DeleteGuild()
  1736.  
  1737. ## Clock
  1738. def ShowClock(self, second):
  1739. self.interface.ShowClock(second)
  1740.  
  1741. def HideClock(self):
  1742. self.interface.HideClock()
  1743.  
  1744. ## Emotion
  1745. def BINARY_ActEmotion(self, emotionIndex):
  1746. if self.interface.wndCharacter:
  1747. self.interface.wndCharacter.ActEmotion(emotionIndex)
  1748.  
  1749. ###############################################################################################
  1750. ###############################################################################################
  1751. ## Keyboard Functions
  1752.  
  1753. def CheckFocus(self):
  1754. if FALSE == self.IsFocus():
  1755. if TRUE == self.interface.IsOpenChat():
  1756. self.interface.ToggleChat()
  1757.  
  1758. self.SetFocus()
  1759.  
  1760. def SaveScreen(self):
  1761. print "save screen"
  1762.  
  1763. # SCREENSHOT_CWDSAVE
  1764. if SCREENSHOT_CWDSAVE:
  1765. if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
  1766. os.mkdir(os.getcwd()+os.sep+"screenshot")
  1767.  
  1768. (succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
  1769. elif SCREENSHOT_DIR:
  1770. (succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
  1771. else:
  1772. (succeeded, name) = grp.SaveScreenShot()
  1773. # END_OF_SCREENSHOT_CWDSAVE
  1774.  
  1775. if succeeded:
  1776. pass
  1777. """
  1778. chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
  1779. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
  1780. """
  1781. else:
  1782. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
  1783.  
  1784. def ShowConsole(self):
  1785. pass
  1786.  
  1787. def ShowName(self):
  1788. self.ShowNameFlag = TRUE
  1789. self.playerGauge.EnableShowAlways()
  1790. player.SetQuickPage(self.quickSlotPageIndex+1)
  1791.  
  1792. # ADD_ALWAYS_SHOW_NAME
  1793. def __IsShowName(self):
  1794.  
  1795. if systemSetting.IsAlwaysShowName():
  1796. return TRUE
  1797.  
  1798. if self.ShowNameFlag:
  1799. return TRUE
  1800.  
  1801. return FALSE
  1802. # END_OF_ADD_ALWAYS_SHOW_NAME
  1803.  
  1804. def HideName(self):
  1805. self.ShowNameFlag = FALSE
  1806. self.playerGauge.DisableShowAlways()
  1807. player.SetQuickPage(self.quickSlotPageIndex)
  1808. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  1809. player.SetNewQuickPage(self.newquickSlotPageIndex)
  1810.  
  1811. def ShowMouseImage(self):
  1812. self.interface.ShowMouseImage()
  1813.  
  1814. def HideMouseImage(self):
  1815. self.interface.HideMouseImage()
  1816.  
  1817. def StartAttack(self):
  1818. MapName = str(background.GetCurrentMapName())
  1819. if MapName == "mapa_guerra" and constInfo.ataque_guerra == 1:
  1820. return
  1821. player.SetAttackKeyState(TRUE)
  1822.  
  1823. if app.ENABLE_REBORN_SYSTEM:
  1824. def SetReborn(self, app):
  1825. import chat
  1826. func_modul = str(app)
  1827. #chat.AppendChat(chat.CHAT_TYPE_INFO, "vegas print number [%s]" % str(app))
  1828. if func_modul == "arg1":
  1829. self.wndReborn.OpenArgument("reborn_1")
  1830. elif func_modul == "arg2":
  1831. self.wndReborn.OpenArgument("reborn_2")
  1832. elif func_modul == "arg3":
  1833. self.wndReborn.OpenArgument("reborn_3")
  1834. elif func_modul == "pro_1":
  1835. self.wndReborn.OpenArgument("pro_1")
  1836. elif func_modul == "pro_0":
  1837. self.wndReborn.OpenArgument("pro_0")
  1838.  
  1839. if app.ENABLE_MAINTENANCE_SYSTEM:
  1840. def BINARY_Update_Maintenance(self, iTime, iDuration, iReason):
  1841. sTime = int(iTime)
  1842. sDuration = int(iDuration)
  1843. sReason = str(iReason)
  1844.  
  1845. if sTime != 0 and sDuration != 0:
  1846. self.wndMaintenance.OpenMaintenance(int(iTime), int(iDuration), str(iReason))
  1847.  
  1848. if app.ENABLE_HIDE_COSTUME_SYSTEM:
  1849. def COSTUME_HIDE_CLEAR(self):
  1850. self.interface.costume_hide_clear()
  1851. def COSTUME_HIDE_LIST(self,slot,index):
  1852. self.interface.costume_hide_list(slot,index)
  1853. def COSTUME_HIDE_LOAD(self):
  1854. self.interface.costume_hide_load()
  1855.  
  1856. if app.ENABLE_COSTUME_AURA:
  1857. def ClearDirRefine(self):
  1858. constInfo.ITEM_REFINE_DIR = {}
  1859.  
  1860. def SetDirRefine(self, i, vnum):
  1861. constInfo.ITEM_REFINE_DIR[i] = vnum
  1862.  
  1863. def AuraRefineInformation(self, result1, result2, item_vn_1, item_co_1, item_vn_2, item_co_2, item_vn_3, item_co_3, item_vn_4, item_co_4, price):
  1864. constInfo.REFINE_ITEM_RESULT_1 = result1
  1865. constInfo.REFINE_ITEM_RESULT_2 = result2
  1866. constInfo.ITEM_VNUM_1 = item_vn_1
  1867. constInfo.ITEM_COUNT_1 = item_co_1
  1868. constInfo.ITEM_VNUM_2 = item_vn_2
  1869. constInfo.ITEM_COUNT_2 = item_co_2
  1870. constInfo.ITEM_VNUM_3 = item_vn_3
  1871. constInfo.ITEM_COUNT_3 = item_co_3
  1872. constInfo.ITEM_VNUM_4 = item_vn_4
  1873. constInfo.ITEM_COUNT_4 = item_co_4
  1874. constInfo.PRICE_R = price
  1875.  
  1876. def OpenBoardRefine(self):
  1877. if (self.RefineAura.IsShow()):
  1878. self.RefineAura.Hide()
  1879. else:
  1880. self.RefineAura.Show()
  1881.  
  1882. def EndAttack(self):
  1883. player.SetAttackKeyState(FALSE)
  1884.  
  1885. def MoveUp(self):
  1886. player.SetSingleDIKKeyState(app.DIK_UP, TRUE)
  1887.  
  1888. def MoveDown(self):
  1889. player.SetSingleDIKKeyState(app.DIK_DOWN, TRUE)
  1890.  
  1891. def MoveLeft(self):
  1892. player.SetSingleDIKKeyState(app.DIK_LEFT, TRUE)
  1893.  
  1894. def MoveRight(self):
  1895. player.SetSingleDIKKeyState(app.DIK_RIGHT, TRUE)
  1896.  
  1897. def StopUp(self):
  1898. player.SetSingleDIKKeyState(app.DIK_UP, FALSE)
  1899.  
  1900. def StopDown(self):
  1901. player.SetSingleDIKKeyState(app.DIK_DOWN, FALSE)
  1902.  
  1903. def StopLeft(self):
  1904. player.SetSingleDIKKeyState(app.DIK_LEFT, FALSE)
  1905.  
  1906. def StopRight(self):
  1907. player.SetSingleDIKKeyState(app.DIK_RIGHT, FALSE)
  1908.  
  1909. def PickUpItem(self):
  1910. player.PickCloseItem()
  1911.  
  1912. ###############################################################################################
  1913. ###############################################################################################
  1914. ## Event Handler
  1915.  
  1916. def OnKeyDown(self, key):
  1917. if self.interface.wndWeb and self.interface.wndWeb.IsShow():
  1918. return
  1919.  
  1920. if key == app.DIK_ESC:
  1921. self.RequestDropItem(False)
  1922. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1923.  
  1924. try:
  1925. self.onPressKeyDict[key]()
  1926. except KeyError:
  1927. pass
  1928. except:
  1929. raise
  1930.  
  1931. return TRUE
  1932.  
  1933. def OnKeyUp(self, key):
  1934. try:
  1935. self.onClickKeyDict[key]()
  1936. except KeyError:
  1937. pass
  1938. except:
  1939. raise
  1940.  
  1941. return TRUE
  1942.  
  1943. def OnMouseLeftButtonDown(self):
  1944. if self.interface.BUILD_OnMouseLeftButtonDown():
  1945. return
  1946.  
  1947. if mouseModule.mouseController.isAttached():
  1948. self.CheckFocus()
  1949. else:
  1950. hyperlink = ui.GetHyperlink()
  1951. if hyperlink:
  1952. return
  1953. else:
  1954. self.CheckFocus()
  1955. player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
  1956.  
  1957. return TRUE
  1958.  
  1959. def OnMouseLeftButtonUp(self):
  1960.  
  1961. if self.interface.BUILD_OnMouseLeftButtonUp():
  1962. return
  1963.  
  1964. if mouseModule.mouseController.isAttached():
  1965.  
  1966. attachedType = mouseModule.mouseController.GetAttachedType()
  1967. attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  1968. attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  1969. attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
  1970.  
  1971. if app.ENABLE_NEW_QUICK_SLOT_SYSTEM:
  1972. if player.SLOT_TYPE_NEW_QUICK_SLOT == attachedType:
  1973. player.RequestDeleteGlobalNewQuickSlot(attachedItemSlotPos)
  1974.  
  1975. ## QuickSlot
  1976. if player.SLOT_TYPE_QUICK_SLOT == attachedType:
  1977. player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
  1978.  
  1979. ## Inventory
  1980. #elif player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY:
  1981. elif player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedType or player.SLOT_TYPE_STONE_INVENTORY == attachedType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == attachedType:
  1982. if player.ITEM_MONEY == attachedItemIndex:
  1983. self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
  1984. else:
  1985. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1986.  
  1987. ## DragonSoul
  1988. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1989. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1990.  
  1991. mouseModule.mouseController.DeattachObject()
  1992.  
  1993. else:
  1994. hyperlink = ui.GetHyperlink()
  1995. if hyperlink:
  1996. if app.IsPressed(app.DIK_LALT):
  1997. link = chat.GetLinkFromHyperlink(hyperlink)
  1998. ime.PasteString(link)
  1999. else:
  2000. self.interface.MakeHyperlinkTooltip(hyperlink)
  2001. return
  2002. else:
  2003. player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
  2004.  
  2005. #player.EndMouseWalking()
  2006. return TRUE
  2007.  
  2008. def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
  2009. if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedType or player.SLOT_TYPE_STONE_INVENTORY == attachedType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == attachedType:
  2010. attachedInvenType = player.SlotTypeToInvenType(attachedType)
  2011. if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  2012. if player.IsEquipmentSlot(attachedItemSlotPos):
  2013. self.stream.popupWindow.Close()
  2014. self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  2015. else:
  2016. if chr.IsNPC(dstChrID):
  2017. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  2018. else:
  2019. if app.ENABLE_MELEY_LAIR_DUNGEON:
  2020. if chr.IsStone(dstChrID):
  2021. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  2022. else:
  2023. net.SendExchangeStartPacket(dstChrID)
  2024. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  2025. else:
  2026. net.SendExchangeStartPacket(dstChrID)
  2027. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  2028. else:
  2029. self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
  2030.  
  2031. def __PutMoney(self, attachedType, attachedMoney, dstChrID):
  2032. if TRUE == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
  2033. net.SendExchangeStartPacket(dstChrID)
  2034. net.SendExchangeElkAddPacket(attachedMoney)
  2035. else:
  2036. self.__DropMoney(attachedType, attachedMoney)
  2037.  
  2038. def __DropMoney(self, attachedType, attachedMoney):
  2039. # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
  2040. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2041. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2042. return
  2043.  
  2044. if app.WJ_OFFLINESHOP_SYSTEM:
  2045. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  2046. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2047. return
  2048.  
  2049. if (uiOfflineShop.IsEditingOfflineShop()):
  2050. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2051. return
  2052.  
  2053. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2054. if attachedMoney>=1000:
  2055. self.stream.popupWindow.Close()
  2056. self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
  2057. return
  2058.  
  2059. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  2060. itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
  2061. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  2062. itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg))
  2063. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  2064. itemDropQuestionDialog.Open()
  2065. itemDropQuestionDialog.dropType = attachedType
  2066. itemDropQuestionDialog.dropCount = attachedMoney
  2067. itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
  2068. self.itemDropQuestionDialog = itemDropQuestionDialog
  2069.  
  2070. def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
  2071. # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
  2072. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2073. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2074. return
  2075.  
  2076. if app.WJ_OFFLINESHOP_SYSTEM:
  2077. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  2078. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2079. return
  2080.  
  2081. if (uiOfflineShop.IsEditingOfflineShop()):
  2082. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2083. return
  2084.  
  2085. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2086. if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
  2087. self.stream.popupWindow.Close()
  2088. self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  2089.  
  2090. else:
  2091. if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedType or player.SLOT_TYPE_STONE_INVENTORY == attachedType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == attachedType:
  2092. dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
  2093.  
  2094. item.SelectItem(dropItemIndex)
  2095. dropItemName = item.GetItemName()
  2096.  
  2097. ## Question Text
  2098. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(((player.GetISellItemPrice(attachedItemSlotPos)*attachedItemCount))))
  2099.  
  2100. ## Dialog
  2101. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  2102. itemDropQuestionDialog.SetText(questionText)
  2103. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  2104. itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg))
  2105. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  2106. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  2107. itemDropQuestionDialog.Open()
  2108. itemDropQuestionDialog.dropType = attachedType
  2109. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  2110. itemDropQuestionDialog.dropCount = attachedItemCount
  2111. self.itemDropQuestionDialog = itemDropQuestionDialog
  2112.  
  2113. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  2114. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  2115. dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
  2116.  
  2117. item.SelectItem(dropItemIndex)
  2118. dropItemName = item.GetItemName()
  2119.  
  2120. ## Question Text
  2121. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString((player.GetISellItemPrice(attachedItemSlotPos)*attachedItemCount)))
  2122.  
  2123. ## Dialog
  2124. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  2125. itemDropQuestionDialog.SetText(questionText)
  2126. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  2127. itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg))
  2128. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  2129. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  2130. itemDropQuestionDialog.Open()
  2131. itemDropQuestionDialog.dropType = attachedType
  2132. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  2133. itemDropQuestionDialog.dropCount = attachedItemCount
  2134. self.itemDropQuestionDialog = itemDropQuestionDialog
  2135.  
  2136. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  2137.  
  2138.  
  2139. def RequestDropItem(self, answer):
  2140. if not self.itemDropQuestionDialog:
  2141. return
  2142.  
  2143. if answer:
  2144. dropType = self.itemDropQuestionDialog.dropType
  2145. dropCount = self.itemDropQuestionDialog.dropCount
  2146. dropNumber = self.itemDropQuestionDialog.dropNumber
  2147.  
  2148. if player.SLOT_TYPE_INVENTORY == dropType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == dropType:
  2149. if dropNumber == player.ITEM_MONEY:
  2150. net.SendGoldDropPacketNew(dropCount)
  2151. snd.PlaySound("sound/ui/money.wav")
  2152. else:
  2153. # PRIVATESHOP_DISABLE_ITEM_DROP
  2154. self.__SendDropItemPacket(dropNumber, dropCount)
  2155. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2156. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  2157. # PRIVATESHOP_DISABLE_ITEM_DROP
  2158. self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  2159. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  2160.  
  2161. self.itemDropQuestionDialog.Close()
  2162. self.itemDropQuestionDialog = None
  2163.  
  2164. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  2165.  
  2166. def RequestDestroyItem(self, answer):
  2167. if not self.itemDropQuestionDialog:
  2168. return
  2169. if answer:
  2170. dropType = self.itemDropQuestionDialog.dropType
  2171. dropNumber = self.itemDropQuestionDialog.dropNumber
  2172. if player.SLOT_TYPE_INVENTORY == dropType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == dropType:
  2173. if dropNumber == player.ITEM_MONEY:
  2174. return
  2175. else:
  2176. self.__SendDestroyItemPacket(dropNumber)
  2177.  
  2178. self.itemDropQuestionDialog.Close()
  2179. self.itemDropQuestionDialog = None
  2180. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  2181.  
  2182. def RequestSellItem(self, answer):
  2183. if not self.itemDropQuestionDialog:
  2184. return
  2185. if answer:
  2186. dropType = self.itemDropQuestionDialog.dropType
  2187. dropNumber = self.itemDropQuestionDialog.dropNumber
  2188. if player.SLOT_TYPE_INVENTORY == dropType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == dropType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == dropType or player.SLOT_TYPE_STONE_INVENTORY == dropType or player.SLOT_TYPE_GIFT_BOX_INVENTORY == dropType:
  2189. if dropNumber == player.ITEM_MONEY:
  2190. return
  2191. else:
  2192. self.__SendSellItemPacket(dropNumber)
  2193.  
  2194. self.itemDropQuestionDialog.Close()
  2195. self.itemDropQuestionDialog = None
  2196. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  2197.  
  2198. def __SendDestroyItemPacket(self, itemVNum, itemInvenType = player.INVENTORY):
  2199. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2200. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2201. return
  2202. net.SendItemDestroyPacket(itemVNum)
  2203.  
  2204. def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  2205. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2206. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2207. return
  2208. if app.WJ_OFFLINESHOP_SYSTEM:
  2209. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  2210. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2211. return
  2212.  
  2213. if (uiOfflineShop.IsEditingOfflineShop()):
  2214. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2215. return
  2216. net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
  2217.  
  2218. def __SendSellItemPacket(self, itemVNum, itemInvenTyoe = player.INVENTORY):
  2219. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  2220. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  2221. return
  2222. if app.WJ_OFFLINESHOP_SYSTEM:
  2223. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  2224. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2225. return
  2226.  
  2227. if (uiOfflineShop.IsEditingOfflineShop()):
  2228. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
  2229. return
  2230. net.SendChatPacket("/itemsat %d" % (int(itemVNum)))
  2231.  
  2232. def OnMouseRightButtonDown(self):
  2233.  
  2234. self.CheckFocus()
  2235.  
  2236. if TRUE == mouseModule.mouseController.isAttached():
  2237. mouseModule.mouseController.DeattachObject()
  2238.  
  2239. else:
  2240. player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
  2241.  
  2242. return TRUE
  2243.  
  2244. def OnMouseRightButtonUp(self):
  2245. if TRUE == mouseModule.mouseController.isAttached():
  2246. return TRUE
  2247.  
  2248. player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
  2249. return TRUE
  2250.  
  2251. def OnMouseMiddleButtonDown(self):
  2252. player.SetMouseMiddleButtonState(player.MBS_PRESS)
  2253.  
  2254. def OnMouseMiddleButtonUp(self):
  2255. player.SetMouseMiddleButtonState(player.MBS_CLICK)
  2256.  
  2257. def OnUpdate(self):
  2258. app.UpdateGame()
  2259.  
  2260. # Daily Gift
  2261. self.wnddailygift.OnUpdate()
  2262. #
  2263.  
  2264. # if app.ENABLE_TITLE_SYSTEM:
  2265. # self.wndTitleSystem.OnUpdate()
  2266.  
  2267. if self.mapNameShower.IsShow():
  2268. self.mapNameShower.Update()
  2269.  
  2270. if gameInfo.SYSTEMS_PAKET1==1:
  2271. self.npcac()
  2272. gameInfo.SYSTEMS_PAKET1=0
  2273.  
  2274. if gameInfo.SYSTEMS_PAKET2==1:
  2275. self.lonca_tanitim()
  2276. gameInfo.SYSTEMS_PAKET2=0
  2277.  
  2278. if gameInfo.SYSTEMS_PAKET3==1:
  2279. self.loncasiralamaopen()
  2280. gameInfo.SYSTEMS_PAKET3=0
  2281.  
  2282. if gameInfo.SYSTEMS_PAKET4==1:
  2283. self.siralamaopen()
  2284. gameInfo.SYSTEMS_PAKET4=0
  2285.  
  2286. if gameInfo.SYSTEMS_PAKET5==1:
  2287. self.recordac()
  2288. gameInfo.SYSTEMS_PAKET5=0
  2289.  
  2290. if gameInfo.SYSTEMS_PAKET6==1:
  2291. self.OpenMarbleShop()
  2292. gameInfo.SYSTEMS_PAKET6=0
  2293.  
  2294. if gameInfo.SYSTEMS_PAKET7==1:
  2295. self.OpenTitleSystem()
  2296. gameInfo.SYSTEMS_PAKET7=0
  2297.  
  2298. #if int(translate.panelisle) == 1:
  2299. # self.interface.__MakePrivateShopSearchWindow()
  2300. # translate.panelisle=0
  2301.  
  2302. if self.isShowDebugInfo:
  2303. self.UpdateDebugInfo()
  2304.  
  2305. if self.enableXMasBoom:
  2306. self.__XMasBoom_Update()
  2307.  
  2308. if 1 == constInfo.AUTO_PICK_UP:
  2309. self.PickUpItem()
  2310.  
  2311. self.interface.BUILD_OnUpdate()
  2312. """lastTime = max(0, self.endTime - time.clock())
  2313. if 0 == lastTime:
  2314. self.YoutuberKimdir()
  2315. curTime = time.clock()
  2316. self.endTime = curTime + 4"""
  2317.  
  2318. """def YoutuberKimdir(self):
  2319. if player.IsYoutuber():
  2320. if player.IsSecurityActivate():
  2321. return
  2322. #net.SendChatPacket("(youtuber)")"""
  2323.  
  2324. def UpdateDebugInfo(self):
  2325. #
  2326. # 캐릭터 좌표 및 FPS 출력
  2327. (x, y, z) = player.GetMainCharacterPosition()
  2328. nUpdateTime = app.GetUpdateTime()
  2329. nUpdateFPS = app.GetUpdateFPS()
  2330. nRenderFPS = app.GetRenderFPS()
  2331. nFaceCount = app.GetFaceCount()
  2332. fFaceSpeed = app.GetFaceSpeed()
  2333. nST=background.GetRenderShadowTime()
  2334. (fAveRT, nCurRT) = app.GetRenderTime()
  2335. (iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
  2336. (iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
  2337. if iPatch == 0:
  2338. iPatch = 1
  2339.  
  2340. #(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()
  2341.  
  2342. self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
  2343. xMouse, yMouse = wndMgr.GetMousePosition()
  2344. self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
  2345.  
  2346. self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
  2347.  
  2348. if fAveRT>1.0:
  2349. self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
  2350.  
  2351. self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
  2352. #self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
  2353. #self.TextureNum.SetText("TN : %s" % (sTextureNum))
  2354. #self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
  2355. self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
  2356.  
  2357. def OnRender(self):
  2358. app.RenderGame()
  2359.  
  2360. if self.console.Console.collision:
  2361. background.RenderCollision()
  2362. chr.RenderCollision()
  2363.  
  2364. (x, y) = app.GetCursorPosition()
  2365.  
  2366. ########################
  2367. # Picking
  2368. ########################
  2369. textTail.UpdateAllTextTail()
  2370.  
  2371. if TRUE == wndMgr.IsPickedWindow(self.hWnd):
  2372.  
  2373. self.PickingCharacterIndex = chr.Pick()
  2374.  
  2375. if -1 != self.PickingCharacterIndex:
  2376. textTail.ShowCharacterTextTail(self.PickingCharacterIndex)
  2377. if 0 != self.targetBoard.GetTargetVID():
  2378. textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
  2379.  
  2380. # ADD_ALWAYS_SHOW_NAME
  2381. if not self.__IsShowName():
  2382. self.PickingItemIndex = item.Pick()
  2383. if -1 != self.PickingItemIndex:
  2384. textTail.ShowItemTextTail(self.PickingItemIndex)
  2385. # END_OF_ADD_ALWAYS_SHOW_NAME
  2386.  
  2387. ## Show all name in the range
  2388.  
  2389. # ADD_ALWAYS_SHOW_NAME
  2390. if self.__IsShowName():
  2391. textTail.ShowAllTextTail()
  2392. self.PickingItemIndex = textTail.Pick(x, y)
  2393. # END_OF_ADD_ALWAYS_SHOW_NAME
  2394.  
  2395. if app.ENABLE_SHOPNAMES_RANGE:
  2396. if systemSetting.IsShowSalesText():
  2397. uiPrivateShopBuilder.UpdateADBoard()
  2398.  
  2399. textTail.UpdateShowingTextTail()
  2400. textTail.ArrangeTextTail()
  2401. if -1 != self.PickingItemIndex:
  2402. textTail.SelectItemName(self.PickingItemIndex)
  2403.  
  2404. grp.PopState()
  2405. grp.SetInterfaceRenderState()
  2406.  
  2407. textTail.Render()
  2408. textTail.HideAllTextTail()
  2409.  
  2410. def OnPressEscapeKey(self):
  2411.  
  2412.  
  2413. if app.TARGET == app.GetCursor():
  2414. app.SetCursor(app.NORMAL)
  2415.  
  2416. elif TRUE == mouseModule.mouseController.isAttached():
  2417. mouseModule.mouseController.DeattachObject()
  2418.  
  2419. else:
  2420. self.interface.OpenSystemDialog()
  2421.  
  2422. if self.recordscreen.IsShow():
  2423. self.recordscreen.Open()
  2424.  
  2425. return TRUE
  2426.  
  2427. def OnIMEReturn(self):
  2428. if app.IsPressed(app.DIK_LSHIFT):
  2429. self.interface.OpenWhisperDialogWithoutTarget()
  2430. else:
  2431. self.interface.ToggleChat()
  2432. return TRUE
  2433.  
  2434. def OnPressExitKey(self):
  2435. self.interface.ToggleSystemDialog()
  2436. return TRUE
  2437.  
  2438. ## BINARY CALLBACK
  2439. ######################################################################################
  2440.  
  2441. if app.WJ_ENABLE_TRADABLE_ICON:
  2442. def BINARY_AddItemToExchange(self, inven_type, inven_pos, display_pos):
  2443. if inven_type == player.INVENTORY:
  2444. self.interface.CantTradableItemExchange(display_pos, inven_pos)
  2445.  
  2446. # WEDDING
  2447. def BINARY_LoverInfo(self, name, lovePoint):
  2448. if self.interface.wndMessenger:
  2449. self.interface.wndMessenger.OnAddLover(name, lovePoint)
  2450. if self.affectShower:
  2451. self.affectShower.SetLoverInfo(name, lovePoint)
  2452.  
  2453. def BINARY_UpdateLovePoint(self, lovePoint):
  2454. if self.interface.wndMessenger:
  2455. self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
  2456. if self.affectShower:
  2457. self.affectShower.OnUpdateLovePoint(lovePoint)
  2458. # END_OF_WEDDING
  2459.  
  2460. # QUEST_CONFIRM
  2461. # QUEST_CONFIRM
  2462. def BINARY_OnQuestConfirm(self, msg, timeout, pid):
  2463. confirmDialog = uiCommon.QuestionDialogWithTimeLimit2()
  2464. confirmDialog.Open(msg, timeout)
  2465. confirmDialog.SetAcceptEvent(lambda answer=TRUE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  2466. confirmDialog.SetCancelEvent(lambda answer=FALSE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  2467. self.confirmDialog = confirmDialog
  2468. # END_OF_QUEST_CONFIRM
  2469.  
  2470. # GIFT command
  2471. def Gift_Show(self):
  2472. self.interface.ShowGift()
  2473.  
  2474. # CUBE
  2475. def BINARY_Cube_Open(self, npcVNUM):
  2476. self.currentCubeNPC = npcVNUM
  2477.  
  2478. self.interface.OpenCubeWindow()
  2479.  
  2480.  
  2481. if npcVNUM not in self.cubeInformation:
  2482. net.SendChatPacket("/cube r_info")
  2483. else:
  2484. cubeInfoList = self.cubeInformation[npcVNUM]
  2485.  
  2486. i = 0
  2487. for cubeInfo in cubeInfoList:
  2488. self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
  2489.  
  2490. j = 0
  2491. for materialList in cubeInfo["materialList"]:
  2492. for materialInfo in materialList:
  2493. itemVnum, itemCount = materialInfo
  2494. self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
  2495. j = j + 1
  2496.  
  2497. i = i + 1
  2498.  
  2499. self.interface.wndCube.Refresh()
  2500.  
  2501. def BINARY_Cube_Close(self):
  2502. self.interface.CloseCubeWindow()
  2503.  
  2504. # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
  2505. def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
  2506. self.interface.UpdateCubeInfo(gold, itemVnum, count)
  2507.  
  2508. def BINARY_Cube_Succeed(self, itemVnum, count):
  2509. print "큐브 제작 성공"
  2510. self.interface.SucceedCubeWork(itemVnum, count)
  2511. pass
  2512.  
  2513. def BINARY_Cube_Failed(self):
  2514. print "큐브 제작 실패"
  2515. self.interface.FailedCubeWork()
  2516. pass
  2517.  
  2518. def BINARY_Cube_ResultList(self, npcVNUM, listText):
  2519. # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 이런식으로 "/" 문자로 구분된 리스트를 줌
  2520. #print listText
  2521.  
  2522. if npcVNUM == 0:
  2523. npcVNUM = self.currentCubeNPC
  2524.  
  2525. self.cubeInformation[npcVNUM] = []
  2526.  
  2527. try:
  2528. for eachInfoText in listText.split("/"):
  2529. eachInfo = eachInfoText.split(",")
  2530. itemVnum = int(eachInfo[0])
  2531. itemCount = int(eachInfo[1])
  2532.  
  2533. self.cubeInformation[npcVNUM].append({"vnum": itemVnum, "count": itemCount})
  2534. self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
  2535.  
  2536. resultCount = len(self.cubeInformation[npcVNUM])
  2537. requestCount = 7
  2538. modCount = resultCount % requestCount
  2539. splitCount = resultCount / requestCount
  2540. for i in xrange(splitCount):
  2541. #print("/cube r_info %d %d" % (i * requestCount, requestCount))
  2542. net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
  2543.  
  2544. if 0 < modCount:
  2545. #print("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  2546. net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  2547.  
  2548. except RuntimeError, msg:
  2549. dbg.TraceError(msg)
  2550. return 0
  2551.  
  2552. pass
  2553.  
  2554. if app.WJ_ITEM_COMBINATION_SYSTEM:
  2555. ## Costume
  2556. def BINARY_Item_Combination_Open(self, npcVNUM):
  2557. self.interface.OpenItemCombinationWindow()
  2558.  
  2559. def BINARY_Item_Combination_Succeed(self):
  2560. print "Item Combination has succesfully!"
  2561. self.interface.SucceedItemCombinationWork()
  2562. pass
  2563.  
  2564. ## SkillBook
  2565. def BINARY_Skill_Book_Combination_Open(self, npcVNUM):
  2566. self.interface.OpenSkillBookCombinationWindow()
  2567.  
  2568. def BINARY_Skill_Book_Combination_Succeed(self):
  2569. print "Item Combination has succesfully!"
  2570. self.interface.SucceedSkillBookCombinationWork()
  2571. pass
  2572.  
  2573. ## Close
  2574. def BINARY_Combination_Close(self):
  2575. self.interface.CloseCombinationWindow()
  2576.  
  2577. def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
  2578. # Material Text Format : 125,1|126,2|127,2|123,5&555,5&555,4/120000
  2579. try:
  2580. #print listText
  2581.  
  2582. if 3 > len(listText):
  2583. dbg.TraceError("Wrong Cube Material Infomation")
  2584. return 0
  2585.  
  2586.  
  2587.  
  2588. eachResultList = listText.split("@")
  2589.  
  2590. cubeInfo = self.cubeInformation[self.currentCubeNPC]
  2591.  
  2592. itemIndex = 0
  2593. for eachResultText in eachResultList:
  2594. cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
  2595. materialList = cubeInfo[startIndex + itemIndex]["materialList"]
  2596.  
  2597. gold = 0
  2598. splitResult = eachResultText.split("/")
  2599. if 1 < len(splitResult):
  2600. gold = int(splitResult[1])
  2601.  
  2602. #print "splitResult : ", splitResult
  2603. eachMaterialList = splitResult[0].split("&")
  2604.  
  2605. i = 0
  2606. for eachMaterialText in eachMaterialList:
  2607. complicatedList = eachMaterialText.split("|")
  2608.  
  2609. if 0 < len(complicatedList):
  2610. for complicatedText in complicatedList:
  2611. (itemVnum, itemCount) = complicatedText.split(",")
  2612. itemVnum = int(itemVnum)
  2613. itemCount = int(itemCount)
  2614. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2615.  
  2616. materialList[i].append((itemVnum, itemCount))
  2617.  
  2618. else:
  2619. itemVnum, itemCount = eachMaterialText.split(",")
  2620. itemVnum = int(itemVnum)
  2621. itemCount = int(itemCount)
  2622. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2623.  
  2624. materialList[i].append((itemVnum, itemCount))
  2625.  
  2626. i = i + 1
  2627.  
  2628.  
  2629.  
  2630. itemIndex = itemIndex + 1
  2631.  
  2632. self.interface.wndCube.Refresh()
  2633.  
  2634.  
  2635. except RuntimeError, msg:
  2636. dbg.TraceError(msg)
  2637. return 0
  2638.  
  2639. pass
  2640.  
  2641. # END_OF_CUBE
  2642. def BINARY_Cards_UpdateInfo(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, hand_4, hand_4_v, hand_5, hand_5_v, cards_left, points):
  2643. self.interface.UpdateCardsInfo(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, hand_4, hand_4_v, hand_5, hand_5_v, cards_left, points)
  2644.  
  2645. def BINARY_Cards_FieldUpdateInfo(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
  2646. self.interface.UpdateCardsFieldInfo(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
  2647.  
  2648. def BINARY_Cards_PutReward(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
  2649. self.interface.CardsPutReward(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
  2650.  
  2651. # def BINARY_Cards_ShowIcon(self, icon):
  2652. # self.interface.CardsShowIcon(icon)
  2653.  
  2654. def BINARY_Cards_Open(self, safemode):
  2655. self.interface.OpenCardsWindow(safemode)
  2656.  
  2657. # 용혼석
  2658. def BINARY_Highlight_Item(self, inven_type, inven_pos):
  2659. if self.interface:
  2660. self.interface.Highligt_Item(inven_type, inven_pos)
  2661.  
  2662. def BINARY_DragonSoulGiveQuilification(self):
  2663. self.interface.DragonSoulGiveQuilification()
  2664.  
  2665. def BINARY_DragonSoulRefineWindow_Open(self):
  2666. self.interface.OpenDragonSoulRefineWindow()
  2667.  
  2668. def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
  2669. self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
  2670.  
  2671. def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
  2672. self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
  2673.  
  2674. # END of DRAGON SOUL REFINE WINDOW
  2675.  
  2676.  
  2677. def BINARY_SetBigMessage(self, message):
  2678. self.interface.bigBoard.SetTip(message)
  2679.  
  2680. def BINARY_SetTipMessage(self, message):
  2681. self.interface.tipBoard.SetTip(message)
  2682.  
  2683. def BINARY_AppendNotifyMessage(self, type):
  2684. if not type in localeInfo.NOTIFY_MESSAGE:
  2685. return
  2686. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NOTIFY_MESSAGE[type])
  2687.  
  2688. def BINARY_Guild_EnterGuildArea(self, areaID):
  2689. self.interface.BULID_EnterGuildArea(areaID)
  2690.  
  2691. def BINARY_Guild_ExitGuildArea(self, areaID):
  2692. self.interface.BULID_ExitGuildArea(areaID)
  2693.  
  2694. def BINARY_GuildWar_OnSendDeclare(self, guildID):
  2695. pass
  2696.  
  2697. def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
  2698. mainCharacterName = player.GetMainCharacterName()
  2699. masterName = guild.GetGuildMasterName()
  2700. if mainCharacterName == masterName:
  2701. self.__GuildWar_OpenAskDialog(guildID, warType)
  2702.  
  2703. def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
  2704. self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
  2705.  
  2706. def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
  2707. self.interface.OnStartGuildWar(guildSelf, guildOpp)
  2708.  
  2709. def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
  2710. self.interface.OnEndGuildWar(guildSelf, guildOpp)
  2711.  
  2712. def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
  2713. self.interface.BINARY_SetObserverMode(isEnable)
  2714.  
  2715. def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
  2716. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2717.  
  2718. def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
  2719. guildID1 = int(guildID1)
  2720. guildID2 = int(guildID2)
  2721. memberCount1 = int(memberCount1)
  2722. memberCount2 = int(memberCount2)
  2723. observerCount = int(observerCount)
  2724.  
  2725. self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
  2726. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2727.  
  2728. def __GuildWar_ProcessKillInput(self, killerName, killerRace, victimName, victimRace):
  2729. self.guildScoreCounter.OnMessage(killerName, killerRace, victimName, victimRace)
  2730.  
  2731. def __GuildWar_OpenAskDialog(self, guildID, warType):
  2732.  
  2733. guildName = guild.GetGuildName(guildID)
  2734.  
  2735. # REMOVED_GUILD_BUG_FIX
  2736. if "Noname" == guildName:
  2737. return
  2738. # END_OF_REMOVED_GUILD_BUG_FIX
  2739.  
  2740. import uiGuild
  2741. questionDialog = uiGuild.AcceptGuildWarDialog()
  2742. questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
  2743. questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
  2744. questionDialog.Open(guildName, warType)
  2745.  
  2746. self.guildWarQuestionDialog = questionDialog
  2747.  
  2748. def __GuildWar_CloseAskDialog(self):
  2749. self.guildWarQuestionDialog.Close()
  2750. self.guildWarQuestionDialog = None
  2751.  
  2752. def __GuildWar_OnAccept(self):
  2753.  
  2754. guildName = self.guildWarQuestionDialog.GetGuildName()
  2755.  
  2756. net.SendChatPacket("/war " + guildName)
  2757. self.__GuildWar_CloseAskDialog()
  2758.  
  2759. return 1
  2760.  
  2761. def __GuildWar_OnDecline(self):
  2762.  
  2763. guildName = self.guildWarQuestionDialog.GetGuildName()
  2764.  
  2765. net.SendChatPacket("/nowar " + guildName)
  2766. self.__GuildWar_CloseAskDialog()
  2767.  
  2768. return 1
  2769.  
  2770. ## BINARY CALLBACK
  2771. ######################################################################################
  2772.  
  2773. def __ServerCommand_Build(self):
  2774. serverCommandList={
  2775. "karakter_kilit" : self.karakter_kilit,
  2776. "getinputbegin" : self.__Inputget1,
  2777. "getinputend" : self.__Inputget2,
  2778. "getinput" : self.__Inputget3,
  2779. "depozit_index" :self.__depozit_questindex,
  2780. "antiexp_index" :self.__antiexp_questindex,
  2781. "Telep" :self.__MakeTelep,
  2782. "dopes_index" :self.__bonus_questindex,
  2783. "evento_ultimo_superviviente" : self.__evento_ultimo_superviviente,
  2784. "ConsoleEnable" : self.__Console_Enable,
  2785. "gorup_match_search" : self.open_group,
  2786. "DayMode" : self.__DayMode_Update,
  2787. "PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
  2788. "CloseRestartWindow" : self.__RestartDialog_Close,
  2789. "OpenPrivateShop" : self.__PrivateShop_Open,
  2790. "OpenOfflineShop" : self.__OfflineShop_Open,
  2791. "PartyHealReady" : self.PartyHealReady,
  2792. "ShowMeSafeboxPassword" : self.AskSafeboxPassword,
  2793. "CloseSafebox" : self.CommandCloseSafebox,
  2794. "Teleport" : self.Teleport,
  2795. "YansitmaBaslat" : self.interface.OpenYansitma,
  2796.  
  2797. # Fix input quest Start
  2798. "GetInputStringStart" : self.GetInputStringStart,
  2799. "GetInputStringEnd" : self.GetInputStringEnd,
  2800. # Fix input quest End
  2801. #Guildstorage
  2802. "GUILDSTORAGE" : self._GuildStorageCMD,
  2803. "GUILDSTORAGE_ADDITEM" : self._GuildStorageAddItem,
  2804. "GUILDSTORAGE_ADDITEMSLOT" : self._GuildStorageAddItemSlot,
  2805. "GUILDSTORAGE_ADDMEMBER" : self._GuildStorageAddMemberToList,
  2806. "GUILDSTORAGE_ADDTEMPSLOT" : self._GuildStorageTempSlotsAdd,
  2807. "GUILDSTORAGE_ADDLOG" : self._GuildStorageAddLog,
  2808. ##
  2809.  
  2810. "OtomatikAvWindow" : self.__otomatikavstart,
  2811. "sorgu" : self.Uzaktan_ticaret_soru,
  2812. "recordquest" : self.__recordscreen,
  2813. "recordwarning" : self.recordwarning,
  2814. "oyunicisiralama" : self.__oyunicisirala,
  2815. "uyarisiralama" : self.uyarisiralama,
  2816. "loncasiralama" : self.__oyunicilonca,
  2817. "uyariloncasira" : self.uyariloncasira,
  2818. "lonca_tanit" : self.lonca_tanitim,
  2819. "loncatanitim" : self.__loncatanitim,
  2820. "lonca_tanitimi" : self.loncatanitekran,
  2821. "uyari" : self.uyari,
  2822. "lonca_lider_q" : self.lonca_lider_q,
  2823. "lider_ekle" : self.lider_ekle,
  2824. "lider_sifirla" : self.lider_sifirla,
  2825.  
  2826. """#ticaret_gecmisi
  2827. "tic_id" : self.__tic_quest_id,
  2828. "tic_ekle" : self.__tic_gecmis_bilgi_gir,
  2829. "tic_ac" : self.__tic_gecmis_ac,
  2830. "tic_gotur" : self.Close_tic,
  2831.  
  2832. "pazar_log_q" : self.__pazar_log_q,
  2833. "itemi_alan" : self.__itemi_alan,
  2834. "item_isim" : self.__item_isim,
  2835. "item_fiyat" : self.__item_fiyat,
  2836. "pazar_log_q_id" : self.__pazar_log_q_id,
  2837. "pazar_ekle" : self.__pazar_log_bilgi_gir,
  2838. "pazar_ac" : self.__pazar_log_ac,
  2839. "pazar_gotur" : self.Close_p_log,"""
  2840.  
  2841. # PET_SYSTEM
  2842. "PetIsMine" : self.__PetIsMineByVid,
  2843. "ActivarGui" : self.__ActivarGui,
  2844. "SetPetClearItemSlotButtonIndex" : self.__PetSetClearItemSlotButtonIndex,
  2845. "SetPetIncreaseBoniButtonIndex" : self.__PetSetIncreaseBoniButtonIndex,
  2846. "SetPetSendAwayButtonIndex" : self.__PetSetSendAwayButtonIndex,
  2847. "ShowPet" : self.__PetShow,
  2848. "HidePet" : self.__PetHide,
  2849. "GetPetClearSlot" : self.__PetGetClearSlot,
  2850. "GetPetIncreaseBoni" : self.__PetGetIncreaseBoni,
  2851. "SetPet" : self.__PetSet,
  2852. "SetPetHead" : self.__PetSetHead,
  2853. "SetPetNeck" : self.__PetSetNeck,
  2854. "SetPetFoot" : self.__PetSetFoot,
  2855. "SetPetAttackValue" : self.__PetSetAttackValue,
  2856. "SetPetMagicAttackValue" : self.__PetSetMagicAttackValue,
  2857. "SetPetArmorValue" : self.__PetSetArmorValue,
  2858. "SetPetName" : self.__PetSetName,
  2859. "SetPetLevel" : self.__PetSetLevel,
  2860. "SetPetExp" : self.__PetSetExp,
  2861. "SetPetMaxExp" : self.__PetSetMaxExp,
  2862. "SetPetSkillPoints" : self.__PetSetSkillPoints,
  2863. # END_OF_PET_SYSTEM
  2864. # ITEM_MALL
  2865. "CloseMall" : self.CommandCloseMall,
  2866. "ShowMeMallPassword" : self.AskMallPassword,
  2867. "item_mall" : self.__ItemMall_Open,
  2868. # END_OF_ITEM_MALL
  2869.  
  2870. "RefineSuceeded" : self.RefineSuceededMessage,
  2871. "RefineFailed" : self.RefineFailedMessage,
  2872. "xmas_snow" : self.__XMasSnow_Enable,
  2873. "xmas_boom" : self.__XMasBoom_Enable,
  2874. "xmas_song" : self.__XMasSong_Enable,
  2875. "xmas_tree" : self.__XMasTree_Enable,
  2876. "newyear_boom" : self.__XMasBoom_Enable,
  2877. "PartyRequest" : self.__PartyRequestQuestion,
  2878. "PartyRequestDenied" : self.__PartyRequestDenied,
  2879. "horse_state" : self.__Horse_UpdateState,
  2880. "hide_horse_state" : self.__Horse_HideState,
  2881. "WarUC" : self.__GuildWar_UpdateMemberCount,
  2882. "test_server" : self.__EnableTestServerFlag,
  2883. "mall" : self.__InGameShop_Show,
  2884. #PET_SYSTEM
  2885. "PetEvolution" : self.SetPetEvolution,
  2886. "PetName" : self.SetPetName,
  2887. "PetLevel" : self.SetPetLevel,
  2888. "PetDuration" : self.SetPetDuration,
  2889. "PetAgeDuration" : self.SetPetAgeDuration,
  2890. "PetBonus" : self.SetPetBonus,
  2891. "PetSkill" : self.SetPetskill,
  2892. "PetIcon" : self.SetPetIcon,
  2893. "PetExp" : self.SetPetExp,
  2894. "PetUnsummon" : self.PetUnsummon,
  2895. "OpenPetIncubator" : self.OpenPetIncubator,
  2896. #PET_SYSTEM
  2897. # ITEM_SHOP
  2898. "SetISLoadButtonIndex" : self.__ISSetLoadButtonIndex,
  2899. "SetISBuyButtonIndex" : self.__ISSetBuyButtonIndex,
  2900. "GetISBuyID" : self.__ISGetBuyID,
  2901. "GetISBuyID2" : self.__ISGetBuyID2,
  2902. "AddISCategory" : self.__ISAddCategory,
  2903. "SelectISCategory" : self.__ISSelectCategory,
  2904. "ClearISItems" : self.__ISClearItems,
  2905. "AddISItem" : self.__ISAddItem,
  2906. "AddISItemDesc" : self.__ISAddItemDesc,
  2907. "SetISLoadSuccess" : self.__ISSetLoadSuccess,
  2908. "SetISLoadFail" : self.__ISSetLoadFail,
  2909. "SetISBuySuccess" : self.__ISSetBuySuccess,
  2910. "SetISBuyFail" : self.__ISSetBuyFail,
  2911. "SetISCoins" : self.__ISSetCoins,
  2912. "SetISMarks" : self.__ISSetMarks,
  2913. "Showmedallas_gui" : self.__showmedallas_gui,
  2914. "Hidemedallas_gui" : self.__hidemedallas_gui,
  2915. "muertes" : self.__muertes,
  2916. "primera_muerte" : self.__primera_muerte,
  2917. "doble_muerte" : self.__doble_muerte,
  2918. "triple_muerte" : self.__triple_muerte,
  2919. "exterminio" : self.__exterminio,
  2920. "muertacular" : self.__muertacular,
  2921. "bestialidad" : self.__bestialidad,
  2922. "salvajada" : self.__salvajada,
  2923. "catastrofe" : self.__catastrofe,
  2924. "apocalipsis" : self.__apocalipsis,
  2925. "lluvia_muertos" : self.__lluvia_muertos,
  2926. "super_increible" : self.__super_increible,
  2927. "input0" : self.__Input0,
  2928. "input1" : self.__Input1,
  2929.  
  2930. # END_OF_ITEM_SHOP
  2931. # WEDDING
  2932. "lover_login" : self.__LoginLover,
  2933. "lover_logout" : self.__LogoutLover,
  2934. "lover_near" : self.__LoverNear,
  2935. "lover_far" : self.__LoverFar,
  2936. "lover_divorce" : self.__LoverDivorce,
  2937. "PlayMusic" : self.__PlayMusic,
  2938. #transfer costume
  2939. "transferopen" : self.showtransfer,
  2940. "get_input_value" : self.GetInputValue,
  2941. "get_input_start" : self.GetInputOn,
  2942. "get_input_end" : self.GetInputOff,
  2943. "super_quest" : self.Tabulejtor,
  2944. "pvp_zdruwko" : self.Mozart,
  2945. #end transfer
  2946. # END_OF_WEDDING
  2947.  
  2948. "SupportLv" : self.SetSupportLevel,
  2949. "SupportName" : self.SetSupportName,
  2950. "SupportLeave" : self.SupportLeave,
  2951. "SupporInt" : self.SupportInt,
  2952. "SupportExp" : self.SetSupportExp,
  2953. "SupportIcon" : self.SetSupportIcon,
  2954. "SupportSpeciality" : self.SetSupportSpeciality,
  2955.  
  2956. ########Anti Exp Button by Sanii##########
  2957. "anti_exp" : self.AntiExp,
  2958. "anti_exp_state" : self.AntiExpState,
  2959. "mostrar_usuarios" : self.__mostrar_usuarios,
  2960. "ocultar_usuarios" : self.__ocultar_usuarios,
  2961. "muerto_guerras" : self.__muerto_guerras,
  2962. "alubias" : self.__alubias,
  2963. "proteccion_guerra" : self.__proteccion_guerra,
  2964. "contador_usuarios_guerra" : self.__contador_usuarios_guerra,
  2965. "muertos_guerra" : self.__muertos_guerra,
  2966. "caido_guerra" : self.__caido_guerra,
  2967. "ataque_guerra" : self.__ataque_guerra,
  2968. "ataque_guerra1" : self.__ataque_guerra1,
  2969. "activar_libre" : self.__activar_libre,
  2970. "cerrar_grupo" : self.__grupobug,
  2971. "spirit2" : self.__spirit2,
  2972.  
  2973. # PRIVATE_SHOP_PRICE_LIST
  2974. "MyShopPriceList" : self.__PrivateShop_PriceList,
  2975. "AppendLoncaGecmisi" : self.__Append_Lonca_Gecmisi,
  2976. "WarPlayerCheckReq" : self.__Do_Check_War_Player,
  2977. "loncaistatistik" : self.loncaistatistik,
  2978.  
  2979. "gecmis_q" : self.lonca_gecmis_q,
  2980. "lonca_gecmis_ekle" : self.lonca_gecmis_ekle,
  2981. "gecmistemizle" : self.gecmistemizle,
  2982. "isim_ver" : self.isim_ver,
  2983.  
  2984. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2985.  
  2986. # END_OF_BONI_SWITCHER
  2987. #offshoppannel
  2988. "MountSystem" : self.__MountSystem,
  2989. "SCHICKSAL_RAD" : self.__SchicksalRad,
  2990. # 5Lv Oto Bec Sistemi
  2991. "item_kilit_q" : self.item_kilit_q,
  2992. "kilit" : self._kilit,
  2993. # Savasci Beceri
  2994. "OpenBec1Gui" : self.__BecSystem1,
  2995. "zihinsel_oto_bec" : self.zihinsel_oto_bec,
  2996. "bedensel_oto_bec" : self.bedensel_oto_bec,
  2997.  
  2998. # Sura Beceri
  2999. "OpenBec3Gui" : self.__BecSystem2,
  3000. "karabuyu_oto_bec" : self.karabuyu_oto_bec,
  3001. "buyulusilah_oto_bec" : self.buyulusilah_oto_bec,
  3002.  
  3003. # Ninja Becerileri
  3004. "OpenBec2Gui" : self.__BecSystem3,
  3005. "yakin_oto_bec" : self.yakin_oto_bec,
  3006. "uzak_oto_bec" : self.uzak_oto_bec,
  3007.  
  3008. # Saman Becerileri
  3009. "OpenBec4Gui" : self.__BecSystem4,
  3010. "ejderha_oto_bec" : self.ejderha_oto_bec,
  3011. "iyilestirme_oto_bec" : self.iyilestirme_oto_bec,
  3012.  
  3013. # Lycan Becerileri
  3014. "OpenBec5Gui" : self.__BecSystem5,
  3015. "lycany_oto_bec" : self.lycany_oto_bec,
  3016. #"lycanu_oto_bec" : self.lycanu_oto_bec,
  3017. #Bk Takas
  3018. "bk_trade_sys" : self.__BKTradeSys,
  3019. """YoutuberKimdir" : self.YoutuberKimdir,"""
  3020.  
  3021. "dragonlair_ranking_open" : self.OpenDragonLairRanking,
  3022. "dragonlair_rank" : self.AddDragonLairRanking,
  3023.  
  3024. "OpenGuiGaya" : self.OpenGuiGaya,
  3025. "GayaCheck" : self.GayaCheck,
  3026.  
  3027. "OpenGuiGayaMarket" :self.OpenGuiGayaMarket,
  3028. "GayaMarketSlotsDesblock" : self.GayaMarketSlotsDesblock,
  3029. "GayaMarketItems" : self.GayaMarketItems,
  3030. "GayaMarketClear" : self.GayaMarketClear,
  3031. "GayaMarketTime" : self.GayaTimeMarket,
  3032.  
  3033. "ruhtasiekranac" : self.ruhcac,
  3034. "bkekranac" : self.bkac,
  3035.  
  3036. "biyologodul" : self.biyoodulac,
  3037. "biyologekrankapa" : self.biyologekrankapa,
  3038. "biyolog" : self.biyolog,
  3039.  
  3040. "SetReborn" : self.SetReborn,
  3041.  
  3042. "GW_Kill_Update" : self.__GuildWar_ProcessKillInput,
  3043. "AkiraEventSys" : self.__AkiraEventDataAppend,
  3044. "COSTUME_HIDE_CLEAR" : self.COSTUME_HIDE_CLEAR,
  3045. # Daily Gift
  3046. "ManagerGiftSystem" : self.ManagerGiftSystem,
  3047. #
  3048. "COSTUME_HIDE_LIST" : self.COSTUME_HIDE_LIST,
  3049. "COSTUME_HIDE_LOAD" : self.COSTUME_HIDE_LOAD,
  3050. }
  3051.  
  3052. if app.WJ_SECURITY_SYSTEM:
  3053. serverCommandList.update({"OpenSecurityCreate" : self.OpenSecurityCreate })
  3054. serverCommandList.update({"OpenSecurityDialog" : self.OpenSecurityDialog })
  3055. serverCommandList.update({"CloseSecurityCreate" : self.CloseSecurityCreate })
  3056. serverCommandList.update({"CloseSecurityDialog" : self.CloseSecurityDialog })
  3057.  
  3058. if app.ENABLE_MAINTENANCE_SYSTEM:
  3059. serverCommandList.update({"BINARY_Update_Maintenance" : self.BINARY_Update_Maintenance })
  3060.  
  3061. # if app.ENABLE_HIDE_COSTUME_SYSTEM:
  3062. # serverCommandList["COSTUME_HIDE_CLEAR"] = self.COSTUME_HIDE_CLEAR
  3063. # serverCommandList["COSTUME_HIDE_LIST"] = self.COSTUME_HIDE_LIST
  3064. # serverCommandList["COSTUME_HIDE_LOAD"] = self.COSTUME_HIDE_LOAD
  3065. if app.ENABLE_COSTUME_AURA:
  3066. serverCommandList["ClearDirRefine"] = self.ClearDirRefine
  3067. serverCommandList["SetDirRefine"] = self.SetDirRefine
  3068. serverCommandList["AuraRefineInformation"] = self.AuraRefineInformation
  3069. serverCommandList["OpenBoardRefine"] = self.OpenBoardRefine
  3070.  
  3071. self.serverCommander=stringCommander.Analyzer()
  3072. for serverCommandItem in serverCommandList.items():
  3073. self.serverCommander.SAFE_RegisterCallBack(
  3074. serverCommandItem[0], serverCommandItem[1]
  3075. )
  3076.  
  3077. if app.ENABLE_NEW_ENCHANT_ATTR:
  3078. self.serverCommander.SAFE_RegisterCallBack("EnchantAttr_open", self.__OpenEnchantAttr)
  3079.  
  3080. if app.ENABLE_MELEY_LAIR_DUNGEON:
  3081. self.serverCommander.SAFE_RegisterCallBack("meley_open", self.OpenMeleyRanking)
  3082. self.serverCommander.SAFE_RegisterCallBack("meley_rank", self.AddRankMeleyRanking)
  3083.  
  3084. def __MakeTelep(self, qid):
  3085. constInfo.Telepqin= int(qid)
  3086.  
  3087. if app.ENABLE_NEW_ENCHANT_ATTR:
  3088. def __OpenEnchantAttr(self, cell):
  3089. if self.interface:
  3090. new_cell = int(cell.split("#")[1])
  3091. attrType0 = int(cell.split("#")[2])
  3092. attrValue0 = int(cell.split("#")[3])
  3093. attrType1 = int(cell.split("#")[4])
  3094. attrValue1 = int(cell.split("#")[5])
  3095. attrType2 = int(cell.split("#")[6])
  3096. attrValue2 = int(cell.split("#")[7])
  3097. attrType3 = int(cell.split("#")[8])
  3098. attrValue3 = int(cell.split("#")[9])
  3099. attrType4 = int(cell.split("#")[10])
  3100. attrValue4 = int(cell.split("#")[11])
  3101. new_attrSlot = [
  3102. [attrType0, attrValue0],
  3103. [attrType1, attrValue1],
  3104. [attrType2, attrValue2],
  3105. [attrType3, attrValue3],
  3106. [attrType4, attrValue4],
  3107. ]
  3108.  
  3109. self.interface.OpenEnchantAttrWindow(new_cell, new_attrSlot)
  3110.  
  3111. def BINARY_ServerCommand_Run(self, line):
  3112. #dbg.TraceError(line)
  3113. try:
  3114. #print " BINARY_ServerCommand_Run", line
  3115. return self.serverCommander.Run(line)
  3116. except RuntimeError, msg:
  3117. dbg.TraceError(msg)
  3118. return 0
  3119.  
  3120. def loncaistatistik(self,isim,level,durum,oldurme,olum,member):
  3121. self.loncaistatistiktemizle(member)
  3122.  
  3123.  
  3124. if int(member) == 1:
  3125. constInfo.isim1 = "1 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3126. constInfo.oldurme1 = str(oldurme)
  3127. constInfo.olum1 = str(olum)
  3128. if int(durum) == 0:
  3129. constInfo.durum1 = "|cff00ff00|H|hYasiyor"
  3130. if int(durum) == 1:
  3131. constInfo.durum1 = "|cffff0000|Hemp|hOlu"
  3132.  
  3133. if int(member) == 2:
  3134. constInfo.isim2 = "2 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3135. constInfo.oldurme2 = str(oldurme)
  3136. constInfo.olum2 = str(olum)
  3137. if int(durum) == 0:
  3138. constInfo.durum2 = "|cff00ff00|H|hYasiyor"
  3139. if int(durum) == 1:
  3140. constInfo.durum2 = "|cffff0000|Hemp|hOlu"
  3141.  
  3142. if int(member) == 3:
  3143. constInfo.isim3 = "3 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3144. constInfo.oldurme3 = str(oldurme)
  3145. constInfo.olum3 = str(olum)
  3146. if int(durum) == 0:
  3147. constInfo.durum3 = "|cff00ff00|H|hYasiyor"
  3148. if int(durum) == 1:
  3149. constInfo.durum3 = "|cffff0000|Hemp|hOlu"
  3150.  
  3151. if int(member) == 4:
  3152. constInfo.isim4 = "4 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3153. constInfo.oldurme4 = str(oldurme)
  3154. constInfo.olum4 = str(olum)
  3155. if int(durum) == 0:
  3156. constInfo.durum4 = "|cff00ff00|H|hYasiyor"
  3157. if int(durum) == 1:
  3158. constInfo.durum4 = "|cffff0000|Hemp|hOlu"
  3159.  
  3160. if int(member) == 5:
  3161. constInfo.isim5 = "5 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3162. constInfo.oldurme5 = str(oldurme)
  3163. constInfo.olum5 = str(olum)
  3164. if int(durum) == 0:
  3165. constInfo.durum5 = "|cff00ff00|H|hYasiyor"
  3166. if int(durum) == 1:
  3167. constInfo.durum5 = "|cffff0000|Hemp|hOlu"
  3168.  
  3169. if int(member) == 6:
  3170. constInfo.isim6 = "6 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3171. constInfo.oldurme6 = str(oldurme)
  3172. constInfo.olum6 = str(olum)
  3173. if int(durum) == 0:
  3174. constInfo.durum6 = "|cff00ff00|H|hYasiyor"
  3175. if int(durum) == 1:
  3176. constInfo.durum6 = "|cffff0000|Hemp|hOlu"
  3177.  
  3178. if int(member) == 7:
  3179. constInfo.isim7 = "7 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3180. constInfo.oldurme7 = str(oldurme)
  3181. constInfo.olum7 = str(olum)
  3182. if int(durum) == 0:
  3183. constInfo.durum7 = "|cff00ff00|H|hYasiyor"
  3184. if int(durum) == 1:
  3185. constInfo.durum7 = "|cffff0000|Hemp|hOlu"
  3186.  
  3187. if int(member) == 8:
  3188. constInfo.isim8 = "8 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3189. constInfo.oldurme8 = str(oldurme)
  3190. constInfo.olum8 = str(olum)
  3191. if int(durum) == 0:
  3192. constInfo.durum8 = "|cff00ff00|H|hYasiyor"
  3193. if int(durum) == 1:
  3194. constInfo.durum8 = "|cffff0000|Hemp|hOlu"
  3195.  
  3196. if int(member) == 9:
  3197. constInfo.isim9 = "9 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3198. constInfo.oldurme9 = str(oldurme)
  3199. constInfo.olum9 = str(olum)
  3200. if int(durum) == 0:
  3201. constInfo.durum9 = "|cff00ff00|H|hYasiyor"
  3202. if int(durum) == 1:
  3203. constInfo.durum9 = "|cffff0000|Hemp|hOlu"
  3204.  
  3205. if int(member) == 10:
  3206. constInfo.isim10 = "10 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3207. constInfo.oldurme10 = str(oldurme)
  3208. constInfo.olum10 = str(olum)
  3209. if int(durum) == 0:
  3210. constInfo.durum10 = "|cff00ff00|H|hYasiyor"
  3211. if int(durum) == 1:
  3212. constInfo.durum10 = "|cffff0000|Hemp|hOlu"
  3213.  
  3214. if int(member) == 11:
  3215. constInfo.isim11 = "11 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3216. constInfo.oldurme11 = str(oldurme)
  3217. constInfo.olum11 = str(olum)
  3218. if int(durum) == 0:
  3219. constInfo.durum11 = "|cff00ff00|H|hYasiyor"
  3220. if int(durum) == 1:
  3221. constInfo.durum11 = "|cffff0000|Hemp|hOlu"
  3222.  
  3223. if int(member) == 12:
  3224. constInfo.isim12 = "12 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3225. constInfo.oldurme12 = str(oldurme)
  3226. constInfo.olum12 = str(olum)
  3227. if int(durum) == 0:
  3228. constInfo.durum12 = "|cff00ff00|H|hYasiyor"
  3229. if int(durum) == 1:
  3230. constInfo.durum12 = "|cffff0000|Hemp|hOlu"
  3231.  
  3232. if int(member) == 13:
  3233. constInfo.isim13 = "13 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3234. constInfo.oldurme13 = str(oldurme)
  3235. constInfo.olum13 = str(olum)
  3236. if int(durum) == 0:
  3237. constInfo.durum13 = "|cff00ff00|H|hYasiyor"
  3238. if int(durum) == 1:
  3239. constInfo.durum13 = "|cffff0000|Hemp|hOlu"
  3240.  
  3241. if int(member) == 14:
  3242. constInfo.isim14 = "14 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3243. constInfo.oldurme14 = str(oldurme)
  3244. constInfo.olum14 = str(olum)
  3245. if int(durum) == 0:
  3246. constInfo.durum14 = "|cff00ff00|H|hYasiyor"
  3247. if int(durum) == 1:
  3248. constInfo.durum14 = "|cffff0000|Hemp|hOlu"
  3249.  
  3250. if int(member) == 15:
  3251. constInfo.isim15 = "15 - "+str(isim)+"(|cff00ff00|H|hNivel."+str(level)+"|h|r)"
  3252. constInfo.oldurme15 = str(oldurme)
  3253. constInfo.olum15 = str(olum)
  3254. if int(durum) == 0:
  3255. constInfo.durum15 = "|cff00ff00|H|hYasiyor"
  3256. if int(durum) == 1:
  3257. constInfo.durum15 = "|cffff0000|Hemp|hOlu"
  3258.  
  3259.  
  3260. def loncaistatistiktemizle(self,member):
  3261. if int(member) == 1:
  3262. constInfo.isim2 = ""
  3263. constInfo.durum2 = ""
  3264. constInfo.oldurme2 = ""
  3265. constInfo.olum2 = ""
  3266.  
  3267. constInfo.isim3 = ""
  3268. constInfo.durum3 = ""
  3269. constInfo.oldurme3 = ""
  3270. constInfo.olum3 = ""
  3271.  
  3272. constInfo.isim4 = ""
  3273. constInfo.durum4 = ""
  3274. constInfo.oldurme4 = ""
  3275. constInfo.olum4 = ""
  3276.  
  3277. constInfo.isim5 = ""
  3278. constInfo.durum5 = ""
  3279. constInfo.oldurme5 = ""
  3280. constInfo.olum5 = ""
  3281.  
  3282. constInfo.isim6 = ""
  3283. constInfo.durum6 = ""
  3284. constInfo.oldurme6 = ""
  3285. constInfo.olum6 = ""
  3286.  
  3287. constInfo.isim7 = ""
  3288. constInfo.durum7 = ""
  3289. constInfo.oldurme7 = ""
  3290. constInfo.olum7 = ""
  3291.  
  3292. constInfo.isim8 = ""
  3293. constInfo.durum8 = ""
  3294. constInfo.oldurme8 = ""
  3295. constInfo.olum8 = ""
  3296.  
  3297. constInfo.isim9 = ""
  3298. constInfo.durum9 = ""
  3299. constInfo.oldurme9 = ""
  3300. constInfo.olum9 = ""
  3301.  
  3302. constInfo.isim10 = ""
  3303. constInfo.durum10 = ""
  3304. constInfo.oldurme10 = ""
  3305. constInfo.olum10 = ""
  3306.  
  3307. constInfo.isim11 = ""
  3308. constInfo.durum11 = ""
  3309. constInfo.oldurme11 = ""
  3310. constInfo.olum11 = ""
  3311.  
  3312. constInfo.isim12 = ""
  3313. constInfo.durum12 = ""
  3314. constInfo.oldurme12 = ""
  3315. constInfo.olum12 = ""
  3316.  
  3317. constInfo.isim13 = ""
  3318. constInfo.durum13 = ""
  3319. constInfo.oldurme13 = ""
  3320. constInfo.olum13 = ""
  3321.  
  3322. constInfo.isim14 = ""
  3323. constInfo.durum14 = ""
  3324. constInfo.oldurme14 = ""
  3325. constInfo.olum14 = ""
  3326.  
  3327. constInfo.isim15 = ""
  3328. constInfo.durum15 = ""
  3329. constInfo.oldurme15 = ""
  3330. constInfo.olum15 = ""
  3331.  
  3332. if int(member) == 2:
  3333.  
  3334. constInfo.isim3 = ""
  3335. constInfo.durum3 = ""
  3336. constInfo.oldurme3 = ""
  3337. constInfo.olum3 = ""
  3338.  
  3339. constInfo.isim4 = ""
  3340. constInfo.durum4 = ""
  3341. constInfo.oldurme4 = ""
  3342. constInfo.olum4 = ""
  3343.  
  3344. constInfo.isim5 = ""
  3345. constInfo.durum5 = ""
  3346. constInfo.oldurme5 = ""
  3347. constInfo.olum5 = ""
  3348.  
  3349. constInfo.isim6 = ""
  3350. constInfo.durum6 = ""
  3351. constInfo.oldurme6 = ""
  3352. constInfo.olum6 = ""
  3353.  
  3354. constInfo.isim7 = ""
  3355. constInfo.durum7 = ""
  3356. constInfo.oldurme7 = ""
  3357. constInfo.olum7 = ""
  3358.  
  3359. constInfo.isim8 = ""
  3360. constInfo.durum8 = ""
  3361. constInfo.oldurme8 = ""
  3362. constInfo.olum8 = ""
  3363.  
  3364. constInfo.isim9 = ""
  3365. constInfo.durum9 = ""
  3366. constInfo.oldurme9 = ""
  3367. constInfo.olum9 = ""
  3368.  
  3369. constInfo.isim10 = ""
  3370. constInfo.durum10 = ""
  3371. constInfo.oldurme10 = ""
  3372. constInfo.olum10 = ""
  3373.  
  3374. constInfo.isim11 = ""
  3375. constInfo.durum11 = ""
  3376. constInfo.oldurme11 = ""
  3377. constInfo.olum11 = ""
  3378.  
  3379. constInfo.isim12 = ""
  3380. constInfo.durum12 = ""
  3381. constInfo.oldurme12 = ""
  3382. constInfo.olum12 = ""
  3383.  
  3384. constInfo.isim13 = ""
  3385. constInfo.durum13 = ""
  3386. constInfo.oldurme13 = ""
  3387. constInfo.olum13 = ""
  3388.  
  3389. constInfo.isim14 = ""
  3390. constInfo.durum14 = ""
  3391. constInfo.oldurme14 = ""
  3392. constInfo.olum14 = ""
  3393.  
  3394. constInfo.isim15 = ""
  3395. constInfo.durum15 = ""
  3396. constInfo.oldurme15 = ""
  3397. constInfo.olum15 = ""
  3398.  
  3399. if int(member) == 3:
  3400.  
  3401. constInfo.isim4 = ""
  3402. constInfo.durum4 = ""
  3403. constInfo.oldurme4 = ""
  3404. constInfo.olum4 = ""
  3405.  
  3406. constInfo.isim5 = ""
  3407. constInfo.durum5 = ""
  3408. constInfo.oldurme5 = ""
  3409. constInfo.olum5 = ""
  3410.  
  3411. constInfo.isim6 = ""
  3412. constInfo.durum6 = ""
  3413. constInfo.oldurme6 = ""
  3414. constInfo.olum6 = ""
  3415.  
  3416. constInfo.isim7 = ""
  3417. constInfo.durum7 = ""
  3418. constInfo.oldurme7 = ""
  3419. constInfo.olum7 = ""
  3420.  
  3421. constInfo.isim8 = ""
  3422. constInfo.durum8 = ""
  3423. constInfo.oldurme8 = ""
  3424. constInfo.olum8 = ""
  3425.  
  3426. constInfo.isim9 = ""
  3427. constInfo.durum9 = ""
  3428. constInfo.oldurme9 = ""
  3429. constInfo.olum9 = ""
  3430.  
  3431. constInfo.isim10 = ""
  3432. constInfo.durum10 = ""
  3433. constInfo.oldurme10 = ""
  3434. constInfo.olum10 = ""
  3435.  
  3436. constInfo.isim11 = ""
  3437. constInfo.durum11 = ""
  3438. constInfo.oldurme11 = ""
  3439. constInfo.olum11 = ""
  3440.  
  3441. constInfo.isim12 = ""
  3442. constInfo.durum12 = ""
  3443. constInfo.oldurme12 = ""
  3444. constInfo.olum12 = ""
  3445.  
  3446. constInfo.isim13 = ""
  3447. constInfo.durum13 = ""
  3448. constInfo.oldurme13 = ""
  3449. constInfo.olum13 = ""
  3450.  
  3451. constInfo.isim14 = ""
  3452. constInfo.durum14 = ""
  3453. constInfo.oldurme14 = ""
  3454. constInfo.olum14 = ""
  3455.  
  3456. constInfo.isim15 = ""
  3457. constInfo.durum15 = ""
  3458. constInfo.oldurme15 = ""
  3459. constInfo.olum15 = ""
  3460.  
  3461. if int(member) == 4:
  3462.  
  3463. constInfo.isim5 = ""
  3464. constInfo.durum5 = ""
  3465. constInfo.oldurme5 = ""
  3466. constInfo.olum5 = ""
  3467.  
  3468. constInfo.isim6 = ""
  3469. constInfo.durum6 = ""
  3470. constInfo.oldurme6 = ""
  3471. constInfo.olum6 = ""
  3472.  
  3473. constInfo.isim7 = ""
  3474. constInfo.durum7 = ""
  3475. constInfo.oldurme7 = ""
  3476. constInfo.olum7 = ""
  3477.  
  3478. constInfo.isim8 = ""
  3479. constInfo.durum8 = ""
  3480. constInfo.oldurme8 = ""
  3481. constInfo.olum8 = ""
  3482.  
  3483. constInfo.isim9 = ""
  3484. constInfo.durum9 = ""
  3485. constInfo.oldurme9 = ""
  3486. constInfo.olum9 = ""
  3487.  
  3488. constInfo.isim10 = ""
  3489. constInfo.durum10 = ""
  3490. constInfo.oldurme10 = ""
  3491. constInfo.olum10 = ""
  3492.  
  3493. constInfo.isim11 = ""
  3494. constInfo.durum11 = ""
  3495. constInfo.oldurme11 = ""
  3496. constInfo.olum11 = ""
  3497.  
  3498. constInfo.isim12 = ""
  3499. constInfo.durum12 = ""
  3500. constInfo.oldurme12 = ""
  3501. constInfo.olum12 = ""
  3502.  
  3503. constInfo.isim13 = ""
  3504. constInfo.durum13 = ""
  3505. constInfo.oldurme13 = ""
  3506. constInfo.olum13 = ""
  3507.  
  3508. constInfo.isim14 = ""
  3509. constInfo.durum14 = ""
  3510. constInfo.oldurme14 = ""
  3511. constInfo.olum14 = ""
  3512.  
  3513. constInfo.isim15 = ""
  3514. constInfo.durum15 = ""
  3515. constInfo.oldurme15 = ""
  3516. constInfo.olum15 = ""
  3517.  
  3518. if int(member) == 5:
  3519.  
  3520. constInfo.isim6 = ""
  3521. constInfo.durum6 = ""
  3522. constInfo.oldurme6 = ""
  3523. constInfo.olum6 = ""
  3524.  
  3525. constInfo.isim7 = ""
  3526. constInfo.durum7 = ""
  3527. constInfo.oldurme7 = ""
  3528. constInfo.olum7 = ""
  3529.  
  3530. constInfo.isim8 = ""
  3531. constInfo.durum8 = ""
  3532. constInfo.oldurme8 = ""
  3533. constInfo.olum8 = ""
  3534.  
  3535. constInfo.isim9 = ""
  3536. constInfo.durum9 = ""
  3537. constInfo.oldurme9 = ""
  3538. constInfo.olum9 = ""
  3539.  
  3540. constInfo.isim10 = ""
  3541. constInfo.durum10 = ""
  3542. constInfo.oldurme10 = ""
  3543. constInfo.olum10 = ""
  3544.  
  3545. constInfo.isim11 = ""
  3546. constInfo.durum11 = ""
  3547. constInfo.oldurme11 = ""
  3548. constInfo.olum11 = ""
  3549.  
  3550. constInfo.isim12 = ""
  3551. constInfo.durum12 = ""
  3552. constInfo.oldurme12 = ""
  3553. constInfo.olum12 = ""
  3554.  
  3555. constInfo.isim13 = ""
  3556. constInfo.durum13 = ""
  3557. constInfo.oldurme13 = ""
  3558. constInfo.olum13 = ""
  3559.  
  3560. constInfo.isim14 = ""
  3561. constInfo.durum14 = ""
  3562. constInfo.oldurme14 = ""
  3563. constInfo.olum14 = ""
  3564.  
  3565. constInfo.isim15 = ""
  3566. constInfo.durum15 = ""
  3567. constInfo.oldurme15 = ""
  3568. constInfo.olum15 = ""
  3569.  
  3570. if int(member) == 6:
  3571.  
  3572. constInfo.isim7 = ""
  3573. constInfo.durum7 = ""
  3574. constInfo.oldurme7 = ""
  3575. constInfo.olum7 = ""
  3576.  
  3577. constInfo.isim8 = ""
  3578. constInfo.durum8 = ""
  3579. constInfo.oldurme8 = ""
  3580. constInfo.olum8 = ""
  3581.  
  3582. constInfo.isim9 = ""
  3583. constInfo.durum9 = ""
  3584. constInfo.oldurme9 = ""
  3585. constInfo.olum9 = ""
  3586.  
  3587. constInfo.isim10 = ""
  3588. constInfo.durum10 = ""
  3589. constInfo.oldurme10 = ""
  3590. constInfo.olum10 = ""
  3591.  
  3592. constInfo.isim11 = ""
  3593. constInfo.durum11 = ""
  3594. constInfo.oldurme11 = ""
  3595. constInfo.olum11 = ""
  3596.  
  3597. constInfo.isim12 = ""
  3598. constInfo.durum12 = ""
  3599. constInfo.oldurme12 = ""
  3600. constInfo.olum12 = ""
  3601.  
  3602. constInfo.isim13 = ""
  3603. constInfo.durum13 = ""
  3604. constInfo.oldurme13 = ""
  3605. constInfo.olum13 = ""
  3606.  
  3607. constInfo.isim14 = ""
  3608. constInfo.durum14 = ""
  3609. constInfo.oldurme14 = ""
  3610. constInfo.olum14 = ""
  3611.  
  3612. constInfo.isim15 = ""
  3613. constInfo.durum15 = ""
  3614. constInfo.oldurme15 = ""
  3615. constInfo.olum15 = ""
  3616.  
  3617. if int(member) == 7:
  3618.  
  3619. constInfo.isim8 = ""
  3620. constInfo.durum8 = ""
  3621. constInfo.oldurme8 = ""
  3622. constInfo.olum8 = ""
  3623.  
  3624. constInfo.isim9 = ""
  3625. constInfo.durum9 = ""
  3626. constInfo.oldurme9 = ""
  3627. constInfo.olum9 = ""
  3628.  
  3629. constInfo.isim10 = ""
  3630. constInfo.durum10 = ""
  3631. constInfo.oldurme10 = ""
  3632. constInfo.olum10 = ""
  3633.  
  3634. constInfo.isim11 = ""
  3635. constInfo.durum11 = ""
  3636. constInfo.oldurme11 = ""
  3637. constInfo.olum11 = ""
  3638.  
  3639. constInfo.isim12 = ""
  3640. constInfo.durum12 = ""
  3641. constInfo.oldurme12 = ""
  3642. constInfo.olum12 = ""
  3643.  
  3644. constInfo.isim13 = ""
  3645. constInfo.durum13 = ""
  3646. constInfo.oldurme13 = ""
  3647. constInfo.olum13 = ""
  3648.  
  3649. constInfo.isim14 = ""
  3650. constInfo.durum14 = ""
  3651. constInfo.oldurme14 = ""
  3652. constInfo.olum14 = ""
  3653.  
  3654. constInfo.isim15 = ""
  3655. constInfo.durum15 = ""
  3656. constInfo.oldurme15 = ""
  3657. constInfo.olum15 = ""
  3658.  
  3659. if int(member) == 8:
  3660.  
  3661. constInfo.isim9 = ""
  3662. constInfo.durum9 = ""
  3663. constInfo.oldurme9 = ""
  3664. constInfo.olum9 = ""
  3665.  
  3666. constInfo.isim10 = ""
  3667. constInfo.durum10 = ""
  3668. constInfo.oldurme10 = ""
  3669. constInfo.olum10 = ""
  3670.  
  3671. constInfo.isim11 = ""
  3672. constInfo.durum11 = ""
  3673. constInfo.oldurme11 = ""
  3674. constInfo.olum11 = ""
  3675.  
  3676. constInfo.isim12 = ""
  3677. constInfo.durum12 = ""
  3678. constInfo.oldurme12 = ""
  3679. constInfo.olum12 = ""
  3680.  
  3681. constInfo.isim13 = ""
  3682. constInfo.durum13 = ""
  3683. constInfo.oldurme13 = ""
  3684. constInfo.olum13 = ""
  3685.  
  3686. constInfo.isim14 = ""
  3687. constInfo.durum14 = ""
  3688. constInfo.oldurme14 = ""
  3689. constInfo.olum14 = ""
  3690.  
  3691. constInfo.isim15 = ""
  3692. constInfo.durum15 = ""
  3693. constInfo.oldurme15 = ""
  3694. constInfo.olum15 = ""
  3695.  
  3696. if int(member) == 9:
  3697.  
  3698. constInfo.isim10 = ""
  3699. constInfo.durum10 = ""
  3700. constInfo.oldurme10 = ""
  3701. constInfo.olum10 = ""
  3702.  
  3703. constInfo.isim11 = ""
  3704. constInfo.durum11 = ""
  3705. constInfo.oldurme11 = ""
  3706. constInfo.olum11 = ""
  3707.  
  3708. constInfo.isim12 = ""
  3709. constInfo.durum12 = ""
  3710. constInfo.oldurme12 = ""
  3711. constInfo.olum12 = ""
  3712.  
  3713. constInfo.isim13 = ""
  3714. constInfo.durum13 = ""
  3715. constInfo.oldurme13 = ""
  3716. constInfo.olum13 = ""
  3717.  
  3718. constInfo.isim14 = ""
  3719. constInfo.durum14 = ""
  3720. constInfo.oldurme14 = ""
  3721. constInfo.olum14 = ""
  3722.  
  3723. constInfo.isim15 = ""
  3724. constInfo.durum15 = ""
  3725. constInfo.oldurme15 = ""
  3726. constInfo.olum15 = ""
  3727.  
  3728. if int(member) == 10:
  3729.  
  3730. constInfo.isim11 = ""
  3731. constInfo.durum11 = ""
  3732. constInfo.oldurme11 = ""
  3733. constInfo.olum11 = ""
  3734.  
  3735. constInfo.isim12 = ""
  3736. constInfo.durum12 = ""
  3737. constInfo.oldurme12 = ""
  3738. constInfo.olum12 = ""
  3739.  
  3740. constInfo.isim13 = ""
  3741. constInfo.durum13 = ""
  3742. constInfo.oldurme13 = ""
  3743. constInfo.olum13 = ""
  3744.  
  3745. constInfo.isim14 = ""
  3746. constInfo.durum14 = ""
  3747. constInfo.oldurme14 = ""
  3748. constInfo.olum14 = ""
  3749.  
  3750. constInfo.isim15 = ""
  3751. constInfo.durum15 = ""
  3752. constInfo.oldurme15 = ""
  3753. constInfo.olum15 = ""
  3754.  
  3755. if int(member) == 11:
  3756.  
  3757. constInfo.isim12 = ""
  3758. constInfo.durum12 = ""
  3759. constInfo.oldurme12 = ""
  3760. constInfo.olum12 = ""
  3761.  
  3762. constInfo.isim13 = ""
  3763. constInfo.durum13 = ""
  3764. constInfo.oldurme13 = ""
  3765. constInfo.olum13 = ""
  3766.  
  3767. constInfo.isim14 = ""
  3768. constInfo.durum14 = ""
  3769. constInfo.oldurme14 = ""
  3770. constInfo.olum14 = ""
  3771.  
  3772. constInfo.isim15 = ""
  3773. constInfo.durum15 = ""
  3774. constInfo.oldurme15 = ""
  3775. constInfo.olum15 = ""
  3776.  
  3777. if int(member) == 12:
  3778.  
  3779. constInfo.isim13 = ""
  3780. constInfo.durum13 = ""
  3781. constInfo.oldurme13 = ""
  3782. constInfo.olum13 = ""
  3783.  
  3784. constInfo.isim14 = ""
  3785. constInfo.durum14 = ""
  3786. constInfo.oldurme14 = ""
  3787. constInfo.olum14 = ""
  3788.  
  3789. constInfo.isim15 = ""
  3790. constInfo.durum15 = ""
  3791. constInfo.oldurme15 = ""
  3792. constInfo.olum15 = ""
  3793.  
  3794. if int(member) == 13:
  3795.  
  3796. constInfo.isim14 = ""
  3797. constInfo.durum14 = ""
  3798. constInfo.oldurme14 = ""
  3799. constInfo.olum14 = ""
  3800.  
  3801. constInfo.isim15 = ""
  3802. constInfo.durum15 = ""
  3803. constInfo.oldurme15 = ""
  3804. constInfo.olum15 = ""
  3805.  
  3806. if int(member) == 14:
  3807.  
  3808. constInfo.isim15 = ""
  3809. constInfo.durum15 = ""
  3810. constInfo.oldurme15 = ""
  3811. constInfo.olum15 = ""
  3812.  
  3813. def LoncaIstatistikOpen(self):
  3814. import net
  3815. net.SendChatPacket("/loncaistatistik")
  3816. import uiloncaistatistik
  3817. self.loncaistatistik = uiloncaistatistik.LoncaIstatistik()
  3818. self.loncaistatistik.Show()
  3819.  
  3820. def GuildstorageTry(self):
  3821. import uiguildstorage
  3822. self.GuildstorageWindow = uiguildstorage.GuildStorage()
  3823. if self.GuildstorageWindow.IsShow():
  3824. self.GuildstorageWindow.Hide()
  3825. else:
  3826. self.GuildStorageWindow.Show()
  3827.  
  3828. def __ProcessPreservedServerCommand(self):
  3829. try:
  3830. command = net.GetPreservedServerCommand()
  3831. while command:
  3832. print " __ProcessPreservedServerCommand", command
  3833. self.serverCommander.Run(command)
  3834. command = net.GetPreservedServerCommand()
  3835. except RuntimeError, msg:
  3836. dbg.TraceError(msg)
  3837. return 0
  3838.  
  3839. #AKIRA_EVENT_SYSTEM
  3840. def __AkiraEventDataAppend(self,event_data):
  3841. self.akiraEventButton.Open(event_data)
  3842. #END_OF_AKIRA_EVENT_SYSTEM
  3843.  
  3844. def __BKTradeSys(self, arg1, arg2):
  3845. if str(arg1) == "qid":
  3846. constInfo.BK_TRADE_SYSTEM["qid"] = arg2
  3847. if str(arg1) == "get":
  3848. net.SendQuestInputStringPacket(str(constInfo.BK_TRADE_SYSTEM["ItemList"]))
  3849. if str(arg1) == "open":
  3850. self.BKTradeSys.OpenWindow()
  3851. if str(arg1) == "block":
  3852. constInfo.INPUT_IGNORE = 1
  3853. if str(arg1) == "break":
  3854. constInfo.INPUT_IGNORE = 0
  3855.  
  3856. def karakter_kilit(self,qid):
  3857. constInfo.karakter_kilit = int(qid)
  3858.  
  3859. def PartyHealReady(self):
  3860. self.interface.PartyHealReady()
  3861.  
  3862. def AskSafeboxPassword(self):
  3863. self.interface.AskSafeboxPassword()
  3864.  
  3865. # ITEM_MALL
  3866. def AskMallPassword(self):
  3867. self.interface.AskMallPassword()
  3868.  
  3869. def __ItemMall_Open(self):
  3870. self.interface.OpenItemMall();
  3871.  
  3872. def CommandCloseMall(self):
  3873. self.interface.CommandCloseMall()
  3874. # END_OF_ITEM_MALL
  3875.  
  3876. def __deschidere_magazin_questindex(self, value):
  3877. constInfo.DESCHIDERE_MAGAZIN_QUESTINDEX = int(value)
  3878.  
  3879. def __deschidere_magazin(self):
  3880. deschidere_magazin = constInfo.DESCHIDERE_MAGAZIN_QUESTINDEX
  3881. event.QuestButtonClick(deschidere_magazin)
  3882.  
  3883. def RefineSuceededMessage(self):
  3884. snd.PlaySound("sound/ui/make_soket.wav")
  3885. self.PopupMessage(localeInfo.REFINE_SUCCESS)
  3886. translate.yenile=3
  3887.  
  3888. def RefineFailedMessage(self):
  3889. snd.PlaySound("sound/ui/jaeryun_fail.wav")
  3890. self.PopupMessage(localeInfo.REFINE_FAILURE)
  3891.  
  3892. def CommandCloseSafebox(self):
  3893. self.interface.CommandCloseSafebox()
  3894.  
  3895. # PRIVATE_SHOP_PRICE_LIST
  3896. def __PrivateShop_PriceList(self, itemVNum, itemPrice):
  3897. if app.WJ_OFFLINESHOP_SYSTEM:
  3898. uiOfflineShopBuilder.SetOfflineShopItemPrice(itemVNum, itemPrice)
  3899. # END_OF_PRIVATE_SHOP_PRICE_LIST
  3900.  
  3901. def __Append_Lonca_Gecmisi(self, guildName, joinDate, joinTime, memberPosition):
  3902. lastPosition = ""
  3903. if int(memberPosition) == 1:
  3904. lastPosition = "Lider"
  3905. else:
  3906. lastPosition = "Uye"
  3907.  
  3908. lastDate = "%s %s" % (str(joinDate), str(joinTime))
  3909.  
  3910. self.LoncaGecmisi.AppendNewMember(str(guildName), str(lastPosition), str(lastDate))
  3911.  
  3912. def __Do_Check_War_Player(self, targetName, killCount, deadCount):
  3913. warPlayerCheckQuestionDialog = uiCommon.QuestionDialog3()
  3914. warPlayerCheckQuestionDialog.SetText1("%s isimli oyuncu ajan olabilir." % (targetName))
  3915. warPlayerCheckQuestionDialog.SetText2("Olme: %s Oldurme: %s" % (str(deadCount), str(killCount)))
  3916. warPlayerCheckQuestionDialog.SetText3("Savastan atilsin mi?")
  3917. warPlayerCheckQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  3918. warPlayerCheckQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  3919. warPlayerCheckQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerWarCheckRequest(arg))
  3920. warPlayerCheckQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerWarCheckRequest(arg))
  3921. warPlayerCheckQuestionDialog.Open()
  3922. warPlayerCheckQuestionDialog.name = targetName
  3923. self.warPlayerCheckQuestionDialog = warPlayerCheckQuestionDialog
  3924.  
  3925. def __AnswerWarCheckRequest(self, answer):
  3926. if not self.warPlayerCheckQuestionDialog:
  3927. return
  3928.  
  3929. targetName = self.warPlayerCheckQuestionDialog.name
  3930.  
  3931. if answer:
  3932. net.SendChatPacket("/kovkopegi %s" % (str(targetName)))
  3933.  
  3934. self.warPlayerCheckQuestionDialog.Close()
  3935. self.warPlayerCheckQuestionDialog = None
  3936.  
  3937. def SetPetEvolution(self, evo):
  3938. petname = ["Tanar", "Salbatic", "Curajos", "Eroic"]
  3939. self.petmain.SetEvolveName(petname[int(evo)])
  3940.  
  3941. def SetPetName(self, name):
  3942. if len(name) > 1 and name != "":
  3943. self.petmini.Show()
  3944. self.petmain.SetName(name)
  3945.  
  3946. def SetPetLevel(self, level):
  3947. self.petmain.SetLevel(level)
  3948.  
  3949. def SetPetDuration(self, dur, durt):
  3950. if int(durt) > 0:
  3951. self.petmini.SetDuration(dur, durt)
  3952. self.petmain.SetDuration(dur, durt)
  3953.  
  3954. def SetPetAgeDuration(self, age):
  3955. if (int(age)) > 0:
  3956. self.petmain.SetAgeDuration(age)
  3957.  
  3958. def SetPetBonus(self, hp, dif, sp):
  3959. self.petmain.SetHp(hp)
  3960. self.petmain.SetDef(dif)
  3961. self.petmain.SetSp(sp)
  3962.  
  3963. def SetPetskill(self, slot, idx, lv):
  3964. if int(lv) > 0:
  3965. self.petmini.SetSkill(slot, idx, lv)
  3966. self.petmain.SetSkill(slot, idx, lv)
  3967. self.affectShower.BINARY_NEW_AddAffect(5400+int(idx),int(constInfo.LASTAFFECT_POINT)+1,int(constInfo.LASTAFFECT_VALUE)+1, 0)
  3968. if int(slot)==0:
  3969. constInfo.SKILL_PET1=5400+int(idx)
  3970. if int(slot)==1:
  3971. constInfo.SKILL_PET2=5400+int(idx)
  3972. if int(slot)==2:
  3973. constInfo.SKILL_PET3=5400+int(idx)
  3974.  
  3975. def SetPetIcon(self, vnum):
  3976. if int(vnum) > 0:
  3977. self.petmini.SetImageSlot(vnum)
  3978. self.petmain.SetImageSlot(vnum)
  3979.  
  3980. def SetPetExp(self, exp, expi, exptot):
  3981. if int(exptot) > 0:
  3982. self.petmini.SetExperience(exp, expi, exptot)
  3983. self.petmain.SetExperience(exp, expi, exptot)
  3984.  
  3985. def PetUnsummon(self):
  3986. self.petmini.SetDefaultInfo()
  3987. self.petmini.Close()
  3988. self.petmain.SetDefaultInfo()
  3989. self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET1),0)
  3990. self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET2),0)
  3991. self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET3),0)
  3992. constInfo.SKILL_PET1 = 0
  3993. constInfo.SKILL_PET2 = 0
  3994. constInfo.SKILL_PET3 = 0
  3995.  
  3996. def OpenPetMainGui(self):
  3997. if constInfo.PET_MAIN == 0:
  3998. self.petmain.Show()
  3999. constInfo.PET_MAIN =1
  4000. self.petmain.SetTop()
  4001. else:
  4002. self.petmain.Hide()
  4003. constInfo.PET_MAIN =0
  4004.  
  4005.  
  4006. def OpenPetIncubator(self, pet_new = 0):
  4007. import uipetincubatrice
  4008. self.petinc = uipetincubatrice.PetSystemIncubator(pet_new)
  4009. self.petinc.Show()
  4010. self.petinc.SetTop()
  4011.  
  4012. def OpenPetMini(self):
  4013. self.petmini.Show()
  4014. self.petmini.SetTop()
  4015.  
  4016. def OpenPetFeed(self):
  4017.  
  4018. self.feedwind = uipetfeed.PetFeedWindow()
  4019. self.feedwind.Show()
  4020. self.feedwind.SetTop()
  4021.  
  4022. def Gift_Show(self):
  4023. if constInfo.PET_MAIN == 0:
  4024. self.petmain.Show()
  4025. constInfo.PET_MAIN =1
  4026. self.petmain.SetTop()
  4027. else:
  4028. self.petmain.Hide()
  4029. constInfo.PET_MAIN =0
  4030.  
  4031. def __Horse_HideState(self):
  4032. self.affectShower.SetHorseState(0, 0, 0)
  4033.  
  4034. def __Horse_UpdateState(self, level, health, battery):
  4035. self.affectShower.SetHorseState(int(level), int(health), int(battery))
  4036.  
  4037. def __IsXMasMap(self):
  4038. mapDict = ( "metin2_map_n_flame_01",
  4039. "metin2_map_n_desert_01",
  4040. "metin2_map_spiderdungeon",
  4041. "metin2_map_deviltower1", )
  4042.  
  4043. if background.GetCurrentMapName() in mapDict:
  4044. return FALSE
  4045.  
  4046. return TRUE
  4047.  
  4048. def __XMasSnow_Enable(self, mode):
  4049.  
  4050. self.__XMasSong_Enable(mode)
  4051.  
  4052. if "1"==mode:
  4053.  
  4054. if not self.__IsXMasMap():
  4055. return
  4056.  
  4057. print "XMAS_SNOW ON"
  4058. background.EnableSnow(1)
  4059.  
  4060. else:
  4061. print "XMAS_SNOW OFF"
  4062. background.EnableSnow(0)
  4063.  
  4064. def __XMasBoom_Enable(self, mode):
  4065. if "1"==mode:
  4066.  
  4067. if not self.__IsXMasMap():
  4068. return
  4069.  
  4070. print "XMAS_BOOM ON"
  4071. self.__DayMode_Update("dark")
  4072. self.enableXMasBoom = TRUE
  4073. self.startTimeXMasBoom = app.GetTime()
  4074. else:
  4075. print "XMAS_BOOM OFF"
  4076. self.__DayMode_Update("light")
  4077. self.enableXMasBoom = FALSE
  4078.  
  4079. def __XMasTree_Enable(self, grade):
  4080.  
  4081. print "XMAS_TREE ", grade
  4082. background.SetXMasTree(int(grade))
  4083. # PET_INVENTORY
  4084. def __PetIsMineByVid(self, vid):
  4085. targetName = chr.GetNameByVID(int(vid))
  4086. charName = player.GetName() or chr.GetMainCharacterName()
  4087. if targetName[0:len(charName)] == charName:
  4088. localeInfo.SEND_BACK = "true"
  4089. else:
  4090. localeInfo.SEND_BACK = "false"
  4091.  
  4092. self.__SendTextPacketToQuest()
  4093. localeInfo.SEND_BACK = ""
  4094.  
  4095. def __SendTextPacketToQuest(self):
  4096. net.SendQuestInputStringPacket(localeInfo.SEND_BACK)
  4097.  
  4098. def __Inputget1(self):
  4099. constInfo.INPUT_IGNORE = 1
  4100.  
  4101. def __Inputget2(self):
  4102. constInfo.INPUT_IGNORE = 0
  4103.  
  4104. def __Inputget3(self):
  4105. net.SendQuestInputStringPacket("1")
  4106.  
  4107. def GetInputStringStart(self):
  4108. constInfo.INPUT_IGNORE = 1
  4109.  
  4110. def GetInputStringEnd(self):
  4111. constInfo.INPUT_IGNORE = 0
  4112.  
  4113. def __PetSetClearItemSlotButtonIndex(self, index):
  4114. constInfo2.PET_CLEAR_ITEM_SLOT_BUTTON_INDEX = int(index)
  4115.  
  4116. def __PetSetIncreaseBoniButtonIndex(self, index):
  4117. constInfo2.PET_INCREASE_BONI_BUTTON_INDEX = int(index)
  4118.  
  4119. def __PetSetSendAwayButtonIndex(self, index):
  4120. constInfo2.PET_SEND_AWAY_BUTTON_INDEX = int(index)
  4121.  
  4122. def karakter_kilit(self,qid):
  4123. constInfo.karakter_kilit = int(qid)
  4124.  
  4125. def item_kilit_q(self, id):
  4126. constInfo.ITEM_KILIT = int(id)
  4127.  
  4128. def _kilit(self):
  4129. item_sil_idd = str(constInfo.kilit_id)
  4130. net.SendQuestInputStringPacket(item_sil_idd)
  4131.  
  4132. def __ActivarGui(self):
  4133. global pet_gui_activado
  4134. pet_gui_activado = 1
  4135.  
  4136. def __DeactivarGui(self):
  4137. global pet_gui_activado
  4138. pet_gui_activado = 0
  4139.  
  4140. def __PetShow(self):
  4141. if not self.petInventoryWnd:
  4142. import uiPet
  4143. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4144. self.petInventoryWnd.Show()
  4145.  
  4146. def __PetHide(self):
  4147. if self.petInventoryWnd:
  4148. self.petInventoryWnd.Hide()
  4149.  
  4150. def __PetGetClearSlot(self):
  4151. net.SendQuestInputStringPacket(str(self.petInventoryWnd.GetClearSlot()))
  4152.  
  4153. def __PetGetIncreaseBoni(self):
  4154. net.SendQuestInputStringPacket(str(self.petInventoryWnd.GetIncreaseBoni()))
  4155.  
  4156. def __PetSet(self, itemVnum):
  4157. if not self.petInventoryWnd:
  4158. import uiPet
  4159. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4160. self.petInventoryWnd.SetPet(itemVnum)
  4161.  
  4162. def __PetSetHead(self, itemVnum):
  4163. if not self.petInventoryWnd:
  4164. import uiPet
  4165. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4166. if int(itemVnum) > 0:
  4167. self.petInventoryWnd.SetHeadItem(itemVnum)
  4168. else:
  4169. self.petInventoryWnd.ClearHeadItem()
  4170.  
  4171. def __PetSetNeck(self, itemVnum):
  4172. if not self.petInventoryWnd:
  4173. import uiPet
  4174. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4175. if int(itemVnum) > 0:
  4176. self.petInventoryWnd.SetNeckItem(itemVnum)
  4177. else:
  4178. self.petInventoryWnd.ClearNeckItem()
  4179.  
  4180. def __PetSetFoot(self, itemVnum):
  4181. if not self.petInventoryWnd:
  4182. import uiPet
  4183. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4184. if int(itemVnum) > 0:
  4185. self.petInventoryWnd.SetFootItem(itemVnum)
  4186. else:
  4187. self.petInventoryWnd.ClearFootItem()
  4188.  
  4189. def __PetSetAttackValue(self, value):
  4190. if not self.petInventoryWnd:
  4191. import uiPet
  4192. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4193. self.petInventoryWnd.SetAttackValue(value)
  4194.  
  4195. def __PetSetMagicAttackValue(self, value):
  4196. if not self.petInventoryWnd:
  4197. import uiPet
  4198. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4199. self.petInventoryWnd.SetMagicAttackValue(value)
  4200.  
  4201. def __PetSetArmorValue(self, value):
  4202. if not self.petInventoryWnd:
  4203. import uiPet
  4204. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4205. self.petInventoryWnd.SetArmorValue(value)
  4206.  
  4207. def __PetSetName(self, name):
  4208. if not self.petInventoryWnd:
  4209. import uiPet
  4210. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4211. self.petInventoryWnd.SetName(name.replace("[_]", " "))
  4212.  
  4213. def __PetSetLevel(self, level):
  4214. if not self.petInventoryWnd:
  4215. import uiPet
  4216. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4217. self.petInventoryWnd.SetLevel(level)
  4218.  
  4219. def __PetSetExp(self, exp):
  4220. if not self.petInventoryWnd:
  4221. import uiPet
  4222. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4223. self.petInventoryWnd.SetExp(exp)
  4224. self.petInventoryWnd.UpdateExpBar()
  4225.  
  4226. def __PetSetMaxExp(self, maxexp):
  4227. if not self.petInventoryWnd:
  4228. import uiPet
  4229. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4230. self.petInventoryWnd.SetMaxExp(maxexp)
  4231. self.petInventoryWnd.UpdateExpBar()
  4232.  
  4233. def __PetSetSkillPoints(self, points):
  4234. if not self.petInventoryWnd:
  4235. import uiPet
  4236. self.petInventoryWnd = uiPet.PetInventoryDialog()
  4237. self.petInventoryWnd.SetSkillPoints(points)
  4238. # END_PET_INVENTORY
  4239. def __XMasSong_Enable(self, mode):
  4240. if "1"==mode:
  4241. print "XMAS_SONG ON"
  4242.  
  4243. XMAS_BGM = "xmas.mp3"
  4244.  
  4245. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4246. if musicInfo.fieldMusic != "":
  4247. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  4248.  
  4249. musicInfo.fieldMusic=XMAS_BGM
  4250. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  4251.  
  4252. else:
  4253. print "XMAS_SONG OFF"
  4254.  
  4255. if musicInfo.fieldMusic != "":
  4256. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  4257.  
  4258. musicInfo.fieldMusic=musicInfo.METIN2THEMA
  4259. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  4260.  
  4261. def __RestartDialog_Close(self):
  4262. self.interface.CloseRestartDialog()
  4263.  
  4264. def __otomatikavstart(self):
  4265. otoavinfo.Start = 1
  4266.  
  4267. def OtomatikAv(self):
  4268. import uiotomatikav
  4269. self.otomatikav = uiotomatikav.otomatikav()
  4270. self.otomatikav.Show()
  4271.  
  4272. def __Console_Enable(self):
  4273. constInfo.CONSOLE_ENABLE = TRUE
  4274. self.consoleEnable = TRUE
  4275. app.EnableSpecialCameraMode()
  4276. ui.EnablePaste(TRUE)
  4277.  
  4278. if app.PARTY_MATCH:
  4279. def open_group(self, ayar, index):
  4280. import uipartymatch
  4281. self.wndPartyMatch = uipartymatch.PartyMatchWindow()
  4282. if ayar == "61":
  4283. # self.wndPartyMatch.sifir()
  4284. constInfo.KILITLE = 0
  4285. else:
  4286. if self.interface:
  4287. self.interface.wndMiniMap.open_party_match(ayar, index)
  4288. if ayar == "1":
  4289. self.wndPartyMatch.bilgi_ver(index)
  4290. constInfo.KILITLE = 61
  4291. else:
  4292. constInfo.KILITLE = 0
  4293.  
  4294. def __muerto_guerras(self, id):
  4295. constInfo.muerto_guerras = int(id)
  4296.  
  4297. def __alubias(self):
  4298. for i in xrange(player.INVENTORY_PAGE_SIZE*2):
  4299. if player.GetItemIndex(i) in (70102,):
  4300. net.SendItemUsePacket(i)
  4301. net.SendItemUsePacket(i)
  4302. net.SendItemUsePacket(i)
  4303. net.SendItemUsePacket(i)
  4304. net.SendItemUsePacket(i)
  4305. net.SendItemUsePacket(i)
  4306. break
  4307.  
  4308. def __spirit2(self):
  4309. net.SendChatPacket("(spirit2)")
  4310.  
  4311. def __proteccion_guerra(self):
  4312. net.SendChatPacket("(proteccion_guerra)")
  4313.  
  4314. def __contador_usuarios_guerra(self, contador_usuarios_guerra):
  4315. self.contador_usuarios_guerra.SetText(contador_usuarios_guerra)
  4316.  
  4317. def __muertos_guerra(self, muertos_guerra):
  4318. self.muertos_guerra.SetText(muertos_guerra)
  4319.  
  4320. def __caido_guerra(self, caido_guerra):
  4321. self.caido_guerra.SetText(caido_guerra)
  4322.  
  4323. def __mostrar_usuarios(self):
  4324. self.Espacio.Show()
  4325. self.contador_usuarios_guerra.Show()
  4326. self.muertos_guerra.Show()
  4327. self.caido_guerra.Show()
  4328. self.usuarios_guerra.Show()
  4329. self.ranking_guerra.Show()
  4330. self.ranking_caido.Show()
  4331.  
  4332. def __ocultar_usuarios(self):
  4333. self.Espacio.Hide()
  4334. self.contador_usuarios_guerra.Hide()
  4335. self.muertos_guerra.Hide()
  4336. self.caido_guerra.Hide()
  4337. self.usuarios_guerra.Hide()
  4338. self.ranking_guerra.Hide()
  4339. self.ranking_caido.Hide()
  4340.  
  4341. def __ataque_guerra(self):
  4342. constInfo.ataque_guerra = 1
  4343.  
  4344. def __ataque_guerra1(self):
  4345. constInfo.ataque_guerra = 0
  4346.  
  4347. def __activar_libre(self):
  4348. net.SendChatPacket("/pkmode 2")
  4349.  
  4350. def __grupobug(self):
  4351. net.SendPartyExitPacket()
  4352.  
  4353. ## PrivateShop
  4354. def __PrivateShop_Open(self):
  4355. self.uiNewShop.Show()
  4356.  
  4357. def BINARY_PrivateShop_Appear(self, vid, text):
  4358. if chr.GetInstanceType(vid) in [chr.INSTANCE_TYPE_PLAYER, chr.INSTANCE_TYPE_NPC]:
  4359. self.interface.AppearPrivateShop(vid, text)
  4360.  
  4361. def BINARY_PrivateShop_Disappear(self, vid):
  4362. if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_PLAYER):
  4363. self.interface.DisappearPrivateShop(vid)
  4364.  
  4365. def __OfflineShop_Open(self):
  4366. self.interface.OpenOfflineShopInputNameDialog()
  4367.  
  4368. def BINARY_OfflineShop_Appear(self, vid, text):
  4369. if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC):
  4370. self.interface.AppearOfflineShop(vid, text)
  4371.  
  4372. def BINARY_OfflineShop_Disappear(self, vid):
  4373. if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC):
  4374. self.interface.DisappearOfflineShop(vid)
  4375.  
  4376. def BINARY_OfflineShopGui(self, result, i, time):
  4377. if result == 0:
  4378. self.interface.ToggleOfflineShopAdminPanelWindow2()
  4379. else:
  4380. self.interface.ToggleOfflineShopAdminPanelWindow(i, time)
  4381.  
  4382. ## DayMode
  4383. def __PRESERVE_DayMode_Update(self, mode):
  4384. if "light"==mode:
  4385. background.SetEnvironmentData(0)
  4386. elif "dark"==mode:
  4387.  
  4388. if not self.__IsXMasMap():
  4389. return
  4390.  
  4391. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  4392. background.SetEnvironmentData(1)
  4393.  
  4394. def __DayMode_Update(self, mode):
  4395. if "light"==mode:
  4396. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
  4397. elif "dark"==mode:
  4398.  
  4399. if not self.__IsXMasMap():
  4400. return
  4401.  
  4402. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
  4403.  
  4404. def __DayMode_OnCompleteChangeToLight(self):
  4405. background.SetEnvironmentData(0)
  4406. self.curtain.FadeIn()
  4407.  
  4408. def __DayMode_OnCompleteChangeToDark(self):
  4409. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  4410. background.SetEnvironmentData(1)
  4411. self.curtain.FadeIn()
  4412.  
  4413. ## XMasBoom
  4414. def __XMasBoom_Update(self):
  4415.  
  4416. self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
  4417. if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
  4418. return
  4419.  
  4420. boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
  4421. boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
  4422.  
  4423. if app.GetTime() - self.startTimeXMasBoom > boomTime:
  4424.  
  4425. self.indexXMasBoom += 1
  4426.  
  4427. for i in xrange(boomCount):
  4428. self.__XMasBoom_Boom()
  4429.  
  4430. def __XMasBoom_Boom(self):
  4431. x, y, z = player.GetMainCharacterPosition()
  4432. randX = app.GetRandom(-150, 150)
  4433. randY = app.GetRandom(-150, 150)
  4434.  
  4435. snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
  4436.  
  4437. def __PartyRequestQuestion(self, vid):
  4438. vid = int(vid)
  4439. partyRequestQuestionDialog = uiCommon.QuestionDialog()
  4440. partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
  4441. partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  4442. partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  4443. partyRequestQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.__AnswerPartyRequest(arg))
  4444. partyRequestQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.__AnswerPartyRequest(arg))
  4445. partyRequestQuestionDialog.Open()
  4446. partyRequestQuestionDialog.vid = vid
  4447. self.partyRequestQuestionDialog = partyRequestQuestionDialog
  4448.  
  4449. def __AnswerPartyRequest(self, answer):
  4450. if not self.partyRequestQuestionDialog:
  4451. return
  4452.  
  4453. vid = self.partyRequestQuestionDialog.vid
  4454.  
  4455. if answer:
  4456. net.SendChatPacket("/party_request_accept " + str(vid))
  4457. else:
  4458. net.SendChatPacket("/party_request_deny " + str(vid))
  4459.  
  4460. self.partyRequestQuestionDialog.Close()
  4461. self.partyRequestQuestionDialog = None
  4462.  
  4463. def __PartyRequestDenied(self):
  4464. self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
  4465.  
  4466. if (app.WJ_COMBAT_ZONE):
  4467. def BINARY_CombatZone_Manager(self, tokens, arg1 = 0, arg2 = 0, arg3 = 0, arg4 = 0):
  4468. if tokens == "OpenWindow":
  4469. self.wndCombatZone.Open(arg1, arg2, arg3, arg4)
  4470.  
  4471. elif tokens == "RegisterRank":
  4472. self.wndCombatZone.RegisterRanking()
  4473.  
  4474. elif tokens == "StartFlashing":
  4475. if self.interface:
  4476. self.interface.wndMiniMap.btnCombatZone.FlashEx()
  4477.  
  4478. elif tokens == "RefreshShop":
  4479. if self.interface:
  4480. self.interface.dlgShop.SetCombatZonePoints(arg1)
  4481. self.interface.dlgShop.SetLimitCombatZonePoints(arg2, arg3)
  4482.  
  4483. if app.TOURNAMENT_PVP_SYSTEM:
  4484. def BINARY_Tournament_OnRecvData(self, leftTime, membersOnline_A, membersOnline_B, membersDead_A, membersDead_B, memberLives):
  4485. self.interface.AddTournamentResultWindow(leftTime, membersOnline_A, membersOnline_B, membersDead_A, membersDead_B, memberLives)
  4486.  
  4487. def __EnableTestServerFlag(self):
  4488. app.EnableTestServerFlag()
  4489.  
  4490. def __InGameShop_Show(self, url):
  4491. if constInfo.IN_GAME_SHOP_ENABLE:
  4492. self.interface.OpenWebWindow(url)
  4493.  
  4494. # WEDDING
  4495. def __LoginLover(self):
  4496. if self.interface.wndMessenger:
  4497. self.interface.wndMessenger.OnLoginLover()
  4498.  
  4499. def __LogoutLover(self):
  4500. if self.interface.wndMessenger:
  4501. self.interface.wndMessenger.OnLogoutLover()
  4502. if self.affectShower:
  4503. self.affectShower.HideLoverState()
  4504.  
  4505. def __LoverNear(self):
  4506. if self.affectShower:
  4507. self.affectShower.ShowLoverState()
  4508.  
  4509. def __LoverFar(self):
  4510. if self.affectShower:
  4511. self.affectShower.HideLoverState()
  4512.  
  4513. if app.ENABLE_TICKET_SYSTEM:
  4514. def BINARY_Ticket_Sort_Admin(self, token, val):
  4515. if token == "r":
  4516. if self.wndTicket.IsShow():
  4517. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.TICKET_BTN_ERROR_OPEN)
  4518. return
  4519. else:
  4520. self.wndTicketStaff.Append()
  4521. elif token == "o":
  4522. constInfo.ObjectD["rmdir"][0] = int(val)
  4523. self.wndTicket.Append()
  4524.  
  4525. def BINARY_Ticket_Logs_Team(self, index, ticked_id, char_name, title, content, priority, create_date, status):
  4526. self.wndTicket.AppendLogsTeam(index, ticked_id, char_name, title, content, priority, create_date, status)
  4527.  
  4528. def BINARY_Ticket_Logs_General(self):
  4529. self.wndTicket.AppendLogs()
  4530.  
  4531. def BINARY_Ticket_Logs_Reply(self):
  4532. self.wndTicketReply.AppendLogs()
  4533.  
  4534. def __LoverDivorce(self):
  4535. if self.interface.wndMessenger:
  4536. self.interface.wndMessenger.ClearLoverInfo()
  4537. if self.affectShower:
  4538. self.affectShower.ClearLoverState()
  4539.  
  4540. def __PlayMusic(self, flag, filename):
  4541. flag = int(flag)
  4542. if flag:
  4543. snd.FadeOutAllMusic()
  4544. musicInfo.SaveLastPlayFieldMusic()
  4545. snd.FadeInMusic("BGM/" + filename)
  4546. else:
  4547. snd.FadeOutAllMusic()
  4548. musicInfo.LoadLastPlayFieldMusic()
  4549. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  4550.  
  4551. def OpenMarbleShop(self):
  4552. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  4553. return
  4554. if self.wndMarbleShop.IsShow():
  4555. self.wndMarbleShop.Hide()
  4556. else:
  4557. self.wndMarbleShop.Show()
  4558.  
  4559. def OpenDragonLairRanking(self):
  4560. if self.interface:
  4561. self.interface.OpenDragonLairRanking()
  4562.  
  4563. def AddDragonLairRanking(self, data):
  4564. if self.interface:
  4565. line = int(data.split("#")[1])
  4566. name = str(data.split("#")[2])
  4567. empire = int(data.split("#")[3])
  4568. killcount = int(data.split("#")[4])
  4569. self.interface.AddDragonLairRanking(line, name, empire, killcount)
  4570.  
  4571. # END_OF_WEDDING
  4572.  
  4573. """# Ticaret LOG #
  4574. def OpenTicaretLog(self):
  4575. self.Board = ui.BoardWithTitleBar()
  4576. self.Board.SetSize(241+30+215, 271+40+40-17-17)
  4577. self.Board.SetCenterPosition()
  4578. self.Board.AddFlag('movable')
  4579. self.Board.AddFlag('float')
  4580. self.Board.SetTitleName('Ticaret Kayitlarin')
  4581. self.Board.SetCloseEvent(self.Kapat)
  4582. self.Board.Show()
  4583.  
  4584.  
  4585. #self.Ticaret = 1
  4586. self.Bekle3 = app.GetTime()
  4587.  
  4588. self.TekliflerText = ui.TextLine_Alisveris()
  4589. self.TekliflerText.SetParent(self.Board)
  4590. self.TekliflerText.SetPosition(0, 30)
  4591. self.TekliflerText.SetText(str(player.GetName()))
  4592. self.TekliflerText.SetWindowHorizontalAlignCenter()
  4593. self.TekliflerText.SetHorizontalAlignCenter()
  4594. self.TekliflerText.Show()
  4595.  
  4596. self.ThinBoard = ui.ThinBoard()
  4597. self.ThinBoard.SetParent(self.Board)
  4598. self.ThinBoard.SetSize(241-18+26+215, 250)
  4599. self.ThinBoard.SetPosition(10+9-5-3, 48)
  4600. self.ThinBoard.Show()
  4601.  
  4602. self.ListBox=ui.ListBox_Scroll()
  4603. self.ListBox.SetParent(self.Board)
  4604. self.ListBox.SetPosition(10+9, 50)
  4605. self.ListBox.SetSize(241-18+26-8+215, 250)
  4606. #self.ListBox.SetEvent(ui.__mem_func__(self.__OnSelectListBox))
  4607. self.ListBox.Show()
  4608.  
  4609.  
  4610. self.ListBox.ClearItem()
  4611.  
  4612. pos = 0
  4613. if os.path.exists(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg"):
  4614. ac = open(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "r").readlines()
  4615. for i in ac:
  4616. bol = i.split("#")
  4617. self.ListBox.InsertItem(pos, str(bol[1]) + " adli oyuncu ile (" + str(bol[2]) + ") tarihinde ticaret gerceklesti.")
  4618. pos += 1
  4619. else:
  4620. self.ListBox.InsertItem(0, "Yapilan hic ticaret kaydi yok.")
  4621.  
  4622. def Kapat(self):
  4623. self.Board.Hide()
  4624. self.TekliflerText.Hide()
  4625. self.ThinBoard.Hide()
  4626. self.ListBox.Hide()
  4627. self.Ticaret = 0
  4628.  
  4629. ##Log Bilgi Ekran
  4630. def log_ekran(self):
  4631. self.log_Board = ui.BoardWithTitleBar()
  4632. self.log_Board.SetSize(225, 160)
  4633. self.log_Board.SetCenterPosition()
  4634. self.log_Board.AddFlag('movable')
  4635. self.log_Board.AddFlag('float')
  4636. self.log_Board.SetTitleName('Log Sistemi')
  4637. self.log_Board.SetCloseEvent(self.log_Close)
  4638. self.log_Board.Show()
  4639. self.comp = Component()
  4640. self.pazar_img = self.comp.ExpandedImage(self.log_Board , 56, 60, 'd:/ymir work/ui/logsistem/pazar.tga')
  4641. self.tic_img = self.comp.ExpandedImage(self.log_Board , 140, 60, 'd:/ymir work/ui/logsistem/tic.tga')#140
  4642. self.pazar_button = self.comp.Button(self.log_Board, 'Pazar', '', 44, 105, self.__pazar_log_ac, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
  4643. self.tic_button = self.comp.Button(self.log_Board, 'Ticaret', '', 127, 105, self.__tic_gecmis_ac, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
  4644.  
  4645.  
  4646. def log_Close(self):
  4647. self.log_Board.Hide()
  4648.  
  4649.  
  4650. ##Pazar_log
  4651.  
  4652. def pazar_log_gui(self):
  4653. constInfo.KONTROL2=1
  4654. self.p_log = ui.BoardWithTitleBar()
  4655. self.p_log.SetSize(450, 300)
  4656. self.p_log.SetCenterPosition()
  4657. self.p_log.AddFlag('movable')
  4658. self.p_log.AddFlag('float')
  4659. self.p_log.SetTitleName(translate.GECMIS)
  4660. self.p_log.SetCloseEvent(self.Close_p_log)
  4661. self.p_log.Show()
  4662. self.comp_p_log = Component()
  4663.  
  4664. self.pazar_bilgi_yenile = self.comp_p_log.Button(self.p_log, 'Yenile', translate.YENILEGEC, 0, 0, self.pazar_log_getir, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
  4665. self.noo1 = self.comp_p_log.TextLine(self.p_log, '', 44, 48, self.comp_p_log.RGB(255, 125, 0))
  4666. self.kisii1 = self.comp_p_log.TextLine(self.p_log, '', 69, 48, self.comp_p_log.RGB(255, 255, 255))
  4667. self.noo2 = self.comp_p_log.TextLine(self.p_log, '', 44, 68, self.comp_p_log.RGB(255, 125, 0))
  4668. self.kisii2 = self.comp_p_log.TextLine(self.p_log, '', 69, 68, self.comp_p_log.RGB(255, 255, 255))
  4669. self.noo3 = self.comp_p_log.TextLine(self.p_log, '', 44, 88, self.comp_p_log.RGB(255, 125, 0))
  4670. self.kisii3 = self.comp_p_log.TextLine(self.p_log, '', 69, 88, self.comp_p_log.RGB(255, 255, 255))
  4671. self.noo4 = self.comp_p_log.TextLine(self.p_log, '', 44, 108, self.comp_p_log.RGB(255, 125, 0))
  4672. self.kisii4 = self.comp_p_log.TextLine(self.p_log, '', 69, 108, self.comp_p_log.RGB(255, 255, 255))
  4673. self.noo5 = self.comp_p_log.TextLine(self.p_log, '', 44, 128, self.comp_p_log.RGB(255, 125, 0))
  4674. self.kisii5 = self.comp_p_log.TextLine(self.p_log, '', 69, 128, self.comp_p_log.RGB(255, 255, 255))
  4675. self.noo6 = self.comp_p_log.TextLine(self.p_log, '', 44, 148, self.comp_p_log.RGB(255, 125, 0))
  4676. self.kisii6 = self.comp_p_log.TextLine(self.p_log, '', 69, 148, self.comp_p_log.RGB(255, 255, 255))
  4677. self.noo7 = self.comp_p_log.TextLine(self.p_log, '', 44, 168, self.comp_p_log.RGB(255, 125, 0))
  4678. self.kisii7 = self.comp_p_log.TextLine(self.p_log, '', 69, 168, self.comp_p_log.RGB(255, 255, 255))
  4679. self.noo8 = self.comp_p_log.TextLine(self.p_log, '', 44, 188, self.comp_p_log.RGB(255, 125, 0))
  4680. self.kisii8 = self.comp_p_log.TextLine(self.p_log, '', 69, 188, self.comp_p_log.RGB(255, 255, 255))
  4681. self.noo9 = self.comp_p_log.TextLine(self.p_log, '', 44, 208, self.comp_p_log.RGB(255, 125, 0))
  4682. self.kisii9 = self.comp_p_log.TextLine(self.p_log, '', 69, 208, self.comp_p_log.RGB(255, 255, 255))
  4683. self.noo10 = self.comp_p_log.TextLine(self.p_log, '', 44, 228, self.comp_p_log.RGB(255, 125, 0))
  4684. self.kisii10 = self.comp_p_log.TextLine(self.p_log, '', 69, 228, self.comp_p_log.RGB(255, 255, 255))
  4685.  
  4686.  
  4687. import event
  4688. event.QuestButtonClick(constInfo.pazar_log_q_id)
  4689.  
  4690. def Close_p_log(self):
  4691. if constInfo.KONTROL2==1:
  4692. self.p_log.Hide()
  4693. constInfo.KONTROL2=0
  4694.  
  4695. def pazar_log_getir(self):
  4696. if gameInfo.PAZAR_CAN==0:
  4697. import event
  4698. event.QuestButtonClick(constInfo.pazar_log_q_id)
  4699. gameInfo.PAZAR_OPEN=1
  4700. gameInfo.PAZAR_TIME=app.GetTime() + 60
  4701. gameInfo.PAZAR_CAN=1
  4702. else:
  4703. chat.AppendChat(chat.CHAT_TYPE_INFO, translate.YENILE1DK)
  4704.  
  4705. def __pazar_log_ac(self):
  4706. self.pazar_log_gui()
  4707.  
  4708. def __pazar_log_bilgi_gir(self, no, alanname, vnum, fiyat, tarih):
  4709. kod = int(vnum)
  4710. item.SelectItem(kod)
  4711. item_isim = item.GetItemName()
  4712. if no == "1":
  4713. self.noo1.SetText(no)
  4714. self.kisii1.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4715. self.p_log.SetSize(600, 120)
  4716. self.pazar_bilgi_yenile.SetPosition(204, 800)
  4717. elif no == "2":
  4718. self.noo2.SetText(no)
  4719. self.kisii2.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4720. self.p_log.SetSize(600, 140)
  4721. self.pazar_bilgi_yenile.SetPosition(204, 100)
  4722. elif no == "3":
  4723. self.noo3.SetText(no)
  4724. self.kisii3.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4725. self.p_log.SetSize(600, 160)
  4726. self.pazar_bilgi_yenile.SetPosition(204, 120)
  4727. elif no == "4":
  4728. self.noo4.SetText(no)
  4729. self.kisii4.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4730. self.p_log.SetSize(600, 180)
  4731. self.pazar_bilgi_yenile.SetPosition(204, 140)
  4732. elif no == "5":
  4733. self.noo5.SetText(no)
  4734. self.kisii5.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4735. self.p_log.SetSize(600, 200)
  4736. self.pazar_bilgi_yenile.SetPosition(204, 160)
  4737. elif no == "6":
  4738. self.noo6.SetText(no)
  4739. self.kisii6.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4740. self.p_log.SetSize(600, 220)
  4741. self.pazar_bilgi_yenile.SetPosition(204, 180)
  4742. elif no == "7":
  4743. self.noo7.SetText(no)
  4744. self.kisii7.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4745. self.p_log.SetSize(600, 240)
  4746. self.pazar_bilgi_yenile.SetPosition(204, 200)
  4747. elif no == "8":
  4748. self.noo8.SetText(no)
  4749. self.kisii8.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4750. self.p_log.SetSize(600, 260)
  4751. self.pazar_bilgi_yenile.SetPosition(204, 220)
  4752. elif no == "9":
  4753. self.noo9.SetText(no)
  4754. self.kisii9.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4755. self.p_log.SetSize(600, 280)
  4756. self.pazar_bilgi_yenile.SetPosition(204, 240)
  4757. elif no == "10":
  4758. self.noo10.SetText(no)
  4759. self.kisii10.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  4760. self.p_log.SetSize(600, 300)
  4761. self.pazar_bilgi_yenile.SetPosition(204, 260)
  4762.  
  4763. def __pazar_log_q_id(self, id):
  4764. constInfo.pazar_log_q_id = int(id)
  4765.  
  4766.  
  4767. def __pazar_log_q(self, id):
  4768. constInfo.pazar_log_q = int(id)
  4769.  
  4770.  
  4771. def __item_fiyat(self):
  4772. fiyat = constInfo.item_fiyat
  4773. net.SendQuestInputStringPacket(fiyat)
  4774.  
  4775. def __item_isim(self):
  4776. isim = constInfo.item_isim
  4777. net.SendQuestInputStringPacket(isim)
  4778.  
  4779. def __itemi_alan(self):
  4780. alanname = constInfo.itemi_alan
  4781. net.SendQuestInputStringPacket(alanname)
  4782.  
  4783. #Ticaret Gecmi?i
  4784. def __tic_quest_id(self, id):
  4785. constInfo.tic_gecmis = int(id)
  4786.  
  4787. ##Ticaret Gecmi?i
  4788. def ticaret_gecmisi(self):
  4789. constInfo.KONTROL1=1
  4790. self.Board_tic = ui.BoardWithTitleBar()
  4791. self.Board_tic.SetSize(450, 300)
  4792. self.Board_tic.SetCenterPosition()
  4793. self.Board_tic.AddFlag('movable')
  4794. self.Board_tic.AddFlag('float')
  4795. self.Board_tic.SetTitleName('Ticaret Gecmi?i')
  4796. self.Board_tic.SetCloseEvent(self.Close_tic)
  4797. self.Board_tic.Show()
  4798. self.__BuildKeyDict()
  4799. self.comp_tic = Component()
  4800.  
  4801.  
  4802. self.tic_bilgi_yenile = self.comp_tic.Button(self.Board_tic, 'Yenile', 'Ticaret Gecmi?ini Yenile', 0, 0, self.tic_gecmis_getir, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
  4803. self.no1 = self.comp_tic.TextLine(self.Board_tic, '', 44, 48, self.comp_tic.RGB(255, 125, 0))
  4804. self.kisi1 = self.comp_tic.TextLine(self.Board_tic, '', 69, 48, self.comp_tic.RGB(255, 255, 255))
  4805. self.no2 = self.comp_tic.TextLine(self.Board_tic, '', 44, 68, self.comp_tic.RGB(255, 125, 0))
  4806. self.kisi2 = self.comp_tic.TextLine(self.Board_tic, '', 69, 68, self.comp_tic.RGB(255, 255, 255))
  4807. self.no3 = self.comp_tic.TextLine(self.Board_tic, '', 44, 88, self.comp_tic.RGB(255, 125, 0))
  4808. self.kisi3 = self.comp_tic.TextLine(self.Board_tic, '', 69, 88, self.comp_tic.RGB(255, 255, 255))
  4809. self.no4 = self.comp_tic.TextLine(self.Board_tic, '', 44, 108, self.comp_tic.RGB(255, 125, 0))
  4810. self.kisi4 = self.comp_tic.TextLine(self.Board_tic, '', 69, 108, self.comp_tic.RGB(255, 255, 255))
  4811. self.no5 = self.comp_tic.TextLine(self.Board_tic, '', 44, 128, self.comp_tic.RGB(255, 125, 0))
  4812. self.kisi5 = self.comp_tic.TextLine(self.Board_tic, '', 69, 128, self.comp_tic.RGB(255, 255, 255))
  4813. self.no6 = self.comp_tic.TextLine(self.Board_tic, '', 44, 148, self.comp_tic.RGB(255, 125, 0))
  4814. self.kisi6 = self.comp_tic.TextLine(self.Board_tic, '', 69, 148, self.comp_tic.RGB(255, 255, 255))
  4815. self.no7 = self.comp_tic.TextLine(self.Board_tic, '', 44, 168, self.comp_tic.RGB(255, 125, 0))
  4816. self.kisi7 = self.comp_tic.TextLine(self.Board_tic, '', 69, 168, self.comp_tic.RGB(255, 255, 255))
  4817. self.no8 = self.comp_tic.TextLine(self.Board_tic, '', 44, 188, self.comp_tic.RGB(255, 125, 0))
  4818. self.kisi8 = self.comp_tic.TextLine(self.Board_tic, '', 69, 188, self.comp_tic.RGB(255, 255, 255))
  4819. self.no9 = self.comp_tic.TextLine(self.Board_tic, '', 44, 208, self.comp_tic.RGB(255, 125, 0))
  4820. self.kisi9 = self.comp_tic.TextLine(self.Board_tic, '', 69, 208, self.comp_tic.RGB(255, 255, 255))
  4821. self.no10 = self.comp_tic.TextLine(self.Board_tic, '', 44, 228, self.comp_tic.RGB(255, 125, 0))
  4822. self.kisi10 = self.comp_tic.TextLine(self.Board_tic, '', 69, 228, self.comp_tic.RGB(255, 255, 255))
  4823.  
  4824.  
  4825. import event
  4826. event.QuestButtonClick(constInfo.tic_gecmis)
  4827.  
  4828. def Close_tic(self):
  4829. if constInfo.KONTROL1==1:
  4830. self.Board_tic.Hide()
  4831. constInfo.KONTROL1=0
  4832.  
  4833. def tic_gecmis_getir(self):
  4834. if gameInfo.TICARET_CAN==0:
  4835. import event
  4836. event.QuestButtonClick(constInfo.tic_gecmis)
  4837. gameInfo.TICARET_OPEN=1
  4838. gameInfo.TICARET_TIME=app.GetTime() + 60
  4839. gameInfo.TICARET_CAN=1
  4840. else:
  4841. chat.AppendChat(chat.CHAT_TYPE_INFO, translate.TICYENILE)
  4842.  
  4843.  
  4844. def __tic_gecmis_ac(self):
  4845. self.ticaret_gecmisi()
  4846.  
  4847. def __tic_gecmis_bilgi_gir(self, no, kisi1, kisii2, tarih):
  4848. if no == "1":
  4849. self.no1.SetText(no)
  4850. self.kisi1.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4851. self.Board_tic.SetSize(450, 120)
  4852. self.tic_bilgi_yenile.SetPosition(204, 800)
  4853. elif no == "2":
  4854. self.no2.SetText(no)
  4855. self.kisi2.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4856. self.Board_tic.SetSize(450, 140)
  4857. self.tic_bilgi_yenile.SetPosition(204, 100)
  4858. elif no == "3":
  4859. self.no3.SetText(no)
  4860. self.kisi3.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4861. self.Board_tic.SetSize(450, 160)
  4862. self.tic_bilgi_yenile.SetPosition(204, 120)
  4863. elif no == "4":
  4864. self.no4.SetText(no)
  4865. self.kisi4.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4866. self.Board_tic.SetSize(450, 180)
  4867. self.tic_bilgi_yenile.SetPosition(204, 140)
  4868. elif no == "5":
  4869. self.no5.SetText(no)
  4870. self.kisi5.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4871. self.Board_tic.SetSize(450, 200)
  4872. self.tic_bilgi_yenile.SetPosition(204, 160)
  4873. elif no == "6":
  4874. self.no6.SetText(no)
  4875. self.kisi6.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4876. self.Board_tic.SetSize(450, 220)
  4877. self.tic_bilgi_yenile.SetPosition(204, 180)
  4878. elif no == "7":
  4879. self.no7.SetText(no)
  4880. self.kisi7.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4881. self.Board_tic.SetSize(450, 240)
  4882. self.tic_bilgi_yenile.SetPosition(204, 200)
  4883. elif no == "8":
  4884. self.no8.SetText(no)
  4885. self.kisi8.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4886. self.Board_tic.SetSize(450, 260)
  4887. self.tic_bilgi_yenile.SetPosition(204, 220)
  4888. elif no == "9":
  4889. self.no9.SetText(no)
  4890. self.kisi9.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4891. self.Board_tic.SetSize(450, 280)
  4892. self.tic_bilgi_yenile.SetPosition(204, 240)
  4893. elif no == "10":
  4894. self.no10.SetText(no)
  4895. self.kisi10.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  4896. self.Board_tic.SetSize(450, 300)
  4897. self.tic_bilgi_yenile.SetPosition(204, 260)"""
  4898.  
  4899. def Uzaktan_ticaret_soru(self, isim, level):
  4900. uzaktan_sorusu = uiCommon.QuestionDialog()
  4901. uzaktan_sorusu.SetText("|cffFDD017|H|h" + str(isim)+ "|cff00ccff" + "(Nivel."+str(level)+")"+ "|h|r" + " Doreste sa negocieze la distanta cu tine.")
  4902. uzaktan_sorusu.SetAcceptEvent(lambda arg=TRUE: self.kabul(isim))
  4903. uzaktan_sorusu.SetCancelEvent(lambda arg=FALSE: self.hayir(isim))
  4904. uzaktan_sorusu.Open()
  4905. self.uzaktan_sorusu = uzaktan_sorusu
  4906. return
  4907.  
  4908. def kabul(self, isim):
  4909. net.SendChatPacket("/uzaktan_ticaret_kabul " + str(isim))
  4910. self.uzaktan_sorusu.Close()
  4911.  
  4912. def hayir(self, isim):
  4913. net.SendChatPacket("/uzaktan_ticaret_hayir " + str(isim))
  4914. self.uzaktan_sorusu.Close()
  4915.  
  4916. if app.ENABLE_SEND_TARGET_INFO:
  4917. def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
  4918. if not raceNum in constInfo.MONSTER_INFO_DATA:
  4919. constInfo.MONSTER_INFO_DATA.update({raceNum : {}})
  4920. constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
  4921. curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
  4922.  
  4923. isUpgradeable = False
  4924. isMetin = False
  4925. item.SelectItem(itemVnum)
  4926. if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
  4927. isUpgradeable = True
  4928. elif item.GetItemType() == item.ITEM_TYPE_METIN:
  4929. isMetin = True
  4930.  
  4931. for curItem in curList:
  4932. if isUpgradeable:
  4933. if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
  4934. if not (itemVnum in curItem["vnum_list"]):
  4935. curItem["vnum_list"].append(itemVnum)
  4936. return
  4937. elif isMetin:
  4938. if curItem.has_key("vnum_list"):
  4939. baseVnum = curItem["vnum_list"][0]
  4940. if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
  4941. if not (itemVnum in curItem["vnum_list"]):
  4942. curItem["vnum_list"].append(itemVnum)
  4943. return
  4944. else:
  4945. if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
  4946. return
  4947.  
  4948. if isUpgradeable or isMetin:
  4949. curList.append({"vnum_list":[itemVnum], "count":itemCount})
  4950. else:
  4951. curList.append({"vnum":itemVnum, "count":itemCount})
  4952.  
  4953. def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
  4954. self.targetBoard.RefreshMonsterInfoBoard()
  4955.  
  4956. ########Anti Exp Button by Sanii##########
  4957. def AntiExp(self, qid):
  4958. constInfo.ANTI_EXP = int(qid)
  4959.  
  4960. def AntiExpState(self, state):
  4961. constInfo.ANTI_EXP_STATE = int(state)
  4962.  
  4963. ##########################################
  4964.  
  4965. # BONI_SWITCHER
  4966. def __BoniSwitcherChangeVisible(self):
  4967. if not self.boniSwitcherWnd[self.LastBoniSwitcherId].IsShow():
  4968. self.__HideAllBoniSwitcher()
  4969. self.boniSwitcherWnd[self.LastBoniSwitcherId].Show(FALSE)
  4970. else:
  4971. self.__HideAllBoniSwitcher()
  4972.  
  4973. def __BoniSwitcherShow(self, id):
  4974. lastId = self.LastBoniSwitcherId
  4975. self.LastBoniSwitcherId = id
  4976. if not self.boniSwitcherWnd[id].IsShow():
  4977. self.__HideAllBoniSwitcher()
  4978. (x, y) = self.boniSwitcherWnd[lastId].GetGlobalPosition()
  4979. self.boniSwitcherWnd[id].SetPosition(x, y)
  4980. self.boniSwitcherWnd[id].Show(FALSE)
  4981.  
  4982. def __BoniSwitcherHide(self, id):
  4983. if self.boniSwitcherWnd[id]:
  4984. self.boniSwitcherWnd[id].Hide()
  4985.  
  4986. def __HideAllBoniSwitcher(self):
  4987. for i in xrange(len(self.boniSwitcherWnd)):
  4988. self.__BoniSwitcherHide(i)
  4989.  
  4990. def __ResetBoniFromSwitcher(self):
  4991. constInfo.BONI_LIST_WEAPON = []
  4992. constInfo.BONI_LIST_WEAPON_ADDON = []
  4993. constInfo.BONI_LIST_ARMOR = []
  4994. constInfo.BONI_LIST_BRACELET = []
  4995. constInfo.BONI_LIST_BOOTS = []
  4996. constInfo.BONI_LIST_NECKLACE = []
  4997. constInfo.BONI_LIST_HELMET = []
  4998. constInfo.BONI_LIST_SHIELD = []
  4999. constInfo.BONI_LIST_EARRINGS = []
  5000. # ITEM_SHOP
  5001. def __ItemShopShow(self):
  5002. if not self.itemShopWnd:
  5003. import uiItemShop
  5004. self.itemShopWnd = uiItemShop.ItemShopBoard()
  5005. self.itemShopWnd.Show()
  5006.  
  5007. def __ISSetLoadButtonIndex(self, index):
  5008. constInfo.ITEM_SHOP_LOAD_BUTTON_INDEX = int(index)
  5009.  
  5010. def __ISSetBuyButtonIndex(self, index):
  5011. constInfo.ITEM_SHOP_BUY_BUTTON_INDEX = int(index)
  5012.  
  5013. def __ISGetBuyID(self):
  5014. if self.itemShopWnd:
  5015. net.SendQuestInputStringPacket(self.itemShopWnd.GetBuyItemString())
  5016. else:
  5017. net.SendQuestInputStringPacket("ERROR")
  5018.  
  5019. def __ISGetBuyID2(self):
  5020. if self.itemShopWnd:
  5021. net.SendQuestInputStringPacket(self.itemShopWnd.GetBuyItemString2())
  5022. else:
  5023. net.SendQuestInputStringPacket("ERROR")
  5024.  
  5025. def __Input0(self):
  5026. constInfo.INPUT_IGNORE = 0
  5027.  
  5028. def __Input1(self):
  5029. constInfo.INPUT_IGNORE = 1
  5030.  
  5031. def __ISAddCategory(self, catId, catName):
  5032. self.itemShopWnd.AddCategory(catId, catName.replace("[_]", " "))
  5033.  
  5034. def __primera_muerte(self):
  5035. self.primera_muerte.Show()
  5036. snd.PlaySound("sound/ui/primera_muerte.wav")
  5037. net.SendChatPacket("(primera_muerte)")
  5038.  
  5039. def __doble_muerte(self):
  5040. self.doble_muerte.Show()
  5041. snd.PlaySound("sound/ui/doble_muerte.wav")
  5042. net.SendChatPacket("(doble_muerte)")
  5043.  
  5044. def __triple_muerte(self):
  5045. self.triple_muerte.Show()
  5046. snd.PlaySound("sound/ui/triple_muerte.wav")
  5047. net.SendChatPacket("(triple_muerte)")
  5048.  
  5049. def __exterminio(self):
  5050. self.exterminio.Show()
  5051. snd.PlaySound("sound/ui/exterminio.wav")
  5052. net.SendChatPacket("(exterminio)")
  5053.  
  5054. def __muertacular(self):
  5055. self.muertacular.Show()
  5056. snd.PlaySound("sound/ui/muertacular.wav")
  5057. net.SendChatPacket("(muertacular)")
  5058.  
  5059. def __bestialidad(self):
  5060. self.bestialidad.Show()
  5061. snd.PlaySound("sound/ui/bestialidad.wav")
  5062. net.SendChatPacket("(bestialidad)")
  5063.  
  5064. def __salvajada(self):
  5065. self.salvajada.Show()
  5066. snd.PlaySound("sound/ui/salvajada.wav")
  5067. net.SendChatPacket("(salvajada)")
  5068.  
  5069. def __catastrofe(self):
  5070. self.catastrofe.Show()
  5071. snd.PlaySound("sound/ui/catastrofe.wav")
  5072. net.SendChatPacket("(catastrofe)")
  5073.  
  5074. def __apocalipsis(self):
  5075. self.apocalipsis.Show()
  5076. snd.PlaySound("sound/ui/apocalipsis.wav")
  5077. net.SendChatPacket("(apocalipsis)")
  5078.  
  5079. def __lluvia_muertos(self):
  5080. self.lluvia_muertos.Show()
  5081. snd.PlaySound("sound/ui/lluvia_muertos.wav")
  5082. net.SendChatPacket("(lluvia_muertos)")
  5083.  
  5084. def __super_increible(self):
  5085. self.super_increible.Show()
  5086. snd.PlaySound("sound/ui/super_increible.wav")
  5087. net.SendChatPacket("(super_increible)")
  5088.  
  5089. def __hidemedallas_gui(self):
  5090. self.Medallas_gui.Hide()
  5091. self.primera_muerte.Hide()
  5092. self.doble_muerte.Hide()
  5093. self.triple_muerte.Hide()
  5094. self.exterminio.Hide()
  5095. self.muertacular.Hide()
  5096. self.bestialidad.Hide()
  5097. self.salvajada.Hide()
  5098. self.catastrofe.Hide()
  5099. self.apocalipsis.Hide()
  5100. self.lluvia_muertos.Hide()
  5101. self.super_increible.Hide()
  5102. self.muertes.Hide()
  5103.  
  5104. def __showmedallas_gui(self):
  5105. self.Medallas_gui.Show()
  5106. self.muertes.Show()
  5107.  
  5108. def __muertes(self, muertes):
  5109. self.muertes.SetText(muertes)
  5110.  
  5111. def __ISSelectCategory(self, catId):
  5112. self.itemShopWnd.SelectCategory(catId)
  5113.  
  5114. def __ISClearItems(self):
  5115. self.itemShopWnd.Clear()
  5116.  
  5117. def __ISAddItem(self, catId, itemId, itemVnum, itemCount, itemCost, itemCostType, attr1, val1, attr2, val2, attr3, val3, attr4, val4, attr5, val5, attr6, val6, attr7, val7, sock1, sock2, sock3):
  5118. itemAttr = [[attr1, val1], [attr2, val2], [attr3, val3], [attr4, val4], [attr5, val5], [attr6, val6], [attr7, val7]]
  5119. for attr in itemAttr:
  5120. attr[0] = int(attr[0])
  5121. attr[1] = int(attr[1])
  5122. itemSocket = [int(sock1), int(sock2), int(sock3)]
  5123. self.curIsItem = {
  5124. "cat" : catId,
  5125. "id" : itemId,
  5126. "vnum" : itemVnum,
  5127. "count" : itemCount,
  5128. "desc" : "",
  5129. "cost" : itemCost,
  5130. "cost_type" : itemCostType,
  5131. "attr" : itemAttr,
  5132. "socket" : itemSocket,
  5133. }
  5134.  
  5135. def __ISAddItemDesc(self, itemDesc):
  5136. obj = self.curIsItem
  5137. if not obj:
  5138. return
  5139. obj["desc"] += itemDesc.replace("[_]", " ")
  5140.  
  5141. self.itemShopWnd.AddItem(obj["cat"], obj["id"], obj["vnum"], obj["count"], obj["desc"], obj["cost"], obj["cost_type"], obj["attr"], obj["socket"])
  5142. self.curIsItem = None
  5143.  
  5144. def __ISSetLoadSuccess(self):
  5145. self.itemShopWnd.SetLoadSuccess()
  5146.  
  5147. def __ISSetLoadFail(self):
  5148. self.itemShopWnd.SetLoadFail()
  5149.  
  5150. def __ISSetBuySuccess(self):
  5151. self.itemShopWnd.SetItemBuySuccess()
  5152.  
  5153. def __ISSetBuyFail(self):
  5154. self.itemShopWnd.SetItemBuyFail()
  5155.  
  5156. def __ISSetCoins(self, coins):
  5157. self.itemShopWnd.SetCoins(coins)
  5158.  
  5159. def __ISSetMarks(self, marks):
  5160. self.itemShopWnd.SetMarks(marks)
  5161. # END_ITEM_SHOP
  5162. def __AddBoniToSwitcher(self, EquipType, boniType):
  5163. EquipType = int(EquipType)
  5164. if EquipType == 1:
  5165. constInfo.BONI_LIST_WEAPON.append(int(boniType))
  5166. constInfo.BONI_LIST_WEAPON_ADDON.append(int(boniType))
  5167. elif EquipType == 2:
  5168. constInfo.BONI_LIST_ARMOR.append(int(boniType))
  5169. elif EquipType == 3:
  5170. constInfo.BONI_LIST_BRACELET.append(int(boniType))
  5171. elif EquipType == 4:
  5172. constInfo.BONI_LIST_BOOTS.append(int(boniType))
  5173. elif EquipType == 5:
  5174. constInfo.BONI_LIST_NECKLACE.append(int(boniType))
  5175. elif EquipType == 6:
  5176. constInfo.BONI_LIST_HELMET.append(int(boniType))
  5177. elif EquipType == 7:
  5178. constInfo.BONI_LIST_SHIELD.append(int(boniType))
  5179. elif EquipType == 8:
  5180. constInfo.BONI_LIST_EARRINGS.append(int(boniType))
  5181. elif EquipType == 9:
  5182. constInfo.BONI_LIST_WEAPON_ADDON.append(int(boniType))
  5183.  
  5184. def __AddMaxValueToBoni(self, boniType, maxValue):
  5185. constInfo.BONI_LIST_MAX_VALUE[int(boniType)] = int(maxValue)
  5186.  
  5187. def __SetBoniSwitcherLoad(self):
  5188. constInfo.BONI_SWITCHER_LOAD = TRUE
  5189.  
  5190. def __BoniSwitcherCheckEvent(self, slotPos):
  5191. for boniSwitcher in self.boniSwitcherWnd:
  5192. if boniSwitcher.aktItemPos == int(slotPos):
  5193. return TRUE
  5194. return FALSE
  5195. # END_BONI_SWITCHER
  5196.  
  5197.  
  5198. def Teleport(self, getString):
  5199. if getString.find("index") != -1:
  5200. self.teleport.UpdateIndex(int(getString.split("x")[1]))
  5201. else:
  5202. constInfo.SendString = str(self.teleport.SendToServer)
  5203. constInfo.CApiSetHide = 1
  5204.  
  5205. def __evento_ultimo_superviviente(self):
  5206. import net
  5207. net.SendChatPacket("/pkmode 2", chat.CHAT_TYPE_TALKING)
  5208.  
  5209. def __Switcher(self):
  5210. import uiswitch
  5211. self.wndSwitch = uiswitch.Switcher()
  5212. self.wndSwitch.Show()
  5213.  
  5214. # def __menubg2(self):
  5215. # if constInfo.MENU_BG2 == 0:
  5216. # constInfo.MENU_BG2 = 1
  5217. # self.menu_bg2.Show()
  5218. # self.Activare_Menu2.Hide()
  5219. # self.Dezactivare_Menu2.Show()
  5220.  
  5221. # else:
  5222. # constInfo.MENU_BG2 = 0
  5223. # self.menu_bg2.Hide()
  5224. # self.Activare_Menu2.Show()
  5225. # self.Dezactivare_Menu2.Hide()
  5226. # def __DMAGAZIN_questindex(self, value):
  5227. # constInfo.DESCHIDERE_MAGAZIN_QUESTINDEX = int(value)
  5228.  
  5229. # def __DeschidereMagazin(self):
  5230. # DeschidereMagazin = constInfo.DESCHIDERE_MAGAZIN_QUESTINDEX
  5231. # event.QuestButtonClick(DeschidereMagazin)
  5232.  
  5233. # def __menubg(self):
  5234. ## if constInfo.MENU_BG == 0:
  5235. # constInfo.MENU_BG = 1
  5236. # self.menu_bg.Show()
  5237. # self.Activare_Menu.Hide()
  5238. # self.Dezactivare_Menu.Show()
  5239. # else:
  5240. # constInfo.MENU_BG = 0
  5241. # self.menu_bg.Hide()
  5242. # self.Activare_Menu.Show()
  5243. # self.Dezactivare_Menu.Hide()
  5244.  
  5245. # def __BonusPage(self):
  5246. # import uibonuspage
  5247. # self.wndBonus = uibonuspage.BonusBoardDialog()
  5248. # self.wndBonus.Show()
  5249.  
  5250. # switchbot
  5251. # def __JINHAN(self):
  5252. # import uistatusup
  5253. # self.wndJinHan = uistatusup.StatusUp()
  5254. # self.wndJinHan.Show()
  5255. # END_switchbot
  5256.  
  5257. def __bonus_questindex(self, value3):
  5258. constInfo.BONUS_QUESTINDEX = int(value3)
  5259.  
  5260. def __activare_bonus(self):
  5261. activare_bonus = constInfo.BONUS_QUESTINDEX
  5262. event.QuestButtonClick(activare_bonus)
  5263.  
  5264. def __depozit_questindex(self, qid):
  5265. constInfo.Depoport= int(qid)
  5266.  
  5267. def __activare_depozit(self):
  5268. activare_depozit = constInfo.DEPOZIT_QUESTINDEX
  5269. event.QuestButtonClick(activare_depozit)
  5270.  
  5271. def __antiexp_questindex(self, value1):
  5272. constInfo.ANTIEXP_QUESTINDEX = int(value1)
  5273.  
  5274. def __activare_antiexp(self):
  5275. activare_antiexp = constInfo.ANTIEXP_QUESTINDEX
  5276. event.QuestButtonClick(activare_antiexp)
  5277.  
  5278. def __teleporter_questindex(self, value2):
  5279. constInfo.TELEPORTER_QUESTINDEX = int(value2)
  5280.  
  5281. def __activare_teleporter(self):
  5282. activare_teleporter = constInfo.TELEPORTER_QUESTINDEX
  5283. event.QuestButtonClick(activare_teleporter)
  5284.  
  5285. def showtransfer(self):
  5286. import uiTransfer
  5287. self.TransferWnd = uiTransfer.TransferWindow()
  5288. self.TransferWnd.Open()
  5289.  
  5290. # 5Lv Beceri Sistemi
  5291. # Gui Sistemleri
  5292. def __BecSystem1(self):
  5293. self.black = savbec.BlackIsinlanma()
  5294. self.black.OpenWindow()
  5295.  
  5296. def __BecSystem2(self):
  5297. self.black = surabec.BlackIsinlanma()
  5298. self.black.OpenWindow()
  5299.  
  5300. def __BecSystem3(self):
  5301. self.black = ninjabec.BlackIsinlanma()
  5302. self.black.OpenWindow()
  5303.  
  5304. def __BecSystem4(self):
  5305. self.black = samanbec.BlackIsinlanma()
  5306. self.black.OpenWindow()
  5307.  
  5308. def __BecSystem5(self):
  5309. self.black = lycanbec.BlackIsinlanma()
  5310. self.black.OpenWindow()
  5311.  
  5312. # Beceri Sistemleri
  5313. # Savasci Becerileri
  5314. def zihinsel_oto_bec(self,qid):
  5315. constInfo.zihinsel_oto_bec = int(qid)
  5316.  
  5317. def bedensel_oto_bec(self,qid):
  5318. constInfo.bedensel_oto_bec = int(qid)
  5319.  
  5320. # Sura Becerileri
  5321. def karabuyu_oto_bec(self,qid):
  5322. constInfo.karabuyu_oto_bec = int(qid)
  5323.  
  5324. def buyulusilah_oto_bec(self,qid):
  5325. constInfo.buyulusilah_oto_bec = int(qid)
  5326.  
  5327. # Ninja Becerileri
  5328. def yakin_oto_bec(self,qid):
  5329. constInfo.yakin_oto_bec = int(qid)
  5330.  
  5331. def uzak_oto_bec(self,qid):
  5332. constInfo.uzak_oto_bec = int(qid)
  5333.  
  5334. # Saman Becerileri
  5335. def ejderha_oto_bec(self,qid):
  5336. constInfo.ejderha_oto_bec = int(qid)
  5337.  
  5338. def iyilestirme_oto_bec(self,qid):
  5339. constInfo.iyilestirme_oto_bec = int(qid)
  5340.  
  5341. # Lycan Becerileri
  5342. def lycany_oto_bec(self,qid):
  5343. constInfo.lycany_oto_bec = int(qid)
  5344.  
  5345. #def lycanu_oto_bec(self,qid):
  5346. # constInfo.lycanu_oto_bec = int(qid)
  5347.  
  5348. #def __showbonus(self):
  5349. # serex = uibonuspage.BonusBoardDialog()
  5350.  
  5351. def __showbonus(self):
  5352. import uiBonusPage
  5353. global bonuspp
  5354. try:
  5355. if bonuspp != 1:
  5356. exec 'uiBonusPage.BonusBoardDialog().Show()'
  5357. else:
  5358. pass
  5359. except ImportError:
  5360. import dbg,app
  5361. dbg.Trace('uiBonusPage.py Importing error')
  5362. app.Abort()
  5363. # guildstorage begin
  5364.  
  5365. def _GuildStorageCMD(self, command):
  5366. cmd = command.split("/")
  5367.  
  5368. if cmd[0] == "OPEN":
  5369. self.interface.GuildStorageWindow.Open(int(cmd[1]))
  5370. elif cmd[0] == "REFRESH":
  5371. self.interface.GuildStorageWindow.RefreshSlots()
  5372. elif cmd[0] == "REFRESH_MONEY":
  5373. self.interface.GuildStorageWindow.SetMoney(cmd[1])
  5374. elif cmd[0] == "REFRESH_MEMBERS":
  5375. self.interface.GuildStorageWindow.Adminpanel["board"].RefreshMembers()
  5376. elif cmd[0] == "CLEAR_TEMPSLOTS":
  5377. constInfo.GUILDSTORAGE["tempslots"] = {"TAB0" : {},"TAB1" : {},"TAB2" : {}}
  5378. elif cmd[0] == "COMPARE_TEMPSLOTS":
  5379. for i in range(3):
  5380. if constInfo.GUILDSTORAGE["tempslots"]["TAB"+str(i)] != constInfo.GUILDSTORAGE["slots"]["TAB"+str(i)]:
  5381. constInfo.GUILDSTORAGE["slots"]["TAB"+str(i)] = {}
  5382. constInfo.GUILDSTORAGE["slots"]["TAB"+str(i)] = constInfo.GUILDSTORAGE["tempslots"]["TAB"+str(i)]
  5383. self.interface.GuildStorageWindow.RefreshSlots()
  5384. elif cmd[0] == "QID":
  5385. self.GuildStorageQID(cmd[1])
  5386. elif cmd[0] == "QUESTCMD":
  5387. self._GuildStorageQuestCMD()
  5388. #self.teleport = uiteleport.TeleportWindow()
  5389. elif cmd[0] == "MEMBER_COMPLETE":
  5390. constInfo.GUILDSTORAGE["members"] = {}
  5391. self.interface.GuildStorageWindow.ClearMembers()
  5392. import event
  5393. constInfo.GUILDSTORAGE["questCMD"] = "GETMEMBERLIST"
  5394. event.QuestButtonClick(int(constInfo.GUILDSTORAGE["qid"]))
  5395.  
  5396.  
  5397. def _GuildStorageAddItemSlot(self, slot, tab ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6):
  5398. self.interface.GuildStorageWindow.AddItemSlot(slot, tab ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6)
  5399.  
  5400. def _GuildStorageAddItem(self, slot ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6):
  5401. slotsWidth = 15
  5402. slotsHeight = 8
  5403. slot = int(slot)
  5404. if slot <= 120:
  5405. constInfo.GUILDSTORAGE["slots"]["TAB0"][slot] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5406. elif slot > 120 and slot <= 240:
  5407. constInfo.GUILDSTORAGE["slots"]["TAB1"][slot-120] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5408. elif slot > 240 and slot <= 360:
  5409. constInfo.GUILDSTORAGE["slots"]["TAB2"][slot-240] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5410.  
  5411. def _GuildStorageTempSlotsAdd(self,slot ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6):
  5412. slot = int(slot)
  5413. if slot <= 120:
  5414. constInfo.GUILDSTORAGE["tempslots"]["TAB0"][slot] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5415. elif slot > 120 and slot <= 240:
  5416. constInfo.GUILDSTORAGE["tempslots"]["TAB1"][slot-120] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5417. elif slot > 240 and slot <= 360:
  5418. constInfo.GUILDSTORAGE["tempslots"]["TAB2"][slot-240] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5419.  
  5420. def _GuildStorageAddLog(self,id,name,date,type,do,desc):
  5421. self.interface.GuildStorageWindow.LogsInsert(id,name,date,type,do,desc)
  5422. constInfo.GUILDSTORAGE["logs"][int(id)] = [name,date,type,do,desc]
  5423.  
  5424. def _GuildStorageQuestCMD(self):
  5425. net.SendQuestInputStringPacket(str(constInfo.GUILDSTORAGE["questCMD"]))
  5426. constInfo.GUILDSTORAGE["questCMD"] = "NULL#"
  5427.  
  5428. def GuildStorageQID(self, qid):
  5429. constInfo.GUILDSTORAGE["qid"] = int(qid)
  5430.  
  5431. def _GuildStorageAddMemberToList(self,memberId,member,authority0,authority1,authority2,authority3):
  5432. constInfo.GUILDSTORAGE["members"]["member"+memberId] = [member,int(authority0),int(authority1),int(authority2),int(authority3)]
  5433. # Guildstorage end
  5434. def __MountSystem(self, info, i=0):
  5435. if info=="Item":
  5436. if i!=0:
  5437. constInfo.MountSystem["index"] = int(i)
  5438. self.MountingSystem.Open()
  5439. elif info=="Input":
  5440. net.SendQuestInputStringPacket(str(constInfo.MountSystem["CMD"]))
  5441.  
  5442. def __SchicksalRad(self, cmd):
  5443. CMD = cmd.split("/")
  5444. if CMD[0]=="index":
  5445. constInfo.SCHICKSAL_RAD["index"] = int(CMD[1])
  5446. constInfo.SCHICKSAL_RAD["kosten"] = int(CMD[2])
  5447. constInfo.SCHICKSAL_RAD["free"] = int(CMD[3])
  5448. elif CMD[0]=="input":
  5449. net.SendQuestInputStringPacket(str(constInfo.SCHICKSAL_RAD["ServerCMD"]))
  5450. elif CMD[0]=="free":
  5451. constInfo.SCHICKSAL_RAD["free"] = int(CMD[1])
  5452. elif CMD[0]=="Answer":
  5453. self.SchicksalRad.SetVars(CMD[1], CMD[2], CMD[3], CMD[4], CMD[5])
  5454. constInfo.SCHICKSAL_RAD["free"] = int(CMD[6])
  5455.  
  5456. def __guinameOPEN(self): # use different function names!
  5457. import schicksalrad
  5458. self.SchicksalRad = schicksalrad.RadDesSchicksals()
  5459. self.SchicksalRad.Open()() # naturally use the code which is provided for the GUI
  5460.  
  5461. if app.ENABLE_MELEY_LAIR_DUNGEON:
  5462. def OpenMeleyRanking(self):
  5463. if self.interface:
  5464. self.interface.OpenMeleyRanking()
  5465.  
  5466. def AddRankMeleyRanking(self, data):
  5467. if self.interface:
  5468. line = int(data.split("#")[1])
  5469. name = str(data.split("#")[2])
  5470. members = int(data.split("#")[3])
  5471. seconds = int(data.split("#")[4])
  5472. minutes = seconds // 60
  5473. seconds %= 60
  5474. if seconds > 0:
  5475. time = localeInfo.TIME_MIN_SEC % (minutes, seconds)
  5476. else:
  5477. time = localeInfo.TIME_MIN % (minutes)
  5478.  
  5479. self.interface.RankMeleyRanking(line, name, members, time)
  5480.  
  5481. if app.WJ_SECURITY_SYSTEM:
  5482. def OpenSecurityCreate(self):
  5483. if self.interface:
  5484. self.interface.OpenSecurityCreate()
  5485.  
  5486. def OpenSecurityDialog(self):
  5487. if self.interface:
  5488. self.interface.OpenSecurityDialog()
  5489.  
  5490. def CloseSecurityCreate(self):
  5491. if self.interface:
  5492. self.interface.CloseSecurityCreate()
  5493.  
  5494. def CloseSecurityDialog(self):
  5495. if self.interface:
  5496. self.interface.CloseSecurityDialog()
  5497.  
  5498. if app.ENABLE_SASH_SYSTEM:
  5499. def ActSash(self, iAct, bWindow):
  5500. if self.interface:
  5501. self.interface.ActSash(iAct, bWindow)
  5502.  
  5503. def AlertSash(self, bWindow):
  5504. snd.PlaySound("sound/ui/make_soket.wav")
  5505. if bWindow:
  5506. self.PopupMessage(localeInfo.SASH_DEL_SERVEITEM)
  5507. else:
  5508. self.PopupMessage(localeInfo.SASH_DEL_ABSORDITEM)
  5509.  
  5510. if app.WJ_CHANGELOOK_SYSTEM:
  5511. def ActChangeLook(self, iAct):
  5512. if self.interface:
  5513. self.interface.ActChangeLook(iAct)
  5514.  
  5515. def AlertChangeLook(self):
  5516. self.PopupMessage(localeInfo.CHANGE_LOOK_DEL_ITEM)
  5517.  
  5518. def OpenGuiGaya(self):
  5519. self.interface.OpenGuiGaya()
  5520.  
  5521. def GayaCheck(self):
  5522. self.interface.GayaCheck()
  5523.  
  5524. def OpenGuiGayaMarket(self):
  5525. self.interface.OpenGuiGayaMarket()
  5526.  
  5527. def GayaMarketItems(self,vnums,gaya,count):
  5528. self.interface.GayaMarketItems(vnums,gaya,count)
  5529.  
  5530. def GayaMarketSlotsDesblock(self,slot0,slot1,slot2,slot3,slot4,slot5):
  5531. self.interface.GayaMarketSlotsDesblock(slot0,slot1,slot2,slot3,slot4,slot5)
  5532.  
  5533. def GayaMarketClear(self):
  5534. self.interface.GayaMarketClear()
  5535.  
  5536. def GayaTimeMarket(self, time):
  5537. self.interface.GayaTime(time)
  5538.  
  5539. if app.WJ_SHOP_SEARCH_SYSTEM:
  5540. def OpenPrivateShopSearch(self, type):
  5541. if self.interface:
  5542. self.interface.OpenPrivateShopSearch(type)
  5543.  
  5544. def RefreshShopSearch(self):
  5545. self.interface.RefreshShopSearch()
  5546.  
  5547. def BuyShopSearch(self):
  5548. self.interface.RefreshShopSearch()
  5549. self.PopupMessage(localeInfo.PRIVATESHOPSEARCH_BUY_SUCCESS)
  5550.  
  5551. if app.ENABLE_SHOW_CHEST_DROP:
  5552. def BINARY_AddChestDropInfo(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
  5553. if self.interface:
  5554. self.interface.AddChestDropInfo(chestVnum, pageIndex, slotIndex, itemVnum, itemCount)
  5555.  
  5556. def BINARY_RefreshChestDropInfo(self, chestVnum):
  5557. if self.interface:
  5558. self.interface.RefreshChestDropInfo(chestVnum)
  5559.  
  5560. def lonca_gecmis_q(self, id):
  5561. import constInfo
  5562. constInfo.lonca_gecmis_q = int(id)
  5563.  
  5564. def lonca_gecmis_ekle(self, isim):
  5565. import constInfo
  5566. constInfo.lonca_gecmis_list.append(isim)
  5567.  
  5568. def gecmistemizle(self):
  5569. import constInfo
  5570. constInfo.lonca_gecmis_list = []
  5571.  
  5572. def isim_ver(self):
  5573. import constInfo
  5574. net.SendQuestInputStringPacket(str(constInfo.lonca_gecmis_isim))
  5575.  
  5576. def uyari(self, msg):
  5577. if msg == "bilgiyok":
  5578. self.PopupMessage("Henuz bilgi girilmemis!")
  5579. elif msg == "loncayok":
  5580. self.PopupMessage("Lonca bulunamadi")
  5581.  
  5582. def siralamaopen(self):
  5583. self.oyunicisiralama.Open()
  5584.  
  5585. def __oyunicisirala(self, info):
  5586. CMD = info.split("/")
  5587. if CMD[0]=="index":
  5588. constInfo.oyunicisiralama["index"] = int(CMD[1])
  5589. elif CMD[0]=="input":
  5590. net.SendQuestInputStringPacket(str(constInfo.oyunicisiralama["CMD"]))
  5591. elif CMD[0]=="yeniliste":
  5592. constInfo.oyunicisiralama["Liste"] = []
  5593. elif CMD[0]=="liste":
  5594. constInfo.oyunicisiralama["Liste"].append(CMD[1].split("|"))
  5595. elif CMD[0]=="blok":
  5596. self.oyunicisiralama.LoadPage(CMD[1])
  5597. elif CMD[0]=="sayfa":
  5598. self.oyunicisiralama.Setsayfa(CMD[1])
  5599.  
  5600. def uyarisiralama(self, msg):
  5601. if msg == "bilgiyok":
  5602. self.PopupMessage("Henuz bilgi girilmemis!")
  5603. elif msg == "oyuncuyok":
  5604. self.PopupMessage("Oyuncu bulunamadi!")
  5605.  
  5606. def loncasiralamaopen(self):
  5607. self.loncasiralama.Open()
  5608.  
  5609. def __oyunicilonca(self, info):
  5610. CMD = info.split("/")
  5611. if CMD[0]=="index":
  5612. constInfo.loncasiralama["index"] = int(CMD[1])
  5613. elif CMD[0]=="input":
  5614. net.SendQuestInputStringPacket(str(constInfo.loncasiralama["CMD"]))
  5615. elif CMD[0]=="yeniliste":
  5616. constInfo.loncasiralama["Liste"] = []
  5617. elif CMD[0]=="liste":
  5618. constInfo.loncasiralama["Liste"].append(CMD[1].split("|"))
  5619. elif CMD[0]=="blok":
  5620. self.loncasiralama.LoadPage(CMD[1])
  5621. elif CMD[0]=="sayfa":
  5622. self.loncasiralama.Setsayfa(CMD[1])
  5623.  
  5624. def uyariloncasira(self, msg):
  5625. if msg == "bilgiyok":
  5626. self.PopupMessage("Henuz bilgi girilmemis!")
  5627. elif msg == "oyuncuyok":
  5628. self.PopupMessage("Oyuncu bulunamadi!")
  5629.  
  5630. def recordac(self):
  5631. self.recordscreen.Open()
  5632.  
  5633. def __recordscreen(self, info):
  5634. CMD = info.split("/")
  5635. if CMD[0]=="index":
  5636. constInfo.record["index"] = int(CMD[1])
  5637. elif CMD[0]=="input":
  5638. net.SendQuestInputStringPacket(str(constInfo.record["CMD"]))
  5639. elif CMD[0]=="yeniliste":
  5640. constInfo.record["Liste"] = []
  5641. elif CMD[0]=="liste":
  5642. constInfo.record["Liste"].append(CMD[1].split("|"))
  5643. elif CMD[0]=="blok":
  5644. self.recordscreen.LoadPage(CMD[1])
  5645. elif CMD[0]=="sayfa":
  5646. self.recordscreen.Setsayfa(CMD[1])
  5647.  
  5648. def recordwarning(self, msg):
  5649. if msg == "bilgiyok":
  5650. self.PopupMessage("Bilgi yok!")
  5651. elif msg == "oyuncuyok":
  5652. self.PopupMessage("Oyuncu bulunamadi!")
  5653.  
  5654. def lonca_tanitim(self):
  5655. self.loncanitanit.Open()
  5656.  
  5657. def loncatanitekran(self):
  5658. self.loncanitanit.Open()
  5659.  
  5660. def __loncatanitim(self, info):
  5661. CMD = info.split("/")
  5662. if CMD[0]=="index":
  5663. constInfo.loncani_tanit["index"] = int(CMD[1])
  5664. elif CMD[0]=="input":
  5665. net.SendQuestInputStringPacket(str(constInfo.loncani_tanit["CMD"]))
  5666. elif CMD[0]=="yeniliste":
  5667. constInfo.loncani_tanit["Liste"] = []
  5668. elif CMD[0]=="liste":
  5669. constInfo.loncani_tanit["Liste"].append(CMD[1].split("|"))
  5670. elif CMD[0]=="blok":
  5671. self.loncanitanit.LoadPage(CMD[1])
  5672. elif CMD[0]=="sayfa":
  5673. self.loncanitanit.Setsayfa(CMD[1])
  5674.  
  5675. def lonca_lider_q(self,qid):
  5676. constInfo.lonca_lider_q = int(qid)
  5677.  
  5678. def lider_ekle(self, isim, lonca):
  5679. import constInfo
  5680. constInfo.lider_list.append("#"+isim+"#"+lonca)
  5681.  
  5682. def lider_sifirla(self):
  5683. import constInfo
  5684. constInfo.lider_list = []
  5685.  
  5686. def __BonusPage(self):
  5687. import PaginaBonusuri
  5688. global BPisLodaded
  5689. try:
  5690. if BPisLodaded[0] == 0:
  5691. BPisLodaded[0] = 1
  5692. exec 'PaginaBonusuri.BonusBoardDialog().Show()'
  5693. else:
  5694. BPisLodaded[0] = 0
  5695. exec 'PaginaBonusuri.BonusBoardDialog().Hide()'
  5696.  
  5697. except ImportError:
  5698. import dbg,app
  5699. dbg.Trace('PaginaBonusuri.py Importing error')
  5700. app.Abort
  5701.  
  5702. if app.ENABLE_SUPPORT_SYSTEM:
  5703. def OpenSupportGui(self):
  5704. if constInfo.SUPPORTGUI == 0:
  5705. self.supportpg.Show()
  5706. self.supportpg.SetTop()
  5707. constInfo.SUPPORTGUI = 1
  5708. else:
  5709. self.supportpg.Close()
  5710. constInfo.SUPPORTGUI = 0
  5711.  
  5712. def SetSupportLevel(self, level):
  5713. self.supportpg.SetLevel(level)
  5714. constInfo.SUPPORTLEVEL = int(level)
  5715.  
  5716. def SetSupportName(self, name, name2):
  5717. self.supportpg.SetName(name, name2)
  5718.  
  5719. def SupportLeave(self):
  5720. self.supportpg.SetDefaultInfo()
  5721. self.supportpg.Close()
  5722.  
  5723. def SupportInt(self , ints):
  5724. self.supportpg.SetInt(ints)
  5725.  
  5726. def SetSupportExp(self, exp, exptot):
  5727. if int(exptot) > 0:
  5728. self.supportpg.SetExperience(exp, exptot)
  5729. self.supportpg.SetExperience(exp, exptot)
  5730.  
  5731. def SetSupportIcon(self, vnum):
  5732. if int(vnum) > 0:
  5733. self.supportpg.SetImageSlot(vnum)
  5734. self.supportpg.SetImageSlot(vnum)
  5735.  
  5736. def SetSupportSpeciality(self,speciality):
  5737. self.supportpg.SetSpeciality(speciality)
  5738.  
  5739. #def test(self):
  5740. # background.SetVisiblePart(background.PART_TREE, False)#True
  5741.  
  5742. class Component:
  5743. def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
  5744. button = ui.Button()
  5745. if parent != None:
  5746. button.SetParent(parent)
  5747. button.SetPosition(x, y)
  5748. button.SetUpVisual(UpVisual)
  5749. button.SetOverVisual(OverVisual)
  5750. button.SetDownVisual(DownVisual)
  5751. button.SetText(buttonName)
  5752. button.SetToolTipText(tooltipText)
  5753. button.Show()
  5754. button.SetEvent(func)
  5755. return button
  5756.  
  5757. def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
  5758. button = ui.ToggleButton()
  5759. if parent != None:
  5760. button.SetParent(parent)
  5761. button.SetPosition(x, y)
  5762. button.SetUpVisual(UpVisual)
  5763. button.SetOverVisual(OverVisual)
  5764. button.SetDownVisual(DownVisual)
  5765. button.SetText(buttonName)
  5766. button.SetToolTipText(tooltipText)
  5767. button.Show()
  5768. button.SetToggleUpEvent(funcUp)
  5769. button.SetToggleDownEvent(funcDown)
  5770. return button
  5771.  
  5772. def EditLine(self, parent, editlineText, x, y, width, heigh, max):
  5773. SlotBar = ui.SlotBar()
  5774. if parent != None:
  5775. SlotBar.SetParent(parent)
  5776. SlotBar.SetSize(width, heigh)
  5777. SlotBar.SetPosition(x, y)
  5778. SlotBar.Show()
  5779. Value = ui.EditLine()
  5780. Value.SetParent(SlotBar)
  5781. Value.SetSize(width, heigh)
  5782. Value.SetPosition(1, 1)
  5783. Value.SetMax(max)
  5784. Value.SetLimitWidth(width)
  5785. Value.SetMultiLine()
  5786. Value.SetText(editlineText)
  5787. Value.Show()
  5788. return SlotBar, Value
  5789.  
  5790. def TextLine(self, parent, textlineText, x, y, color):
  5791. textline = ui.TextLine()
  5792. if parent != None:
  5793. textline.SetParent(parent)
  5794. textline.SetPosition(x, y)
  5795. if color != None:
  5796. textline.SetFontColor(color[0], color[1], color[2])
  5797. textline.SetText(textlineText)
  5798. textline.Show()
  5799. return textline
  5800.  
  5801. def RGB(self, r, g, b):
  5802. return (r*255, g*255, b*255)
  5803.  
  5804. def SliderBar(self, parent, sliderPos, func, x, y):
  5805. Slider = ui.SliderBar()
  5806. if parent != None:
  5807. Slider.SetParent(parent)
  5808. Slider.SetPosition(x, y)
  5809. Slider.SetSliderPos(sliderPos / 100)
  5810. Slider.Show()
  5811. Slider.SetEvent(func)
  5812. return Slider
  5813.  
  5814. def ExpandedImage(self, parent, x, y, img):
  5815. image = ui.ExpandedImageBox()
  5816. if parent != None:
  5817. image.SetParent(parent)
  5818. image.SetPosition(x, y)
  5819. image.LoadImage(img)
  5820. image.Show()
  5821. return image
  5822.  
  5823. def ComboBox(self, parent, text, x, y, width):
  5824. combo = ui.ComboBox()
  5825. if parent != None:
  5826. combo.SetParent(parent)
  5827. combo.SetPosition(x, y)
  5828. combo.SetSize(width, 15)
  5829. combo.SetCurrentItem(text)
  5830. combo.Show()
  5831. return combo
  5832.  
  5833. def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
  5834. thin = ui.ThinBoard()
  5835. if parent != None:
  5836. thin.SetParent(parent)
  5837. if moveable == TRUE:
  5838. thin.AddFlag('movable')
  5839. thin.AddFlag('float')
  5840. thin.SetSize(width, heigh)
  5841. thin.SetPosition(x, y)
  5842. if center == TRUE:
  5843. thin.SetCenterPosition()
  5844. thin.Show()
  5845. return thin
  5846.  
  5847. def Gauge(self, parent, width, color, x, y):
  5848. gauge = ui.Gauge()
  5849. if parent != None:
  5850. gauge.SetParent(parent)
  5851. gauge.SetPosition(x, y)
  5852. gauge.MakeGauge(width, color)
  5853. gauge.Show()
  5854. return gauge
  5855.  
  5856. def ListBoxEx(self, parent, x, y, width, heigh):
  5857. bar = ui.Bar()
  5858. if parent != None:
  5859. bar.SetParent(parent)
  5860. bar.SetPosition(x, y)
  5861. bar.SetSize(width, heigh)
  5862. bar.SetColor(0x77000000)
  5863. bar.Show()
  5864. ListBox=ui.ListBoxEx()
  5865. ListBox.SetParent(bar)
  5866. ListBox.SetPosition(0, 0)
  5867. ListBox.SetSize(width, heigh)
  5868. ListBox.Show()
  5869. scroll = ui.ScrollBar()
  5870. scroll.SetParent(ListBox)
  5871. scroll.SetPosition(width-15, 0)
  5872. scroll.SetScrollBarSize(heigh)
  5873. scroll.Show()
  5874. ListBox.SetScrollBar(scroll)
  5875. return bar, ListBox
  5876.  
  5877. if app.ENABLE_SWITCHER_MIJAGO:
  5878. #Switchbot
  5879. def __toggleSwitchbot(self):
  5880. if self.switchbot.bot_shown == 1:
  5881. self.switchbot.Hide()
  5882. else:
  5883. self.switchbot.Show()
  5884. # END_switchbot
  5885.  
  5886. # Daily Gift
  5887. def ManagerGiftSystem(self, cmd):
  5888. cmd = cmd.split("|")
  5889. if cmd[0] == "Show":
  5890. self.wnddailygift.Show()
  5891. elif cmd[0] == "DeleteRewards":
  5892. self.wnddailygift.DeleteRewards()
  5893. elif cmd[0] == "SetDailyReward":
  5894. self.wnddailygift.SetDailyReward(cmd[1]) # numero de la recompensa
  5895. elif cmd[0] == "SetTime":
  5896. self.wnddailygift.SetTime(cmd[1]) # tiempo en numeros grandes
  5897. elif cmd[0] == "SetReward":
  5898. self.wnddailygift.SetReward(cmd[1], cmd[2]) #hacer un array con los items
  5899. elif cmd[0] == "SetRewardDone":
  5900. self.wnddailygift.SetRewardDone()
Add Comment
Please, Sign In to add comment