Guest User

game nemodificat

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