1. import gameInfo
  2. import uisaplingsw
  3. import uitaskbar
  4. import translate
  5. import os
  6. import app
  7. import dbg
  8. import grp
  9. import item
  10. import background
  11. import chr
  12. import chrmgr
  13. import player
  14. import snd
  15. import chat
  16. import event
  17. import textTail
  18. import snd
  19. import net
  20. import effect
  21. import wndMgr
  22. import fly
  23. import systemSetting
  24. import quest
  25. import guild
  26. import skill
  27. import messenger
  28. import localeInfo
  29. import constInfo
  30. import uiruhtasi
  31. import uibkoku
  32. import exchange
  33. import ime
  34. import time
  35. import localegame
  36. import revensysteminfo
  37. import reveninfo
  38. import ui
  39. import uiCommon
  40. import uiPhaseCurtain
  41. import uiMapNameShower
  42. import uiAffectShower
  43. import uiPlayerGauge
  44. import uiCharacter
  45. import uiTarget
  46. import uinpcekran
  47. import uibiyolog
  48. import uiwordgamesystem
  49. import uiloncaistatistik
  50. # PRIVATE_SHOP_PRICE_LIST
  51. import uiPrivateShopBuilder
  52. import uiOfflineShopBuilder
  53. import uiOfflineShop
  54. # END_OF_PRIVATE_SHOP_PRICE_LIST
  55. import mouseModule
  56. import consoleModule
  57. import localeInfo
  58. import playerSettingModule
  59. import interfaceModule
  60. import musicInfo
  61. import debugInfo
  62. import stringCommander
  63. import record
  64. import oyunicisiralama
  65. import loncasiralama
  66. import guildwarkillcounter
  67. # -------------------
  68. # 5Lv Oto Bec Sistemi
  69. import savbec
  70. import surabec
  71. import ninjabec
  72. import samanbec
  73. # -------------------
  74. if app.ENABLE_PVP_ADVANCED:
  75. import constInfo as pvp
  76. import uiCommon as message
  77. import uiduel
  78. from _weakref import proxy
  79. #bildirimler = 0
  80. kisi = ""
  81. oyunagirdi = 0
  82. oyunagirdibeklemesuresi = 2
  83. oyunagirdiglobaltimesuresi = app.GetTime() - 2
  84. # TEXTTAIL_LIVINGTIME_CONTROL
  85. #if localeInfo.IsJAPAN():
  86. # app.SetTextTailLivingTime(8.0)
  87. # END_OF_TEXTTAIL_LIVINGTIME_CONTROL
  88. # SCREENSHOT_CWDSAVE
  89. SCREENSHOT_CWDSAVE = False
  90. SCREENSHOT_DIR = None
  91. if localeInfo.IsEUROPE():
  92. SCREENSHOT_CWDSAVE = True
  93. if localeInfo.IsCIBN10():
  94. SCREENSHOT_CWDSAVE = False
  95. SCREENSHOT_DIR = "YT2W"
  96. cameraDistance = 1550.0
  97. cameraPitch = 27.0
  98. cameraRotation = 0.0
  99. cameraHeight = 100.0
  100. testAlignment = 0
  101. ######################################
  102. class Component:
  103. def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
  104. button = ui.Button()
  105. if parent != None:
  106. button.SetParent(parent)
  107. button.SetPosition(x, y)
  108. button.SetUpVisual(UpVisual)
  109. button.SetOverVisual(OverVisual)
  110. button.SetDownVisual(DownVisual)
  111. button.SetText(buttonName)
  112. button.SetToolTipText(tooltipText)
  113. button.Show()
  114. button.SetEvent(func)
  115. return button
  116. def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
  117. button = ui.ToggleButton()
  118. if parent != None:
  119. button.SetParent(parent)
  120. button.SetPosition(x, y)
  121. button.SetUpVisual(UpVisual)
  122. button.SetOverVisual(OverVisual)
  123. button.SetDownVisual(DownVisual)
  124. button.SetText(buttonName)
  125. button.SetToolTipText(tooltipText)
  126. button.Show()
  127. button.SetToggleUpEvent(funcUp)
  128. button.SetToggleDownEvent(funcDown)
  129. return button
  130. def EditLine(self, parent, editlineText, x, y, width, heigh, max):
  131. SlotBar = ui.SlotBar()
  132. if parent != None:
  133. SlotBar.SetParent(parent)
  134. SlotBar.SetSize(width, heigh)
  135. SlotBar.SetPosition(x, y)
  136. SlotBar.Show()
  137. Value = ui.EditLine()
  138. Value.SetParent(SlotBar)
  139. Value.SetSize(width, heigh)
  140. Value.SetPosition(1, 1)
  141. Value.SetMax(max)
  142. Value.SetLimitWidth(width)
  143. Value.SetMultiLine()
  144. Value.SetText(editlineText)
  145. Value.Show()
  146. return SlotBar, Value
  147. def TextLine(self, parent, textlineText, x, y, color):
  148. textline = ui.TextLine()
  149. if parent != None:
  150. textline.SetParent(parent)
  151. textline.SetPosition(x, y)
  152. if color != None:
  153. textline.SetFontColor(color[0], color[1], color[2])
  154. textline.SetText(textlineText)
  155. textline.Show()
  156. return textline
  157. def RGB(self, r, g, b):
  158. return (r*255, g*255, b*255)
  159. def SliderBar(self, parent, sliderPos, func, x, y):
  160. Slider = ui.SliderBar()
  161. if parent != None:
  162. Slider.SetParent(parent)
  163. Slider.SetPosition(x, y)
  164. Slider.SetSliderPos(sliderPos / 100)
  165. Slider.Show()
  166. Slider.SetEvent(func)
  167. return Slider
  168. def ExpandedImage(self, parent, x, y, img):
  169. image = ui.ImageBox()
  170. if parent != None:
  171. image.SetParent(parent)
  172. image.SetPosition(x, y)
  173. image.LoadImage(img)
  174. image.Show()
  175. return image
  176. def ComboBox(self, parent, text, x, y, width):
  177. combo = ui.ComboBox()
  178. if parent != None:
  179. combo.SetParent(parent)
  180. combo.SetPosition(x, y)
  181. combo.SetSize(width, 15)
  182. combo.SetCurrentItem(text)
  183. combo.Show()
  184. return combo
  185. def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
  186. thin = ui.ThinBoard()
  187. if parent != None:
  188. thin.SetParent(parent)
  189. if moveable == TRUE:
  190. thin.AddFlag('movable')
  191. thin.AddFlag('float')
  192. thin.SetSize(width, heigh)
  193. thin.SetPosition(x, y)
  194. if center == TRUE:
  195. thin.SetCenterPosition()
  196. thin.Show()
  197. return thin
  198. def Gauge(self, parent, width, color, x, y):
  199. gauge = ui.Gauge()
  200. if parent != None:
  201. gauge.SetParent(parent)
  202. gauge.SetPosition(x, y)
  203. gauge.MakeGauge(width, color)
  204. gauge.Show()
  205. return gauge
  206. def ListBoxEx(self, parent, x, y, width, heigh):
  207. bar = ui.Bar()
  208. if parent != None:
  209. bar.SetParent(parent)
  210. bar.SetPosition(x, y)
  211. bar.SetSize(width, heigh)
  212. bar.SetColor(0x77000000)
  213. bar.Show()
  214. ListBox=ui.ListBoxEx()
  215. ListBox.SetParent(bar)
  216. ListBox.SetPosition(0, 0)
  217. ListBox.SetSize(width, heigh)
  218. ListBox.Show()
  219. scroll = ui.ScrollBar()
  220. scroll.SetParent(ListBox)
  221. scroll.SetPosition(width-15, 0)
  222. scroll.SetScrollBarSize(heigh)
  223. scroll.Show()
  224. ListBox.SetScrollBar(scroll)
  225. return bar, ListBox
  226. ######################################
  227. class GameWindow(ui.ScriptWindow):
  228. def __init__(self, stream):
  229. ui.ScriptWindow.__init__(self, "GAME")
  230. self.SetWindowName("game")
  231. net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
  232. player.SetGameWindow(self)
  233. self.biyoekran = uibiyolog.BiyologEkran()
  234. self.biyoekran.Hide()
  235. self.endTime = 0
  236. self.quickSlotPageIndex = 0
  237. self.lastPKModeSendedTime = 0
  238. self.pressNumber = None
  239. self.guildWarQuestionDialog = None
  240. self.interface = None
  241. self.targetBoard = None
  242. self.console = None
  243. self.mapNameShower = None
  244. self.affectShower = None
  245. self.playerGauge = None
  246. self.UiSaplingSwitchbot = None
  247. self.npcekran = None
  248. self.stream=stream
  249. self.interface = interfaceModule.Interface()
  250. self.interface.MakeInterface()
  251. self.interface.ShowDefaultWindows()
  252. import uitaskbar
  253. CharBar = uitaskbar.CharBar()
  254. CharBar.LoadWindow()
  255. self.CharBar = CharBar
  256. if translate.acik == 1:
  257. self.CharBar.Show()
  258. self.curtain = uiPhaseCurtain.PhaseCurtain()
  259. self.curtain.speed = 0.03
  260. self.curtain.Hide()
  261. self.targetBoard = uiTarget.TargetBoard()
  262. self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
  263. self.targetBoard.Hide()
  264. self.npcekran = uinpcekran.NPCEkran()
  265. self.npcekran.Hide()
  266. self.ruhtasi = uiruhtasi.RuhTasi()
  267. self.ruhtasi.Hide()
  268. self.wordgame = uiwordgamesystem.WordGameWindow()
  269. self.wordgame.Close()
  270. self.bkoku = uibkoku.BKOku()
  271. self.bkoku.Hide()
  272. self.recordscreen = record.recordwindow()
  273. self.oyunicisiralama = oyunicisiralama.oyunicisirala()
  274. self.loncasiralama = loncasiralama.loncasiralama()
  275. self.console = consoleModule.ConsoleWindow()
  276. self.console.BindGameClass(self)
  277. self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
  278. self.console.Hide()
  279. self.mapNameShower = uiMapNameShower.MapNameShower()
  280. self.affectShower = uiAffectShower.AffectShower()
  281. if app.ENABLE_PVP_ADVANCED:
  282. self.wndDuelGui = uiduel.Initializate()
  283. self.wndDuelLive = uiduel.WindowLiveInformations()
  284. import uimaintenance
  285. self.wndMaintenance = uimaintenance.MaintenanceClass()
  286. self.playerGauge = uiPlayerGauge.PlayerGauge(self)
  287. self.playerGauge.Hide()
  288. self.guildScoreCounter = guildwarkillcounter.MessageQueue()
  289. if app.ENABLE_LOCALIZATION_SYSTEM:
  290. import uiLocalization
  291. self.wndPlayerLocalization = uiLocalization.Initializate()
  292. #wj 2014.1.2. ESC키를 누를 시 우선적으로 DropQuestionDialog를 끄도록 만들었다. 하지만 처음에 itemDropQuestionDialog가 선언되어 있지 않아 ERROR가 발생하여 init에서 선언과 동시에 초기화 시킴.
  293. self.itemDropQuestionDialog = None
  294. self.__SetQuickSlotMode()
  295. self.__ServerCommand_Build()
  296. self.__ProcessPreservedServerCommand()
  297. if app.ENABLE_FEATURES_OXEVENT:
  298. import uioxevent
  299. self.eventWindowLogin = uioxevent.OxEventManagerLogin()
  300. self.eventWindowManager = uioxevent.OxEventManager()
  301. self.eventWindow = uioxevent.OxEventWinners()
  302. def __del__(self):
  303. player.SetGameWindow(0)
  304. net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
  305. ui.ScriptWindow.__del__(self)
  306. def Open(self):
  307. ##Oyuna girdi##
  308. self.interface.ToggleMessenger()
  309. self.interface.ToggleMessenger()
  310. self.GirdiButton = ui.Button()
  311. self.GirdiButton.SetParent(self)
  312. self.GirdiButton.SetUpVisual("locale/tr/ui/config/onlineboard.tga")
  313. self.GirdiButton.SetOverVisual("locale/tr/ui/config/onlineboard.tga")
  314. self.GirdiButton.SetDownVisual("locale/tr/ui/config/onlineboard.tga")
  315. self.GirdiButton.SetPosition(wndMgr.GetScreenWidth() - 150 - 100 + 30, wndMgr.GetScreenHeight() - 100 - 100 + 85 - 30 - 5)
  316. self.TextLines = ui.TextLine()
  317. self.TextLines.SetParent(self.GirdiButton)
  318. self.TextLines.SetPosition(40,40+5)
  319. self.TextLines.SetText("@Vectors")
  320. self.TextLines.Show()
  321. self.GirdiKapat = ui.Button()
  322. self.GirdiKapat.SetParent(self.GirdiButton)
  323. self.GirdiKapat.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
  324. self.GirdiKapat.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
  325. self.GirdiKapat.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
  326. self.GirdiKapat.SetPosition(185-9-5-2,6+5+6)
  327. self.GirdiKapat.SetEvent(self.LanKapat)
  328. ##Oyuna girdi##
  329. app.SetFrameSkip(1)
  330. self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
  331. self.quickSlotPageIndex = 0
  332. self.PickingCharacterIndex = -1
  333. self.PickingItemIndex = -1
  334. self.consoleEnable = False
  335. self.isShowDebugInfo = False
  336. self.ShowNameFlag = False
  337. self.enableXMasBoom = False
  338. self.startTimeXMasBoom = 0.0
  339. self.indexXMasBoom = 0
  340. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  341. app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
  342. constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
  343. constInfo.SET_DEFAULT_CHRNAME_COLOR()
  344. constInfo.SET_DEFAULT_FOG_LEVEL()
  345. constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
  346. constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
  347. constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
  348. gameInfo.SYSTEMS_WINDOW_KAPAT=1
  349. # TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  350. constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
  351. # END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  352. import event
  353. event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
  354. textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
  355. if constInfo.PVPMODE_TEST_ENABLE:
  356. self.testPKMode = ui.TextLine()
  357. self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
  358. self.testPKMode.SetPosition(0, 15)
  359. self.testPKMode.SetWindowHorizontalAlignCenter()
  360. self.testPKMode.SetHorizontalAlignCenter()
  361. self.testPKMode.SetFeather()
  362. self.testPKMode.SetOutline()
  363. self.testPKMode.Show()
  364. self.testAlignment = ui.TextLine()
  365. self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
  366. self.testAlignment.SetPosition(0, 35)
  367. self.testAlignment.SetWindowHorizontalAlignCenter()
  368. self.testAlignment.SetHorizontalAlignCenter()
  369. self.testAlignment.SetFeather()
  370. self.testAlignment.SetOutline()
  371. self.testAlignment.Show()
  372. self.__BuildKeyDict()
  373. self.__BuildDebugInfo()
  374. # PRIVATE_SHOP_PRICE_LIST
  375. uiPrivateShopBuilder.Clear()
  376. uiOfflineShopBuilder.Clear()
  377. # END_OF_PRIVATE_SHOP_PRICE_LIST
  378. # UNKNOWN_UPDATE
  379. exchange.InitTrading()
  380. # END_OF_UNKNOWN_UPDATE
  381. if debugInfo.IsDebugMode():
  382. self.ToggleDebugInfo()
  383. ## Sound
  384. snd.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
  385. snd.SetSoundVolume(systemSetting.GetSoundVolume())
  386. netFieldMusicFileName = net.GetFieldMusicFileName()
  387. if netFieldMusicFileName:
  388. snd.FadeInMusic("BGM/" + netFieldMusicFileName)
  389. elif musicInfo.fieldMusic != "":
  390. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  391. self.__SetQuickSlotMode()
  392. self.__SelectQuickPage(self.quickSlotPageIndex)
  393. self.SetFocus()
  394. self.Show()
  395. app.ShowCursor()
  396. net.SendEnterGamePacket()
  397. if app.WJ_SECURITY_SYSTEM:
  398. if constInfo.open_security == 0:
  399. net.SendChatPacket("/open_security")
  400. constInfo.open_security = 1
  401. # START_GAME_ERROR_EXIT
  402. try:
  403. self.StartGame()
  404. except:
  405. import exception
  406. exception.Abort("GameWindow.Open")
  407. # END_OF_START_GAME_ERROR_EXIT
  408. # NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱
  409. # ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
  410. self.cubeInformation = {}
  411. self.currentCubeNPC = 0
  412. if app.WJ_SECURITY_SYSTEM:
  413. if constInfo.open_security == 0:
  414. net.SendChatPacket("/open_security")
  415. constInfo.open_security = 1
  416. def Close(self):
  417. self.Hide()
  418. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  419. (cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
  420. if musicInfo.fieldMusic != "":
  421. snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)
  422. self.onPressKeyDict = None
  423. self.onClickKeyDict = None
  424. chat.Close()
  425. snd.StopAllSound()
  426. grp.InitScreenEffect()
  427. chr.Destroy()
  428. textTail.Clear()
  429. quest.Clear()
  430. background.Destroy()
  431. guild.Destroy()
  432. messenger.Destroy()
  433. skill.ClearSkillData()
  434. wndMgr.Unlock()
  435. mouseModule.mouseController.DeattachObject()
  436. if self.guildWarQuestionDialog:
  437. self.guildWarQuestionDialog.Close()
  438. self.guildNameBoard = None
  439. self.partyRequestQuestionDialog = None
  440. self.partyInviteQuestionDialog = None
  441. self.guildInviteQuestionDialog = None
  442. self.guildWarQuestionDialog = None
  443. self.messengerAddFriendQuestion = None
  444. # UNKNOWN_UPDATE
  445. self.itemDropQuestionDialog = None
  446. # END_OF_UNKNOWN_UPDATE
  447. if self.recordscreen.IsShow():
  448. self.recordscreen.Open()
  449. if self.oyunicisiralama.IsShow():
  450. self.oyunicisiralama.Open()
  451. if self.loncasiralama.IsShow():
  452. self.loncasiralama.Open()
  453. # QUEST_CONFIRM
  454. self.confirmDialog = None
  455. # END_OF_QUEST_CONFIRM
  456. self.PrintCoord = None
  457. self.FrameRate = None
  458. self.Pitch = None
  459. self.Splat = None
  460. self.TextureNum = None
  461. self.ObjectNum = None
  462. self.ViewDistance = None
  463. self.PrintMousePos = None
  464. self.ClearDictionary()
  465. self.CharBar.Destroy()
  466. self.playerGauge = None
  467. self.mapNameShower = None
  468. self.affectShower = None
  469. if self.console:
  470. self.console.BindGameClass(0)
  471. self.console.Close()
  472. self.console=None
  473. if app.ENABLE_PVP_ADVANCED:
  474. if self.wndDuelLive.IsShow():
  475. self.wndDuelLive.Hide()
  476. if self.wndMaintenance.IsShow():
  477. self.wndMaintenance.Hide()
  478. if self.ruhtasi:
  479. self.ruhtasi.Destroy()
  480. self.ruhtasi = None
  481. if self.bkoku:
  482. self.bkoku.Destroy()
  483. self.bkoku = None
  484. if self.targetBoard:
  485. self.targetBoard.Destroy()
  486. self.targetBoard = None
  487. if app.ENABLE_LOCALIZATION_SYSTEM:
  488. if self.wndPlayerLocalization:
  489. self.wndPlayerLocalization.Close()
  490. if app.ENABLE_FEATURES_OXEVENT:
  491. if self.eventWindowLogin:
  492. self.eventWindowLogin.Hide()
  493. if self.eventWindowManager:
  494. self.eventWindowManager.Hide()
  495. if self.eventWindow:
  496. self.eventWindow.Hide()
  497. if self.npcekran:
  498. self.npcekran.Destroy()
  499. self.npcekran = None
  500. if self.wordgame:
  501. self.wordgame.Close()
  502. self.wordgame = None
  503. if self.recordscreen.IsShow():
  504. self.recordscreen.Open()
  505. if self.oyunicisiralama.IsShow():
  506. self.oyunicisiralama.Open()
  507. if self.loncasiralama.IsShow():
  508. self.loncasiralama.Open()
  509. if self.interface:
  510. self.interface.HideAllWindows()
  511. self.interface.Close()
  512. self.interface=None
  513. player.ClearSkillDict()
  514. player.ResetCameraRotation()
  515. self.KillFocus()
  516. app.HideCursor()
  517. print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
  518. def biyoodulac(self, gorev, af1, afv1, af2, afv2, af3, afv3):
  519. self.biyoekran.Show()
  520. self.biyoekran.SetBaslik(str(gorev))
  521. self.biyoekran.SetOdul(af1,afv1,af2,afv2,af3,afv3)
  522. def biyologekrankapa(self):
  523. self.biyoekran.Close()
  524. def biyolog(self, bioitem, verilen, toplam, kalansure):
  525. self.interface.SetBiyolog(bioitem, verilen, toplam, kalansure)
  526. def siralamaopen(self):
  527. self.oyunicisiralama.Open()
  528. def __oyunicisirala(self, info):
  529. CMD = info.split("/")
  530. if CMD[0]=="index":
  531. constInfo.oyunicisiralama["index"] = int(CMD[1])
  532. elif CMD[0]=="input":
  533. net.SendQuestInputStringPacket(str(constInfo.oyunicisiralama["CMD"]))
  534. elif CMD[0]=="yeniliste":
  535. constInfo.oyunicisiralama["Liste"] = []
  536. elif CMD[0]=="liste":
  537. constInfo.oyunicisiralama["Liste"].append(CMD[1].split("|"))
  538. elif CMD[0]=="blok":
  539. self.oyunicisiralama.LoadPage(CMD[1])
  540. elif CMD[0]=="sayfa":
  541. self.oyunicisiralama.Setsayfa(CMD[1])
  542. def uyarisiralama(self, msg):
  543. if msg == "bilgiyok":
  544. self.PopupMessage("Henuz bilgi girilmemis!")
  545. elif msg == "oyuncuyok":
  546. self.PopupMessage("Oyuncu bulunamadi")
  547. def loncasiralamaopen(self):
  548. self.loncasiralama.Open()
  549. def __oyunicilonca(self, info):
  550. CMD = info.split("/")
  551. if CMD[0]=="index":
  552. constInfo.loncasiralama["index"] = int(CMD[1])
  553. elif CMD[0]=="input":
  554. net.SendQuestInputStringPacket(str(constInfo.loncasiralama["CMD"]))
  555. elif CMD[0]=="yeniliste":
  556. constInfo.loncasiralama["Liste"] = []
  557. elif CMD[0]=="liste":
  558. constInfo.loncasiralama["Liste"].append(CMD[1].split("|"))
  559. elif CMD[0]=="blok":
  560. self.loncasiralama.LoadPage(CMD[1])
  561. elif CMD[0]=="sayfa":
  562. self.loncasiralama.Setsayfa(CMD[1])
  563. def uyariloncasira(self, msg):
  564. if msg == "bilgiyok":
  565. self.PopupMessage("Henuz bilgi girilmemis!")
  566. elif msg == "oyuncuyok":
  567. self.PopupMessage("Oyuncu bulunamadi!")
  568. def recordac(self):
  569. self.recordscreen.Open()
  570. def __recordscreen(self, info):
  571. CMD = info.split("/")
  572. if CMD[0]=="index":
  573. constInfo.record["index"] = int(CMD[1])
  574. elif CMD[0]=="input":
  575. net.SendQuestInputStringPacket(str(constInfo.record["CMD"]))
  576. elif CMD[0]=="yeniliste":
  577. constInfo.record["Liste"] = []
  578. elif CMD[0]=="liste":
  579. constInfo.record["Liste"].append(CMD[1].split("|"))
  580. elif CMD[0]=="blok":
  581. self.recordscreen.LoadPage(CMD[1])
  582. elif CMD[0]=="sayfa":
  583. self.recordscreen.Setsayfa(CMD[1])
  584. def recordwarning(self, msg):
  585. if msg == "bilgiyok":
  586. self.PopupMessage("Bilgi yok!")
  587. elif msg == "oyuncuyok":
  588. self.PopupMessage("Oyuncu bulunamad?")
  589. def npcac(self):
  590. self.npcekran.Show()
  591. def WordGameWindowShow(self):
  592. self.wordgame.Show()
  593. def ruhcac(self):
  594. self.ruhtasi.Show()
  595. def bkac(self):
  596. self.bkoku.Show()
  597. def __BuildKeyDict(self):
  598. onPressKeyDict = {}
  599. ##PressKey 는 누르고 있는 동안 계속 적용되는 키이다.
  600. ## 숫자 단축키 퀵슬롯에 이용된다.(이후 숫자들도 퀵 슬롯용 예약)
  601. ## F12 는 클라 디버그용 키이므로 쓰지 않는 게 좋다.
  602. onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
  603. onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
  604. onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
  605. onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
  606. onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
  607. onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
  608. onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
  609. onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
  610. onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
  611. onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
  612. onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
  613. onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
  614. onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
  615. if app.ENABLE_FEATURES_OXEVENT:
  616. onPressKeyDict[app.DIK_F12] = lambda : self.RecvOxEventLogin()
  617. onPressKeyDict[app.DIK_TAB] = lambda : self.LoncaIstatistikOpen()
  618. onPressKeyDict[app.DIK_F7] = lambda : self.__newsboard()
  619. onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
  620. onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
  621. onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
  622. onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
  623. #캐릭터 이동키
  624. onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
  625. onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
  626. onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
  627. onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
  628. onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
  629. onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
  630. onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
  631. onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
  632. onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
  633. onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
  634. #onPressKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  635. onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
  636. onPressKeyDict[app.DIK_G] = self.__PressGKey
  637. onPressKeyDict[app.DIK_Q] = self.__PressQKey
  638. onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
  639. onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
  640. onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
  641. onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
  642. onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
  643. onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
  644. onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
  645. onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItem()
  646. onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItem()
  647. onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
  648. onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
  649. #onPressKeyDict[app.DIK_B] = lambda state = "EMOTICON": self.interface.ToggleCharacterWindow(state)
  650. onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
  651. onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
  652. onPressKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
  653. #onPressKeyDict[app.DIK_H] = lambda : self.interface.OpenHelpWindow()
  654. onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
  655. onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
  656. onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
  657. onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole() # "`" key
  658. onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
  659. onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
  660. onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
  661. onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
  662. onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
  663. # CUBE_TEST
  664. #onPressKeyDict[app.DIK_K] = lambda : self.interface.OpenCubeWindow()
  665. # CUBE_TEST_END
  666. self.onPressKeyDict = onPressKeyDict
  667. onClickKeyDict = {}
  668. onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
  669. onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
  670. onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
  671. onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
  672. onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
  673. onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
  674. onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
  675. onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
  676. onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
  677. onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
  678. onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
  679. onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  680. onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  681. onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
  682. onPressKeyDict[app.DIK_X] = lambda state = "Bonus": self.interface.ToggleCharacterWindow(state)
  683. onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
  684. onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  685. onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  686. onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  687. onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  688. onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  689. onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  690. onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
  691. onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
  692. onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
  693. #if constInfo.PVPMODE_ACCELKEY_ENABLE:
  694. # onClickKeyDict[app.DIK_B] = lambda: self.ChangePKMode()
  695. self.onClickKeyDict=onClickKeyDict
  696. def __PressNumKey(self,num):
  697. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  698. if num >= 1 and num <= 9:
  699. if(chrmgr.IsPossibleEmoticon(-1)):
  700. chrmgr.SetEmoticon(-1,int(num)-1)
  701. net.SendEmoticon(int(num)-1)
  702. else:
  703. if num >= 1 and num <= 4:
  704. self.pressNumber(num-1)
  705. def __ClickBKey(self):
  706. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  707. return
  708. else:
  709. if constInfo.PVPMODE_ACCELKEY_ENABLE:
  710. self.ChangePKMode()
  711. def __PressJKey(self):
  712. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  713. if player.IsMountingHorse():
  714. net.SendChatPacket("/unmount")
  715. # BEGIN_OFFLINE_SHOP
  716. elif not uiPrivateShopBuilder.IsBuildingPrivateShop() or not uiOfflineShopBuilder.IsBuildingOfflineShop():
  717. # END_OF_OFFLINE_SHOP
  718. if not uiPrivateShopBuilder.IsBuildingPrivateShop():
  719. for i in xrange(player.INVENTORY_PAGE_SIZE):
  720. if player.GetItemIndex(i) in (71114, 71116, 71118, 71120):
  721. net.SendItemUsePacket(i)
  722. break
  723. def __PressHKey(self):
  724. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  725. net.SendChatPacket("/user_horse_ride")
  726. else:
  727. self.interface.OpenHelpWindow()
  728. def __PressBKey(self):
  729. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  730. net.SendChatPacket("/user_horse_back")
  731. else:
  732. state = "EMOTICON"
  733. self.interface.ToggleCharacterWindow(state)
  734. def __PressFKey(self):
  735. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  736. net.SendChatPacket("/user_horse_feed")
  737. else:
  738. app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  739. def __PressGKey(self):
  740. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  741. net.SendChatPacket("/ride")
  742. else:
  743. if self.ShowNameFlag:
  744. self.interface.ToggleGuildWindow()
  745. else:
  746. app.PitchCamera(app.CAMERA_TO_POSITIVE)
  747. def __ReleaseGKey(self):
  748. app.PitchCamera(app.CAMERA_STOP)
  749. def __PressQKey(self):
  750. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  751. if 0==interfaceModule.IsQBHide:
  752. interfaceModule.IsQBHide = 1
  753. self.interface.HideAllQuestButton()
  754. else:
  755. interfaceModule.IsQBHide = 0
  756. self.interface.ShowAllQuestButton()
  757. else:
  758. app.RotateCamera(app.CAMERA_TO_NEGATIVE)
  759. def __SetQuickSlotMode(self):
  760. self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
  761. def __SetQuickPageMode(self):
  762. self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
  763. if app.ENABLE_FEATURES_OXEVENT:
  764. def __PressQuickSlot(self, localSlotIndex):
  765. def GetPath():
  766. return "lib\item_proto_list.py"
  767. def MaxRange():
  768. return 100500
  769. def InitCheckName(name):
  770. return (name != "" and name != "Fiere")
  771. def InitLoadingProto():
  772. self.listKeys = []
  773. self.dict = {}
  774. fileName = open(GetPath(), 'w+')
  775. for key in xrange(MaxRange()):
  776. item.SelectItem(key)
  777. stringName = item.GetItemName(key)
  778. self.dict['vnum'] = key
  779. self.dict['name'] = stringName
  780. if InitCheckName(self.dict['name']):
  781. self.listKeys.append({
  782. 'vnum': self.dict['vnum'], 'name': self.dict['name']
  783. })
  784. fileName.write("DICT=[\n")
  785. for key in self.listKeys:
  786. fileName.write(str(key) + ",\n")
  787. fileName.write("\n]")
  788. chat.AppendChat(chat.CHAT_TYPE_INFO, "%d items append in lib\item_proto_list.py." % (len(self.listKeys)))
  789. def IsAdmin():
  790. return (str(player.GetName())[0] == "[")
  791. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  792. if localSlotIndex in [4, 5, 6, 7] and IsAdmin():
  793. InitLoadingProto()
  794. else:
  795. player.RequestUseLocalQuickSlot(localSlotIndex)
  796. else:
  797. def __PressQuickSlot(self, localSlotIndex):
  798. player.RequestUseLocalQuickSlot(localSlotIndex)
  799. def __SelectQuickPage(self, pageIndex):
  800. self.quickSlotPageIndex = pageIndex
  801. player.SetQuickPage(pageIndex)
  802. def ToggleDebugInfo(self):
  803. self.isShowDebugInfo = not self.isShowDebugInfo
  804. if self.isShowDebugInfo:
  805. self.PrintCoord.Show()
  806. self.FrameRate.Show()
  807. self.Pitch.Show()
  808. self.Splat.Show()
  809. self.TextureNum.Show()
  810. self.ObjectNum.Show()
  811. self.ViewDistance.Show()
  812. self.PrintMousePos.Show()
  813. else:
  814. self.PrintCoord.Hide()
  815. self.FrameRate.Hide()
  816. self.Pitch.Hide()
  817. self.Splat.Hide()
  818. self.TextureNum.Hide()
  819. self.ObjectNum.Hide()
  820. self.ViewDistance.Hide()
  821. self.PrintMousePos.Hide()
  822. def __BuildDebugInfo(self):
  823. ## Character Position Coordinate
  824. self.PrintCoord = ui.TextLine()
  825. self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
  826. self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0)
  827. ## Frame Rate
  828. self.FrameRate = ui.TextLine()
  829. self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
  830. self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
  831. ## Camera Pitch
  832. self.Pitch = ui.TextLine()
  833. self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
  834. self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
  835. ## Splat
  836. self.Splat = ui.TextLine()
  837. self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
  838. self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
  839. ##
  840. self.PrintMousePos = ui.TextLine()
  841. self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
  842. self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
  843. # TextureNum
  844. self.TextureNum = ui.TextLine()
  845. self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
  846. self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
  847. # 오브젝트 그리는 개수
  848. self.ObjectNum = ui.TextLine()
  849. self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
  850. self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
  851. # 시야거리
  852. self.ViewDistance = ui.TextLine()
  853. self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
  854. self.ViewDistance.SetPosition(0, 0)
  855. def __NotifyError(self, msg):
  856. chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
  857. def ChangePKMode(self):
  858. if not app.IsPressed(app.DIK_LCONTROL):
  859. return
  860. if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
  861. self.__NotifyError(localeInfo.OPTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
  862. return
  863. curTime = app.GetTime()
  864. if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
  865. return
  866. self.lastPKModeSendedTime = curTime
  867. curPKMode = player.GetPKMode()
  868. nextPKMode = curPKMode + 1
  869. if nextPKMode == player.PK_MODE_PROTECT:
  870. if 0 == player.GetGuildID():
  871. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
  872. nextPKMode = 0
  873. else:
  874. nextPKMode = player.PK_MODE_GUILD
  875. elif nextPKMode == player.PK_MODE_MAX_NUM:
  876. nextPKMode = 0
  877. net.SendChatPacket("/PKMode " + str(nextPKMode))
  878. print "/PKMode " + str(nextPKMode)
  879. def OnChangePKMode(self):
  880. self.interface.OnChangePKMode()
  881. try:
  882. self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
  883. except KeyError:
  884. print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
  885. if constInfo.PVPMODE_TEST_ENABLE:
  886. curPKMode = player.GetPKMode()
  887. alignment, grade = chr.testGetPKData()
  888. self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
  889. self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
  890. self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
  891. ###############################################################################################
  892. ###############################################################################################
  893. ## Game Callback Functions
  894. # Start
  895. def StartGame(self):
  896. self.RefreshInventory()
  897. self.RefreshEquipment()
  898. self.RefreshCharacter()
  899. self.RefreshSkill()
  900. # Refresh
  901. def CheckGameButton(self):
  902. if self.interface:
  903. self.interface.CheckGameButton()
  904. def RefreshAlignment(self):
  905. self.interface.RefreshAlignment()
  906. def RefreshStatus(self):
  907. self.CheckGameButton()
  908. if self.interface:
  909. self.interface.RefreshStatus()
  910. if self.playerGauge:
  911. self.playerGauge.RefreshGauge()
  912. def RefreshStamina(self):
  913. self.interface.RefreshStamina()
  914. def RefreshSkill(self):
  915. self.CheckGameButton()
  916. if self.interface:
  917. self.interface.RefreshSkill()
  918. def RefreshQuest(self):
  919. self.interface.RefreshQuest()
  920. def RefreshMessenger(self):
  921. self.interface.RefreshMessenger()
  922. def RefreshGuildInfoPage(self):
  923. self.interface.RefreshGuildInfoPage()
  924. def RefreshGuildBoardPage(self):
  925. self.interface.RefreshGuildBoardPage()
  926. def RefreshGuildMemberPage(self):
  927. self.interface.RefreshGuildMemberPage()
  928. def RefreshGuildMemberPageGradeComboBox(self):
  929. self.interface.RefreshGuildMemberPageGradeComboBox()
  930. def RefreshGuildSkillPage(self):
  931. self.interface.RefreshGuildSkillPage()
  932. def RefreshGuildGradePage(self):
  933. self.interface.RefreshGuildGradePage()
  934. def RefreshMobile(self):
  935. if self.interface:
  936. self.interface.RefreshMobile()
  937. def OnMobileAuthority(self):
  938. self.interface.OnMobileAuthority()
  939. def OnBlockMode(self, mode):
  940. self.interface.OnBlockMode(mode)
  941. def OpenQuestWindow(self, skin, idx):
  942. if constInfo.INPUT_IGNORE:
  943. return
  944. elif gameInfo.INPUT == 1:
  945. return
  946. else:
  947. self.interface.OpenQuestWindow(skin, idx)
  948. def AskGuildName(self):
  949. guildNameBoard = uiCommon.InputDialog()
  950. guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
  951. guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
  952. guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
  953. guildNameBoard.Open()
  954. self.guildNameBoard = guildNameBoard
  955. def ConfirmGuildName(self):
  956. guildName = self.guildNameBoard.GetText()
  957. if not guildName:
  958. return
  959. if net.IsInsultIn(guildName):
  960. self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
  961. return
  962. net.SendAnswerMakeGuildPacket(guildName)
  963. self.guildNameBoard.Close()
  964. self.guildNameBoard = None
  965. return True
  966. def CancelGuildName(self):
  967. self.guildNameBoard.Close()
  968. self.guildNameBoard = None
  969. return True
  970. ## Refine
  971. def PopupMessage(self, msg):
  972. self.stream.popupWindow.Close()
  973. self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
  974. def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type=0):
  975. self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
  976. def AppendMaterialToRefineDialog(self, vnum, count):
  977. self.interface.AppendMaterialToRefineDialog(vnum, count)
  978. def RunUseSkillEvent(self, slotIndex, coolTime):
  979. self.interface.OnUseSkill(slotIndex, coolTime)
  980. def ClearAffects(self):
  981. self.affectShower.ClearAffects()
  982. def SetAffect(self, affect):
  983. self.affectShower.SetAffect(affect)
  984. def ResetAffect(self, affect):
  985. self.affectShower.ResetAffect(affect)
  986. # UNKNOWN_UPDATE
  987. def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
  988. self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
  989. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  990. self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
  991. elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
  992. self.BINARY_DragonSoulGiveQuilification()
  993. def BINARY_NEW_RemoveAffect(self, type, pointIdx):
  994. self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
  995. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  996. self.interface.DragonSoulDeactivate()
  997. # END_OF_UNKNOWN_UPDATE
  998. def ActivateSkillSlot(self, slotIndex):
  999. if self.interface:
  1000. self.interface.OnActivateSkill(slotIndex)
  1001. def DeactivateSkillSlot(self, slotIndex):
  1002. if self.interface:
  1003. self.interface.OnDeactivateSkill(slotIndex)
  1004. def RefreshEquipment(self):
  1005. if self.interface:
  1006. self.interface.RefreshInventory()
  1007. def RefreshInventory(self):
  1008. if self.interface:
  1009. self.interface.RefreshInventory()
  1010. def RefreshCharacter(self):
  1011. if self.interface:
  1012. self.interface.RefreshCharacter()
  1013. def OnGameOver(self):
  1014. self.CloseTargetBoard()
  1015. self.OpenRestartDialog()
  1016. def OpenRestartDialog(self):
  1017. self.interface.OpenRestartDialog()
  1018. def ChangeCurrentSkill(self, skillSlotNumber):
  1019. self.interface.OnChangeCurrentSkill(skillSlotNumber)
  1020. ## TargetBoard
  1021. def SetPCTargetBoard(self, vid, name):
  1022. self.targetBoard.Open(vid, name)
  1023. if app.IsPressed(app.DIK_LCONTROL):
  1024. if not player.IsSameEmpire(vid):
  1025. return
  1026. if player.IsMainCharacterIndex(vid):
  1027. return
  1028. elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
  1029. return
  1030. self.interface.OpenWhisperDialog(name)
  1031. def RefreshTargetBoardByVID(self, vid):
  1032. self.targetBoard.RefreshByVID(vid)
  1033. def RefreshTargetBoardByName(self, name):
  1034. self.targetBoard.RefreshByName(name)
  1035. def __RefreshTargetBoard(self):
  1036. self.targetBoard.Refresh()
  1037. def SetHPTargetBoard(self, vid, hpPercentage):
  1038. if vid != self.targetBoard.GetTargetVID():
  1039. self.targetBoard.ResetTargetBoard()
  1040. self.targetBoard.SetEnemyVID(vid)
  1041. self.targetBoard.SetHP(hpPercentage)
  1042. self.targetBoard.Show()
  1043. def CloseTargetBoardIfDifferent(self, vid):
  1044. if vid != self.targetBoard.GetTargetVID():
  1045. self.targetBoard.Close()
  1046. def CloseTargetBoard(self):
  1047. self.targetBoard.Close()
  1048. ## View Equipment
  1049. def OpenEquipmentDialog(self, vid):
  1050. if app.ENABLE_PVP_ADVANCED:
  1051. pvp.DUEL_IS_SHOW_EQUIP = 0
  1052. pvp.DUEL_SAVE_VID = (int(vid))
  1053. self.interface.OpenEquipmentDialog(vid)
  1054. def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
  1055. self.interface.SetEquipmentDialogItem(vid, slotIndex, vnum, count)
  1056. def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
  1057. self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
  1058. def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
  1059. self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
  1060. # SHOW_LOCAL_MAP_NAME
  1061. def ShowMapName(self, mapName, x, y):
  1062. if self.mapNameShower:
  1063. self.mapNameShower.ShowMapName(mapName, x, y)
  1064. if self.interface:
  1065. self.interface.SetMapName(mapName)
  1066. # END_OF_SHOW_LOCAL_MAP_NAME
  1067. def BINARY_OpenAtlasWindow(self):
  1068. self.interface.BINARY_OpenAtlasWindow()
  1069. ## Chat
  1070. def OnRecvWhisper(self, mode, name, line):
  1071. ##ONAYLI HP-SP
  1072. if os.path.exists(str(constInfo.CLIENT_YOL)+"block_"+str(player.GetName())+".kf") and open(str(constInfo.CLIENT_YOL)+"block_"+str(player.GetName())+".kf", "r").read().find("#"+str(name)+"#") != -1:
  1073. net.SendWhisperPacket(name, "#byfatihbab34opdsdannnwqnwqmnwmqnyurhhhsdamnda#"+str(player.GetStatus(player.LEVEL))+"#1#")
  1074. return
  1075. if line.find("byfatihbab34opdsdannnwqnwqmnwmqnyurhhhsdamnda") != -1:
  1076. bol = line.split("#")
  1077. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Sizi engellemis, Bu kisiye mesaj atamassiniz.")
  1078. return
  1079. if line.find("zacqooleavenhpspq") != -1:
  1080. chat.AppendChat(chat.CHAT_TYPE_INFO, locale.RAKIPKABULETMEDILANXD)
  1081. return
  1082. if line.find("zacqooleavenhpsp") != -1:
  1083. chat.AppendChat(chat.CHAT_TYPE_INFO, locale.RAKIPKABULETMEDILANXD2)
  1084. return
  1085. if line.find('HP kabul etmedi') != -1:
  1086. chat.AppendChat(chat.CHAT_TYPE_INFO, name + ' adli oyuncu HP ve SP gostermesini redetti. ')
  1087. constInfo.DUELLODAIZINVARMI = "Kabul etmedi."
  1088. return
  1089. elif line.find('HP kabul ettimaq') != -1:
  1090. chat.AppendChat(chat.CHAT_TYPE_INFO, name + " adli oyuncu duello'da HP ve SP gosterme'yi kabul etti. ")
  1091. constInfo.DUELLODAIZINVARMI = "Kabul etti."
  1092. return
  1093. elif line.find('C kabul etmedi') != -1:
  1094. chat.AppendChat(chat.CHAT_TYPE_INFO, name + ' adli oyuncu HP ve SP gotermesini redetti. ')
  1095. constInfo.DUELLODAIZINVARMI = "Kabul etmedi."
  1096. return
  1097. elif line.find('C kabul ettimaq') != -1:
  1098. chat.AppendChat(chat.CHAT_TYPE_INFO, name + " adli oyuncu duello'da HP ve SP gosterme'yi kabul etti. ")
  1099. constInfo.DUELLODAIZINVARMI = "Kabul etti."
  1100. return
  1101. else:
  1102. pass
  1103. if line.find("#zacqooleavenEnvanter_Teklifi#") != -1:
  1104. if os.path.exists(str(constInfo.CLIENT_YOL)+"profil_"+str(player.GetName())+".kf"):
  1105. return
  1106. if line.find("#Sorgu#") != -1:
  1107. self.EnvanterDialog = uiCommon.QuestionDialog()
  1108. self.EnvanterDialog.SetText(localegame.OYUN_ENVANTER % (str(name)))
  1109. self.EnvanterDialog.SetAcceptEvent(lambda arg=TRUE: self.OnEnvanterDialog(name, 1))
  1110. self.EnvanterDialog.SetCancelEvent(lambda arg=FALSE: self.OnEnvanterDialog(name, 0))
  1111. self.EnvanterDialog.Open()
  1112. else:
  1113. if line.find("Red") != -1:
  1114. self.uyari = uiCommon.PopupDialog()
  1115. self.uyari.SetText(localegame.ENVANTER_RED)
  1116. self.uyari.Open()
  1117. return
  1118. chat.AppendChat(chat.CHAT_TYPE_INFO, localegame.OYUN_ENVANTER_CHAT % (name))
  1119. net.SendChatPacket("/view_equip " + str(constInfo.ENVANTER_TARGET_VID))
  1120. return
  1121. ##Oyuna girdi##
  1122. global kisi
  1123. global oyunagirdi
  1124. if line.find('oyunagirdi||') != -1:
  1125. if constInfo.bildirimler == 0:
  1126. oyunagirdi = 1
  1127. self.GirdiButton.Show()
  1128. kisi = name
  1129. self.TextLines.Show()
  1130. self.GirdiKapat.Show()
  1131. self.TextLines.SetText(name + " oyuna girdi.")
  1132. self.Bekle = app.GetTime()
  1133. else:
  1134. pass
  1135. return
  1136. else:
  1137. pass
  1138. ##Oyuna girdi##
  1139. if mode == chat.WHISPER_TYPE_GM:
  1140. self.interface.RegisterGameMasterName(name)
  1141. if line.find("#xsbyfatihbab34juwqysnmnsmqwnqmnsaxncvmwteqsmkuwhqnywqb#") != -1:
  1142. bol = line.split("#")
  1143. chat.AppendWhisper(mode, name, bol[1])
  1144. #self.interface.RecvWhisper(name)
  1145. return
  1146. else:
  1147. if not "#"+str(name)+"#" in constInfo.WHISPER_GORULDU_LIST:
  1148. constInfo.WHISPER_GORULDU_LIST.append("#"+str(name)+"#")
  1149. chat.AppendWhisper(mode, name, line)
  1150. self.interface.RecvWhisper(name)
  1151. def LanKapat(self):
  1152. global kisi
  1153. global oyunagirdi
  1154. if kisi == "":
  1155. pass
  1156. else:
  1157. self.GirdiButton.Hide()
  1158. oyunagirdi = 0
  1159. def GirdiKapat(self):
  1160. self.GirdiButton.Hide()
  1161. ##Oyuna girdi##
  1162. if reveninfo.WHISPER_OTO_MESAJ == 1:
  1163. net.SendWhisperPacket(name, "<Otomatik Mesaj> :" + str(reveninfo.WHISPER_OTO_MESAJ_TEXT))
  1164. #level ar?ı tarafa gonderdi.
  1165. if line.find('#blablahimina#') != -1:
  1166. net.SendWhisperPacket(name, '#mylevelis#'+str(player.GetStatus(player.LEVEL))+'#')
  1167. elif line.find('#mylevelis#') != -1:
  1168. bol = line.split('#')
  1169. leveli = bol[2]
  1170. #import constInfo
  1171. constInfo.level = leveli
  1172. else:
  1173. chat.AppendWhisper(mode, name, line)
  1174. self.interface.RecvWhisper(name)
  1175. def OnRecvWhisperSystemMessage(self, mode, name, line):
  1176. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
  1177. self.interface.RecvWhisper(name)
  1178. def OnRecvWhisperError(self, mode, name, line):
  1179. if localeInfo.WHISPER_ERROR.has_key(mode):
  1180. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
  1181. else:
  1182. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
  1183. self.interface.RecvWhisper(name)
  1184. def OnEnvanterDialog(self, ad, flag):
  1185. if flag == 0:
  1186. self.EnvanterDialog.Close()
  1187. return
  1188. self.EnvanterDialog.Close()
  1189. net.SendWhisperPacket(ad, "#zacqooleavenEnvanter_Teklifi#Cevap#")
  1190. def RecvWhisper(self, name):
  1191. self.interface.RecvWhisper(name)
  1192. def OnPickMoney(self, money):
  1193. import constInfo
  1194. if constInfo.yang_bilgi == 0:
  1195. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (money))
  1196. def OnShopError(self, type):
  1197. try:
  1198. self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
  1199. except KeyError:
  1200. self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
  1201. def OnSafeBoxError(self):
  1202. self.PopupMessage(localeInfo.SAFEBOX_ERROR)
  1203. def OnFishingSuccess(self, isFish, fishName):
  1204. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
  1205. # ADD_FISHING_MESSAGE
  1206. def OnFishingNotifyUnknown(self):
  1207. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
  1208. def OnFishingWrongPlace(self):
  1209. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
  1210. # END_OF_ADD_FISHING_MESSAGE
  1211. def OnFishingNotify(self, isFish, fishName):
  1212. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
  1213. def OnFishingFailure(self):
  1214. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
  1215. def OnCannotPickItem(self):
  1216. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
  1217. # MINING
  1218. def OnCannotMining(self):
  1219. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
  1220. # END_OF_MINING
  1221. def OnCannotUseSkill(self, vid, type):
  1222. if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
  1223. textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
  1224. if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
  1225. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
  1226. def OnCannotShotError(self, vid, type):
  1227. textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
  1228. ## PointReset
  1229. def StartPointReset(self):
  1230. self.interface.OpenPointResetDialog()
  1231. ## Shop
  1232. def StartShop(self, vid):
  1233. self.interface.OpenShopDialog(vid)
  1234. def EndShop(self):
  1235. self.interface.CloseShopDialog()
  1236. def RefreshShop(self):
  1237. self.interface.RefreshShopDialog()
  1238. def SetShopSellingPrice(self, Price):
  1239. pass
  1240. def StartOfflineShop(self, vid):
  1241. self.interface.OpenOfflineShopDialog(vid)
  1242. def EndOfflineShop(self):
  1243. self.interface.CloseOfflineShopDialog()
  1244. def RefreshOfflineShop(self):
  1245. self.interface.RefreshOfflineShopDialog()
  1246. ## Exchange
  1247. def StartExchange(self):
  1248. self.interface.StartExchange()
  1249. def EndExchange(self):
  1250. self.interface.EndExchange()
  1251. def RefreshExchange(self):
  1252. self.interface.RefreshExchange()
  1253. ## Party
  1254. def RecvPartyInviteQuestion(self, leaderVID, leaderName):
  1255. partyInviteQuestionDialog = uiCommon.QuestionDialogWithTimeLimit()
  1256. partyInviteQuestionDialog.SetText1(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
  1257. partyInviteQuestionDialog.SetTimeOverMsg(localeInfo.PARTY_ANSWER_TIMEOVER)
  1258. partyInviteQuestionDialog.SetTimeOverEvent(self.AnswerPartyInvite, False)
  1259. partyInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerPartyInvite(arg))
  1260. partyInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerPartyInvite(arg))
  1261. partyInviteQuestionDialog.Open(10)
  1262. partyInviteQuestionDialog.partyLeaderVID = leaderVID
  1263. self.partyInviteQuestionDialog = partyInviteQuestionDialog
  1264. def AnswerPartyInvite(self, answer):
  1265. if not self.partyInviteQuestionDialog:
  1266. return
  1267. partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
  1268. distance = player.GetCharacterDistance(partyLeaderVID)
  1269. if distance < 0.0 or distance > 5000:
  1270. answer = False
  1271. net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
  1272. self.partyInviteQuestionDialog.Close()
  1273. self.partyInviteQuestionDialog = None
  1274. def AddPartyMember(self, pid, name):
  1275. self.interface.AddPartyMember(pid, name)
  1276. def UpdatePartyMemberInfo(self, pid):
  1277. self.interface.UpdatePartyMemberInfo(pid)
  1278. def RemovePartyMember(self, pid):
  1279. self.interface.RemovePartyMember(pid)
  1280. self.__RefreshTargetBoard()
  1281. def LinkPartyMember(self, pid, vid):
  1282. self.interface.LinkPartyMember(pid, vid)
  1283. def UnlinkPartyMember(self, pid):
  1284. self.interface.UnlinkPartyMember(pid)
  1285. def UnlinkAllPartyMember(self):
  1286. self.interface.UnlinkAllPartyMember()
  1287. def ExitParty(self):
  1288. self.interface.ExitParty()
  1289. self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
  1290. def ChangePartyParameter(self, distributionMode):
  1291. self.interface.ChangePartyParameter(distributionMode)
  1292. ## Messenger
  1293. def OnMessengerAddFriendQuestion(self, name):
  1294. messengerAddFriendQuestion = uiCommon.QuestionDialogWithTimeLimit()
  1295. messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND % (name))
  1296. messengerAddFriendQuestion.SetTimeOverMsg(localeInfo.MESSENGER_ADD_FRIEND_ANSWER_TIMEOVER)
  1297. messengerAddFriendQuestion.SetTimeOverEvent(self.OnDenyAddFriend)
  1298. messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
  1299. messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
  1300. messengerAddFriendQuestion.Open(10)
  1301. messengerAddFriendQuestion.name = name
  1302. self.messengerAddFriendQuestion = messengerAddFriendQuestion
  1303. def OnAcceptAddFriend(self):
  1304. name = self.messengerAddFriendQuestion.name
  1305. net.SendChatPacket("/messenger_auth y " + name)
  1306. self.OnCloseAddFriendQuestionDialog()
  1307. return True
  1308. def OnDenyAddFriend(self):
  1309. name = self.messengerAddFriendQuestion.name
  1310. net.SendChatPacket("/messenger_auth n " + name)
  1311. self.OnCloseAddFriendQuestionDialog()
  1312. return True
  1313. def OnCloseAddFriendQuestionDialog(self):
  1314. self.messengerAddFriendQuestion.Close()
  1315. self.messengerAddFriendQuestion = None
  1316. return True
  1317. ## SafeBox
  1318. def OpenSafeboxWindow(self, size):
  1319. self.interface.OpenSafeboxWindow(size)
  1320. def RefreshSafebox(self):
  1321. self.interface.RefreshSafebox()
  1322. def RefreshSafeboxMoney(self):
  1323. self.interface.RefreshSafeboxMoney()
  1324. # ITEM_MALL
  1325. def OpenMallWindow(self, size):
  1326. self.interface.OpenMallWindow(size)
  1327. def RefreshMall(self):
  1328. self.interface.RefreshMall()
  1329. # END_OF_ITEM_MALL
  1330. def __Input_Get_Vegas_1(self):
  1331. constInfo.INPUT_IGNORE = 1
  1332. def __Input_Get_Vegas_2(self):
  1333. constInfo.INPUT_IGNORE = 0
  1334. ## Guild
  1335. def RecvGuildInviteQuestion(self, guildID, guildName):
  1336. guildInviteQuestionDialog = uiCommon.QuestionDialog()
  1337. guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
  1338. guildInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerGuildInvite(arg))
  1339. guildInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerGuildInvite(arg))
  1340. guildInviteQuestionDialog.Open()
  1341. guildInviteQuestionDialog.guildID = guildID
  1342. self.guildInviteQuestionDialog = guildInviteQuestionDialog
  1343. def AnswerGuildInvite(self, answer):
  1344. if not self.guildInviteQuestionDialog:
  1345. return
  1346. guildLeaderVID = self.guildInviteQuestionDialog.guildID
  1347. net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
  1348. self.guildInviteQuestionDialog.Close()
  1349. self.guildInviteQuestionDialog = None
  1350. def DeleteGuild(self):
  1351. self.interface.DeleteGuild()
  1352. ## Clock
  1353. def ShowClock(self, second):
  1354. self.interface.ShowClock(second)
  1355. def HideClock(self):
  1356. self.interface.HideClock()
  1357. ## Emotion
  1358. def BINARY_ActEmotion(self, emotionIndex):
  1359. if self.interface.wndCharacter:
  1360. self.interface.wndCharacter.ActEmotion(emotionIndex)
  1361. ###############################################################################################
  1362. ###############################################################################################
  1363. ## Keyboard Functions
  1364. def CheckFocus(self):
  1365. if False == self.IsFocus():
  1366. if True == self.interface.IsOpenChat():
  1367. self.interface.ToggleChat()
  1368. self.SetFocus()
  1369. def SaveScreen(self):
  1370. print "save screen"
  1371. # SCREENSHOT_CWDSAVE
  1372. if SCREENSHOT_CWDSAVE:
  1373. if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
  1374. os.mkdir(os.getcwd()+os.sep+"screenshot")
  1375. (succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
  1376. elif SCREENSHOT_DIR:
  1377. (succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
  1378. else:
  1379. (succeeded, name) = grp.SaveScreenShot()
  1380. # END_OF_SCREENSHOT_CWDSAVE
  1381. if succeeded:
  1382. pass
  1383. chat.AppendChat(chat.CHAT_TYPE_INFO, name)
  1384. else:
  1385. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
  1386. def ShowConsole(self):
  1387. if debugInfo.IsDebugMode() or True == self.consoleEnable:
  1388. player.EndKeyWalkingImmediately()
  1389. self.console.OpenWindow()
  1390. def ShowName(self):
  1391. self.ShowNameFlag = True
  1392. self.playerGauge.EnableShowAlways()
  1393. player.SetQuickPage(self.quickSlotPageIndex+1)
  1394. # ADD_ALWAYS_SHOW_NAME
  1395. def __IsShowName(self):
  1396. if systemSetting.IsAlwaysShowName():
  1397. return True
  1398. if self.ShowNameFlag:
  1399. return True
  1400. return False
  1401. # END_OF_ADD_ALWAYS_SHOW_NAME
  1402. def HideName(self):
  1403. self.ShowNameFlag = False
  1404. self.playerGauge.DisableShowAlways()
  1405. player.SetQuickPage(self.quickSlotPageIndex)
  1406. def ShowMouseImage(self):
  1407. self.interface.ShowMouseImage()
  1408. def HideMouseImage(self):
  1409. self.interface.HideMouseImage()
  1410. def StartAttack(self):
  1411. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1412. self.OpenSecurityDialog()
  1413. return
  1414. player.SetAttackKeyState(True)
  1415. def EndAttack(self):
  1416. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1417. self.OpenSecurityDialog()
  1418. return
  1419. player.SetAttackKeyState(False)
  1420. def BINARY_Update_Maintenance(self, iTime, iDuration, iReason):
  1421. sTime = int(iTime)
  1422. sDuration = int(iDuration)
  1423. sReason = str(iReason)
  1424. if sTime != 0 and sDuration != 0:
  1425. self.wndMaintenance.OpenMaintenance(int(iTime), int(iDuration), str(iReason))
  1426. def MoveUp(self):
  1427. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1428. self.OpenSecurityDialog()
  1429. return
  1430. player.SetSingleDIKKeyState(app.DIK_UP, True)
  1431. def MoveDown(self):
  1432. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1433. self.OpenSecurityDialog()
  1434. return
  1435. player.SetSingleDIKKeyState(app.DIK_DOWN, True)
  1436. def MoveLeft(self):
  1437. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1438. self.OpenSecurityDialog()
  1439. return
  1440. player.SetSingleDIKKeyState(app.DIK_LEFT, True)
  1441. def MoveRight(self):
  1442. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1443. self.OpenSecurityDialog()
  1444. return
  1445. player.SetSingleDIKKeyState(app.DIK_RIGHT, True)
  1446. def StopUp(self):
  1447. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1448. self.OpenSecurityDialog()
  1449. return
  1450. player.SetSingleDIKKeyState(app.DIK_UP, False)
  1451. def StopDown(self):
  1452. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1453. self.uiSafebox.SecurityDialog()
  1454. return
  1455. player.SetSingleDIKKeyState(app.DIK_DOWN, False)
  1456. def StopLeft(self):
  1457. player.SetSingleDIKKeyState(app.DIK_LEFT, False)
  1458. def StopRight(self):
  1459. player.SetSingleDIKKeyState(app.DIK_RIGHT, False)
  1460. def PickUpItem(self):
  1461. player.PickCloseItem()
  1462. def PickUpMoney(self):
  1463. player.PickCloseMoney()
  1464. ###############################################################################################
  1465. ###############################################################################################
  1466. ## Event Handler
  1467. def OnKeyDown(self, key):
  1468. if self.interface.wndWeb and self.interface.wndWeb.IsShow():
  1469. return
  1470. if key == app.DIK_ESC:
  1471. self.RequestDropItem(False)
  1472. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1473. try:
  1474. self.onPressKeyDict[key]()
  1475. except KeyError:
  1476. pass
  1477. except:
  1478. raise
  1479. return True
  1480. def OnKeyUp(self, key):
  1481. try:
  1482. self.onClickKeyDict[key]()
  1483. except KeyError:
  1484. pass
  1485. except:
  1486. raise
  1487. return TRUE
  1488. def OnMouseLeftButtonDown(self):
  1489. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1490. self.OpenSecurityDialog()
  1491. return
  1492. if self.interface.BUILD_OnMouseLeftButtonDown():
  1493. return
  1494. if mouseModule.mouseController.isAttached():
  1495. self.CheckFocus()
  1496. else:
  1497. hyperlink = ui.GetHyperlink()
  1498. if hyperlink:
  1499. return
  1500. else:
  1501. self.CheckFocus()
  1502. player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
  1503. return True
  1504. def OnMouseLeftButtonUp(self):
  1505. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1506. self.OpenSecurityDialog()
  1507. return
  1508. if self.interface.BUILD_OnMouseLeftButtonUp():
  1509. return
  1510. if mouseModule.mouseController.isAttached():
  1511. attachedType = mouseModule.mouseController.GetAttachedType()
  1512. attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  1513. attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  1514. attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
  1515. ## QuickSlot
  1516. if player.SLOT_TYPE_QUICK_SLOT == attachedType:
  1517. player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
  1518. ## Inventory
  1519. elif player.SLOT_TYPE_INVENTORY == attachedType:
  1520. if player.ITEM_MONEY == attachedItemIndex:
  1521. self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
  1522. else:
  1523. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1524. ## DragonSoul
  1525. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1526. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1527. mouseModule.mouseController.DeattachObject()
  1528. else:
  1529. hyperlink = ui.GetHyperlink()
  1530. if hyperlink:
  1531. if app.IsPressed(app.DIK_LALT):
  1532. link = chat.GetLinkFromHyperlink(hyperlink)
  1533. ime.PasteString(link)
  1534. else:
  1535. self.interface.MakeHyperlinkTooltip(hyperlink)
  1536. return
  1537. else:
  1538. player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
  1539. #player.EndMouseWalking()
  1540. return True
  1541. def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
  1542. if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1543. attachedInvenType = player.SlotTypeToInvenType(attachedType)
  1544. if True == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  1545. if player.IsEquipmentSlot(attachedItemSlotPos) and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType:
  1546. self.stream.popupWindow.Close()
  1547. self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  1548. else:
  1549. if chr.IsNPC(dstChrID):
  1550. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  1551. else:
  1552. net.SendExchangeStartPacket(dstChrID)
  1553. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  1554. else:
  1555. self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
  1556. def __PutMoney(self, attachedType, attachedMoney, dstChrID):
  1557. if True == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
  1558. net.SendExchangeStartPacket(dstChrID)
  1559. net.SendExchangeElkAddPacket(attachedMoney)
  1560. else:
  1561. self.__DropMoney(attachedType, attachedMoney)
  1562. def __DropMoney(self, attachedType, attachedMoney):
  1563. # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
  1564. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1565. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1566. return
  1567. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1568. # BEGIN_OFFLINE_SHOP
  1569. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  1570. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1571. return
  1572. if (uiOfflineShop.IsEditingOfflineShop()):
  1573. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1574. return
  1575. # END_OF_OFFLINE_SHOP
  1576. if attachedMoney>=1000:
  1577. self.stream.popupWindow.Close()
  1578. self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
  1579. return
  1580. itemDropQuestionDialog = uiCommon.QuestionDialog()
  1581. itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
  1582. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1583. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1584. itemDropQuestionDialog.Open()
  1585. itemDropQuestionDialog.dropType = attachedType
  1586. itemDropQuestionDialog.dropCount = attachedMoney
  1587. itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
  1588. self.itemDropQuestionDialog = itemDropQuestionDialog
  1589. def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
  1590. # PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
  1591. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1592. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1593. return
  1594. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1595. # BEGIN_OFFLINE_SHOP
  1596. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  1597. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1598. return
  1599. if (uiOfflineShop.IsEditingOfflineShop()):
  1600. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1601. return
  1602. # END_OF_OFFLINE_SHOP
  1603. if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
  1604. self.stream.popupWindow.Close()
  1605. self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  1606. else:
  1607. if player.SLOT_TYPE_INVENTORY == attachedType:
  1608. dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
  1609. item.SelectItem(dropItemIndex)
  1610. dropItemName = item.GetItemName()
  1611. ## Question Text
  1612. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  1613. ## Dialog
  1614. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1615. itemDropQuestionDialog.SetText(questionText)
  1616. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1617. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1618. itemDropQuestionDialog.Open()
  1619. itemDropQuestionDialog.dropType = attachedType
  1620. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1621. itemDropQuestionDialog.dropCount = attachedItemCount
  1622. self.itemDropQuestionDialog = itemDropQuestionDialog
  1623. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1624. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1625. dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
  1626. item.SelectItem(dropItemIndex)
  1627. dropItemName = item.GetItemName()
  1628. ## Question Text
  1629. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  1630. ## Dialog
  1631. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1632. itemDropQuestionDialog.SetText(questionText)
  1633. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1634. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1635. itemDropQuestionDialog.Open()
  1636. itemDropQuestionDialog.dropType = attachedType
  1637. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1638. itemDropQuestionDialog.dropCount = attachedItemCount
  1639. self.itemDropQuestionDialog = itemDropQuestionDialog
  1640. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1641. def RequestDropItem(self, answer):
  1642. if not self.itemDropQuestionDialog:
  1643. return
  1644. if answer:
  1645. dropType = self.itemDropQuestionDialog.dropType
  1646. dropCount = self.itemDropQuestionDialog.dropCount
  1647. dropNumber = self.itemDropQuestionDialog.dropNumber
  1648. if player.SLOT_TYPE_INVENTORY == dropType:
  1649. if dropNumber == player.ITEM_MONEY:
  1650. net.SendGoldDropPacketNew(dropCount)
  1651. snd.PlaySound("sound/ui/money.wav")
  1652. else:
  1653. # PRIVATESHOP_DISABLE_ITEM_DROP
  1654. self.__SendDropItemPacket(dropNumber, dropCount)
  1655. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1656. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  1657. # PRIVATESHOP_DISABLE_ITEM_DROP
  1658. self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  1659. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1660. self.itemDropQuestionDialog.Close()
  1661. self.itemDropQuestionDialog = None
  1662. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1663. def RequestDestroyItem(self, answer):
  1664. if not self.itemDropQuestionDialog:
  1665. return
  1666. if answer:
  1667. dropType = self.itemDropQuestionDialog.dropType
  1668. dropNumber = self.itemDropQuestionDialog.dropNumber
  1669. if player.SLOT_TYPE_INVENTORY == dropType:
  1670. if dropNumber == player.ITEM_MONEY:
  1671. return
  1672. else:
  1673. self.__SendDestroyItemPacket(dropNumber)
  1674. self.itemDropQuestionDialog.Close()
  1675. self.itemDropQuestionDialog = None
  1676. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1677. # PRIVATESHOP_DISABLE_ITEM_DROP
  1678. def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  1679. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1680. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1681. return
  1682. # BEGIN_OFFLINE_SHOP
  1683. if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
  1684. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1685. return
  1686. if (uiOfflineShop.IsEditingOfflineShop()):
  1687. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1688. return
  1689. # END_OF_OFFLINE_SHOP
  1690. net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
  1691. def __SendDestroyItemPacket(self, itemVNum, itemInvenType = player.INVENTORY):
  1692. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1693. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1694. return
  1695. net.SendItemDestroyPacket(itemVNum)
  1696. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1697. def OnMouseRightButtonDown(self):
  1698. self.CheckFocus()
  1699. if True == mouseModule.mouseController.isAttached():
  1700. mouseModule.mouseController.DeattachObject()
  1701. else:
  1702. player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
  1703. return True
  1704. def OnMouseRightButtonUp(self):
  1705. if True == mouseModule.mouseController.isAttached():
  1706. return True
  1707. player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
  1708. return True
  1709. def OnMouseMiddleButtonDown(self):
  1710. player.SetMouseMiddleButtonState(player.MBS_PRESS)
  1711. def OnMouseMiddleButtonUp(self):
  1712. player.SetMouseMiddleButtonState(player.MBS_CLICK)
  1713. def OnUpdate(self):
  1714. gamemasta = player.GetName()
  1715. app.UpdateGame()
  1716. if constInfo.citsystem== 1:
  1717. lastTime = max(0, self.endTime - time.clock())
  1718. if 0 == lastTime:
  1719. self.citsystem2()
  1720. curTime = time.clock()
  1721. self.endTime = curTime + 1
  1722. if app.ENABLE_PVP_ADVANCED:
  1723. if pvp.DUEL_IS_SHOW_EQUIP == int(1):
  1724. self.interface.CloseEquipmentDialog(int(pvp.DUEL_SAVE_VID))
  1725. if gameInfo.SYSTEMS_PAKET4==1:
  1726. self.__ArayuzManager()
  1727. gameInfo.SYSTEMS_PAKET4=0
  1728. if reveninfo.REVEN_OYUNCU==1:
  1729. self.siralamaopen()
  1730. reveninfo.REVEN_OYUNCU=0
  1731. # onupdate sırasında gameınfoya gonderildi #
  1732. if revensysteminfo.REVEN_BOOS==1:
  1733. self.recordac()
  1734. revensysteminfo.REVEN_BOOS=0
  1735. if gameInfo.REVEN_RANK==1:
  1736. self.loncasiralamaopen()
  1737. gameInfo.REVEN_RANK=0
  1738. ##Oyuna girdi##
  1739. global oyunagirdibeklemesuresi
  1740. global oyunagirdiglobaltimesuresi
  1741. global oyunagirdi
  1742. if oyunagirdi == 1:
  1743. if app.GetTime() < self.Bekle + 4:
  1744. pass
  1745. else:
  1746. self.GirdiButton.Hide()
  1747. oyunagirdi = 0
  1748. else:
  1749. pass
  1750. ##Oyuna girdi##
  1751. if self.mapNameShower.IsShow():
  1752. self.mapNameShower.Update()
  1753. if self.isShowDebugInfo:
  1754. self.UpdateDebugInfo()
  1755. if self.enableXMasBoom:
  1756. self.__XMasBoom_Update()
  1757. if 1 == constInfo.AUTO_PICK_UP:
  1758. self.PickUpItem()
  1759. if gameInfo.SYSTEMS_PAKET2==1:
  1760. self.otocevapekran()
  1761. gameInfo.SYSTEMS_PAKET2=0
  1762. if gameInfo.SYSTEMS_PAKET3 == 1:
  1763. self.log_ekran()
  1764. gameInfo.SYSTEMS_PAKET3 = 0
  1765. if 0 == constInfo.auto_pick_item:
  1766. self.PickUpItem()
  1767. if 0 == constInfo.auto_pick_yang:
  1768. self.PickUpMoney()
  1769. if int(int(self.interface.LastContactTimeStamp) + self.interface.WaitTime) < int(app.GetTime()) and self.interface.State == "Kapali":
  1770. self.interface.State = "Acik"
  1771. self.interface.BUILD_OnUpdate()
  1772. if gamemasta.find("[KRAL]")!=-1 and constInfo.GM_MARK == 0:
  1773. constInfo.GM_MARK = 1
  1774. net.SendChatPacket("(kral)")
  1775. if player.IsPartyMember(player.GetMainCharacterIndex()):
  1776. self.CharBar.pozisyon(123, 16)
  1777. else:
  1778. self.CharBar.pozisyon(13, 16)
  1779. cbmrace = net.GetMainActorRace()
  1780. if cbmrace == 0:
  1781. self.CharBar.SetFoto("sidebar/icon_mwarrior.tga")
  1782. elif cbmrace == 1:
  1783. self.CharBar.SetFoto("sidebar/icon_wninja.tga")
  1784. elif cbmrace == 2:
  1785. self.CharBar.SetFoto("sidebar/icon_msura.tga")
  1786. elif cbmrace == 3:
  1787. self.CharBar.SetFoto("sidebar/icon_wshaman.tga")
  1788. elif cbmrace == 4:
  1789. self.CharBar.SetFoto("sidebar/icon_wwarrior.tga")
  1790. elif cbmrace == 5:
  1791. self.CharBar.SetFoto("sidebar/icon_mninja.tga")
  1792. elif cbmrace == 6:
  1793. self.CharBar.SetFoto("sidebar/icon_wsura.tga")
  1794. elif cbmrace == 7:
  1795. self.CharBar.SetFoto("sidebar/icon_mshaman.tga")
  1796. else:
  1797. self.CharBar.Hide()
  1798. if translate.acik == 0:
  1799. self.CharBar.Hide()
  1800. elif translate.acik == 1:
  1801. self.CharBar.Show()
  1802. curHP = player.GetStatus(player.HP)
  1803. maxHP = player.GetStatus(player.MAX_HP)
  1804. recoveryHP = player.GetStatus(player.HP_RECOVERY)
  1805. curPointHP = min(curHP, maxHP)
  1806. curSP = player.GetStatus(player.SP)
  1807. maxSP = player.GetStatus(player.MAX_SP)
  1808. recoverySP = player.GetStatus(player.SP_RECOVERY)
  1809. curPointSP = min(curSP, maxSP)
  1810. curST = player.GetStatus(player.STAMINA)
  1811. maxST = player.GetStatus(player.MAX_STAMINA)
  1812. curPointST = min(curST, maxST)
  1813. self.CharBar.hpyenile(curPointHP, maxHP)
  1814. self.CharBar.spyenile(curPointSP, maxSP)
  1815. self.CharBar.sethp(str(player.GetStatus(player.HP)) + ' / ' + str(player.GetStatus(player.MAX_HP)))
  1816. self.CharBar.setsp(str(player.GetStatus(player.SP)) + ' / ' + str(player.GetStatus(player.MAX_SP)))
  1817. self.CharBar.setisim(player.GetName())
  1818. self.CharBar.setlevel(str(player.GetStatus(player.LEVEL)))
  1819. import locale
  1820. import datetime
  1821. locale.setlocale(locale.LC_ALL, 'turkish')
  1822. mydate = datetime.datetime.now()
  1823. gun = time.strftime("%d ")
  1824. ay = mydate.strftime("%B ")
  1825. yil = time.strftime("%Y ")
  1826. gun2 = mydate.strftime("%A")
  1827. saat = time.strftime(" %H:%M:%S")
  1828. self.CharBar.settime(gun+ay+yil+gun2+saat)
  1829. def UpdateDebugInfo(self):
  1830. #
  1831. # 캐릭터 좌표 및 FPS 출력
  1832. (x, y, z) = player.GetMainCharacterPosition()
  1833. nUpdateTime = app.GetUpdateTime()
  1834. nUpdateFPS = app.GetUpdateFPS()
  1835. nRenderFPS = app.GetRenderFPS()
  1836. nFaceCount = app.GetFaceCount()
  1837. fFaceSpeed = app.GetFaceSpeed()
  1838. nST=background.GetRenderShadowTime()
  1839. (fAveRT, nCurRT) = app.GetRenderTime()
  1840. (iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
  1841. (iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
  1842. if iPatch == 0:
  1843. iPatch = 1
  1844. #(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()
  1845. self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
  1846. xMouse, yMouse = wndMgr.GetMousePosition()
  1847. self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
  1848. self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
  1849. if fAveRT>1.0:
  1850. self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
  1851. self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
  1852. #self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
  1853. #self.TextureNum.SetText("TN : %s" % (sTextureNum))
  1854. #self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
  1855. self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
  1856. def OnRender(self):
  1857. app.RenderGame()
  1858. if self.console.Console.collision:
  1859. background.RenderCollision()
  1860. chr.RenderCollision()
  1861. (x, y) = app.GetCursorPosition()
  1862. ########################
  1863. # Picking
  1864. ########################
  1865. textTail.UpdateAllTextTail()
  1866. if True == wndMgr.IsPickedWindow(self.hWnd):
  1867. self.PickingCharacterIndex = chr.Pick()
  1868. if -1 != self.PickingCharacterIndex:
  1869. textTail.ShowCharacterTextTail(self.PickingCharacterIndex)
  1870. if 0 != self.targetBoard.GetTargetVID():
  1871. textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
  1872. # ADD_ALWAYS_SHOW_NAME
  1873. if not self.__IsShowName():
  1874. self.PickingItemIndex = item.Pick()
  1875. if -1 != self.PickingItemIndex:
  1876. textTail.ShowItemTextTail(self.PickingItemIndex)
  1877. # END_OF_ADD_ALWAYS_SHOW_NAME
  1878. ## Show all name in the range
  1879. # ADD_ALWAYS_SHOW_NAME
  1880. if self.__IsShowName():
  1881. textTail.ShowAllTextTail()
  1882. self.PickingItemIndex = textTail.Pick(x, y)
  1883. # END_OF_ADD_ALWAYS_SHOW_NAME
  1884. if app.ENABLE_SHOPNAMES_RANGE:
  1885. if systemSetting.IsShowSalesText():
  1886. uiPrivateShopBuilder.UpdateADBoard()
  1887. uiOfflineShopBuilder.UpdateADBoard()
  1888. textTail.UpdateShowingTextTail()
  1889. textTail.ArrangeTextTail()
  1890. if -1 != self.PickingItemIndex:
  1891. textTail.SelectItemName(self.PickingItemIndex)
  1892. grp.PopState()
  1893. grp.SetInterfaceRenderState()
  1894. textTail.Render()
  1895. textTail.HideAllTextTail()
  1896. def OnPressEscapeKey(self):
  1897. if app.TARGET == app.GetCursor():
  1898. app.SetCursor(app.NORMAL)
  1899. elif True == mouseModule.mouseController.isAttached():
  1900. mouseModule.mouseController.DeattachObject()
  1901. else:
  1902. self.interface.OpenSystemDialog()
  1903. if self.recordscreen.IsShow():
  1904. self.recordscreen.Open()
  1905. return True
  1906. def OnIMEReturn(self):
  1907. if app.IsPressed(app.DIK_LSHIFT):
  1908. self.interface.OpenWhisperDialogWithoutTarget()
  1909. else:
  1910. self.interface.ToggleChat()
  1911. return True
  1912. def OnPressExitKey(self):
  1913. self.interface.ToggleSystemDialog()
  1914. return True
  1915. ## BINARY CALLBACK
  1916. ######################################################################################
  1917. if app.WJ_ENABLE_TRADABLE_ICON:
  1918. def BINARY_AddItemToExchange(self, inven_type, inven_pos, display_pos):
  1919. if inven_type == player.INVENTORY:
  1920. self.interface.CantTradableItemExchange(display_pos, inven_pos)
  1921. # WEDDING
  1922. def BINARY_LoverInfo(self, name, lovePoint):
  1923. if self.interface.wndMessenger:
  1924. self.interface.wndMessenger.OnAddLover(name, lovePoint)
  1925. if self.affectShower:
  1926. self.affectShower.SetLoverInfo(name, lovePoint)
  1927. def BINARY_UpdateLovePoint(self, lovePoint):
  1928. if self.interface.wndMessenger:
  1929. self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
  1930. if self.affectShower:
  1931. self.affectShower.OnUpdateLovePoint(lovePoint)
  1932. # END_OF_WEDDING
  1933. # QUEST_CONFIRM
  1934. def BINARY_OnQuestConfirm(self, msg, timeout, pid):
  1935. confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
  1936. confirmDialog.SetText1(msg)
  1937. confirmDialog.Open(timeout)
  1938. confirmDialog.SetAcceptEvent(lambda answer=True, pid=pid: m2net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  1939. confirmDialog.SetCancelEvent(lambda answer=False, pid=pid: m2net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  1940. self.confirmDialog = confirmDialog
  1941. # END_OF_QUEST_CONFIRM
  1942. # GIFT command
  1943. def Gift_Show(self):
  1944. self.interface.ShowGift()
  1945. # CUBE
  1946. def BINARY_Cube_Open(self, npcVNUM):
  1947. self.currentCubeNPC = npcVNUM
  1948. self.interface.OpenCubeWindow()
  1949. if npcVNUM not in self.cubeInformation:
  1950. net.SendChatPacket("/cube r_info")
  1951. else:
  1952. cubeInfoList = self.cubeInformation[npcVNUM]
  1953. i = 0
  1954. for cubeInfo in cubeInfoList:
  1955. self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
  1956. j = 0
  1957. for materialList in cubeInfo["materialList"]:
  1958. for materialInfo in materialList:
  1959. itemVnum, itemCount = materialInfo
  1960. self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
  1961. j = j + 1
  1962. i = i + 1
  1963. self.interface.wndCube.Refresh()
  1964. def BINARY_Cube_Close(self):
  1965. self.interface.CloseCubeWindow()
  1966. # 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
  1967. def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
  1968. self.interface.UpdateCubeInfo(gold, itemVnum, count)
  1969. def BINARY_Cube_Succeed(self, itemVnum, count):
  1970. print "큐브 제작 성공"
  1971. self.interface.SucceedCubeWork(itemVnum, count)
  1972. pass
  1973. def BINARY_Cube_Failed(self):
  1974. print "큐브 제작 실패"
  1975. self.interface.FailedCubeWork()
  1976. pass
  1977. def BINARY_Cube_ResultList(self, npcVNUM, listText):
  1978. # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 이런식으로 "/" 문자로 구분된 리스트를 줌
  1979. #print listText
  1980. if npcVNUM == 0:
  1981. npcVNUM = self.currentCubeNPC
  1982. self.cubeInformation[npcVNUM] = []
  1983. try:
  1984. for eachInfoText in listText.split("/"):
  1985. eachInfo = eachInfoText.split(",")
  1986. itemVnum = int(eachInfo[0])
  1987. itemCount = int(eachInfo[1])
  1988. self.cubeInformation[npcVNUM].append({"vnum": itemVnum, "count": itemCount})
  1989. self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
  1990. resultCount = len(self.cubeInformation[npcVNUM])
  1991. requestCount = 7
  1992. modCount = resultCount % requestCount
  1993. splitCount = resultCount / requestCount
  1994. for i in xrange(splitCount):
  1995. #print("/cube r_info %d %d" % (i * requestCount, requestCount))
  1996. net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
  1997. if 0 < modCount:
  1998. #print("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  1999. net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  2000. except RuntimeError, msg:
  2001. dbg.TraceError(msg)
  2002. return 0
  2003. pass
  2004. def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
  2005. # Material Text Format : 125,1|126,2|127,2|123,5&555,5&555,4/120000
  2006. try:
  2007. #print listText
  2008. if 3 > len(listText):
  2009. dbg.TraceError("Wrong Cube Material Infomation")
  2010. return 0
  2011. eachResultList = listText.split("@")
  2012. cubeInfo = self.cubeInformation[self.currentCubeNPC]
  2013. itemIndex = 0
  2014. for eachResultText in eachResultList:
  2015. cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
  2016. materialList = cubeInfo[startIndex + itemIndex]["materialList"]
  2017. gold = 0
  2018. splitResult = eachResultText.split("/")
  2019. if 1 < len(splitResult):
  2020. gold = int(splitResult[1])
  2021. #print "splitResult : ", splitResult
  2022. eachMaterialList = splitResult[0].split("&")
  2023. i = 0
  2024. for eachMaterialText in eachMaterialList:
  2025. complicatedList = eachMaterialText.split("|")
  2026. if 0 < len(complicatedList):
  2027. for complicatedText in complicatedList:
  2028. (itemVnum, itemCount) = complicatedText.split(",")
  2029. itemVnum = int(itemVnum)
  2030. itemCount = int(itemCount)
  2031. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2032. materialList[i].append((itemVnum, itemCount))
  2033. else:
  2034. itemVnum, itemCount = eachMaterialText.split(",")
  2035. itemVnum = int(itemVnum)
  2036. itemCount = int(itemCount)
  2037. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2038. materialList[i].append((itemVnum, itemCount))
  2039. i = i + 1
  2040. itemIndex = itemIndex + 1
  2041. self.interface.wndCube.Refresh()
  2042. except RuntimeError, msg:
  2043. dbg.TraceError(msg)
  2044. return 0
  2045. pass
  2046. # END_OF_CUBE
  2047. # 용혼석
  2048. def BINARY_Highlight_Item(self, inven_type, inven_pos):
  2049. if self.interface:
  2050. self.interface.Highligt_Item(inven_type, inven_pos)
  2051. def BINARY_DragonSoulGiveQuilification(self):
  2052. self.interface.DragonSoulGiveQuilification()
  2053. def __Cofres_Search(self,vnums,counts):
  2054. self.interface.ItemsCofres(vnums,counts)
  2055. def __Cofres_Search_Refresh(self):
  2056. self.interface.ItemsCofresRefresh()
  2057. def __Cofres_Search_Refresh_Open(self):
  2058. self.interface.ItemsCofreRefreshOpen()
  2059. def __CofresShow(self):
  2060. self.interface.CofresShow()
  2061. def BINARY_DragonSoulRefineWindow_Open(self):
  2062. self.interface.OpenDragonSoulRefineWindow()
  2063. def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
  2064. self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
  2065. def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
  2066. self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
  2067. # END of DRAGON SOUL REFINE WINDOW
  2068. def BINARY_SetBigMessage(self, message):
  2069. self.interface.bigBoard.SetTip(message)
  2070. def BINARY_SetTipMessage(self, message):
  2071. self.interface.tipBoard.SetTip(message)
  2072. def BINARY_AppendNotifyMessage(self, type):
  2073. if not type in localeInfo.NOTIFY_MESSAGE:
  2074. return
  2075. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NOTIFY_MESSAGE[type])
  2076. def BINARY_Guild_EnterGuildArea(self, areaID):
  2077. self.interface.BULID_EnterGuildArea(areaID)
  2078. def BINARY_Guild_ExitGuildArea(self, areaID):
  2079. self.interface.BULID_ExitGuildArea(areaID)
  2080. def BINARY_GuildWar_OnSendDeclare(self, guildID):
  2081. pass
  2082. def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
  2083. mainCharacterName = player.GetMainCharacterName()
  2084. masterName = guild.GetGuildMasterName()
  2085. if mainCharacterName == masterName:
  2086. self.__GuildWar_OpenAskDialog(guildID, warType)
  2087. def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
  2088. self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
  2089. def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
  2090. self.interface.OnStartGuildWar(guildSelf, guildOpp)
  2091. def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
  2092. self.interface.OnEndGuildWar(guildSelf, guildOpp)
  2093. def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
  2094. self.interface.BINARY_SetObserverMode(isEnable)
  2095. def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
  2096. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2097. def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
  2098. guildID1 = int(guildID1)
  2099. guildID2 = int(guildID2)
  2100. memberCount1 = int(memberCount1)
  2101. memberCount2 = int(memberCount2)
  2102. observerCount = int(observerCount)
  2103. self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
  2104. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2105. def __GuildWar_ProcessKillInput(self, killerName, killerRace, victimName, victimRace):
  2106. self.guildScoreCounter.OnMessage(killerName, killerRace, victimName, victimRace)
  2107. def __GuildWar_OpenAskDialog(self, guildID, warType):
  2108. guildName = guild.GetGuildName(guildID)
  2109. # REMOVED_GUILD_BUG_FIX
  2110. if "Noname" == guildName:
  2111. return
  2112. # END_OF_REMOVED_GUILD_BUG_FIX
  2113. import uiGuild
  2114. questionDialog = uiGuild.AcceptGuildWarDialog()
  2115. questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
  2116. questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
  2117. questionDialog.Open(guildName, warType)
  2118. self.guildWarQuestionDialog = questionDialog
  2119. def __GuildWar_CloseAskDialog(self):
  2120. self.guildWarQuestionDialog.Close()
  2121. self.guildWarQuestionDialog = None
  2122. def __GuildWar_OnAccept(self):
  2123. guildName = self.guildWarQuestionDialog.GetGuildName()
  2124. net.SendChatPacket("/war " + guildName)
  2125. self.__GuildWar_CloseAskDialog()
  2126. return 1
  2127. def __GuildWar_OnDecline(self):
  2128. guildName = self.guildWarQuestionDialog.GetGuildName()
  2129. net.SendChatPacket("/nowar " + guildName)
  2130. self.__GuildWar_CloseAskDialog()
  2131. return 1
  2132. ## BINARY CALLBACK
  2133. ######################################################################################
  2134. def __ServerCommand_Build(self):
  2135. serverCommandList={
  2136. "BINARY_Update_Cash" :self.BINARY_Update_Cash,
  2137. "ConsoleEnable" : self.__Console_Enable,
  2138. "DayMode" : self.__DayMode_Update,
  2139. "PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
  2140. "CloseRestartWindow" : self.__RestartDialog_Close,
  2141. "OtomatikAvWindow" : self.__otomatikavstart,
  2142. "OpenPrivateShop" : self.__PrivateShop_Open,
  2143. "ruhtasiekranac" : self.ruhcac,
  2144. "bkekranac" : self.bkac,
  2145. "PartyHealReady" : self.PartyHealReady,
  2146. "ShowMeSafeboxPassword" : self.AskSafeboxPassword,
  2147. "CloseSafebox" : self.CommandCloseSafebox,
  2148. "PythonToLua" : self.__PythonToLua,
  2149. "PythonIslem" : self.__PythonIslem,
  2150. "LuaToPython" : self.__LuaToPython,
  2151. "citsystem" : self.citsystem,
  2152. "loncaistatistik" : self.loncaistatistik,
  2153. "HorseOpen" : self.__HorseOpen,
  2154. "skill_index" : self._Skill,
  2155. "reven_profil_test" : self.__reventestprofil,
  2156. "reven_profil_input" : self.__reveninputprofil,
  2157. "reven_profil_albunu" : self.__revenproalbunu,
  2158. ########################### GAYA SYSTEM #################################
  2159. "OpenGuiGaya" : self.OpenGuiGaya,
  2160. "GayaCheck" : self.GayaCheck,
  2161. "OpenGuiGayaMarket" :self.OpenGuiGayaMarket,
  2162. "GayaMarketSlotsDesblock" : self.GayaMarketSlotsDesblock,
  2163. "GayaMarketItems" : self.GayaMarketItems,
  2164. "GayaMarketClear" : self.GayaMarketClear,
  2165. "GayaMarketTime" : self.GayaTimeMarket,
  2166. ####################### END GAYA SYSTEM ######################################
  2167. # ITEM_MALL
  2168. "CloseMall" : self.CommandCloseMall,
  2169. "biyologodul" : self.biyoodulac,
  2170. "biyologekrankapa" : self.biyologekrankapa,
  2171. "biyolog" : self.biyolog,
  2172. "ShowMeMallPassword" : self.AskMallPassword,
  2173. "item_mall" : self.__ItemMall_Open,
  2174. # BEGIN_OFFLINE_SHOP
  2175. "OpenOfflineShop" : self.__OfflineShop_Open,
  2176. "CloseOfflineShopBuilderWindow" : self.__CloseOfflineShopBuilderWindow,
  2177. # END_OF_OFFLINE_SHOP
  2178. "item_kilit_q" : self.item_kilit_q,
  2179. "kilit" : self.kilit,
  2180. "getinputbegin" : self.__Inputget1,
  2181. "getinputend" : self.__Inputget2,
  2182. "servis_index" : self._Servis,
  2183. "anti_index" : self._Antiexp,
  2184. "exp_engel_id" : self.__exp_engel_id,
  2185. "exp_bilgi_id" : self.__exp_bilgi_id,
  2186. "exp_bilgi" : self.__exp_bilgi,
  2187. "sandikbutton" : self.sandik_quest,
  2188. #ticaret_gecmisi
  2189. "tic_id" : self.__tic_quest_id,
  2190. "tic_ekle" : self.__tic_gecmis_bilgi_gir,
  2191. "tic_ac" : self.__tic_gecmis_ac,
  2192. "tic_gotur" : self.Close_tic,
  2193. "pazar_log_q" : self.__pazar_log_q,
  2194. "itemi_alan" : self.__itemi_alan,
  2195. "item_isim" : self.__item_isim,
  2196. "item_fiyat" : self.__item_fiyat,
  2197. "pazar_log_q_id" : self.__pazar_log_q_id,
  2198. "pazar_ekle" : self.__pazar_log_bilgi_gir,
  2199. "pazar_ac" : self.__pazar_log_ac,
  2200. "pazar_gotur" : self.Close_p_log,
  2201. "getinputbegin" : self.__Inputget1,
  2202. "getinputend" : self.__Inputget2,
  2203. "getinput" : self.__Inputget3,
  2204. "search_cofre_ids" : self.__Cofres_Search,
  2205. "search_cofre_refresh" : self.__Cofres_Search_Refresh,
  2206. "search_cofre_refresh_open" : self.__Cofres_Search_Refresh_Open,
  2207. "sandik_button" : self.__CofresShow,
  2208. # END_OF_ITEM_MALL
  2209. "RefineSuceeded" : self.RefineSuceededMessage,
  2210. "RefineFailed" : self.RefineFailedMessage,
  2211. "xmas_snow" : self.__XMasSnow_Enable,
  2212. "xmas_boom" : self.__XMasBoom_Enable,
  2213. "xmas_song" : self.__XMasSong_Enable,
  2214. "xmas_tree" : self.__XMasTree_Enable,
  2215. "newyear_boom" : self.__XMasBoom_Enable,
  2216. "PartyRequest" : self.__PartyRequestQuestion,
  2217. "PartyRequestDenied" : self.__PartyRequestDenied,
  2218. "horse_state" : self.__Horse_UpdateState,
  2219. "hide_horse_state" : self.__Horse_HideState,
  2220. "WarUC" : self.__GuildWar_UpdateMemberCount,
  2221. "GW_Kill_Update" : self.__GuildWar_ProcessKillInput,
  2222. "test_server" : self.__EnableTestServerFlag,
  2223. "mall" : self.__InGameShop_Show,
  2224. "BINARY_Update_Maintenance" : self.BINARY_Update_Maintenance,
  2225. "lonca_lider_q" : self.lonca_lider_q,
  2226. "lider_ekle" : self.lider_ekle,
  2227. "lider_sifirla" : self.lider_sifirla,
  2228. # WEDDING
  2229. "lover_login" : self.__LoginLover,
  2230. "KelimeEventGui" : self.WordGameWindowShow,
  2231. "lover_logout" : self.__LogoutLover,
  2232. "lover_near" : self.__LoverNear,
  2233. "lover_far" : self.__LoverFar,
  2234. "lover_divorce" : self.__LoverDivorce,
  2235. "PlayMusic" : self.__PlayMusic,
  2236. "BINARY_Localization_Append" : self.BINARY_Localization_Append,
  2237. "guvenlipc" : self.guvenlipc,
  2238. # END_OF_WEDDING
  2239. # 5Lv Oto Bec Sistemi
  2240. # Sava?cı Beceri
  2241. "OpenBec1Gui" : self.__BecSystem1,
  2242. "zihinsel_oto_bec" : self.zihinsel_oto_bec,
  2243. "bedensel_oto_bec" : self.bedensel_oto_bec,
  2244. # Sura Beceri
  2245. "OpenBec3Gui" : self.__BecSystem2,
  2246. "karabuyu_oto_bec" : self.karabuyu_oto_bec,
  2247. "buyulusilah_oto_bec" : self.buyulusilah_oto_bec,
  2248. # Ninja Becerileri
  2249. "OpenBec2Gui" : self.__BecSystem3,
  2250. "yakin_oto_bec" : self.yakin_oto_bec,
  2251. "uzak_oto_bec" : self.uzak_oto_bec,
  2252. # ?aman Becerileri
  2253. "OpenBec4Gui" : self.__BecSystem4,
  2254. "ejderha_oto_bec" : self.ejderha_oto_bec,
  2255. "iyilestirme_oto_bec" : self.iyilestirme_oto_bec,
  2256. # ----------------------------------------------------
  2257. #################################################
  2258. # Duel System #
  2259. "BINARY_Duel_GetInfo" : self.BINARY_Duel_GetInfo,
  2260. "BINARY_Duel_Request" : self.BINARY_Duel_Request,
  2261. "BINARY_Duel_LiveInterface" : self.BINARY_Duel_LiveInterface,
  2262. "BINARY_Duel_Delete" : self.BINARY_Duel_Delete,
  2263. "BINARY_Duel_SendMessage" : self.BINARY_Duel_SendMessage,
  2264. #################################################
  2265. "guvenli_pc" : self._guvenli_pc,
  2266. "guvenli_pc_bilgi" : self._guvenli_pc_bilgi,
  2267. # PRIVATE_SHOP_PRICE_LIST
  2268. "MyShopPriceList" : self.__PrivateShop_PriceList,
  2269. "Uzaktan_Ticaret" : self.Uzaktan_Ticaret,
  2270. "ItemSil_Index" : self.__ReceiveItemSilIndex,
  2271. "get_item_value" : self.__GetItemValue,
  2272. "InputStringStart" : self.ItemSilInputOn,
  2273. "InputStringEnd" : self.ItemSilGetInputOff,
  2274. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2275. "recordquest" : self.__recordscreen,
  2276. "recordwarning" : self.recordwarning,
  2277. "oyunicisiralama" : self.__oyunicisirala,
  2278. "uyarisiralama" : self.uyarisiralama,
  2279. "loncasiralama" : self.__oyunicilonca,
  2280. "uyariloncasira" : self.uyariloncasira,
  2281. }
  2282. if app.WJ_SECURITY_SYSTEM:
  2283. serverCommandList.update({"OpenSecurityCreate" : self.OpenSecurityCreate })
  2284. serverCommandList.update({"OpenSecurityDialog" : self.OpenSecurityDialog })
  2285. serverCommandList.update({"CloseSecurityCreate" : self.CloseSecurityCreate })
  2286. serverCommandList.update({"CloseSecurityDialog" : self.CloseSecurityDialog })
  2287. self.serverCommander=stringCommander.Analyzer()
  2288. for serverCommandItem in serverCommandList.items():
  2289. self.serverCommander.SAFE_RegisterCallBack(
  2290. serverCommandItem[0], serverCommandItem[1]
  2291. )
  2292. def __ReceiveItemSilIndex(self, index):
  2293. constInfo.ItemSil_Index = int(index)
  2294. def __GetItemValue(self):
  2295. net.SendQuestInputStringPacket(str(constInfo.ItemSil_Slot))
  2296. def ItemSilInputOn(self):
  2297. constInfo.INPUT_IGNORE = 1
  2298. def ItemSilGetInputOff(self):
  2299. constInfo.INPUT_IGNORE = 0
  2300. def BINARY_ServerCommand_Run(self, line):
  2301. #dbg.TraceError(line)
  2302. try:
  2303. #print " BINARY_ServerCommand_Run", line
  2304. return self.serverCommander.Run(line)
  2305. except RuntimeError, msg:
  2306. dbg.TraceError(msg)
  2307. return 0
  2308. def _guvenli_pc(self, value):
  2309. constInfo.GUVENLIPC = int(value)
  2310. def _guvenli_pc_bilgi(self, value):
  2311. constInfo.GUVENLIPCBILGI = int(value)
  2312. def __ProcessPreservedServerCommand(self):
  2313. try:
  2314. command = net.GetPreservedServerCommand()
  2315. while command:
  2316. print " __ProcessPreservedServerCommand", command
  2317. self.serverCommander.Run(command)
  2318. command = net.GetPreservedServerCommand()
  2319. except RuntimeError, msg:
  2320. dbg.TraceError(msg)
  2321. return 0
  2322. def PartyHealReady(self):
  2323. self.interface.PartyHealReady()
  2324. def AskSafeboxPassword(self):
  2325. self.interface.AskSafeboxPassword()
  2326. # ITEM_MALL
  2327. def AskMallPassword(self):
  2328. self.interface.AskMallPassword()
  2329. def __ItemMall_Open(self):
  2330. self.interface.OpenItemMall();
  2331. def CommandCloseMall(self):
  2332. self.interface.CommandCloseMall()
  2333. # END_OF_ITEM_MALL
  2334. def __reventestprofil(self, questindex):
  2335. constInfo.pi_sistem = questindex
  2336. def __reveninputprofil(self):
  2337. net.SendQuestInputStringPacket(str(constInfo.adinnelanp))
  2338. def __revenproalbunu(self, pid):
  2339. pit = int(pid)
  2340. constInfo.ENVANTER_TARGET_VID = pit
  2341. net.SendWhisperPacket(str(constInfo.adinnelanp), '#byfatihbab34Envanter_Teklifi#Sorgu#')
  2342. def RefineSuceededMessage(self):
  2343. snd.PlaySound("sound/ui/make_soket.wav")
  2344. self.PopupMessage(localeInfo.REFINE_SUCCESS)
  2345. def RefineFailedMessage(self):
  2346. snd.PlaySound("sound/ui/jaeryun_fail.wav")
  2347. self.PopupMessage(localeInfo.REFINE_FAILURE)
  2348. def CommandCloseSafebox(self):
  2349. self.interface.CommandCloseSafebox()
  2350. # PRIVATE_SHOP_PRICE_LIST
  2351. def __PrivateShop_PriceList(self, itemVNum, itemPrice):
  2352. uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
  2353. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2354. def __Horse_HideState(self):
  2355. self.affectShower.SetHorseState(0, 0, 0)
  2356. if app.ENABLE_PVP_ADVANCED:
  2357. def BINARY_Duel_GetInfo(self, a, b, c, d, e, f, g, h):
  2358. self.wndDuelGui.OpenDialog(a, b, c, d, e, f, g, h)
  2359. def BINARY_Duel_Request(self, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q):
  2360. self.wndDuelGui.OpenDialog(a, b, c, d, e, f, g, h)
  2361. self.wndDuelGui.Selected([int(i), int(j), int(k), int(l), int(m), int(n), int(o), int(p), int(q)])
  2362. def BINARY_Duel_Delete(self):
  2363. self.wndDuelGui.Remove()
  2364. if self.wndDuelLive.IsShow():
  2365. self.wndDuelLive.Hide()
  2366. def BINARY_Duel_LiveInterface(self, a, b, c, d, e, f, g, h, i, j, k, l):
  2367. self.wndDuelLive.ShowInformations([str(a), int(b), int(c), int(d), int(e), int(f), int(g), int(h), int(i), int(j), int(k), int(l)])
  2368. def BINARY_Duel_SendMessage(self, textLine):
  2369. if str(textLine) != "":
  2370. self.wndMsg = message.PopupDialog()
  2371. self.wndMsg.SetWidth(550)
  2372. self.wndMsg.SetText((str(textLine).replace("$"," ")))
  2373. self.wndMsg.Show()
  2374. else:
  2375. chat.AppendChat(chat.CHAT_TYPE_INFO, "Error, i could not initialize message from server!")
  2376. def __Horse_UpdateState(self, level, health, battery):
  2377. self.affectShower.SetHorseState(int(level), int(health), int(battery))
  2378. def __IsXMasMap(self):
  2379. mapDict = ( "metin2_map_n_flame_01",
  2380. "metin2_map_n_desert_01",
  2381. "metin2_map_spiderdungeon",
  2382. "metin2_map_deviltower1", )
  2383. if background.GetCurrentMapName() in mapDict:
  2384. return False
  2385. return True
  2386. def __XMasSnow_Enable(self, mode):
  2387. self.__XMasSong_Enable(mode)
  2388. if "1"==mode:
  2389. if not self.__IsXMasMap():
  2390. return
  2391. print "XMAS_SNOW ON"
  2392. background.EnableSnow(1)
  2393. else:
  2394. print "XMAS_SNOW OFF"
  2395. background.EnableSnow(0)
  2396. def __XMasBoom_Enable(self, mode):
  2397. if "1"==mode:
  2398. if not self.__IsXMasMap():
  2399. return
  2400. print "XMAS_BOOM ON"
  2401. self.__DayMode_Update("dark")
  2402. self.enableXMasBoom = True
  2403. self.startTimeXMasBoom = app.GetTime()
  2404. else:
  2405. print "XMAS_BOOM OFF"
  2406. self.__DayMode_Update("light")
  2407. self.enableXMasBoom = False
  2408. def __XMasTree_Enable(self, grade):
  2409. print "XMAS_TREE ", grade
  2410. background.SetXMasTree(int(grade))
  2411. def __XMasSong_Enable(self, mode):
  2412. if "1"==mode:
  2413. print "XMAS_SONG ON"
  2414. XMAS_BGM = "xmas.mp3"
  2415. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  2416. if musicInfo.fieldMusic != "":
  2417. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  2418. musicInfo.fieldMusic=XMAS_BGM
  2419. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  2420. else:
  2421. print "XMAS_SONG OFF"
  2422. if musicInfo.fieldMusic != "":
  2423. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  2424. musicInfo.fieldMusic=musicInfo.METIN2THEMA
  2425. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  2426. def __RestartDialog_Close(self):
  2427. self.interface.CloseRestartDialog()
  2428. def __otomatikavstart(self):
  2429. import ahmetatalayInfo
  2430. ahmetatalayInfo.Start = 1
  2431. def __Console_Enable(self):
  2432. constInfo.CONSOLE_ENABLE = True
  2433. self.consoleEnable = True
  2434. app.EnableSpecialCameraMode()
  2435. ui.EnablePaste(True)
  2436. ## PrivateShop
  2437. def __PrivateShop_Open(self):
  2438. self.interface.OpenPrivateShopInputNameDialog()
  2439. def BINARY_PrivateShop_Appear(self, vid, text):
  2440. self.interface.AppearPrivateShop(vid, text)
  2441. def BINARY_PrivateShop_Disappear(self, vid):
  2442. self.interface.DisappearPrivateShop(vid)
  2443. # BEGIN_OFFLINE_SHOP
  2444. def __OfflineShop_Open(self):
  2445. self.interface.OpenOfflineShopInputNameDialog()
  2446. def BINARY_OfflineShop_Appear(self, vid, text):
  2447. if chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC:
  2448. self.interface.AppearOfflineShop(vid, text)
  2449. def BINARY_OfflineShop_Disappear(self, vid):
  2450. if chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC:
  2451. self.interface.DisappearOfflineShop(vid)
  2452. def __CloseOfflineShopBuilderWindow(self):
  2453. self.interface.CloseOfflineShopBuilder()
  2454. # END_OF_OFFLINE_SHOP
  2455. ## DayMode
  2456. def __PRESERVE_DayMode_Update(self, mode):
  2457. if "light"==mode:
  2458. background.SetEnvironmentData(0)
  2459. elif "dark"==mode:
  2460. if not self.__IsXMasMap():
  2461. return
  2462. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  2463. background.SetEnvironmentData(1)
  2464. def __DayMode_Update(self, mode):
  2465. if "light"==mode:
  2466. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
  2467. elif "dark"==mode:
  2468. if not self.__IsXMasMap():
  2469. return
  2470. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
  2471. def __DayMode_OnCompleteChangeToLight(self):
  2472. background.SetEnvironmentData(0)
  2473. self.curtain.FadeIn()
  2474. def __DayMode_OnCompleteChangeToDark(self):
  2475. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  2476. background.SetEnvironmentData(1)
  2477. self.curtain.FadeIn()
  2478. ## XMasBoom
  2479. def __XMasBoom_Update(self):
  2480. self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
  2481. if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
  2482. return
  2483. boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
  2484. boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
  2485. if app.GetTime() - self.startTimeXMasBoom > boomTime:
  2486. self.indexXMasBoom += 1
  2487. for i in xrange(boomCount):
  2488. self.__XMasBoom_Boom()
  2489. def __XMasBoom_Boom(self):
  2490. x, y, z = player.GetMainCharacterPosition()
  2491. randX = app.GetRandom(-150, 150)
  2492. randY = app.GetRandom(-150, 150)
  2493. snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
  2494. def __PartyRequestQuestion(self, vid):
  2495. vid = int(vid)
  2496. partyRequestQuestionDialog = uiCommon.QuestionDialog()
  2497. partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
  2498. partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  2499. partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  2500. partyRequestQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerPartyRequest(arg))
  2501. partyRequestQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerPartyRequest(arg))
  2502. partyRequestQuestionDialog.Open()
  2503. partyRequestQuestionDialog.vid = vid
  2504. self.partyRequestQuestionDialog = partyRequestQuestionDialog
  2505. def __AnswerPartyRequest(self, answer):
  2506. if not self.partyRequestQuestionDialog:
  2507. return
  2508. vid = self.partyRequestQuestionDialog.vid
  2509. if answer:
  2510. net.SendChatPacket("/party_request_accept " + str(vid))
  2511. else:
  2512. net.SendChatPacket("/party_request_deny " + str(vid))
  2513. self.partyRequestQuestionDialog.Close()
  2514. self.partyRequestQuestionDialog = None
  2515. def __PartyRequestDenied(self):
  2516. self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
  2517. if app.ENABLE_FEATURES_OXEVENT:
  2518. def RecvOxEventLogin(self):
  2519. if self.eventWindowLogin.IsShow():
  2520. self.eventWindowLogin.Hide()
  2521. else:
  2522. self.eventWindowLogin.Show()
  2523. def __EnableTestServerFlag(self):
  2524. app.EnableTestServerFlag()
  2525. def __InGameShop_Show(self, url):
  2526. if constInfo.IN_GAME_SHOP_ENABLE:
  2527. self.interface.OpenWebWindow(url)
  2528. def __ArayuzManager(self):
  2529. if constInfo.arayuzkoray == 0:
  2530. self.interface.HideAllWindows()
  2531. chat.AppendChat(chat.CHAT_TYPE_INFO, "Tam ekran modu aktif.")
  2532. constInfo.arayuzkoray = 1
  2533. elif constInfo.arayuzkoray == 1:
  2534. self.interface.wndTaskBar.Show()
  2535. self.interface.wndChat.Show()
  2536. self.interface.wndMiniMap.Show()
  2537. chat.AppendChat(chat.CHAT_TYPE_INFO, "Tam ekran modu kapatildi.")
  2538. constInfo.arayuzkoray = 0
  2539. # Finish
  2540. def otocevapekran(self):
  2541. import constInfo
  2542. if constInfo.AFK == 1:
  2543. constInfo.AFK = 0
  2544. chat.AppendChat(chat.CHAT_TYPE_INFO, "Oto cevap sistemi kapatildi")
  2545. else:
  2546. ocevap = uiCommon.InputDialog()
  2547. ocevap.SetTitle("Oto Cevap Sistemi (Max: 120 Karakter) ")
  2548. ocevap.SetMaxLength(120)
  2549. ocevap.SetAcceptEvent(ui.__mem_func__(self.otocevapac))
  2550. ocevap.SetCancelEvent(ui.__mem_func__(self.otocevapekrankapa))
  2551. ocevap.Open()
  2552. self.ocevap = ocevap
  2553. def otocevapekrankapa(self):
  2554. self.ocevap = None
  2555. return TRUE
  2556. def otocevapac(self):
  2557. if not self.ocevap:
  2558. return TRUE
  2559. if not len(self.ocevap.GetText()):
  2560. return TRUE
  2561. import constInfo
  2562. constInfo.otocevap = self.ocevap.GetText()
  2563. constInfo.AFK = 1
  2564. constInfo.otoisim = player.GetName()
  2565. chat.AppendChat(chat.CHAT_TYPE_INFO, "Oto cevap sistemi acildi")
  2566. self.otocevapekrankapa()
  2567. return TRUE
  2568. # WEDDING
  2569. def __LoginLover(self):
  2570. if self.interface.wndMessenger:
  2571. self.interface.wndMessenger.OnLoginLover()
  2572. def __LogoutLover(self):
  2573. if self.interface.wndMessenger:
  2574. self.interface.wndMessenger.OnLogoutLover()
  2575. if self.affectShower:
  2576. self.affectShower.HideLoverState()
  2577. def __LoverNear(self):
  2578. if self.affectShower:
  2579. self.affectShower.ShowLoverState()
  2580. if app.ENABLE_LOCALIZATION_SYSTEM:
  2581. def BINARY_Localization_Append(self, register_callback, idx1, idx2, idx3, idx4, idx5, idx6, idx7, idx8, idx9, idx10, idx11, idx12, idx13, idx14):
  2582. self.wndPlayerLocalization.Append([int(register_callback), int(idx1), int(idx2), int(idx3), int(idx4), int(idx5), int(idx6), int(idx7), int(idx8), int(idx9), int(idx10), int(idx11), int(idx12), int(idx13), int(idx14)])
  2583. def __LoverFar(self):
  2584. if self.affectShower:
  2585. self.affectShower.HideLoverState()
  2586. if app.ENABLE_FEATURES_OXEVENT:
  2587. def BINARY_OxEvent_Append(self, event, participantsCount, observersCount):
  2588. import oxevent
  2589. tokens = int(event)
  2590. if tokens == oxevent.APPEND_WINNERS:
  2591. self.eventWindow.Append()
  2592. elif tokens == oxevent.APPEND_REFRESH:
  2593. self.eventWindowManager.RefreshCounter(participantsCount, observersCount)
  2594. elif tokens == oxevent.APPEND_WINDOW:
  2595. self.eventWindowManager.Show()
  2596. def __LoverDivorce(self):
  2597. if self.interface.wndMessenger:
  2598. self.interface.wndMessenger.ClearLoverInfo()
  2599. if self.affectShower:
  2600. self.affectShower.ClearLoverState()
  2601. def __PlayMusic(self, flag, filename):
  2602. flag = int(flag)
  2603. if flag:
  2604. snd.FadeOutAllMusic()
  2605. musicInfo.SaveLastPlayFieldMusic()
  2606. snd.FadeInMusic("BGM/" + filename)
  2607. else:
  2608. snd.FadeOutAllMusic()
  2609. musicInfo.LoadLastPlayFieldMusic()
  2610. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  2611. # END_OF_WEDDING
  2612. ## Ticaret LOG #
  2613. def OpenTicaretLog(self):
  2614. self.Board = ui.BoardWithTitleBar()
  2615. self.Board.SetSize(241+30+215, 271+40+40-17-17)
  2616. self.Board.SetCenterPosition()
  2617. self.Board.AddFlag('movable')
  2618. self.Board.AddFlag('float')
  2619. self.Board.SetTitleName('Ticaret Kayitlarin')
  2620. self.Board.SetCloseEvent(self.Kapat)
  2621. self.Board.Show()
  2622. #self.Ticaret = 1
  2623. self.Bekle3 = app.GetTime()
  2624. self.TekliflerText = ui.TextLine_Alisveris()
  2625. self.TekliflerText.SetParent(self.Board)
  2626. self.TekliflerText.SetPosition(0, 30)
  2627. self.TekliflerText.SetText(str(player.GetName()))
  2628. self.TekliflerText.SetWindowHorizontalAlignCenter()
  2629. self.TekliflerText.SetHorizontalAlignCenter()
  2630. self.TekliflerText.Show()
  2631. self.ThinBoard = ui.ThinBoard()
  2632. self.ThinBoard.SetParent(self.Board)
  2633. self.ThinBoard.SetSize(241-18+26+215, 250)
  2634. self.ThinBoard.SetPosition(10+9-5-3, 48)
  2635. self.ThinBoard.Show()
  2636. self.ListBox=ui.ListBox_Scroll()
  2637. self.ListBox.SetParent(self.Board)
  2638. self.ListBox.SetPosition(10+9, 50)
  2639. self.ListBox.SetSize(241-18+26-8+215, 250)
  2640. #self.ListBox.SetEvent(ui.__mem_func__(self.__OnSelectListBox))
  2641. self.ListBox.Show()
  2642. self.ListBox.ClearItem()
  2643. pos = 0
  2644. if os.path.exists(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg"):
  2645. ac = open(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "r").readlines()
  2646. for i in ac:
  2647. bol = i.split("#")
  2648. self.ListBox.InsertItem(pos, str(bol[1]) + " adli oyuncu ile (" + str(bol[2]) + ") tarihinde ticaret gerceklesti.")
  2649. pos += 1
  2650. else:
  2651. self.ListBox.InsertItem(0, "Yapilan hic ticaret kaydi yok.")
  2652. def Kapat(self):
  2653. self.Board.Hide()
  2654. self.TekliflerText.Hide()
  2655. self.ThinBoard.Hide()
  2656. self.ListBox.Hide()
  2657. self.Ticaret = 0
  2658. ##T?CARET LOG
  2659. def __ClickSaplingButton(self):
  2660. if not self.UiSaplingSwitchbot:
  2661. self.UiSaplingSwitchbot = uisaplingsw.OptionDialog()
  2662. self.UiSaplingSwitchbot.Show()
  2663. def kilit(self):
  2664. kilit_idd = str(gameInfo.kilit_id)
  2665. net.SendQuestInputStringPacket(kilit_idd)
  2666. def item_kilit_q(self, qid):
  2667. gameInfo.item_kilit_q = int(qid)
  2668. def lonca_lider_q(self,qid):
  2669. constInfo.lonca_lider_q = int(qid)
  2670. def lider_ekle(self, isim, lonca):
  2671. import constInfo
  2672. constInfo.lider_list.append("#"+isim+"#"+lonca)
  2673. def lider_sifirla(self):
  2674. import constInfo
  2675. constInfo.lider_list = []
  2676. def __Inputget1(self):
  2677. gameInfo.INPUT = 1
  2678. def __Inputget2(self):
  2679. gameInfo.INPUT = 0
  2680. def __Inputget3(self):
  2681. net.SendQuestInputStringPacket("1")
  2682. def BINARY_Update_Cash(self, coins):
  2683. constInfo.ep =(int(coins))
  2684. def __HorseOpen(self, qid):
  2685. gameInfo.LOAD_QUEST_HORSE_BUTTON = int(qid)
  2686. def _Antiexp(self, qid):
  2687. gameInfo.ANTIEXP = int(qid)
  2688. def _Servis(self, qid):
  2689. gameInfo.SERVIS = int(qid)
  2690. def _Skill(self, qid):
  2691. gameInfo.SKILL = int(qid)
  2692. def sandik_quest(self, value):
  2693. constInfo.SANDIK_QUEST_BUTTON = int(value)
  2694. ##MOB_TARGET_SYSTEM
  2695. if app.ENABLE_SEND_TARGET_INFO:
  2696. def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
  2697. if not raceNum in constInfo.MONSTER_INFO_DATA:
  2698. constInfo.MONSTER_INFO_DATA.update({raceNum : {}})
  2699. constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
  2700. curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
  2701. isUpgradeable = False
  2702. isMetin = False
  2703. item.SelectItem(itemVnum)
  2704. if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
  2705. isUpgradeable = True
  2706. elif item.GetItemType() == item.ITEM_TYPE_METIN:
  2707. isMetin = True
  2708. for curItem in curList:
  2709. if isUpgradeable:
  2710. if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
  2711. if not (itemVnum in curItem["vnum_list"]):
  2712. curItem["vnum_list"].append(itemVnum)
  2713. return
  2714. elif isMetin:
  2715. if curItem.has_key("vnum_list"):
  2716. baseVnum = curItem["vnum_list"][0]
  2717. if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
  2718. if not (itemVnum in curItem["vnum_list"]):
  2719. curItem["vnum_list"].append(itemVnum)
  2720. return
  2721. else:
  2722. if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
  2723. return
  2724. if isUpgradeable or isMetin:
  2725. curList.append({"vnum_list":[itemVnum], "count":itemCount})
  2726. else:
  2727. curList.append({"vnum":itemVnum, "count":itemCount})
  2728. def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
  2729. self.targetBoard.RefreshMonsterInfoBoard()
  2730. ##MOB_TARGET_SYSTEM
  2731. ##KU?AK S?STEM?
  2732. if app.ENABLE_SASH_SYSTEM:
  2733. def ActSash(self, iAct, bWindow):
  2734. if self.interface:
  2735. self.interface.ActSash(iAct, bWindow)
  2736. def AlertSash(self, bWindow):
  2737. snd.PlaySound("sound/ui/make_soket.wav")
  2738. if bWindow:
  2739. self.PopupMessage(localeInfo.SASH_DEL_SERVEITEM)
  2740. else:
  2741. self.PopupMessage(localeInfo.SASH_DEL_ABSORDITEM)
  2742. ##KU?AK S?STEM?
  2743. def __exp_engel_id(self, id):
  2744. constInfo.EXP_Engel_ID = int(id)
  2745. def __exp_bilgi_id(self, id):
  2746. constInfo.EXP_Bilgi_ID = int(id)
  2747. def __exp_bilgi(self, id):
  2748. constInfo.EXP_Bilgi = int(id)
  2749. ## T?CARET - PAZAR LOG S?STEM?
  2750. def log_ekran(self):
  2751. self.log_Board = ui.BoardWithTitleBar()
  2752. self.log_Board.SetSize(225, 160)
  2753. self.log_Board.SetCenterPosition()
  2754. self.log_Board.AddFlag('movable')
  2755. self.log_Board.AddFlag('float')
  2756. self.log_Board.SetTitleName('Log Sistemi')
  2757. self.log_Board.SetCloseEvent(self.log_Close)
  2758. self.log_Board.Show()
  2759. self.comp = Component()
  2760. self.pazar_img = self.comp.ExpandedImage(self.log_Board , 56, 60, 'logsistem/pazar.tga')
  2761. self.tic_img = self.comp.ExpandedImage(self.log_Board , 140, 60, 'logsistem/tic.tga')#140
  2762. 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')
  2763. 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')
  2764. def log_Close(self):
  2765. self.log_Board.Hide()
  2766. ##Pazar_log
  2767. def pazar_log_gui(self):
  2768. constInfo.KONTROL2=1
  2769. self.p_log = ui.BoardWithTitleBar()
  2770. self.p_log.SetSize(450, 300)
  2771. self.p_log.SetCenterPosition()
  2772. self.p_log.AddFlag('movable')
  2773. self.p_log.AddFlag('float')
  2774. self.p_log.SetTitleName(translate.GECMIS)
  2775. self.p_log.SetCloseEvent(self.Close_p_log)
  2776. self.p_log.Show()
  2777. self.comp_p_log = Component()
  2778. 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')
  2779. self.noo1 = self.comp_p_log.TextLine(self.p_log, '', 44, 48, self.comp_p_log.RGB(255, 125, 0))
  2780. self.kisii1 = self.comp_p_log.TextLine(self.p_log, '', 69, 48, self.comp_p_log.RGB(255, 255, 255))
  2781. self.noo2 = self.comp_p_log.TextLine(self.p_log, '', 44, 68, self.comp_p_log.RGB(255, 125, 0))
  2782. self.kisii2 = self.comp_p_log.TextLine(self.p_log, '', 69, 68, self.comp_p_log.RGB(255, 255, 255))
  2783. self.noo3 = self.comp_p_log.TextLine(self.p_log, '', 44, 88, self.comp_p_log.RGB(255, 125, 0))
  2784. self.kisii3 = self.comp_p_log.TextLine(self.p_log, '', 69, 88, self.comp_p_log.RGB(255, 255, 255))
  2785. self.noo4 = self.comp_p_log.TextLine(self.p_log, '', 44, 108, self.comp_p_log.RGB(255, 125, 0))
  2786. self.kisii4 = self.comp_p_log.TextLine(self.p_log, '', 69, 108, self.comp_p_log.RGB(255, 255, 255))
  2787. self.noo5 = self.comp_p_log.TextLine(self.p_log, '', 44, 128, self.comp_p_log.RGB(255, 125, 0))
  2788. self.kisii5 = self.comp_p_log.TextLine(self.p_log, '', 69, 128, self.comp_p_log.RGB(255, 255, 255))
  2789. self.noo6 = self.comp_p_log.TextLine(self.p_log, '', 44, 148, self.comp_p_log.RGB(255, 125, 0))
  2790. self.kisii6 = self.comp_p_log.TextLine(self.p_log, '', 69, 148, self.comp_p_log.RGB(255, 255, 255))
  2791. self.noo7 = self.comp_p_log.TextLine(self.p_log, '', 44, 168, self.comp_p_log.RGB(255, 125, 0))
  2792. self.kisii7 = self.comp_p_log.TextLine(self.p_log, '', 69, 168, self.comp_p_log.RGB(255, 255, 255))
  2793. self.noo8 = self.comp_p_log.TextLine(self.p_log, '', 44, 188, self.comp_p_log.RGB(255, 125, 0))
  2794. self.kisii8 = self.comp_p_log.TextLine(self.p_log, '', 69, 188, self.comp_p_log.RGB(255, 255, 255))
  2795. self.noo9 = self.comp_p_log.TextLine(self.p_log, '', 44, 208, self.comp_p_log.RGB(255, 125, 0))
  2796. self.kisii9 = self.comp_p_log.TextLine(self.p_log, '', 69, 208, self.comp_p_log.RGB(255, 255, 255))
  2797. self.noo10 = self.comp_p_log.TextLine(self.p_log, '', 44, 228, self.comp_p_log.RGB(255, 125, 0))
  2798. self.kisii10 = self.comp_p_log.TextLine(self.p_log, '', 69, 228, self.comp_p_log.RGB(255, 255, 255))
  2799. import event
  2800. event.QuestButtonClick(constInfo.pazar_log_q_id)
  2801. def Close_p_log(self):
  2802. if constInfo.KONTROL2==1:
  2803. self.p_log.Hide()
  2804. constInfo.KONTROL2=0
  2805. def pazar_log_getir(self):
  2806. if gameInfo.PAZAR_CAN==0:
  2807. import event
  2808. event.QuestButtonClick(constInfo.pazar_log_q_id)
  2809. gameInfo.PAZAR_OPEN=1
  2810. gameInfo.PAZAR_TIME=app.GetTime() + 60
  2811. gameInfo.PAZAR_CAN=1
  2812. else:
  2813. chat.AppendChat(chat.CHAT_TYPE_INFO, translate.YENILE1DK)
  2814. def __pazar_log_ac(self):
  2815. self.pazar_log_gui()
  2816. def __pazar_log_bilgi_gir(self, no, alanname, vnum, fiyat, tarih):
  2817. kod = int(vnum)
  2818. item.SelectItem(kod)
  2819. item_isim = item.GetItemName()
  2820. if no == "1":
  2821. self.noo1.SetText(no)
  2822. self.kisii1.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2823. self.p_log.SetSize(600, 120)
  2824. self.pazar_bilgi_yenile.SetPosition(204, 800)
  2825. elif no == "2":
  2826. self.noo2.SetText(no)
  2827. self.kisii2.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2828. self.p_log.SetSize(600, 140)
  2829. self.pazar_bilgi_yenile.SetPosition(204, 100)
  2830. elif no == "3":
  2831. self.noo3.SetText(no)
  2832. self.kisii3.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2833. self.p_log.SetSize(600, 160)
  2834. self.pazar_bilgi_yenile.SetPosition(204, 120)
  2835. elif no == "4":
  2836. self.noo4.SetText(no)
  2837. self.kisii4.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2838. self.p_log.SetSize(600, 180)
  2839. self.pazar_bilgi_yenile.SetPosition(204, 140)
  2840. elif no == "5":
  2841. self.noo5.SetText(no)
  2842. self.kisii5.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2843. self.p_log.SetSize(600, 200)
  2844. self.pazar_bilgi_yenile.SetPosition(204, 160)
  2845. elif no == "6":
  2846. self.noo6.SetText(no)
  2847. self.kisii6.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2848. self.p_log.SetSize(600, 220)
  2849. self.pazar_bilgi_yenile.SetPosition(204, 180)
  2850. elif no == "7":
  2851. self.noo7.SetText(no)
  2852. self.kisii7.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2853. self.p_log.SetSize(600, 240)
  2854. self.pazar_bilgi_yenile.SetPosition(204, 200)
  2855. elif no == "8":
  2856. self.noo8.SetText(no)
  2857. self.kisii8.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2858. self.p_log.SetSize(600, 260)
  2859. self.pazar_bilgi_yenile.SetPosition(204, 220)
  2860. elif no == "9":
  2861. self.noo9.SetText(no)
  2862. self.kisii9.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2863. self.p_log.SetSize(600, 280)
  2864. self.pazar_bilgi_yenile.SetPosition(204, 240)
  2865. elif no == "10":
  2866. self.noo10.SetText(no)
  2867. self.kisii10.SetText(alanname + " oyuncusu " + item_isim + " itemini " + fiyat + translate.YANGKAR + tarih + " tarihinde aldi")
  2868. self.p_log.SetSize(600, 300)
  2869. self.pazar_bilgi_yenile.SetPosition(204, 260)
  2870. def __pazar_log_q_id(self, id):
  2871. constInfo.pazar_log_q_id = int(id)
  2872. def __pazar_log_q(self, id):
  2873. constInfo.pazar_log_q = int(id)
  2874. def __item_fiyat(self):
  2875. fiyat = constInfo.item_fiyat
  2876. net.SendQuestInputStringPacket(fiyat)
  2877. def __item_isim(self):
  2878. isim = constInfo.item_isim
  2879. net.SendQuestInputStringPacket(isim)
  2880. def __itemi_alan(self):
  2881. alanname = constInfo.itemi_alan
  2882. net.SendQuestInputStringPacket(alanname)
  2883. #Ticaret Gecmii
  2884. def __tic_quest_id(self, id):
  2885. constInfo.tic_gecmis = int(id)
  2886. ##Ticaret Gecmii
  2887. def ticaret_gecmisi(self):
  2888. constInfo.KONTROL1=1
  2889. self.Board_tic = ui.BoardWithTitleBar()
  2890. self.Board_tic.SetSize(450, 300)
  2891. self.Board_tic.SetCenterPosition()
  2892. self.Board_tic.AddFlag('movable')
  2893. self.Board_tic.AddFlag('float')
  2894. self.Board_tic.SetTitleName('Ticaret Gecmii')
  2895. self.Board_tic.SetCloseEvent(self.Close_tic)
  2896. self.Board_tic.Show()
  2897. self.__BuildKeyDict()
  2898. self.comp_tic = Component()
  2899. self.tic_bilgi_yenile = self.comp_tic.Button(self.Board_tic, 'Yenile', 'Ticaret Gecmiini 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')
  2900. self.no1 = self.comp_tic.TextLine(self.Board_tic, '', 44, 48, self.comp_tic.RGB(255, 125, 0))
  2901. self.kisi1 = self.comp_tic.TextLine(self.Board_tic, '', 69, 48, self.comp_tic.RGB(255, 255, 255))
  2902. self.no2 = self.comp_tic.TextLine(self.Board_tic, '', 44, 68, self.comp_tic.RGB(255, 125, 0))
  2903. self.kisi2 = self.comp_tic.TextLine(self.Board_tic, '', 69, 68, self.comp_tic.RGB(255, 255, 255))
  2904. self.no3 = self.comp_tic.TextLine(self.Board_tic, '', 44, 88, self.comp_tic.RGB(255, 125, 0))
  2905. self.kisi3 = self.comp_tic.TextLine(self.Board_tic, '', 69, 88, self.comp_tic.RGB(255, 255, 255))
  2906. self.no4 = self.comp_tic.TextLine(self.Board_tic, '', 44, 108, self.comp_tic.RGB(255, 125, 0))
  2907. self.kisi4 = self.comp_tic.TextLine(self.Board_tic, '', 69, 108, self.comp_tic.RGB(255, 255, 255))
  2908. self.no5 = self.comp_tic.TextLine(self.Board_tic, '', 44, 128, self.comp_tic.RGB(255, 125, 0))
  2909. self.kisi5 = self.comp_tic.TextLine(self.Board_tic, '', 69, 128, self.comp_tic.RGB(255, 255, 255))
  2910. self.no6 = self.comp_tic.TextLine(self.Board_tic, '', 44, 148, self.comp_tic.RGB(255, 125, 0))
  2911. self.kisi6 = self.comp_tic.TextLine(self.Board_tic, '', 69, 148, self.comp_tic.RGB(255, 255, 255))
  2912. self.no7 = self.comp_tic.TextLine(self.Board_tic, '', 44, 168, self.comp_tic.RGB(255, 125, 0))
  2913. self.kisi7 = self.comp_tic.TextLine(self.Board_tic, '', 69, 168, self.comp_tic.RGB(255, 255, 255))
  2914. self.no8 = self.comp_tic.TextLine(self.Board_tic, '', 44, 188, self.comp_tic.RGB(255, 125, 0))
  2915. self.kisi8 = self.comp_tic.TextLine(self.Board_tic, '', 69, 188, self.comp_tic.RGB(255, 255, 255))
  2916. self.no9 = self.comp_tic.TextLine(self.Board_tic, '', 44, 208, self.comp_tic.RGB(255, 125, 0))
  2917. self.kisi9 = self.comp_tic.TextLine(self.Board_tic, '', 69, 208, self.comp_tic.RGB(255, 255, 255))
  2918. self.no10 = self.comp_tic.TextLine(self.Board_tic, '', 44, 228, self.comp_tic.RGB(255, 125, 0))
  2919. self.kisi10 = self.comp_tic.TextLine(self.Board_tic, '', 69, 228, self.comp_tic.RGB(255, 255, 255))
  2920. import event
  2921. event.QuestButtonClick(constInfo.tic_gecmis)
  2922. def Close_tic(self):
  2923. if constInfo.KONTROL1==1:
  2924. self.Board_tic.Hide()
  2925. constInfo.KONTROL1=0
  2926. def tic_gecmis_getir(self):
  2927. if gameInfo.TICARET_CAN==0:
  2928. import event
  2929. event.QuestButtonClick(constInfo.tic_gecmis)
  2930. gameInfo.TICARET_OPEN=1
  2931. gameInfo.TICARET_TIME=app.GetTime() + 60
  2932. gameInfo.TICARET_CAN=1
  2933. else:
  2934. chat.AppendChat(chat.CHAT_TYPE_INFO, translate.TICYENILE)
  2935. def __tic_gecmis_ac(self):
  2936. self.ticaret_gecmisi()
  2937. def __tic_gecmis_bilgi_gir(self, no, kisi1, kisii2, tarih):
  2938. if no == "1":
  2939. self.no1.SetText(no)
  2940. self.kisi1.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2941. self.Board_tic.SetSize(450, 120)
  2942. self.tic_bilgi_yenile.SetPosition(204, 800)
  2943. elif no == "2":
  2944. self.no2.SetText(no)
  2945. self.kisi2.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2946. self.Board_tic.SetSize(450, 140)
  2947. self.tic_bilgi_yenile.SetPosition(204, 100)
  2948. elif no == "3":
  2949. self.no3.SetText(no)
  2950. self.kisi3.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2951. self.Board_tic.SetSize(450, 160)
  2952. self.tic_bilgi_yenile.SetPosition(204, 120)
  2953. elif no == "4":
  2954. self.no4.SetText(no)
  2955. self.kisi4.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2956. self.Board_tic.SetSize(450, 180)
  2957. self.tic_bilgi_yenile.SetPosition(204, 140)
  2958. elif no == "5":
  2959. self.no5.SetText(no)
  2960. self.kisi5.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2961. self.Board_tic.SetSize(450, 200)
  2962. self.tic_bilgi_yenile.SetPosition(204, 160)
  2963. elif no == "6":
  2964. self.no6.SetText(no)
  2965. self.kisi6.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2966. self.Board_tic.SetSize(450, 220)
  2967. self.tic_bilgi_yenile.SetPosition(204, 180)
  2968. elif no == "7":
  2969. self.no7.SetText(no)
  2970. self.kisi7.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2971. self.Board_tic.SetSize(450, 240)
  2972. self.tic_bilgi_yenile.SetPosition(204, 200)
  2973. elif no == "8":
  2974. self.no8.SetText(no)
  2975. self.kisi8.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2976. self.Board_tic.SetSize(450, 260)
  2977. self.tic_bilgi_yenile.SetPosition(204, 220)
  2978. elif no == "9":
  2979. self.no9.SetText(no)
  2980. self.kisi9.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2981. self.Board_tic.SetSize(450, 280)
  2982. self.tic_bilgi_yenile.SetPosition(204, 240)
  2983. elif no == "10":
  2984. self.no10.SetText(no)
  2985. self.kisi10.SetText(kisi1 + " ile " + kisii2 + " oyuncusu " + tarih + " tarihinde ticaret yapti")
  2986. self.Board_tic.SetSize(450, 300)
  2987. self.tic_bilgi_yenile.SetPosition(204, 260)
  2988. ## T?CARET - PAZAR LOG S?STEM?
  2989. ##ONAYLI HP-SP Sistemi
  2990. def __PythonToLua(self, id):
  2991. constInfo.PYTHONTOLUA = int(id)
  2992. def __PythonIslem(self, PythonIslem):
  2993. if PythonIslem == "PYTHONISLEM":
  2994. net.SendQuestInputStringPacket(constInfo.PYTHONISLEM)
  2995. elif PythonIslem == "PLAYER_VID":
  2996. net.SendQuestInputStringPacket(str(constInfo.PLAYER_VID))
  2997. elif PythonIslem == "MESSAGE_MESAJ_AL":
  2998. net.SendQuestInputStringPacket(str(gameInfo.MESSAGE_MESAJ))
  2999. elif PythonIslem == "MESSAGE_MESAJ_AL_2":
  3000. net.SendQuestInputStringPacket(str(gameInfo.MESSAGE_MESAJ2))
  3001. elif PythonIslem == "MESSAGE_NAME":
  3002. net.SendQuestInputStringPacket(str(gameInfo.MESSAGE_NAME))
  3003. def __LuaToPython(self, LuaToPython):
  3004. if LuaToPython.find("#quest_input#") != -1:
  3005. constInfo.INPUT = 1
  3006. elif LuaToPython.find("#quest_inputbitir#") != -1:
  3007. constInfo.INPUT = 0
  3008. elif LuaToPython.find("#rakip_hp_sp#") != -1:
  3009. constInfo.PLAYER_HP = LuaToPython.split("|")[1]
  3010. constInfo.PLAYER_MAX_HP = LuaToPython.split("|")[2]
  3011. constInfo.PLAYER_SP = LuaToPython.split("|")[3]
  3012. constInfo.PLAYER_MAX_SP = LuaToPython.split("|")[4]
  3013. ##ONAYLI HP-SP Sistemi
  3014. ##REVEN_UT_SYSTEM
  3015. if app.ENABLE_REVEN_UT_SYSTEM:
  3016. def Uzaktan_Ticaret(self, name):
  3017. uzaktan_ticaret = uiCommon.QuestionDialog()
  3018. uzaktan_ticaret.SetText(str(name) + " " + localeInfo.UZAKTAN_TICARET)
  3019. uzaktan_ticaret.SetAcceptEvent(lambda arg=True: self.Uzaktan_Ticaret_Kabulet(name))
  3020. uzaktan_ticaret.SetCancelEvent(lambda arg=False: self.Uzaktan_Ticaret_Iptalet(name))
  3021. uzaktan_ticaret.Open()
  3022. self.uzaktan_ticaret = uzaktan_ticaret
  3023. return
  3024. def Uzaktan_Ticaret_Kabulet(self, name):
  3025. net.SendChatPacket("/uzaktan_ticaret_kabulet " + str(name))
  3026. self.uzaktan_ticaret.Close()
  3027. def Uzaktan_Ticaret_Iptalet(self, name):
  3028. net.SendChatPacket("/uzaktan_ticaret_iptalet " + str(name))
  3029. self.uzaktan_ticaret.Close()
  3030. ##REVEN_UT_SYSTEM
  3031. ##REVEN_SECURITY_SYSTEM
  3032. if app.WJ_SECURITY_SYSTEM:
  3033. def OpenSecurityCreate(self):
  3034. if self.interface:
  3035. self.interface.OpenSecurityCreate()
  3036. def OpenSecurityDialog(self):
  3037. if self.interface:
  3038. self.interface.OpenSecurityDialog()
  3039. def CloseSecurityCreate(self):
  3040. if self.interface:
  3041. self.interface.CloseSecurityCreate()
  3042. def CloseSecurityDialog(self):
  3043. if self.interface:
  3044. self.interface.CloseSecurityDialog()
  3045. ##REVEN_SECURITY_SYSTEM
  3046. ##REVEN_GUVENLI_PC
  3047. def guvenlipc(self):
  3048. net.SendQuestInputStringPacket(str(player.GetMacAddress()))
  3049. ##REVEN_GUVENLI_PC
  3050. ############################### GAYA SYSTEM ###############################
  3051. def OpenGuiGaya(self):
  3052. self.interface.OpenGuiGaya()
  3053. def GayaCheck(self):
  3054. self.interface.GayaCheck()
  3055. def OpenGuiGayaMarket(self):
  3056. self.interface.OpenGuiGayaMarket()
  3057. def GayaMarketItems(self,vnums,gaya,count):
  3058. self.interface.GayaMarketItems(vnums,gaya,count)
  3059. def GayaMarketSlotsDesblock(self,slot0,slot1,slot2,slot3,slot4,slot5):
  3060. self.interface.GayaMarketSlotsDesblock(slot0,slot1,slot2,slot3,slot4,slot5)
  3061. def GayaMarketClear(self):
  3062. self.interface.GayaMarketClear()
  3063. def GayaTimeMarket(self, time):
  3064. self.interface.GayaTime(time)
  3065. ######################################## END GAYA SYSTEM ################################
  3066. # 5Lv Beceri Sistemi
  3067. # Gui Sistemleri
  3068. def __BecSystem1(self):
  3069. self.black = savbec.BlackIsinlanma()
  3070. self.black.OpenWindow()
  3071. def __BecSystem2(self):
  3072. self.black = surabec.BlackIsinlanma()
  3073. self.black.OpenWindow()
  3074. def __BecSystem3(self):
  3075. self.black = ninjabec.BlackIsinlanma()
  3076. self.black.OpenWindow()
  3077. def __BecSystem4(self):
  3078. self.black = samanbec.BlackIsinlanma()
  3079. self.black.OpenWindow()
  3080. # Beceri Sistemleri
  3081. # Sava?cı Becerileri
  3082. def zihinsel_oto_bec(self,qid):
  3083. constInfo.zihinsel_oto_bec = int(qid)
  3084. def bedensel_oto_bec(self,qid):
  3085. constInfo.bedensel_oto_bec = int(qid)
  3086. # Sura Becerileri
  3087. def karabuyu_oto_bec(self,qid):
  3088. constInfo.karabuyu_oto_bec = int(qid)
  3089. def buyulusilah_oto_bec(self,qid):
  3090. constInfo.buyulusilah_oto_bec = int(qid)
  3091. # Ninja Becerileri
  3092. def yakin_oto_bec(self,qid):
  3093. constInfo.yakin_oto_bec = int(qid)
  3094. def uzak_oto_bec(self,qid):
  3095. constInfo.uzak_oto_bec = int(qid)
  3096. # ?aman Becerileri
  3097. def ejderha_oto_bec(self,qid):
  3098. constInfo.ejderha_oto_bec = int(qid)
  3099. def iyilestirme_oto_bec(self,qid):
  3100. constInfo.iyilestirme_oto_bec = int(qid)
  3101. def citsystem(self):
  3102. if constInfo.citsystem== 0:
  3103. constInfo.citsystem=1
  3104. def citsystem2(self):
  3105. sayac = constInfo.citsystem2
  3106. if sayac != 10:
  3107. net.SendChatPacket("/notice_map Citlerin kalkmasına son "+ str(10-sayac) + " saniye kaldı. ")
  3108. sayac=sayac+1
  3109. constInfo.citsystem2=sayac
  3110. else:
  3111. net.SendChatPacket("/notice_map Sava? Ba?ladı! Go Go Go! ")
  3112. net.SendChatPacket("/purge all")
  3113. constInfo.citsystem=0
  3114. constInfo.citsystem2=0
  3115. def loncaistatistik(self,isim,level,durum,oldurme,olum,member):
  3116. self.loncaistatistiktemizle(member)
  3117. if int(member) == 1:
  3118. constInfo.isim1 = "1 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3119. constInfo.oldurme1 = str(oldurme)
  3120. constInfo.olum1 = str(olum)
  3121. if int(durum) == 0:
  3122. constInfo.durum1 = "|cff00ff00|H|hYa?ıyor"
  3123. if int(durum) == 1:
  3124. constInfo.durum1 = "|cffff0000|Hemp|hOlu"
  3125. if int(member) == 2:
  3126. constInfo.isim2 = "2 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3127. constInfo.oldurme2 = str(oldurme)
  3128. constInfo.olum2 = str(olum)
  3129. if int(durum) == 0:
  3130. constInfo.durum2 = "|cff00ff00|H|hYa?ıyor"
  3131. if int(durum) == 1:
  3132. constInfo.durum2 = "|cffff0000|Hemp|hOlu"
  3133. if int(member) == 3:
  3134. constInfo.isim3 = "3 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3135. constInfo.oldurme3 = str(oldurme)
  3136. constInfo.olum3 = str(olum)
  3137. if int(durum) == 0:
  3138. constInfo.durum3 = "|cff00ff00|H|hYa?ıyor"
  3139. if int(durum) == 1:
  3140. constInfo.durum3 = "|cffff0000|Hemp|hOlu"
  3141. if int(member) == 4:
  3142. constInfo.isim4 = "4 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3143. constInfo.oldurme4 = str(oldurme)
  3144. constInfo.olum4 = str(olum)
  3145. if int(durum) == 0:
  3146. constInfo.durum4 = "|cff00ff00|H|hYa?ıyor"
  3147. if int(durum) == 1:
  3148. constInfo.durum4 = "|cffff0000|Hemp|hOlu"
  3149. if int(member) == 5:
  3150. constInfo.isim5 = "5 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3151. constInfo.oldurme5 = str(oldurme)
  3152. constInfo.olum5 = str(olum)
  3153. if int(durum) == 0:
  3154. constInfo.durum5 = "|cff00ff00|H|hYa?ıyor"
  3155. if int(durum) == 1:
  3156. constInfo.durum5 = "|cffff0000|Hemp|hOlu"
  3157. if int(member) == 6:
  3158. constInfo.isim6 = "6 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3159. constInfo.oldurme6 = str(oldurme)
  3160. constInfo.olum6 = str(olum)
  3161. if int(durum) == 0:
  3162. constInfo.durum6 = "|cff00ff00|H|hYa?ıyor"
  3163. if int(durum) == 1:
  3164. constInfo.durum6 = "|cffff0000|Hemp|hOlu"
  3165. if int(member) == 7:
  3166. constInfo.isim7 = "7 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3167. constInfo.oldurme7 = str(oldurme)
  3168. constInfo.olum7 = str(olum)
  3169. if int(durum) == 0:
  3170. constInfo.durum7 = "|cff00ff00|H|hYa?ıyor"
  3171. if int(durum) == 1:
  3172. constInfo.durum7 = "|cffff0000|Hemp|hOlu"
  3173. if int(member) == 8:
  3174. constInfo.isim8 = "8 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3175. constInfo.oldurme8 = str(oldurme)
  3176. constInfo.olum8 = str(olum)
  3177. if int(durum) == 0:
  3178. constInfo.durum8 = "|cff00ff00|H|hYa?ıyor"
  3179. if int(durum) == 1:
  3180. constInfo.durum8 = "|cffff0000|Hemp|hOlu"
  3181. if int(member) == 9:
  3182. constInfo.isim9 = "9 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3183. constInfo.oldurme9 = str(oldurme)
  3184. constInfo.olum9 = str(olum)
  3185. if int(durum) == 0:
  3186. constInfo.durum9 = "|cff00ff00|H|hYa?ıyor"
  3187. if int(durum) == 1:
  3188. constInfo.durum9 = "|cffff0000|Hemp|hOlu"
  3189. if int(member) == 10:
  3190. constInfo.isim10 = "10 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3191. constInfo.oldurme10 = str(oldurme)
  3192. constInfo.olum10 = str(olum)
  3193. if int(durum) == 0:
  3194. constInfo.durum10 = "|cff00ff00|H|hYa?ıyor"
  3195. if int(durum) == 1:
  3196. constInfo.durum10 = "|cffff0000|Hemp|hOlu"
  3197. if int(member) == 11:
  3198. constInfo.isim11 = "11 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3199. constInfo.oldurme11 = str(oldurme)
  3200. constInfo.olum11 = str(olum)
  3201. if int(durum) == 0:
  3202. constInfo.durum11 = "|cff00ff00|H|hYa?ıyor"
  3203. if int(durum) == 1:
  3204. constInfo.durum11 = "|cffff0000|Hemp|hOlu"
  3205. if int(member) == 12:
  3206. constInfo.isim12 = "12 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3207. constInfo.oldurme12 = str(oldurme)
  3208. constInfo.olum12 = str(olum)
  3209. if int(durum) == 0:
  3210. constInfo.durum12 = "|cff00ff00|H|hYa?ıyor"
  3211. if int(durum) == 1:
  3212. constInfo.durum12 = "|cffff0000|Hemp|hOlu"
  3213. if int(member) == 13:
  3214. constInfo.isim13 = "13 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3215. constInfo.oldurme13 = str(oldurme)
  3216. constInfo.olum13 = str(olum)
  3217. if int(durum) == 0:
  3218. constInfo.durum13 = "|cff00ff00|H|hYa?ıyor"
  3219. if int(durum) == 1:
  3220. constInfo.durum13 = "|cffff0000|Hemp|hOlu"
  3221. if int(member) == 14:
  3222. constInfo.isim14 = "14 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3223. constInfo.oldurme14 = str(oldurme)
  3224. constInfo.olum14 = str(olum)
  3225. if int(durum) == 0:
  3226. constInfo.durum14 = "|cff00ff00|H|hYa?ıyor"
  3227. if int(durum) == 1:
  3228. constInfo.durum14 = "|cffff0000|Hemp|hOlu"
  3229. if int(member) == 15:
  3230. constInfo.isim15 = "15 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
  3231. constInfo.oldurme15 = str(oldurme)
  3232. constInfo.olum15 = str(olum)
  3233. if int(durum) == 0:
  3234. constInfo.durum15 = "|cff00ff00|H|hYa?ıyor"
  3235. if int(durum) == 1:
  3236. constInfo.durum15 = "|cffff0000|Hemp|hOlu"
  3237. def loncaistatistiktemizle(self,member):
  3238. if int(member) == 1:
  3239. constInfo.isim2 = ""
  3240. constInfo.durum2 = ""
  3241. constInfo.oldurme2 = ""
  3242. constInfo.olum2 = ""
  3243. constInfo.isim3 = ""
  3244. constInfo.durum3 = ""
  3245. constInfo.oldurme3 = ""
  3246. constInfo.olum3 = ""
  3247. constInfo.isim4 = ""
  3248. constInfo.durum4 = ""
  3249. constInfo.oldurme4 = ""
  3250. constInfo.olum4 = ""
  3251. constInfo.isim5 = ""
  3252. constInfo.durum5 = ""
  3253. constInfo.oldurme5 = ""
  3254. constInfo.olum5 = ""
  3255. constInfo.isim6 = ""
  3256. constInfo.durum6 = ""
  3257. constInfo.oldurme6 = ""
  3258. constInfo.olum6 = ""
  3259. constInfo.isim7 = ""
  3260. constInfo.durum7 = ""
  3261. constInfo.oldurme7 = ""
  3262. constInfo.olum7 = ""
  3263. constInfo.isim8 = ""
  3264. constInfo.durum8 = ""
  3265. constInfo.oldurme8 = ""
  3266. constInfo.olum8 = ""
  3267. constInfo.isim9 = ""
  3268. constInfo.durum9 = ""
  3269. constInfo.oldurme9 = ""
  3270. constInfo.olum9 = ""
  3271. constInfo.isim10 = ""
  3272. constInfo.durum10 = ""
  3273. constInfo.oldurme10 = ""
  3274. constInfo.olum10 = ""
  3275. constInfo.isim11 = ""
  3276. constInfo.durum11 = ""
  3277. constInfo.oldurme11 = ""
  3278. constInfo.olum11 = ""
  3279. constInfo.isim12 = ""
  3280. constInfo.durum12 = ""
  3281. constInfo.oldurme12 = ""
  3282. constInfo.olum12 = ""
  3283. constInfo.isim13 = ""
  3284. constInfo.durum13 = ""
  3285. constInfo.oldurme13 = ""
  3286. constInfo.olum13 = ""
  3287. constInfo.isim14 = ""
  3288. constInfo.durum14 = ""
  3289. constInfo.oldurme14 = ""
  3290. constInfo.olum14 = ""
  3291. constInfo.isim15 = ""
  3292. constInfo.durum15 = ""
  3293. constInfo.oldurme15 = ""
  3294. constInfo.olum15 = ""
  3295. if int(member) == 2:
  3296. constInfo.isim3 = ""
  3297. constInfo.durum3 = ""
  3298. constInfo.oldurme3 = ""
  3299. constInfo.olum3 = ""
  3300. constInfo.isim4 = ""
  3301. constInfo.durum4 = ""
  3302. constInfo.oldurme4 = ""
  3303. constInfo.olum4 = ""
  3304. constInfo.isim5 = ""
  3305. constInfo.durum5 = ""
  3306. constInfo.oldurme5 = ""
  3307. constInfo.olum5 = ""
  3308. constInfo.isim6 = ""
  3309. constInfo.durum6 = ""
  3310. constInfo.oldurme6 = ""
  3311. constInfo.olum6 = ""
  3312. constInfo.isim7 = ""
  3313. constInfo.durum7 = ""
  3314. constInfo.oldurme7 = ""
  3315. constInfo.olum7 = ""
  3316. constInfo.isim8 = ""
  3317. constInfo.durum8 = ""
  3318. constInfo.oldurme8 = ""
  3319. constInfo.olum8 = ""
  3320. constInfo.isim9 = ""
  3321. constInfo.durum9 = ""
  3322. constInfo.oldurme9 = ""
  3323. constInfo.olum9 = ""
  3324. constInfo.isim10 = ""
  3325. constInfo.durum10 = ""
  3326. constInfo.oldurme10 = ""
  3327. constInfo.olum10 = ""
  3328. constInfo.isim11 = ""
  3329. constInfo.durum11 = ""
  3330. constInfo.oldurme11 = ""
  3331. constInfo.olum11 = ""
  3332. constInfo.isim12 = ""
  3333. constInfo.durum12 = ""
  3334. constInfo.oldurme12 = ""
  3335. constInfo.olum12 = ""
  3336. constInfo.isim13 = ""
  3337. constInfo.durum13 = ""
  3338. constInfo.oldurme13 = ""
  3339. constInfo.olum13 = ""
  3340. constInfo.isim14 = ""
  3341. constInfo.durum14 = ""
  3342. constInfo.oldurme14 = ""
  3343. constInfo.olum14 = ""
  3344. constInfo.isim15 = ""
  3345. constInfo.durum15 = ""
  3346. constInfo.oldurme15 = ""
  3347. constInfo.olum15 = ""
  3348. if int(member) == 3:
  3349. constInfo.isim4 = ""
  3350. constInfo.durum4 = ""
  3351. constInfo.oldurme4 = ""
  3352. constInfo.olum4 = ""
  3353. constInfo.isim5 = ""
  3354. constInfo.durum5 = ""
  3355. constInfo.oldurme5 = ""
  3356. constInfo.olum5 = ""
  3357. constInfo.isim6 = ""
  3358. constInfo.durum6 = ""
  3359. constInfo.oldurme6 = ""
  3360. constInfo.olum6 = ""
  3361. constInfo.isim7 = ""
  3362. constInfo.durum7 = ""
  3363. constInfo.oldurme7 = ""
  3364. constInfo.olum7 = ""
  3365. constInfo.isim8 = ""
  3366. constInfo.durum8 = ""
  3367. constInfo.oldurme8 = ""
  3368. constInfo.olum8 = ""
  3369. constInfo.isim9 = ""
  3370. constInfo.durum9 = ""
  3371. constInfo.oldurme9 = ""
  3372. constInfo.olum9 = ""
  3373. constInfo.isim10 = ""
  3374. constInfo.durum10 = ""
  3375. constInfo.oldurme10 = ""
  3376. constInfo.olum10 = ""
  3377. constInfo.isim11 = ""
  3378. constInfo.durum11 = ""
  3379. constInfo.oldurme11 = ""
  3380. constInfo.olum11 = ""
  3381. constInfo.isim12 = ""
  3382. constInfo.durum12 = ""
  3383. constInfo.oldurme12 = ""
  3384. constInfo.olum12 = ""
  3385. constInfo.isim13 = ""
  3386. constInfo.durum13 = ""
  3387. constInfo.oldurme13 = ""
  3388. constInfo.olum13 = ""
  3389. constInfo.isim14 = ""
  3390. constInfo.durum14 = ""
  3391. constInfo.oldurme14 = ""
  3392. constInfo.olum14 = ""
  3393. constInfo.isim15 = ""
  3394. constInfo.durum15 = ""
  3395. constInfo.oldurme15 = ""
  3396. constInfo.olum15 = ""
  3397. if int(member) == 4:
  3398. constInfo.isim5 = ""
  3399. constInfo.durum5 = ""
  3400. constInfo.oldurme5 = ""
  3401. constInfo.olum5 = ""
  3402. constInfo.isim6 = ""
  3403. constInfo.durum6 = ""
  3404. constInfo.oldurme6 = ""
  3405. constInfo.olum6 = ""
  3406. constInfo.isim7 = ""
  3407. constInfo.durum7 = ""
  3408. constInfo.oldurme7 = ""
  3409. constInfo.olum7 = ""
  3410. constInfo.isim8 = ""
  3411. constInfo.durum8 = ""
  3412. constInfo.oldurme8 = ""
  3413. constInfo.olum8 = ""
  3414. constInfo.isim9 = ""
  3415. constInfo.durum9 = ""
  3416. constInfo.oldurme9 = ""
  3417. constInfo.olum9 = ""
  3418. constInfo.isim10 = ""
  3419. constInfo.durum10 = ""
  3420. constInfo.oldurme10 = ""
  3421. constInfo.olum10 = ""
  3422. constInfo.isim11 = ""
  3423. constInfo.durum11 = ""
  3424. constInfo.oldurme11 = ""
  3425. constInfo.olum11 = ""
  3426. constInfo.isim12 = ""
  3427. constInfo.durum12 = ""
  3428. constInfo.oldurme12 = ""
  3429. constInfo.olum12 = ""
  3430. constInfo.isim13 = ""
  3431. constInfo.durum13 = ""
  3432. constInfo.oldurme13 = ""
  3433. constInfo.olum13 = ""
  3434. constInfo.isim14 = ""
  3435. constInfo.durum14 = ""
  3436. constInfo.oldurme14 = ""
  3437. constInfo.olum14 = ""
  3438. constInfo.isim15 = ""
  3439. constInfo.durum15 = ""
  3440. constInfo.oldurme15 = ""
  3441. constInfo.olum15 = ""
  3442. if int(member) == 5:
  3443. constInfo.isim6 = ""
  3444. constInfo.durum6 = ""
  3445. constInfo.oldurme6 = ""
  3446. constInfo.olum6 = ""
  3447. constInfo.isim7 = ""
  3448. constInfo.durum7 = ""
  3449. constInfo.oldurme7 = ""
  3450. constInfo.olum7 = ""
  3451. constInfo.isim8 = ""
  3452. constInfo.durum8 = ""
  3453. constInfo.oldurme8 = ""
  3454. constInfo.olum8 = ""
  3455. constInfo.isim9 = ""
  3456. constInfo.durum9 = ""
  3457. constInfo.oldurme9 = ""
  3458. constInfo.olum9 = ""
  3459. constInfo.isim10 = ""
  3460. constInfo.durum10 = ""
  3461. constInfo.oldurme10 = ""
  3462. constInfo.olum10 = ""
  3463. constInfo.isim11 = ""
  3464. constInfo.durum11 = ""
  3465. constInfo.oldurme11 = ""
  3466. constInfo.olum11 = ""
  3467. constInfo.isim12 = ""
  3468. constInfo.durum12 = ""
  3469. constInfo.oldurme12 = ""
  3470. constInfo.olum12 = ""
  3471. constInfo.isim13 = ""
  3472. constInfo.durum13 = ""
  3473. constInfo.oldurme13 = ""
  3474. constInfo.olum13 = ""
  3475. constInfo.isim14 = ""
  3476. constInfo.durum14 = ""
  3477. constInfo.oldurme14 = ""
  3478. constInfo.olum14 = ""
  3479. constInfo.isim15 = ""
  3480. constInfo.durum15 = ""
  3481. constInfo.oldurme15 = ""
  3482. constInfo.olum15 = ""
  3483. if int(member) == 6:
  3484. constInfo.isim7 = ""
  3485. constInfo.durum7 = ""
  3486. constInfo.oldurme7 = ""
  3487. constInfo.olum7 = ""
  3488. constInfo.isim8 = ""
  3489. constInfo.durum8 = ""
  3490. constInfo.oldurme8 = ""
  3491. constInfo.olum8 = ""
  3492. constInfo.isim9 = ""
  3493. constInfo.durum9 = ""
  3494. constInfo.oldurme9 = ""
  3495. constInfo.olum9 = ""
  3496. constInfo.isim10 = ""
  3497. constInfo.durum10 = ""
  3498. constInfo.oldurme10 = ""
  3499. constInfo.olum10 = ""
  3500. constInfo.isim11 = ""
  3501. constInfo.durum11 = ""
  3502. constInfo.oldurme11 = ""
  3503. constInfo.olum11 = ""
  3504. constInfo.isim12 = ""
  3505. constInfo.durum12 = ""
  3506. constInfo.oldurme12 = ""
  3507. constInfo.olum12 = ""
  3508. constInfo.isim13 = ""
  3509. constInfo.durum13 = ""
  3510. constInfo.oldurme13 = ""
  3511. constInfo.olum13 = ""
  3512. constInfo.isim14 = ""
  3513. constInfo.durum14 = ""
  3514. constInfo.oldurme14 = ""
  3515. constInfo.olum14 = ""
  3516. constInfo.isim15 = ""
  3517. constInfo.durum15 = ""
  3518. constInfo.oldurme15 = ""
  3519. constInfo.olum15 = ""
  3520. if int(member) == 7:
  3521. constInfo.isim8 = ""
  3522. constInfo.durum8 = ""
  3523. constInfo.oldurme8 = ""
  3524. constInfo.olum8 = ""
  3525. constInfo.isim9 = ""
  3526. constInfo.durum9 = ""
  3527. constInfo.oldurme9 = ""
  3528. constInfo.olum9 = ""
  3529. constInfo.isim10 = ""
  3530. constInfo.durum10 = ""
  3531. constInfo.oldurme10 = ""
  3532. constInfo.olum10 = ""
  3533. constInfo.isim11 = ""
  3534. constInfo.durum11 = ""
  3535. constInfo.oldurme11 = ""
  3536. constInfo.olum11 = ""
  3537. constInfo.isim12 = ""
  3538. constInfo.durum12 = ""
  3539. constInfo.oldurme12 = ""
  3540. constInfo.olum12 = ""
  3541. constInfo.isim13 = ""
  3542. constInfo.durum13 = ""
  3543. constInfo.oldurme13 = ""
  3544. constInfo.olum13 = ""
  3545. constInfo.isim14 = ""
  3546. constInfo.durum14 = ""
  3547. constInfo.oldurme14 = ""
  3548. constInfo.olum14 = ""
  3549. constInfo.isim15 = ""
  3550. constInfo.durum15 = ""
  3551. constInfo.oldurme15 = ""
  3552. constInfo.olum15 = ""
  3553. if int(member) == 8:
  3554. constInfo.isim9 = ""
  3555. constInfo.durum9 = ""
  3556. constInfo.oldurme9 = ""
  3557. constInfo.olum9 = ""
  3558. constInfo.isim10 = ""
  3559. constInfo.durum10 = ""
  3560. constInfo.oldurme10 = ""
  3561. constInfo.olum10 = ""
  3562. constInfo.isim11 = ""
  3563. constInfo.durum11 = ""
  3564. constInfo.oldurme11 = ""
  3565. constInfo.olum11 = ""
  3566. constInfo.isim12 = ""
  3567. constInfo.durum12 = ""
  3568. constInfo.oldurme12 = ""
  3569. constInfo.olum12 = ""
  3570. constInfo.isim13 = ""
  3571. constInfo.durum13 = ""
  3572. constInfo.oldurme13 = ""
  3573. constInfo.olum13 = ""
  3574. constInfo.isim14 = ""
  3575. constInfo.durum14 = ""
  3576. constInfo.oldurme14 = ""
  3577. constInfo.olum14 = ""
  3578. constInfo.isim15 = ""
  3579. constInfo.durum15 = ""
  3580. constInfo.oldurme15 = ""
  3581. constInfo.olum15 = ""
  3582. if int(member) == 9:
  3583. constInfo.isim10 = ""
  3584. constInfo.durum10 = ""
  3585. constInfo.oldurme10 = ""
  3586. constInfo.olum10 = ""
  3587. constInfo.isim11 = ""
  3588. constInfo.durum11 = ""
  3589. constInfo.oldurme11 = ""
  3590. constInfo.olum11 = ""
  3591. constInfo.isim12 = ""
  3592. constInfo.durum12 = ""
  3593. constInfo.oldurme12 = ""
  3594. constInfo.olum12 = ""
  3595. constInfo.isim13 = ""
  3596. constInfo.durum13 = ""
  3597. constInfo.oldurme13 = ""
  3598. constInfo.olum13 = ""
  3599. constInfo.isim14 = ""
  3600. constInfo.durum14 = ""
  3601. constInfo.oldurme14 = ""
  3602. constInfo.olum14 = ""
  3603. constInfo.isim15 = ""
  3604. constInfo.durum15 = ""
  3605. constInfo.oldurme15 = ""
  3606. constInfo.olum15 = ""
  3607. if int(member) == 10:
  3608. constInfo.isim11 = ""
  3609. constInfo.durum11 = ""
  3610. constInfo.oldurme11 = ""
  3611. constInfo.olum11 = ""
  3612. constInfo.isim12 = ""
  3613. constInfo.durum12 = ""
  3614. constInfo.oldurme12 = ""
  3615. constInfo.olum12 = ""
  3616. constInfo.isim13 = ""
  3617. constInfo.durum13 = ""
  3618. constInfo.oldurme13 = ""
  3619. constInfo.olum13 = ""
  3620. constInfo.isim14 = ""
  3621. constInfo.durum14 = ""
  3622. constInfo.oldurme14 = ""
  3623. constInfo.olum14 = ""
  3624. constInfo.isim15 = ""
  3625. constInfo.durum15 = ""
  3626. constInfo.oldurme15 = ""
  3627. constInfo.olum15 = ""
  3628. if int(member) == 11:
  3629. constInfo.isim12 = ""
  3630. constInfo.durum12 = ""
  3631. constInfo.oldurme12 = ""
  3632. constInfo.olum12 = ""
  3633. constInfo.isim13 = ""
  3634. constInfo.durum13 = ""
  3635. constInfo.oldurme13 = ""
  3636. constInfo.olum13 = ""
  3637. constInfo.isim14 = ""
  3638. constInfo.durum14 = ""
  3639. constInfo.oldurme14 = ""
  3640. constInfo.olum14 = ""
  3641. constInfo.isim15 = ""
  3642. constInfo.durum15 = ""
  3643. constInfo.oldurme15 = ""
  3644. constInfo.olum15 = ""
  3645. if int(member) == 12:
  3646. constInfo.isim13 = ""
  3647. constInfo.durum13 = ""
  3648. constInfo.oldurme13 = ""
  3649. constInfo.olum13 = ""
  3650. constInfo.isim14 = ""
  3651. constInfo.durum14 = ""
  3652. constInfo.oldurme14 = ""
  3653. constInfo.olum14 = ""
  3654. constInfo.isim15 = ""
  3655. constInfo.durum15 = ""
  3656. constInfo.oldurme15 = ""
  3657. constInfo.olum15 = ""
  3658. if int(member) == 13:
  3659. constInfo.isim14 = ""
  3660. constInfo.durum14 = ""
  3661. constInfo.oldurme14 = ""
  3662. constInfo.olum14 = ""
  3663. constInfo.isim15 = ""
  3664. constInfo.durum15 = ""
  3665. constInfo.oldurme15 = ""
  3666. constInfo.olum15 = ""
  3667. if int(member) == 14:
  3668. constInfo.isim15 = ""
  3669. constInfo.durum15 = ""
  3670. constInfo.oldurme15 = ""
  3671. constInfo.olum15 = ""
  3672. def LoncaIstatistikOpen(self):
  3673. import net
  3674. net.SendChatPacket("/loncaistatistik")
  3675. import uiloncaistatistik
  3676. self.loncaistatistik = uiloncaistatistik.LoncaIstatistik()
  3677. self.loncaistatistik.Show()
  3678. def __newsboard(self):
  3679. import haber
  3680. try:
  3681. if constInfo.haber != 1:
  3682. exec 'haber.EpvpGuiDialog().Show()'
  3683. else:
  3684. chat.AppendChat(chat.CHAT_TYPE_INFO, "<Sistem> Nabu Metin2 Haber Tablosu Zaten Acık")
  3685. except ImportError:
  3686. import dbg,app
  3687. dbg.Trace('Nabu Metin2 HaberTablosu Hatası')
  3688. app.Abort()
  3689. # ----------------------------------------------------- #