1. import os
  2. import app
  3. import dbg
  4. import grp
  5. import item
  6. import background
  7. # import uiaverage_price
  8. import uicalendarsystem
  9. import chr
  10. import chrmgr
  11. import player
  12. import chat
  13. import translate
  14. # import uibiowindow
  15. import textTail
  16. import event
  17. import uibonuspage
  18. import uipetsystem
  19. import hydracooltime
  20. import snd
  21. import net
  22. import effect
  23. import wndMgr
  24. import fly
  25. import systemSetting
  26. import quest
  27. import guild
  28. import skill
  29. import messenger
  30. import localeInfo
  31. import constInfo
  32. import exchange
  33. import uiHealth
  34. import ime
  35. import constInfo2
  36. import mounting
  37. import uiaverage_price
  38. # import uiShipMastHP
  39. import uibosstracking
  40. import uiakiraevent
  41. import uiakiramenu
  42. import ui
  43. import uiTip
  44. import uiCommon
  45. import uiPhaseCurtain
  46. import uiMapNameShower
  47. import uiAffectShower
  48. import uiPlayerGauge
  49. import uiCharacter
  50. import uiTarget
  51. import uiTaskbar
  52. import uiteleport
  53. import uiguildstorage
  54. import uimushroom
  55. import schicksalrad
  56. # PRIVATE_SHOP_PRICE_LIST
  57. import uiPrivateShopBuilder
  58. # END_OF_PRIVATE_SHOP_PRICE_LIST
  59. import time
  60. # 5Lv Oto Bec Sistemi
  61. import savbec
  62. import surabec
  63. import ninjabec
  64. import samanbec
  65. import lycanbec
  66. import BKTrade
  67. import serverInfo
  68. import mouseModule
  69. import consoleModule
  70. import localeInfo
  71. import constGame
  72. import constGame
  73. import uiruhtasi
  74. import uibiyolog
  75. import uibecerikitabi
  76. import uibiyolog
  77. import record
  78. import uipricetrans
  79. import playerSettingModule
  80. import interfaceModule
  81. import systeminfo
  82. import uiRoulette
  83. import musicInfo
  84. import debugInfo
  85. import stringCommander
  86. from _weakref import proxy
  87. # from switchbot import Bot
  88. # SCREENSHOT_CWDSAVE
  89. SCREENSHOT_CWDSAVE = FALSE
  90. SCREENSHOT_DIR = None
  91. svsidedia = None
  92. svsidedi_cp = ""
  93. from svsideoi import SvsideDialog
  94. import binascii
  95. import guildwarkillcounter
  96. import uiGuild
  97. import petoplama
  98. import uisupportsystem
  99. import uimaintenance
  100. import uiDungeonInfo
  101. import uiEventInfo
  102. #Hizli-Panel#
  103. import uihizlipanel
  104. import uiyenimenu
  105. #Hizli-Panel#
  106. # import uiShipMastHP
  107. import uiBossTime
  108. if app.ENABLE_ITEMINE_WS_SYSTEM:
  109. import itemws
  110. import uiiteminewsskor
  111. import uiWhisperAdmin
  112. if localeInfo.IsEUROPE():
  113. SCREENSHOT_CWDSAVE = TRUE
  114. if localeInfo.IsCIBN10():
  115. SCREENSHOT_CWDSAVE = FALSE
  116. SCREENSHOT_DIR = "YT2W"
  117. cameraDistance = 1550.0
  118. cameraPitch = 27.0
  119. cameraRotation = 0.0
  120. cameraHeight = 100.0
  121. testAlignment = 0
  122. BPisLodaded = 0
  123. pet_gui_activado = 0
  124. bonuspp = 0
  125. class GameWindow(ui.ScriptWindow):
  126. def __init__(self, stream):
  127. ui.ScriptWindow.__init__(self, "GAME")
  128. self.SetWindowName("game")
  129. net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
  130. player.SetGameWindow(self)
  131. self.Roulette = uiRoulette.RouletteWindow()
  132. global svsidedia
  133. if svsidedia == None:
  134. svsidedia = SvsideDialog()
  135. svsidedia.Board.Hide()
  136. self.uiNewShopCreate = None
  137. self.uiNewShop = None
  138. import uidailypass
  139. self.wnddailypass = uidailypass.DailyPass()
  140. self.quickSlotPageIndex = 0
  141. self.lastPKModeSendedTime = 0
  142. self.LastBoniSwitcherId = 0
  143. self.pressNumber = None
  144. if (app.WJ_COMBAT_ZONE):
  145. import uicombatzone
  146. self.wndCombatZone = uicombatzone.CombatZoneWindow()
  147. self.guildWarQuestionDialog = None
  148. self.interface = None
  149. self.targetBoard = None
  150. self.console = None
  151. self.mapNameShower = None
  152. self.affectShower = None
  153. self.playerGauge = None
  154. self.endTime = 0
  155. self.petInventoryWnd = None
  156. self.boniSwitcherWnd = []
  157. constInfo.BONI_SWITCHER_LOAD = FALSE
  158. self.itemShopWnd = None
  159. self.stream=stream
  160. self.interface = interfaceModule.Interface()
  161. self.interface.SetStream(self.stream)
  162. self.interface.MakeInterface()
  163. self.interface.SetOpenBoniSwitcherEvent(self.__BoniSwitcherShow)
  164. self.interface.ShowDefaultWindows()
  165. self.stream.isAutoSelect = 0
  166. self.curtain = uiPhaseCurtain.PhaseCurtain()
  167. self.curtain.speed = 0.03
  168. self.curtain.Hide()
  169. self.GuildStorageWindow = uiguildstorage.GuildStorage()
  170. self.targetBoard = uiTarget.TargetBoard()
  171. self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
  172. self.targetBoard.Hide()
  173. self.akiraEventButton = uiakiraevent.AkiraEventButton()
  174. self.akiraEventButton.LoadWindow()
  175. self.akiraEventButton.Hide()
  176. self.akiraLog = uiakiramenu.AkiraLog()
  177. self.akiraLog.LoadWindow()
  178. self.akiraLog.Hide()
  179. self.petmain = uipetsystem.PetSystemMain()
  180. if (app.ENABLE_PET_ATTR_DETERMINE):
  181. self.petmain.SetItemToolTip(self.interface.tooltipItem)
  182. self.petmini = uipetsystem.PetSystemMini()
  183. self.console = consoleModule.ConsoleWindow()
  184. self.console.BindGameClass(self)
  185. self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
  186. self.console.Hide()
  187. self.mapNameShower = uiMapNameShower.MapNameShower()
  188. self.affectShower = uiAffectShower.AffectShower()
  189. if app.ENABLE_TITLE_SYSTEM:
  190. import title_system
  191. self.wndTitleSystem = title_system.Title_System()
  192. self.bosstracking = uibosstracking.BossTrackingInfoWindow()
  193. self.bosstracking.Hide()
  194. self.wndShipImageCoolTime = hydracooltime.ImageCoolTimeTest()
  195. self.wndShipImageCoolTime.Close()
  196. self.average_price = uiaverage_price.AveragePrice()
  197. self.average_price.Hide()
  198. self.wndMaintenance = uimaintenance.MaintenanceClass()
  199. self.playerGauge = uiPlayerGauge.PlayerGauge(self)
  200. self.playerGauge.Hide()
  201. self.whisperAdmin = uiWhisperAdmin.AdminWhisperManager()
  202. self.whisperAdmin.Close()
  203. # self.biowindow = uibiowindow.BiologWnd()
  204. # self.biowindow.Hide()
  205. self.guildScoreCounter = guildwarkillcounter.MessageQueue()
  206. if app.ENABLE_LOCALIZATION_SYSTEM:
  207. import uiLocalization
  208. self.wndPlayerLocalization = uiLocalization.Initializate()
  209. self.BKTradeSys = BKTrade.BKTrade()
  210. self.BKTradeSys.Close()
  211. self.withdrawHorseTime = 0
  212. #Hizli-Ruhtasi#
  213. self.ruhtasi = uiruhtasi.RuhTasi()
  214. self.ruhtasi.Hide()
  215. #Hizli-Ruhtasi#
  216. self.chequetogold = uipricetrans.ChequeToGoldWindow()
  217. self.chequetogold.Hide()
  218. self.goldtocheque = uipricetrans.GoldToChequeWindow()
  219. self.goldtocheque.Hide()
  220. #Hizli-BeceriKitabi#
  221. self.becerikitabi = uibecerikitabi.BeceriKitabi()
  222. self.becerikitabi.Hide()
  223. #Hizli-BeceriKitabi#
  224. #Biyolog#
  225. # self.biyoekran = uibiyolog.BiyologEkran()
  226. # self.biyoekran.Hide()
  227. #Biyolog#
  228. #Boss-Siralama#
  229. self.recordscreen = record.recordwindow()
  230. #Boss-Siralama#
  231. #Hizli-Panel#
  232. self.HizliPanel = uihizlipanel.HizliPanel()
  233. self.YeniMenu = uiyenimenu.YeniMenu()
  234. #Hizli-Panel#
  235. self.mushroom = uimushroom.OpenMushroomCube()
  236. self.mushroom.Close()
  237. self.mushroom_minimap = uimushroom.MushroomDungeonGui()
  238. self.mushroom_minimap.Hide()
  239. self.petoplamas = petoplama.PetDialog()
  240. self.petoplamas.Hide()
  241. if app.ENABLE_ITEMINE_WS_SYSTEM:
  242. self.skortable = uiiteminewsskor.ItemineWsSkorDialog()
  243. self.skortable.Hide()
  244. self.supportpg = uisupportsystem.SupportMainGui()
  245. # self.wndShipMastHP = uiShipMastHP.ShipMastHP()
  246. # self.wndShipMastHP.Close()
  247. self.itemDropQuestionDialog = None
  248. self.__SetQuickSlotMode()
  249. self.__ServerCommand_Build()
  250. self.__ProcessPreservedServerCommand()
  251. self.teleport = uiteleport.TeleportWindow()
  252. self.MountingSystem = mounting.MountWindow()
  253. self.SchicksalRad = schicksalrad.RadDesSchicksals()
  254. # constInfo.INTERFACE_MODULE = self.interface
  255. def __del__(self):
  256. player.SetGameWindow(0)
  257. net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
  258. ui.ScriptWindow.__del__(self)
  259. def Open(self):
  260. app.SetFrameSkip(1)
  261. self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
  262. self.BoardMessage = uiTip.BigBoard()
  263. Espacio = ui.AniImageBox()
  264. Espacio.SetWindowHorizontalAlignLeft()
  265. Espacio.SetWindowVerticalAlignTop()
  266. Espacio.AppendImage("d:/ymir work/ui/pattern/medallas/espacio.dds")
  267. self.Espacio = Espacio
  268. self.Espacio.SetPosition(10, 80)
  269. self.contador_usuarios_guerra = ui.TextLine()
  270. self.contador_usuarios_guerra.SetWindowHorizontalAlignLeft()
  271. self.contador_usuarios_guerra.SetWindowVerticalAlignTop()
  272. self.contador_usuarios_guerra.SetDefaultFontName()
  273. self.contador_usuarios_guerra.SetPosition(24+8, 37+2 +40)
  274. self.contador_usuarios_guerra.SetText("0")
  275. self.contador_usuarios_guerra.SetOutline()
  276. self.muertos_guerra = ui.TextLine()
  277. self.muertos_guerra.SetWindowHorizontalAlignLeft()
  278. self.muertos_guerra.SetWindowVerticalAlignTop()
  279. self.muertos_guerra.SetDefaultFontName()
  280. self.muertos_guerra.SetPosition(24+8, 47+2+40)
  281. self.muertos_guerra.SetText("0")
  282. self.muertos_guerra.SetOutline()
  283. self.caido_guerra = ui.TextLine()
  284. self.caido_guerra.SetWindowHorizontalAlignLeft()
  285. self.caido_guerra.SetWindowVerticalAlignTop()
  286. self.caido_guerra.SetDefaultFontName()
  287. self.caido_guerra.SetPosition(24+8, 57+2+40)
  288. self.caido_guerra.SetText("0")
  289. self.caido_guerra.SetOutline()
  290. self.usuarios_guerra = ui.TextLine()
  291. self.usuarios_guerra.SetWindowHorizontalAlignLeft()
  292. self.usuarios_guerra.SetWindowVerticalAlignTop()
  293. self.usuarios_guerra.SetDefaultFontName()
  294. self.usuarios_guerra.SetPosition(10+8, 37+2+40)
  295. self.usuarios_guerra.SetText("U:")
  296. self.usuarios_guerra.SetOutline()
  297. self.ranking_guerra = ui.TextLine()
  298. self.ranking_guerra.SetWindowHorizontalAlignLeft()
  299. self.ranking_guerra.SetWindowVerticalAlignTop()
  300. self.ranking_guerra.SetDefaultFontName()
  301. self.ranking_guerra.SetPosition(10+8, 47+2+40)
  302. self.ranking_guerra.SetText("R:")
  303. self.ranking_guerra.SetOutline()
  304. self.ranking_caido = ui.TextLine()
  305. self.ranking_caido.SetWindowHorizontalAlignLeft()
  306. self.ranking_caido.SetWindowVerticalAlignTop()
  307. self.ranking_caido.SetDefaultFontName()
  308. self.ranking_caido.SetPosition(10 +8, 57 +2+40)
  309. self.ranking_caido.SetText("M:")
  310. self.ranking_caido.SetOutline()
  311. Medallas_gui = ui.AniImageBox()
  312. Medallas_gui.SetWindowHorizontalAlignLeft()
  313. Medallas_gui.SetWindowVerticalAlignTop()
  314. Medallas_gui.AppendImage("d:/ymir work/ui/pattern/medallas/espacio.dds")
  315. self.Medallas_gui = Medallas_gui
  316. self.Medallas_gui.SetPosition(10, 40)
  317. self.muertes = ui.TextLine()
  318. self.muertes.SetWindowHorizontalAlignLeft()
  319. self.muertes.SetWindowVerticalAlignTop()
  320. self.muertes.SetDefaultFontName()
  321. self.muertes.SetPosition(24, 51)
  322. self.muertes.SetText("0")
  323. self.muertes.SetOutline()
  324. self.primera_muerte = ui.AniImageBox()
  325. self.primera_muerte.SetWindowHorizontalAlignLeft()
  326. self.primera_muerte.SetWindowVerticalAlignTop()
  327. self.primera_muerte.AppendImage("d:/ymir work/ui/pattern/medallas/1.dds")
  328. self.primera_muerte.SetPosition(43, 40)
  329. self.doble_muerte = ui.AniImageBox()
  330. self.doble_muerte.SetWindowHorizontalAlignLeft()
  331. self.doble_muerte.SetWindowVerticalAlignTop()
  332. self.doble_muerte.AppendImage("d:/ymir work/ui/pattern/medallas/2.dds")
  333. self.doble_muerte.SetPosition(43 + 33, 40)
  334. self.triple_muerte = ui.AniImageBox()
  335. self.triple_muerte.SetWindowHorizontalAlignLeft()
  336. self.triple_muerte.SetWindowVerticalAlignTop()
  337. self.triple_muerte.AppendImage("d:/ymir work/ui/pattern/medallas/3.dds")
  338. self.triple_muerte.SetPosition(43 + 33 + 33, 40)
  339. self.exterminio = ui.AniImageBox()
  340. self.exterminio.SetWindowHorizontalAlignLeft()
  341. self.exterminio.SetWindowVerticalAlignTop()
  342. self.exterminio.AppendImage("d:/ymir work/ui/pattern/medallas/4.dds")
  343. self.exterminio.SetPosition(43+ 33+ 33 + 33, 40)
  344. self.muertacular = ui.AniImageBox()
  345. self.muertacular.SetWindowHorizontalAlignLeft()
  346. self.muertacular.SetWindowVerticalAlignTop()
  347. self.muertacular.AppendImage("d:/ymir work/ui/pattern/medallas/5.dds")
  348. self.muertacular.SetPosition(43+ 33+ 33+ 33 + 33, 40)
  349. self.bestialidad = ui.AniImageBox()
  350. self.bestialidad.SetWindowHorizontalAlignLeft()
  351. self.bestialidad.SetWindowVerticalAlignTop()
  352. self.bestialidad.AppendImage("d:/ymir work/ui/pattern/medallas/6.dds")
  353. self.bestialidad.SetPosition(43+ 33+ 33+ 33+ 33 + 33, 40)
  354. self.salvajada = ui.AniImageBox()
  355. self.salvajada.SetWindowHorizontalAlignLeft()
  356. self.salvajada.SetWindowVerticalAlignTop()
  357. self.salvajada.AppendImage("d:/ymir work/ui/pattern/medallas/7.dds")
  358. self.salvajada.SetPosition(43+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  359. self.catastrofe = ui.AniImageBox()
  360. self.catastrofe.SetWindowHorizontalAlignLeft()
  361. self.catastrofe.SetWindowVerticalAlignTop()
  362. self.catastrofe.AppendImage("d:/ymir work/ui/pattern/medallas/8.dds")
  363. self.catastrofe.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  364. self.apocalipsis = ui.AniImageBox()
  365. self.apocalipsis.SetWindowHorizontalAlignLeft()
  366. self.apocalipsis.SetWindowVerticalAlignTop()
  367. self.apocalipsis.AppendImage("d:/ymir work/ui/pattern/medallas/9.dds")
  368. self.apocalipsis.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  369. self.lluvia_muertos = ui.AniImageBox()
  370. self.lluvia_muertos.SetWindowHorizontalAlignLeft()
  371. self.lluvia_muertos.SetWindowVerticalAlignTop()
  372. self.lluvia_muertos.AppendImage("d:/ymir work/ui/pattern/medallas/10.dds")
  373. self.lluvia_muertos.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  374. self.super_increible = ui.AniImageBox()
  375. self.super_increible.SetWindowHorizontalAlignLeft()
  376. self.super_increible.SetWindowVerticalAlignTop()
  377. self.super_increible.AppendImage("d:/ymir work/ui/pattern/medallas/11.dds")
  378. self.super_increible.SetPosition(43+ 33+ 33+ 33+ 33+ 33+ 33+ 33+ 33+ 33 + 33, 40)
  379. #Fin menu
  380. import uiNewShop
  381. self.uiNewShop = uiNewShop.ShopDialog()
  382. self.uiNewShop.Close()
  383. self.uiNewShopCreate = uiNewShop.ShopDialogCreate()
  384. self.uiNewShopCreate.Hide()
  385. self.quickSlotPageIndex = 0
  386. # self.switchbot = Bot()
  387. # self.switchbot.Hide()
  388. self.PickingCharacterIndex = -1
  389. self.PickingItemIndex = -1
  390. self.consoleEnable = FALSE
  391. self.isShowDebugInfo = FALSE
  392. self.ShowNameFlag = FALSE
  393. self.enableXMasBoom = FALSE
  394. self.enableXMasMuzik = FALSE
  395. self.startTimeXMasBoom = 0.0
  396. self.startTimeXMasMuzik = 0.0
  397. self.indexXMasBoom = 0
  398. self.indexXMasMuzik = 0
  399. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  400. app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
  401. constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
  402. constInfo.SET_DEFAULT_CHRNAME_COLOR()
  403. constInfo.SET_DEFAULT_FOG_LEVEL()
  404. constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
  405. constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
  406. constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
  407. # TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  408. constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
  409. # END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  410. import event
  411. event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
  412. textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
  413. if constInfo.PVPMODE_TEST_ENABLE:
  414. self.testPKMode = ui.TextLine()
  415. self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
  416. self.testPKMode.SetPosition(0, 15)
  417. self.testPKMode.SetWindowHorizontalAlignCenter()
  418. self.testPKMode.SetHorizontalAlignCenter()
  419. self.testPKMode.SetFeather()
  420. self.testPKMode.SetOutline()
  421. self.testPKMode.Show()
  422. self.testAlignment = ui.TextLine()
  423. self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
  424. self.testAlignment.SetPosition(0, 35)
  425. self.testAlignment.SetWindowHorizontalAlignCenter()
  426. self.testAlignment.SetHorizontalAlignCenter()
  427. self.testAlignment.SetFeather()
  428. self.testAlignment.SetOutline()
  429. self.testAlignment.Show()
  430. self.__BuildKeyDict()
  431. self.__BuildDebugInfo()
  432. # PRIVATE_SHOP_PRICE_LIST
  433. uiPrivateShopBuilder.Clear()
  434. # END_OF_PRIVATE_SHOP_PRICE_LIST
  435. # UNKNOWN_UPDATE
  436. exchange.InitTrading()
  437. # END_OF_UNKNOWN_UPDATE
  438. if app.ENABLE_ITEMINE_WS_SYSTEM:
  439. itemws.InitItemwsing()
  440. ## Sound
  441. snd.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
  442. snd.SetSoundVolume(systemSetting.GetSoundVolume())
  443. netFieldMusicFileName = net.GetFieldMusicFileName()
  444. if netFieldMusicFileName:
  445. snd.FadeInMusic("BGM/" + netFieldMusicFileName)
  446. elif musicInfo.fieldMusic != "":
  447. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  448. self.__SetQuickSlotMode()
  449. self.__SelectQuickPage(self.quickSlotPageIndex)
  450. self.SetFocus()
  451. self.Show()
  452. app.ShowCursor()
  453. net.SendEnterGamePacket()
  454. if app.WJ_SECURITY_SYSTEM:
  455. if constInfo.open_security == 0:
  456. net.SendChatPacket("/open_security ac")
  457. # constInfo.open_security = 1
  458. # START_GAME_ERROR_EXIT
  459. try:
  460. self.StartGame()
  461. except:
  462. import exception
  463. exception.Abort("GameWindow.Open")
  464. # END_OF_START_GAME_ERROR_EXIT
  465. self.cubeInformation = {}
  466. self.currentCubeNPC = 0
  467. # self.acceInformation = {}
  468. # self.currentAcceNPC = 0
  469. for i in xrange(10):
  470. if systemSetting.IsSnowTexturesMode() == 1:
  471. if background.GetCurrentMapName():
  472. snow_maps = [
  473. "metin2_map_a1",
  474. "metin2_map_b1",
  475. "metin2_map_c1"
  476. ]
  477. snow_maps_textures = {
  478. "metin2_map_a1" : "textureset\metin2_a1_snow.txt",
  479. "metin2_map_b1" : "textureset\metin2_b1_snow.txt",
  480. "metin2_map_c1" : "textureset\metin2_c1_snow.txt",
  481. }
  482. if str(background.GetCurrentMapName()) in snow_maps:
  483. background.TextureChange(snow_maps_textures[str(background.GetCurrentMapName())])
  484. elif systemSetting.IsSnowTexturesMode() == 2:
  485. if background.GetCurrentMapName():
  486. desert_maps = [
  487. "metin2_map_a1",
  488. "metin2_map_b1",
  489. "metin2_map_c1"
  490. ]
  491. desert_maps_textures = {
  492. "metin2_map_a1" : "textureset\metin2_a1_desert.txt",
  493. "metin2_map_b1" : "textureset\metin2_b1_desert.txt",
  494. "metin2_map_c1" : "textureset\metin2_c1_desert.txt",
  495. }
  496. if str(background.GetCurrentMapName()) in desert_maps:
  497. background.TextureChange(desert_maps_textures[str(background.GetCurrentMapName())])
  498. def Close(self):
  499. if self.Roulette.IsShow():
  500. self.Roulette.Open()
  501. self.Hide()
  502. self.wndShipImageCoolTime.Close()
  503. #AKIRA_EVENT_SYSTEM
  504. self.akiraEventButton.Hide()
  505. #END_OF_AKIRA_EVENT_SYSTEM
  506. self.akiraLog.Hide()
  507. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  508. (cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
  509. if musicInfo.fieldMusic != "":
  510. snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)
  511. self.onPressKeyDict = None
  512. self.onClickKeyDict = None
  513. self.uiNewShop.Hide()
  514. self.uiNewShopCreate.Hide()
  515. uiPrivateShopBuilder.Clear()
  516. chat.Close()
  517. snd.StopAllSound()
  518. grp.InitScreenEffect()
  519. chr.Destroy()
  520. textTail.Clear()
  521. quest.Clear()
  522. background.Destroy()
  523. guild.Destroy()
  524. messenger.Destroy()
  525. skill.ClearSkillData()
  526. wndMgr.Unlock()
  527. mouseModule.mouseController.DeattachObject()
  528. if self.guildWarQuestionDialog:
  529. self.guildWarQuestionDialog.Close()
  530. self.guildNameBoard = None
  531. self.partyRequestQuestionDialog = None
  532. self.warPlayerCheckQuestionDialog = None
  533. self.partyInviteQuestionDialog = None
  534. self.guildInviteQuestionDialog = None
  535. self.guildWarQuestionDialog = None
  536. self.messengerAddFriendQuestion = None
  537. # UNKNOWN_UPDATE
  538. self.itemDropQuestionDialog = None
  539. # END_OF_UNKNOWN_UPDATE
  540. # QUEST_CONFIRM
  541. self.confirmDialog = None
  542. # END_OF_QUEST_CONFIRM
  543. self.PrintCoord = None
  544. self.FrameRate = None
  545. self.Pitch = None
  546. self.Splat = None
  547. self.TextureNum = None
  548. self.ObjectNum = None
  549. self.ViewDistance = None
  550. self.PrintMousePos = None
  551. self.ClearDictionary()
  552. self.petmain.Close()
  553. self.petmini.Close()
  554. self.playerGauge = None
  555. self.mapNameShower = None
  556. self.affectShower = None
  557. if self.whisperAdmin:
  558. self.whisperAdmin.Close()
  559. self.whisperAdmin = None
  560. if self.SchicksalRad.IsShow():
  561. self.SchicksalRad.Open()
  562. if self.MountingSystem.IsShow():
  563. self.MountingSystem.Open()
  564. #Hizli-Ruhtasi#
  565. if self.ruhtasi:
  566. self.ruhtasi.Destroy()
  567. self.ruhtasi = None
  568. #Hizli-Ruhtasi#
  569. if self.chequetogold:
  570. self.chequetogold.Destroy()
  571. self.chequetogold = None
  572. if self.goldtocheque:
  573. self.goldtocheque.Destroy()
  574. self.goldtocheque = None
  575. # if self.average_price:
  576. # self.average_price.Destroy()
  577. # self.average_price = None
  578. if self.bosstracking:
  579. self.bosstracking.Destroy()
  580. self.bosstracking = None
  581. if self.average_price:
  582. self.average_price.Destroy()
  583. self.average_price = None
  584. #Hizli-Becerikitabi#
  585. if self.becerikitabi:
  586. self.becerikitabi.Destroy()
  587. self.becerikitabi = None
  588. #Hizli-Becerikitabi#
  589. #Biyolog#
  590. # if self.biyoekran:
  591. # self.biyoekran.Destroy()
  592. # self.biyoekran = None
  593. #Biyolog#
  594. if self.mushroom:
  595. self.mushroom.Close()
  596. self.mushroom = None
  597. if self.mushroom_minimap:
  598. self.mushroom_minimap.Destroy()
  599. self.mushroom_minimap = None
  600. #Boss-Siralama#
  601. if self.recordscreen.IsShow():
  602. self.recordscreen.Open()
  603. #Boss-Siralama#
  604. if self.petoplamas:
  605. self.petoplamas.Destroy()
  606. self.petoplamas = None
  607. if app.ENABLE_ITEMINE_WS_SYSTEM:
  608. if self.skortable:
  609. self.skortable.Destroy()
  610. self.skortable = None
  611. self.supportpg.Close()
  612. if self.console:
  613. self.console.BindGameClass(0)
  614. self.console.Close()
  615. self.console=None
  616. # if self.biowindow:
  617. # self.biowindow.Destroy()
  618. # self.biowindow = None
  619. if self.wndMaintenance.IsShow():
  620. self.wndMaintenance.Hide()
  621. if app.ENABLE_TITLE_SYSTEM:
  622. self.wndTitleSystem.Close()
  623. if self.targetBoard:
  624. self.targetBoard.Destroy()
  625. self.targetBoard = None
  626. if (app.WJ_COMBAT_ZONE):
  627. if self.wndCombatZone:
  628. self.wndCombatZone.Close()
  629. if app.ENABLE_LOCALIZATION_SYSTEM:
  630. if self.wndPlayerLocalization:
  631. self.wndPlayerLocalization.Close()
  632. if self.itemShopWnd:
  633. self.itemShopWnd.Destroy()
  634. self.itemShopWnd = None
  635. if self.interface:
  636. self.interface.HideAllWindows()
  637. self.interface.Close()
  638. self.interface=None
  639. # if self.biowindow:
  640. # self.biowindow.Destroy()
  641. # self.biowindow = None
  642. for i in xrange(len(self.boniSwitcherWnd)):
  643. if self.boniSwitcherWnd[i]:
  644. self.boniSwitcherWnd[i].Destroy()
  645. self.boniSwitcherWnd[i] = None
  646. if self.petInventoryWnd:
  647. self.petInventoryWnd.Destroy()
  648. self.petInventoryWnd = None
  649. player.ClearSkillDict()
  650. player.ResetCameraRotation()
  651. self.KillFocus()
  652. app.HideCursor()
  653. print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
  654. def BINARY_ReceiveChannel(self, channel):
  655. if self.interface:
  656. if self.interface.wndMiniMap:
  657. self.interface.wndMiniMap.UpdateChannelInfo(channel)
  658. constInfo.channel_idx = channel
  659. def __BuildKeyDict(self):
  660. onPressKeyDict = {}
  661. onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
  662. onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
  663. onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
  664. onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
  665. onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
  666. onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
  667. onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
  668. onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
  669. onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
  670. onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
  671. onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
  672. onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
  673. onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
  674. # onPressKeyDict[app.DIK_F5] = lambda : self.__HizliPanel()
  675. # if app.ENABLE_TITLE_SYSTEM:
  676. # onPressKeyDict[app.DIK_F6] = lambda : self.OpenTitleSystem()
  677. onPressKeyDict[app.DIK_F11] = lambda : self.whisperAdmin.OpenWindow()
  678. onPressKeyDict[app.DIK_TAB] = lambda : self.LoncaIstatistikOpen()
  679. onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
  680. onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
  681. onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
  682. onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
  683. onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
  684. onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
  685. onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
  686. onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
  687. onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
  688. onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
  689. onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
  690. onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
  691. ######--PET_ATTACK--######
  692. # onPressKeyDict[app.DIK_E] = lambda : self.__pet_attack_yap()
  693. # onPressKeyDict[app.DIK_R] = lambda : self.__pet_attack_dur()
  694. ######--PET_ATTACK--######
  695. onPressKeyDict[app.DIK_O] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
  696. onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
  697. onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
  698. onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
  699. onPressKeyDict[app.DIK_G] = self.__PressGKey
  700. onPressKeyDict[app.DIK_Q] = self.__PressQKey
  701. onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
  702. onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
  703. onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
  704. onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
  705. onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
  706. onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
  707. onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
  708. onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItem()
  709. onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItem()
  710. #onPressKeyDict[app.DIK_X] = lambda: self.interface.ToggleBonusWindow()
  711. onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
  712. onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
  713. onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
  714. onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
  715. onPressKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
  716. onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
  717. onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
  718. onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
  719. onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole()
  720. onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
  721. onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
  722. onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
  723. onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
  724. onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
  725. if app.ENABLE_SPECIAL_STORAGE:
  726. onPressKeyDict[app.DIK_K] = lambda : self.__OpenSpecialInventory()
  727. self.onPressKeyDict = onPressKeyDict
  728. onClickKeyDict = {}
  729. onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
  730. onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
  731. onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
  732. onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
  733. onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
  734. onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
  735. onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
  736. onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
  737. onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
  738. onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
  739. onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
  740. onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  741. onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  742. onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
  743. onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
  744. onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  745. onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  746. onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  747. onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  748. onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  749. onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  750. onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
  751. onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
  752. onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
  753. onClickKeyDict[app.DIK_P] = lambda: self.OpenPetMainGui()
  754. self.onClickKeyDict=onClickKeyDict
  755. def __PressNumKey(self,num):
  756. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  757. if num >= 1 and num <= 9:
  758. if(chrmgr.IsPossibleEmoticon(-1)):
  759. chrmgr.SetEmoticon(-1,int(num)-1)
  760. net.SendEmoticon(int(num)-1)
  761. else:
  762. if num >= 1 and num <= 4:
  763. self.pressNumber(num-1)
  764. def __ClickBKey(self):
  765. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  766. return
  767. else:
  768. if constInfo.PVPMODE_ACCELKEY_ENABLE:
  769. self.ChangePKMode()
  770. def __PressJKey(self):
  771. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  772. if player.IsMountingHorse():
  773. net.SendChatPacket("/unmount")
  774. else:
  775. if not uiPrivateShopBuilder.IsBuildingPrivateShop():
  776. if app.ENABLE_MOUNT_SYSTEM:
  777. for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
  778. index = player.GetItemIndex(i)
  779. if index:
  780. item.SelectItem(index)
  781. subType = item.GetItemSubType()
  782. if subType == item.PET_MOUNT:
  783. allow = 0
  784. net.SendItemUsePacket(i)
  785. break
  786. else:
  787. for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
  788. if player.GetItemIndex(i) in (52043, 52044, 52045, 71164, 71165, 71166, 71167, 71168, 52091, 52092, 52093, 52094, 52095, 52096, 52097, 52098, 71161, 71131, 52033, 52005, 52019, 71176, 71177):
  789. net.SendItemUsePacket(i)
  790. break
  791. def __PressHKey(self):
  792. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  793. net.SendChatPacket("/user_horse_ride")
  794. # else:
  795. # if (app.GetTime() < self.withdrawHorseTime + 3):
  796. # chat.AppendChat(chat.CHAT_TYPE_INFO, "3 Saniye beklemelisin!")
  797. # return
  798. # self.withdrawHorseTime = app.GetTime()
  799. # net.SendChatPacket("/at_gellan_buraya")
  800. self.interface.OpenHelpWindow()
  801. def __PressBKey(self):
  802. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  803. net.SendChatPacket("/user_horse_back")
  804. else:
  805. state = "EMOTICON"
  806. self.interface.ToggleCharacterWindow(state)
  807. def __PressFKey(self):
  808. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  809. net.SendChatPacket("/user_horse_feed")
  810. else:
  811. app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  812. def __PressGKey(self):
  813. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  814. net.SendChatPacket("/ride")
  815. else:
  816. if self.ShowNameFlag:
  817. self.interface.ToggleGuildWindow()
  818. else:
  819. app.PitchCamera(app.CAMERA_TO_POSITIVE)
  820. def __ReleaseGKey(self):
  821. app.PitchCamera(app.CAMERA_STOP)
  822. if app.ENABLE_TITLE_SYSTEM:
  823. def OpenTitleSystem(self):
  824. self.wndTitleSystem.OpenWindow()
  825. def __PressQKey(self):
  826. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  827. if 0==interfaceModule.IsQBHide:
  828. interfaceModule.IsQBHide = 1
  829. self.interface.HideAllQuestButton()
  830. else:
  831. interfaceModule.IsQBHide = 0
  832. self.interface.ShowAllQuestButton()
  833. else:
  834. app.RotateCamera(app.CAMERA_TO_NEGATIVE)
  835. def __PressJKey(self):
  836. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  837. if player.IsmountingHorse():
  838. net.SendChatPacket("/unmount")
  839. else:
  840. self.teleport.Open()
  841. def __SetQuickSlotMode(self):
  842. self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
  843. def __SetQuickPageMode(self):
  844. self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
  845. def __PressQuickSlot(self, localSlotIndex):
  846. if localeInfo.IsARABIC():
  847. if 0 <= localSlotIndex and localSlotIndex < 4:
  848. player.RequestUseLocalQuickSlot(3-localSlotIndex)
  849. else:
  850. player.RequestUseLocalQuickSlot(11-localSlotIndex)
  851. else:
  852. player.RequestUseLocalQuickSlot(localSlotIndex)
  853. def __SelectQuickPage(self, pageIndex):
  854. self.quickSlotPageIndex = pageIndex
  855. player.SetQuickPage(pageIndex)
  856. def ToggleDebugInfo(self):
  857. self.isShowDebugInfo = not self.isShowDebugInfo
  858. if self.isShowDebugInfo:
  859. self.PrintCoord.Show()
  860. self.FrameRate.Show()
  861. self.Pitch.Show()
  862. self.Splat.Show()
  863. self.TextureNum.Show()
  864. self.ObjectNum.Show()
  865. self.ViewDistance.Show()
  866. self.PrintMousePos.Show()
  867. else:
  868. self.PrintCoord.Hide()
  869. self.FrameRate.Hide()
  870. self.Pitch.Hide()
  871. self.Splat.Hide()
  872. self.TextureNum.Hide()
  873. self.ObjectNum.Hide()
  874. self.ViewDistance.Hide()
  875. self.PrintMousePos.Hide()
  876. def __BuildDebugInfo(self):
  877. ## Character Position Coordinate
  878. self.PrintCoord = ui.TextLine()
  879. self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
  880. self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0)
  881. ## Frame Rate
  882. self.FrameRate = ui.TextLine()
  883. self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
  884. self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
  885. ## Camera Pitch
  886. self.Pitch = ui.TextLine()
  887. self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
  888. self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
  889. ## Splat
  890. self.Splat = ui.TextLine()
  891. self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
  892. self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
  893. ##
  894. self.PrintMousePos = ui.TextLine()
  895. self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
  896. self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
  897. # TextureNum
  898. self.TextureNum = ui.TextLine()
  899. self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
  900. self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
  901. # ¢¯A¨¬eA¡×¨¡¢ç ¡¾¡¿¢¬¢ç¢¥A ¡Æ©ø¨ùo
  902. self.ObjectNum = ui.TextLine()
  903. self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
  904. self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
  905. # ¨öA¨ú©¬¡ÆA¢¬¢ç
  906. self.ViewDistance = ui.TextLine()
  907. self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
  908. self.ViewDistance.SetPosition(0, 0)
  909. def __NotifyError(self, msg):
  910. chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
  911. def ChangePKMode(self):
  912. if not app.IsPressed(app.DIK_LCONTROL):
  913. return
  914. if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
  915. self.__NotifyError(localeInfo.OPTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
  916. return
  917. curTime = app.GetTime()
  918. if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
  919. return
  920. self.lastPKModeSendedTime = curTime
  921. curPKMode = player.GetPKMode()
  922. nextPKMode = curPKMode + 1
  923. if nextPKMode == player.PK_MODE_PROTECT:
  924. if 0 == player.GetGuildID():
  925. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
  926. nextPKMode = 0
  927. else:
  928. nextPKMode = player.PK_MODE_GUILD
  929. elif nextPKMode == player.PK_MODE_MAX_NUM:
  930. nextPKMode = 0
  931. net.SendChatPacket("/PKMode " + str(nextPKMode))
  932. print "/PKMode " + str(nextPKMode)
  933. def OnChangePKMode(self):
  934. self.interface.OnChangePKMode()
  935. try:
  936. self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
  937. except KeyError:
  938. print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
  939. if constInfo.PVPMODE_TEST_ENABLE:
  940. curPKMode = player.GetPKMode()
  941. alignment, grade = chr.testGetPKData()
  942. self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
  943. self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
  944. self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
  945. ###############################################################################################
  946. ###############################################################################################
  947. ## Game Callback Functions
  948. # Start
  949. def StartGame(self):
  950. self.RefreshInventory()
  951. self.RefreshEquipment()
  952. self.RefreshCharacter()
  953. self.RefreshSkill()
  954. szNameValue = "[%s]" % (player.GetName())
  955. app.SetTitle(szNameValue)
  956. # Refresh
  957. def CheckGameButton(self):
  958. if self.interface:
  959. self.interface.CheckGameButton()
  960. def RefreshAlignment(self):
  961. self.interface.RefreshAlignment()
  962. def RefreshStatus(self):
  963. self.CheckGameButton()
  964. if self.interface:
  965. self.interface.RefreshStatus()
  966. if self.playerGauge:
  967. self.playerGauge.RefreshGauge()
  968. def RefreshStamina(self):
  969. self.interface.RefreshStamina()
  970. def RefreshSkill(self):
  971. self.CheckGameButton()
  972. if self.interface:
  973. self.interface.RefreshSkill()
  974. def RefreshQuest(self):
  975. self.interface.RefreshQuest()
  976. def RefreshMessenger(self):
  977. self.interface.RefreshMessenger()
  978. def RefreshGuildInfoPage(self):
  979. self.interface.RefreshGuildInfoPage()
  980. def RefreshGuildBoardPage(self):
  981. self.interface.RefreshGuildBoardPage()
  982. def RefreshGuildMemberPage(self):
  983. self.interface.RefreshGuildMemberPage()
  984. def RefreshGuildMemberPageGradeComboBox(self):
  985. self.interface.RefreshGuildMemberPageGradeComboBox()
  986. def RefreshGuildSkillPage(self):
  987. self.interface.RefreshGuildSkillPage()
  988. def RefreshGuildGradePage(self):
  989. self.interface.RefreshGuildGradePage()
  990. def RefreshMobile(self):
  991. if self.interface:
  992. self.interface.RefreshMobile()
  993. def OnMobileAuthority(self):
  994. self.interface.OnMobileAuthority()
  995. def OnBlockMode(self, mode):
  996. self.interface.OnBlockMode(mode)
  997. def OpenQuestWindow(self, skin, idx):
  998. if constInfo.AkiraMenu[0]:
  999. return
  1000. if constInfo.CApiSetHide == 1:
  1001. net.SendQuestInputStringPacket(str(constInfo.SendString))
  1002. constInfo.CApiSetHide = 0
  1003. return
  1004. if constInfo.INPUT_IGNORE == 1:
  1005. return
  1006. self.interface.OpenQuestWindow(skin, idx)
  1007. def Mozart(self, data):
  1008. dane = data.split("|")
  1009. constInfo.PLAYER_NAME = str(dane[0])
  1010. constInfo.PLAYER_HP = int(dane[1])
  1011. constInfo.PLAYER_MAX_HP = int(dane[2])
  1012. constInfo.PLAYER_SP = int(dane[3])
  1013. constInfo.PLAYER_MAX_SP = int(dane[4])
  1014. def Tabulejtor(self, id):
  1015. constInfo.STHX = int(id)
  1016. def GetInputOn(self):
  1017. constInfo.INPUT_IGNORE = 1
  1018. def GetInputOff(self):
  1019. constInfo.INPUT_IGNORE = 0
  1020. def GetInputValue(self):
  1021. net.SendQuestInputStringPacket(str(constInfo.VID))
  1022. def OpenQuestWindow(self, skin, idx):
  1023. if constInfo.INPUT_IGNORE == 1:
  1024. return
  1025. else:
  1026. self.interface.OpenQuestWindow(skin, idx)
  1027. def __OpenSpecialInventory(self):
  1028. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  1029. return
  1030. self.interface.ToggleSpecialStorageWindow()
  1031. def AskGuildName(self):
  1032. guildNameBoard = uiCommon.InputDialog()
  1033. guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
  1034. guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
  1035. guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
  1036. guildNameBoard.Open()
  1037. self.guildNameBoard = guildNameBoard
  1038. def ConfirmGuildName(self):
  1039. guildName = self.guildNameBoard.GetText()
  1040. if not guildName:
  1041. return
  1042. if net.IsInsultIn(guildName):
  1043. self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
  1044. return
  1045. net.SendAnswerMakeGuildPacket(guildName)
  1046. self.guildNameBoard.Close()
  1047. self.guildNameBoard = None
  1048. return TRUE
  1049. def CancelGuildName(self):
  1050. self.guildNameBoard.Close()
  1051. self.guildNameBoard = None
  1052. return TRUE
  1053. ## Refine
  1054. def PopupMessage(self, msg):
  1055. self.stream.popupWindow.Close()
  1056. self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
  1057. def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type=0):
  1058. self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
  1059. def AppendMaterialToRefineDialog(self, vnum, count):
  1060. self.interface.AppendMaterialToRefineDialog(vnum, count)
  1061. def RunUseSkillEvent(self, slotIndex, coolTime):
  1062. self.interface.OnUseSkill(slotIndex, coolTime)
  1063. def ClearAffects(self):
  1064. self.affectShower.ClearAffects()
  1065. def SetAffect(self, affect):
  1066. self.affectShower.SetAffect(affect)
  1067. def ResetAffect(self, affect):
  1068. self.affectShower.ResetAffect(affect)
  1069. # UNKNOWN_UPDATE
  1070. def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
  1071. self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
  1072. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  1073. self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
  1074. elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
  1075. self.BINARY_DragonSoulGiveQuilification()
  1076. def BINARY_NEW_RemoveAffect(self, type, pointIdx):
  1077. self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
  1078. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  1079. self.interface.DragonSoulDeactivate()
  1080. # END_OF_UNKNOWN_UPDATE
  1081. def OpenTimerWindow(self):
  1082. self.interface.OpenTimerWindow()
  1083. if app.ENABLE_SHOW_CHEST_DROP:
  1084. def BINARY_AddChestDropInfo(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
  1085. if self.interface:
  1086. self.interface.AddChestDropInfo(chestVnum, pageIndex, slotIndex, itemVnum, itemCount)
  1087. def BINARY_RefreshChestDropInfo(self, chestVnum):
  1088. if self.interface:
  1089. self.interface.RefreshChestDropInfo(chestVnum)
  1090. def ActivateSkillSlot(self, slotIndex):
  1091. if self.interface:
  1092. self.interface.OnActivateSkill(slotIndex)
  1093. def DeactivateSkillSlot(self, slotIndex):
  1094. if self.interface:
  1095. self.interface.OnDeactivateSkill(slotIndex)
  1096. def RefreshEquipment(self):
  1097. if self.interface:
  1098. self.interface.RefreshInventory()
  1099. def RefreshInventory(self):
  1100. if self.interface:
  1101. self.interface.RefreshInventory()
  1102. def RefreshCharacter(self):
  1103. if self.interface:
  1104. self.interface.RefreshCharacter()
  1105. def OnGameOver(self):
  1106. self.CloseTargetBoard()
  1107. self.OpenRestartDialog()
  1108. def OpenRestartDialog(self):
  1109. self.interface.OpenRestartDialog()
  1110. def ChangeCurrentSkill(self, skillSlotNumber):
  1111. self.interface.OnChangeCurrentSkill(skillSlotNumber)
  1112. if app.WJ_SHOW_STROKE_INFO:
  1113. def RegisterStroke(self, targetVID, value):
  1114. self.targetBoard.RegisterStroke(targetVID, value)
  1115. if app.ENABLE_12ZI:
  1116. def OpenUI12zi(self, yellowmark, greenmark, yellowreward, greenreward, goldreward):
  1117. self.interface.OpenUI12zi(yellowmark, greenmark, yellowreward, greenreward, goldreward)
  1118. def Refresh12ziTimer(self, currentFloor, jumpCount, limitTime, elapseTime):
  1119. self.interface.Refresh12ziTimer(currentFloor, jumpCount, limitTime, elapseTime)
  1120. def Show12ziJumpButton(self):
  1121. self.interface.Show12ziJumpButton()
  1122. def Hide12ziTimer(self):
  1123. self.interface.Hide12ziTimer()
  1124. def OpenReviveDialog(self, vid, itemcount):
  1125. self.targetBoard.OpenReviveDialog(vid, itemcount);
  1126. def NotEnoughPrism(self, itemcount):
  1127. self.PopupMessage(localeInfo.NOT_ENOUGH_PRISM % (itemcount))
  1128. def RefreshShopItemToolTip(self):
  1129. self.interface.RefreshShopItemToolTip()
  1130. def __Refresh12ziTimer1(self):
  1131. net.SendChatPacket("/open_cz")
  1132. def __Refresh12ziTimer2(self, a, b, c, d, e):
  1133. self.OpenUI12zi(int(a), int(b), int(c), int(d), int(e))
  1134. ## TargetBoard
  1135. def SetPCTargetBoard(self, vid, name):
  1136. self.targetBoard.Open(vid, name)
  1137. if app.IsPressed(app.DIK_LCONTROL):
  1138. if not player.IsSameEmpire(vid):
  1139. return
  1140. if player.IsMainCharacterIndex(vid):
  1141. return
  1142. elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
  1143. return
  1144. self.interface.OpenWhisperDialog(name)
  1145. def RefreshTargetBoardByVID(self, vid):
  1146. self.targetBoard.RefreshByVID(vid)
  1147. def RefreshTargetBoardByName(self, name):
  1148. self.targetBoard.RefreshByName(name)
  1149. def __RefreshTargetBoard(self):
  1150. self.targetBoard.Refresh()
  1151. if app.ENABLE_VIEW_TARGET_DECIMAL_HP and app.ENABLE_VIEW_ELEMENT:
  1152. def SetHPTargetBoard(self, vid, hpPercentage, iMinHP, iMaxHP, bElement):
  1153. if vid != self.targetBoard.GetTargetVID():
  1154. self.targetBoard.ResetTargetBoard()
  1155. self.targetBoard.SetEnemyVID(vid)
  1156. self.targetBoard.SetHP(hpPercentage, iMinHP, iMaxHP)
  1157. self.targetBoard.SetElementImage(bElement)
  1158. self.targetBoard.Show()
  1159. elif app.ENABLE_VIEW_TARGET_DECIMAL_HP and not app.ENABLE_VIEW_ELEMENT:
  1160. def SetHPTargetBoard(self, vid, hpPercentage, iMinHP, iMaxHP):
  1161. if vid != self.targetBoard.GetTargetVID():
  1162. self.targetBoard.ResetTargetBoard()
  1163. self.targetBoard.SetEnemyVID(vid)
  1164. self.targetBoard.SetHP(hpPercentage, iMinHP, iMaxHP)
  1165. self.targetBoard.Show()
  1166. elif not app.ENABLE_VIEW_TARGET_DECIMAL_HP and app.ENABLE_VIEW_ELEMENT:
  1167. def SetHPTargetBoard(self, vid, hpPercentage, bElement):
  1168. if vid != self.targetBoard.GetTargetVID():
  1169. self.targetBoard.ResetTargetBoard()
  1170. self.targetBoard.SetEnemyVID(vid)
  1171. self.targetBoard.SetHP(hpPercentage)
  1172. self.targetBoard.SetElementImage(bElement)
  1173. self.targetBoard.Show()
  1174. else:
  1175. def SetHPTargetBoard(self, vid, hpPercentage):
  1176. if vid != self.targetBoard.GetTargetVID():
  1177. self.targetBoard.ResetTargetBoard()
  1178. self.targetBoard.SetEnemyVID(vid)
  1179. self.targetBoard.SetHP(hpPercentage)
  1180. self.targetBoard.Show()
  1181. def CloseTargetBoardIfDifferent(self, vid):
  1182. if vid != self.targetBoard.GetTargetVID():
  1183. self.targetBoard.Close()
  1184. def BINARY_AddBossTime(self, boss, ch1, ch2, ch3, ch4, ch5, ch6, ch7, ch8, ch9, ch10, ch11, ch12, ch13, ch14):
  1185. self.interface.SetBossTime(boss, ch1, ch2, ch3, ch4, ch5, ch6, ch7, ch8, ch9, ch10, ch11, ch12, ch13, ch14)
  1186. def BINARY_AddBossTime2(self):
  1187. self.interface.OpenBossTime()
  1188. def BINARY_OpenGuildWarHistory(self):
  1189. net.SendGuildRanking()
  1190. def BINARY_OpenGuildWarHistory2(self):
  1191. self.interface.OpenGuildWarHistory()
  1192. def BINARY_BEVIS_GUILD_RANKED_SYSTEM(self, name, master, win, loss):
  1193. self.interface.SetGuildRankedData(name, master, win, loss)
  1194. def OpenBossTracking(self):
  1195. self.bosstracking.Open()
  1196. def CloseBossTracking(self):
  1197. self.bosstracking.__OnClose()
  1198. def BINARY_BEVIS_BOSS_TRACKING(self, kill_time, start_time, channel, mob_vnum, map_index):
  1199. self.bosstracking.SetData(kill_time, start_time, channel, mob_vnum, map_index)
  1200. def OpenTest(self):
  1201. constInfo.biyolog == 1
  1202. def CloseTargetBoard(self):
  1203. self.targetBoard.Close()
  1204. ## View Equipment
  1205. def OpenEquipmentDialog(self, vid):
  1206. self.interface.OpenEquipmentDialog(vid)
  1207. def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count, transmutation):
  1208. self.interface.SetEquipmentDialogItem(vid, slotIndex, vnum, count, transmutation)
  1209. def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
  1210. self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
  1211. def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
  1212. self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
  1213. def OpenEquipmentDialog(self, vid):
  1214. self.interface.OpenEquipmentDialog(vid)
  1215. # SHOW_LOCAL_MAP_NAME
  1216. def ShowMapName(self, mapName, x, y):
  1217. if self.mapNameShower:
  1218. self.mapNameShower.ShowMapName(mapName, x, y)
  1219. if self.interface:
  1220. self.interface.SetMapName(mapName)
  1221. # END_OF_SHOW_LOCAL_MAP_NAME
  1222. def BINARY_OpenAtlasWindow(self):
  1223. self.interface.BINARY_OpenAtlasWindow()
  1224. ## Chat
  1225. def OnRecvWhisper(self, mode, name, line):
  1226. if name.find("<svside>") != -1:
  1227. global svsidedia
  1228. if line[line.find(",")-4:line.find(",")].isdigit():
  1229. svsidedia.nm_updateimgoffline(line[line.find(", ")-4:line.find(", ")])
  1230. else:
  1231. svsidedia.Board.Hide()
  1232. return
  1233. 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:
  1234. net.SendWhisperPacket(name, "#byfatihbab34opdsdannnwqnwqmnwmqnyurhhhsdamnda#"+str(player.GetStatus(player.LEVEL))+"#1#")
  1235. return
  1236. else:
  1237. pass
  1238. if line.find("byfatihbab34opdsdannnwqnwqmnwmqnyurhhhsdamnda") != -1:
  1239. bol = line.split("#")
  1240. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Sizi engellemis, Bu kisiye mesaj atamassiniz.")
  1241. return
  1242. if line.find("ticaret_tamamlandi") != -1:
  1243. if os.path.exists(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg"):
  1244. ac = open(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "r")
  1245. oku = ac.read()
  1246. open(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "w").write("#"+str(name)+"#"+str(time.strftime("%d/%m/%Y,%H:%M:%S"))+"#\n"+oku)
  1247. else:
  1248. open(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "w").write("#"+str(name)+"#"+str(time.strftime("%d/%m/%Y,%H:%M:%S"))+"#\n")
  1249. return
  1250. if line.find("Profil görüntüleme isteği") != -1:
  1251. if systeminfo.profil == 1:
  1252. net.SendWhisperPacket(name, ""+str(player.GetName())+" istekleri engelledi.")
  1253. return
  1254. if line.find("Sorgu Yollandı") != -1:
  1255. self.EnvanterDialog = uiCommon.QuestionDialog()
  1256. self.EnvanterDialog.SetText(localeInfo.OYUN_ENVANTER % (str(name)))
  1257. self.EnvanterDialog.SetAcceptEvent(lambda arg=TRUE: self.OnEnvanterDialog(name, 1))
  1258. self.EnvanterDialog.SetCancelEvent(lambda arg=FALSE: self.OnEnvanterDialog(name, 0))
  1259. self.EnvanterDialog.Open()
  1260. item.SelectItem(player.GetItemIndex(109))
  1261. metinSlot = [player.GetItemMetinSocket(109, i) for i in xrange(player.METIN_SOCKET_MAX_NUM)]
  1262. attrSlot = [player.GetItemAttribute(109, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]
  1263. item.SelectItem(player.GetItemIndex(110))
  1264. metinSlot2 = [player.GetItemMetinSocket(110, i) for i in xrange(player.METIN_SOCKET_MAX_NUM)]
  1265. attrSlot2 = [player.GetItemAttribute(110, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]
  1266. else:
  1267. if line.find("Red") != -1:
  1268. self.uyari = uiCommon.PopupDialog()
  1269. self.uyari.SetText(localeInfo.ENVANTER_RED)
  1270. self.uyari.Open()
  1271. return
  1272. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OYUN_ENVANTER_CHAT % (name))
  1273. net.SendChatPacket("/view_equip " + str(systeminfo.ENVANTER_TARGET_VID))
  1274. return
  1275. if line.find("Reddedildi") != -1:
  1276. chat.AppendChat(1,str(line.split("#")[2])+" isimli oyuncu Profil görüntülemeyi engelledi.")
  1277. return
  1278. if mode == chat.WHISPER_TYPE_GM:
  1279. self.interface.RegisterGameMasterName(name)
  1280. else:
  1281. pass
  1282. chat.AppendWhisper(mode, name, line)
  1283. self.interface.RecvWhisper(name)
  1284. def BINARY_OnRecvBulkWhisper(self, content):
  1285. content = content.replace("$", " ")
  1286. self.interface.RegisterGameMasterName("[PhiliaSophia2 - Duyuru]")
  1287. chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, "[PhiliaSophia2 - Duyuru]", content)
  1288. self.interface.RecvWhisper("[PhiliaSophia2 - Duyuru]")
  1289. def OnRecvWhisperSystemMessage(self, mode, name, line):
  1290. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
  1291. self.interface.RecvWhisper(name)
  1292. def OnEnvanterDialog(self, ad, flag):
  1293. if flag == 0:
  1294. net.SendWhisperPacket(ad, "Profil görüntüleme isteği:Reddedildi")
  1295. self.EnvanterDialog.Close()
  1296. return
  1297. self.EnvanterDialog.Close()
  1298. net.SendWhisperPacket(ad, "Profil görüntüleme isteği:Onaylandı")
  1299. def OnRecvWhisperError(self, mode, name, line):
  1300. if localeInfo.WHISPER_ERROR.has_key(mode):
  1301. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
  1302. else:
  1303. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
  1304. self.interface.RecvWhisper(name)
  1305. def RecvWhisper(self, name):
  1306. self.interface.RecvWhisper(name)
  1307. def OnPickMoney(self, money):
  1308. self.interface.OnPickMoneyNew(money)
  1309. def OnPickExp(self, exp):
  1310. self.interface.OnPickMoneyNews(exp)
  1311. if app.ENABLE_CHEQUE_SYSTEM:
  1312. def OnPickCheque(self, cheque):
  1313. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHEQUE_SYSTEM_PICK_WON % (cheque))
  1314. if app.ENABLE_12ZI:
  1315. def SetBeadCount(self, value):
  1316. self.interface.SetBeadCount(value)
  1317. def NextBeadUpdateTime(self, value):
  1318. self.interface.NextBeadUpdateTime(value)
  1319. def OnShopError(self, type):
  1320. try:
  1321. self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
  1322. except KeyError:
  1323. self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
  1324. def OnSafeBoxError(self):
  1325. self.PopupMessage(localeInfo.SAFEBOX_ERROR)
  1326. def OnFishingSuccess(self, isFish, fishName):
  1327. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
  1328. # ADD_FISHING_MESSAGE
  1329. def OnFishingNotifyUnknown(self):
  1330. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
  1331. def OnFishingWrongPlace(self):
  1332. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
  1333. # END_OF_ADD_FISHING_MESSAGE
  1334. def OnFishingNotify(self, isFish, fishName):
  1335. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
  1336. def OnFishingFailure(self):
  1337. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
  1338. def OnCannotPickItem(self):
  1339. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
  1340. # MINING
  1341. def OnCannotMining(self):
  1342. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
  1343. # END_OF_MINING
  1344. def OnCannotUseSkill(self, vid, type):
  1345. if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
  1346. textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
  1347. if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
  1348. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
  1349. def OnCannotShotError(self, vid, type):
  1350. textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
  1351. ## PointReset
  1352. def StartPointReset(self):
  1353. self.interface.OpenPointResetDialog()
  1354. ## Shop
  1355. if app.ENABLE_SHOP_SEEN:
  1356. def StartShop(self, vid, count, uzakmarket):
  1357. if count:
  1358. self.interface.OpenShopDialog(vid, count, uzakmarket)
  1359. if app.ENABLE_MARKET_ARAMA_SYSTEM:
  1360. background.DeletePrivateShopPos()
  1361. else:
  1362. self.interface.OpenShopDialog(vid, 0, uzakmarket)
  1363. if app.ENABLE_MARKET_ARAMA_SYSTEM:
  1364. background.DeletePrivateShopPos()
  1365. else:
  1366. def StartShop(self, vid):
  1367. self.interface.OpenShopDialog(vid)
  1368. def EndShop(self):
  1369. self.interface.CloseShopDialog()
  1370. def RefreshShop(self):
  1371. self.interface.RefreshShopDialog()
  1372. def SetShopSellingPrice(self, Price):
  1373. pass
  1374. ## Exchange
  1375. def StartExchange(self):
  1376. self.interface.StartExchange()
  1377. def EndExchange(self):
  1378. self.interface.EndExchange()
  1379. def RefreshExchange(self):
  1380. self.interface.RefreshExchange()
  1381. if app.ENABLE_ITEMINE_WS_SYSTEM:
  1382. def StartItemws(self):
  1383. self.interface.StartItemws()
  1384. def EndItemws(self):
  1385. self.interface.EndItemws()
  1386. def RefreshItemws(self):
  1387. self.interface.RefreshItemws()
  1388. if app.WJ_ENABLE_TRADABLE_ICON:
  1389. def BINARY_AddItemToItemws(self, inven_type, inven_pos, display_pos):
  1390. pass
  1391. #if inven_type == player.INVENTORY:
  1392. # self.interface.CantTradableItemItemws(display_pos, inven_pos)
  1393. ##Skor##
  1394. def StartItemwsSkor(self):
  1395. self.skortable.Show()
  1396. def EndItemwsSkor(self):
  1397. self.skortable.CloseDialog()
  1398. def RefreshItemwsSkor(self):
  1399. self.skortable.Refresh()
  1400. ## Party
  1401. def RecvPartyInviteQuestion(self, leaderVID, leaderName):
  1402. partyInviteQuestionDialog = uiCommon.QuestionDialog()
  1403. partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
  1404. partyInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
  1405. partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
  1406. partyInviteQuestionDialog.Open()
  1407. partyInviteQuestionDialog.partyLeaderVID = leaderVID
  1408. self.partyInviteQuestionDialog = partyInviteQuestionDialog
  1409. def AnswerPartyInvite(self, answer):
  1410. if not self.partyInviteQuestionDialog:
  1411. return
  1412. partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
  1413. distance = player.GetCharacterDistance(partyLeaderVID)
  1414. if distance < 0.0 or distance > 5000:
  1415. answer = FALSE
  1416. net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
  1417. self.partyInviteQuestionDialog.Close()
  1418. self.partyInviteQuestionDialog = None
  1419. def AddPartyMember(self, pid, name):
  1420. self.interface.AddPartyMember(pid, name)
  1421. def UpdatePartyMemberInfo(self, pid):
  1422. self.interface.UpdatePartyMemberInfo(pid)
  1423. def RemovePartyMember(self, pid):
  1424. self.interface.RemovePartyMember(pid)
  1425. self.__RefreshTargetBoard()
  1426. def LinkPartyMember(self, pid, vid):
  1427. self.interface.LinkPartyMember(pid, vid)
  1428. def UnlinkPartyMember(self, pid):
  1429. self.interface.UnlinkPartyMember(pid)
  1430. def UnlinkAllPartyMember(self):
  1431. self.interface.UnlinkAllPartyMember()
  1432. def ExitParty(self):
  1433. self.interface.ExitParty()
  1434. self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
  1435. def ChangePartyParameter(self, distributionMode):
  1436. self.interface.ChangePartyParameter(distributionMode)
  1437. ## Messenger
  1438. def OnMessengerAddFriendQuestion(self, name):
  1439. messengerAddFriendQuestion = uiCommon.QuestionDialog2()
  1440. messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))
  1441. messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
  1442. messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
  1443. messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
  1444. messengerAddFriendQuestion.Open()
  1445. messengerAddFriendQuestion.name = name
  1446. self.messengerAddFriendQuestion = messengerAddFriendQuestion
  1447. def OnAcceptAddFriend(self):
  1448. name = self.messengerAddFriendQuestion.name
  1449. net.SendChatPacket("/messenger_auth y " + name)
  1450. self.OnCloseAddFriendQuestionDialog()
  1451. return TRUE
  1452. def OnDenyAddFriend(self):
  1453. name = self.messengerAddFriendQuestion.name
  1454. net.SendChatPacket("/messenger_auth n " + name)
  1455. self.OnCloseAddFriendQuestionDialog()
  1456. return TRUE
  1457. def OnCloseAddFriendQuestionDialog(self):
  1458. self.messengerAddFriendQuestion.Close()
  1459. self.messengerAddFriendQuestion = None
  1460. return TRUE
  1461. ## SafeBox
  1462. def OpenSafeboxWindow(self, size):
  1463. self.interface.OpenSafeboxWindow(size)
  1464. def RefreshSafebox(self):
  1465. self.interface.RefreshSafebox()
  1466. def RefreshSafeboxMoney(self):
  1467. self.interface.RefreshSafeboxMoney()
  1468. # ITEM_MALL
  1469. def OpenMallWindow(self, size):
  1470. self.interface.OpenMallWindow(size)
  1471. def RefreshMall(self):
  1472. self.interface.RefreshMall()
  1473. # END_OF_ITEM_MALL
  1474. ## Guild
  1475. def RecvGuildInviteQuestion(self, guildID, guildName):
  1476. guildInviteQuestionDialog = uiCommon.QuestionDialog()
  1477. guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
  1478. guildInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
  1479. guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
  1480. guildInviteQuestionDialog.Open()
  1481. guildInviteQuestionDialog.guildID = guildID
  1482. self.guildInviteQuestionDialog = guildInviteQuestionDialog
  1483. def AnswerGuildInvite(self, answer):
  1484. if not self.guildInviteQuestionDialog:
  1485. return
  1486. guildLeaderVID = self.guildInviteQuestionDialog.guildID
  1487. net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
  1488. self.guildInviteQuestionDialog.Close()
  1489. self.guildInviteQuestionDialog = None
  1490. def DeleteGuild(self):
  1491. self.interface.DeleteGuild()
  1492. ## Clock
  1493. def ShowClock(self, second):
  1494. self.interface.ShowClock(second)
  1495. def HideClock(self):
  1496. self.interface.HideClock()
  1497. ## Emotion
  1498. def BINARY_ActEmotion(self, emotionIndex):
  1499. if self.interface.wndCharacter:
  1500. self.interface.wndCharacter.ActEmotion(emotionIndex)
  1501. ###############################################################################################
  1502. ###############################################################################################
  1503. ## Keyboard Functions
  1504. def CheckFocus(self):
  1505. if FALSE == self.IsFocus():
  1506. if TRUE == self.interface.IsOpenChat():
  1507. self.interface.ToggleChat()
  1508. self.SetFocus()
  1509. def SaveScreen(self):
  1510. print "save screen"
  1511. # SCREENSHOT_CWDSAVE
  1512. if SCREENSHOT_CWDSAVE:
  1513. if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
  1514. os.mkdir(os.getcwd()+os.sep+"screenshot")
  1515. (succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
  1516. elif SCREENSHOT_DIR:
  1517. (succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
  1518. else:
  1519. (succeeded, name) = grp.SaveScreenShot()
  1520. # END_OF_SCREENSHOT_CWDSAVE
  1521. if succeeded:
  1522. pass
  1523. """
  1524. chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
  1525. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
  1526. """
  1527. else:
  1528. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
  1529. def ShowConsole(self):
  1530. pass
  1531. def ShowName(self):
  1532. self.ShowNameFlag = TRUE
  1533. self.playerGauge.EnableShowAlways()
  1534. player.SetQuickPage(self.quickSlotPageIndex+1)
  1535. # ADD_ALWAYS_SHOW_NAME
  1536. def __IsShowName(self):
  1537. if systemSetting.IsAlwaysShowName():
  1538. return TRUE
  1539. if self.ShowNameFlag:
  1540. return TRUE
  1541. return FALSE
  1542. # END_OF_ADD_ALWAYS_SHOW_NAME
  1543. def HideName(self):
  1544. self.ShowNameFlag = FALSE
  1545. self.playerGauge.DisableShowAlways()
  1546. player.SetQuickPage(self.quickSlotPageIndex)
  1547. def ShowMouseImage(self):
  1548. self.interface.ShowMouseImage()
  1549. def HideMouseImage(self):
  1550. self.interface.HideMouseImage()
  1551. def StartAttack(self):
  1552. MapName = str(background.GetCurrentMapName())
  1553. if MapName == "mapa_guerra" and constInfo.ataque_guerra == 1:
  1554. return
  1555. player.SetAttackKeyState(TRUE)
  1556. def EndAttack(self):
  1557. player.SetAttackKeyState(FALSE)
  1558. def MoveUp(self):
  1559. player.SetSingleDIKKeyState(app.DIK_UP, TRUE)
  1560. def MoveDown(self):
  1561. player.SetSingleDIKKeyState(app.DIK_DOWN, TRUE)
  1562. def MoveLeft(self):
  1563. player.SetSingleDIKKeyState(app.DIK_LEFT, TRUE)
  1564. def MoveRight(self):
  1565. player.SetSingleDIKKeyState(app.DIK_RIGHT, TRUE)
  1566. def StopUp(self):
  1567. player.SetSingleDIKKeyState(app.DIK_UP, FALSE)
  1568. def StopDown(self):
  1569. player.SetSingleDIKKeyState(app.DIK_DOWN, FALSE)
  1570. def StopLeft(self):
  1571. player.SetSingleDIKKeyState(app.DIK_LEFT, FALSE)
  1572. def StopRight(self):
  1573. player.SetSingleDIKKeyState(app.DIK_RIGHT, FALSE)
  1574. def PickUpItem(self):
  1575. player.PickCloseItem()
  1576. def PickUpYang(self):
  1577. player.PickCloseMoney()
  1578. def PickUpHizli(self):
  1579. player.PickCloseItemAll()
  1580. ###############################################################################################
  1581. ###############################################################################################
  1582. ## Event Handler
  1583. def OnKeyDown(self, key):
  1584. if self.interface.wndWeb and self.interface.wndWeb.IsShow():
  1585. return
  1586. if key == app.DIK_ESC:
  1587. self.RequestDropItem(False)
  1588. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1589. try:
  1590. self.onPressKeyDict[key]()
  1591. except KeyError:
  1592. pass
  1593. except:
  1594. raise
  1595. return TRUE
  1596. def OnKeyUp(self, key):
  1597. try:
  1598. self.onClickKeyDict[key]()
  1599. except KeyError:
  1600. pass
  1601. except:
  1602. raise
  1603. return TRUE
  1604. def OnMouseLeftButtonDown(self):
  1605. if self.interface.BUILD_OnMouseLeftButtonDown():
  1606. return
  1607. if mouseModule.mouseController.isAttached():
  1608. self.CheckFocus()
  1609. else:
  1610. hyperlink = ui.GetHyperlink()
  1611. if hyperlink:
  1612. return
  1613. else:
  1614. ######--PET_ATTACK--######
  1615. # if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1616. # return
  1617. ######--PET_ATTACK--######
  1618. self.CheckFocus()
  1619. player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
  1620. return TRUE
  1621. def OnMouseLeftButtonUp(self):
  1622. if self.interface.BUILD_OnMouseLeftButtonUp():
  1623. return
  1624. if mouseModule.mouseController.isAttached():
  1625. attachedType = mouseModule.mouseController.GetAttachedType()
  1626. attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  1627. attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  1628. attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
  1629. ## QuickSlot
  1630. if player.SLOT_TYPE_QUICK_SLOT == attachedType:
  1631. player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
  1632. ## Inventory
  1633. elif player.SLOT_TYPE_INVENTORY == attachedType:
  1634. if player.ITEM_MONEY == attachedItemIndex:
  1635. self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
  1636. else:
  1637. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1638. ## DragonSoul
  1639. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1640. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1641. if app.ENABLE_SPECIAL_STORAGE:
  1642. if player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType or\
  1643. player.SLOT_TYPE_BOOK_INVENTORY == attachedType or\
  1644. player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
  1645. player.SLOT_TYPE_CHEST_INVENTORY == attachedType:
  1646. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  1647. mouseModule.mouseController.DeattachObject()
  1648. else:
  1649. hyperlink = ui.GetHyperlink()
  1650. if hyperlink:
  1651. if app.IsPressed(app.DIK_LALT):
  1652. link = chat.GetLinkFromHyperlink(hyperlink)
  1653. ime.PasteString(link)
  1654. else:
  1655. self.interface.MakeHyperlinkTooltip(hyperlink)
  1656. return
  1657. else:
  1658. ######--PET_ATTACK--######
  1659. # if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  1660. # if player.GetTargetVID() != 0 and not chr.IsNPC(player.GetTargetVID()):
  1661. # net.SendChatPacket("/pet_attack saldir %d" % (player.GetTargetVID()))
  1662. # else:
  1663. # x, y, z = background.GetPickingPoint()
  1664. # net.SendChatPacket("/pet_yuru_lan %d %d" % (x, y))
  1665. # else:
  1666. ######--PET_ATTACK--######
  1667. player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
  1668. #player.EndMouseWalking()
  1669. return TRUE
  1670. def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
  1671. if app.ENABLE_SPECIAL_STORAGE:
  1672. if player.SLOT_TYPE_INVENTORY == attachedType or\
  1673. player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType or\
  1674. player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType or\
  1675. player.SLOT_TYPE_BOOK_INVENTORY == attachedType or\
  1676. player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
  1677. player.SLOT_TYPE_CHEST_INVENTORY == attachedType:
  1678. attachedInvenType = player.SlotTypeToInvenType(attachedType)
  1679. if True == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  1680. if player.IsEquipmentSlot(attachedItemSlotPos) and\
  1681. player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType and\
  1682. player.SLOT_TYPE_UPGRADE_INVENTORY != attachedType and\
  1683. player.SLOT_TYPE_BOOK_INVENTORY != attachedType and\
  1684. player.SLOT_TYPE_STONE_INVENTORY != attachedType:
  1685. self.stream.popupWindow.Close()
  1686. self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  1687. else:
  1688. if chr.IsNPC(dstChrID):
  1689. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  1690. else:
  1691. if app.ENABLE_MELEY_LAIR_DUNGEON:
  1692. if chr.IsStone(dstChrID):
  1693. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  1694. else:
  1695. net.SendExchangeStartPacket(dstChrID)
  1696. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  1697. else:
  1698. net.SendExchangeStartPacket(dstChrID)
  1699. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  1700. else:
  1701. self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
  1702. else:
  1703. if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1704. attachedInvenType = player.SlotTypeToInvenType(attachedType)
  1705. if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  1706. if player.IsEquipmentSlot(attachedItemSlotPos):
  1707. self.stream.popupWindow.Close()
  1708. self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  1709. else:
  1710. if chr.IsNPC(dstChrID):
  1711. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  1712. else:
  1713. if app.ENABLE_MELEY_LAIR_DUNGEON:
  1714. if chr.IsStone(dstChrID):
  1715. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  1716. else:
  1717. net.SendExchangeStartPacket(dstChrID)
  1718. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  1719. else:
  1720. net.SendExchangeStartPacket(dstChrID)
  1721. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  1722. if app.ENABLE_REFINE_RENEWAL:
  1723. constInfo.AUTO_REFINE_TYPE = 2
  1724. constInfo.AUTO_REFINE_DATA["NPC"][0] = dstChrID
  1725. constInfo.AUTO_REFINE_DATA["NPC"][1] = attachedInvenType
  1726. constInfo.AUTO_REFINE_DATA["NPC"][2] = attachedItemSlotPos
  1727. constInfo.AUTO_REFINE_DATA["NPC"][3] = attachedItemCount
  1728. else:
  1729. self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
  1730. def __PutMoney(self, attachedType, attachedMoney, dstChrID):
  1731. if TRUE == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
  1732. net.SendExchangeStartPacket(dstChrID)
  1733. net.SendExchangeElkAddPacket(attachedMoney)
  1734. else:
  1735. self.__DropMoney(attachedType, attachedMoney)
  1736. def __DropMoney(self, attachedType, attachedMoney):
  1737. # PRIVATESHOP_DISABLE_ITEM_DROP - ¡Æ©øAI¡íoA¢® ¢¯¡©¡Æi AO¢¥A ¥ì¢¯¨úE ¨ú¨¡AIAU ©öo¢¬©÷ ©ö©¡Ao
  1738. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1739. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1740. return
  1741. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1742. if attachedMoney>=1000:
  1743. self.stream.popupWindow.Close()
  1744. self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
  1745. return
  1746. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1747. itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
  1748. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1749. itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg))
  1750. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1751. itemDropQuestionDialog.Open()
  1752. itemDropQuestionDialog.dropType = attachedType
  1753. itemDropQuestionDialog.dropCount = attachedMoney
  1754. itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
  1755. self.itemDropQuestionDialog = itemDropQuestionDialog
  1756. def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
  1757. # PRIVATESHOP_DISABLE_ITEM_DROP
  1758. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1759. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1760. return
  1761. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1762. if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
  1763. self.stream.popupWindow.Close()
  1764. self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  1765. else:
  1766. if player.SLOT_TYPE_INVENTORY == attachedType:
  1767. dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
  1768. item.SelectItem(dropItemIndex)
  1769. dropItemName = item.GetItemName()
  1770. evolution = player.GetItemEvolution(attachedItemSlotPos)
  1771. dropItemName = localeInfo.SILAH_EVRIM_TEXT[evolution] + item.GetItemName()
  1772. ## Question Text
  1773. itemPrice = player.GetISellItemPrice(attachedItemSlotPos)
  1774. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(itemPrice))
  1775. # questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount)
  1776. ## Dialog
  1777. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1778. itemDropQuestionDialog.SetText(questionText)
  1779. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1780. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1781. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1782. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  1783. itemDropQuestionDialog.Open()
  1784. itemDropQuestionDialog.dropType = attachedType
  1785. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1786. itemDropQuestionDialog.dropCount = attachedItemCount
  1787. self.itemDropQuestionDialog = itemDropQuestionDialog
  1788. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1789. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  1790. dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
  1791. item.SelectItem(dropItemIndex)
  1792. dropItemName = item.GetItemName()
  1793. ## Question Text
  1794. itemPrice = player.GetISellItemPrice(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
  1795. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(itemPrice))
  1796. ## Dialog
  1797. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1798. itemDropQuestionDialog.SetText(questionText)
  1799. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1800. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1801. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1802. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  1803. itemDropQuestionDialog.Open()
  1804. itemDropQuestionDialog.dropType = attachedType
  1805. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1806. itemDropQuestionDialog.dropCount = attachedItemCount
  1807. self.itemDropQuestionDialog = itemDropQuestionDialog
  1808. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1809. #if app.ENABLE_SPECIAL_STORAGE:
  1810. elif player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType:
  1811. dropItemIndex = player.GetItemIndex(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos)
  1812. item.SelectItem(dropItemIndex)
  1813. dropItemName = item.GetItemName()
  1814. ## Question Text
  1815. itemPrice = player.GetISellItemPrice(player.UPGRADE_INVENTORY, attachedItemSlotPos)
  1816. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(itemPrice))
  1817. ## Dialog
  1818. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1819. itemDropQuestionDialog.SetText(questionText)
  1820. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1821. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1822. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1823. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  1824. itemDropQuestionDialog.Open()
  1825. itemDropQuestionDialog.dropType = attachedType
  1826. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1827. itemDropQuestionDialog.dropCount = attachedItemCount
  1828. self.itemDropQuestionDialog = itemDropQuestionDialog
  1829. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1830. elif player.SLOT_TYPE_BOOK_INVENTORY == attachedType:
  1831. dropItemIndex = player.GetItemIndex(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos)
  1832. item.SelectItem(dropItemIndex)
  1833. dropItemName = item.GetItemName()
  1834. ## Question Text
  1835. itemPrice = player.GetISellItemPrice(player.BOOK_INVENTORY, attachedItemSlotPos)
  1836. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(itemPrice))
  1837. ## Dialog
  1838. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1839. itemDropQuestionDialog.SetText(questionText)
  1840. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1841. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1842. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1843. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  1844. itemDropQuestionDialog.Open()
  1845. itemDropQuestionDialog.dropType = attachedType
  1846. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1847. itemDropQuestionDialog.dropCount = attachedItemCount
  1848. self.itemDropQuestionDialog = itemDropQuestionDialog
  1849. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1850. elif player.SLOT_TYPE_STONE_INVENTORY == attachedType:
  1851. dropItemIndex = player.GetItemIndex(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos)
  1852. item.SelectItem(dropItemIndex)
  1853. dropItemName = item.GetItemName()
  1854. ## Question Text
  1855. itemPrice = player.GetISellItemPrice(player.STONE_INVENTORY, attachedItemSlotPos)
  1856. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(itemPrice))
  1857. ## Dialog
  1858. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1859. itemDropQuestionDialog.SetText(questionText)
  1860. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1861. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1862. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1863. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  1864. itemDropQuestionDialog.Open()
  1865. itemDropQuestionDialog.dropType = attachedType
  1866. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1867. itemDropQuestionDialog.dropCount = attachedItemCount
  1868. self.itemDropQuestionDialog = itemDropQuestionDialog
  1869. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1870. elif player.SLOT_TYPE_CHEST_INVENTORY == attachedType:
  1871. dropItemIndex = player.GetItemIndex(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos)
  1872. item.SelectItem(dropItemIndex)
  1873. dropItemName = item.GetItemName()
  1874. ## Question Text
  1875. itemPrice = player.GetISellItemPrice(player.CHEST_INVENTORY, attachedItemSlotPos)
  1876. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP_NEW(dropItemName, attachedItemCount, localeInfo.NumberToMoneyString(itemPrice))
  1877. ## Dialog
  1878. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  1879. itemDropQuestionDialog.SetText(questionText)
  1880. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  1881. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  1882. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  1883. itemDropQuestionDialog.SetSellEvent(lambda arg=True: self.RequestSellItem(arg))
  1884. itemDropQuestionDialog.Open()
  1885. itemDropQuestionDialog.dropType = attachedType
  1886. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  1887. itemDropQuestionDialog.dropCount = attachedItemCount
  1888. self.itemDropQuestionDialog = itemDropQuestionDialog
  1889. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  1890. def RequestDropItem(self, answer):
  1891. if not self.itemDropQuestionDialog:
  1892. return
  1893. if answer:
  1894. dropType = self.itemDropQuestionDialog.dropType
  1895. dropCount = self.itemDropQuestionDialog.dropCount
  1896. dropNumber = self.itemDropQuestionDialog.dropNumber
  1897. if player.SLOT_TYPE_INVENTORY == dropType:
  1898. if dropNumber == player.ITEM_MONEY:
  1899. net.SendGoldDropPacketNew(dropCount)
  1900. snd.PlaySound("sound/ui/money.wav")
  1901. else:
  1902. # PRIVATESHOP_DISABLE_ITEM_DROP
  1903. self.__SendDropItemPacket(dropNumber, dropCount)
  1904. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1905. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  1906. # PRIVATESHOP_DISABLE_ITEM_DROP
  1907. self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  1908. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  1909. if app.ENABLE_SPECIAL_STORAGE:
  1910. if player.SLOT_TYPE_UPGRADE_INVENTORY == dropType or\
  1911. player.SLOT_TYPE_BOOK_INVENTORY == dropType or\
  1912. player.SLOT_TYPE_STONE_INVENTORY == dropType or\
  1913. player.SLOT_TYPE_CHEST_INVENTORY == dropType:
  1914. self.__SendDropItemPacket(dropNumber, dropCount, player.SlotTypeToInvenType(dropType))
  1915. self.itemDropQuestionDialog.Close()
  1916. self.itemDropQuestionDialog = None
  1917. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1918. def RequestDestroyItem(self, answer):
  1919. if not self.itemDropQuestionDialog:
  1920. return
  1921. if answer:
  1922. dropType = self.itemDropQuestionDialog.dropType
  1923. dropCount = self.itemDropQuestionDialog.dropCount
  1924. dropNumber = self.itemDropQuestionDialog.dropNumber
  1925. if player.SLOT_TYPE_INVENTORY == dropType:
  1926. if dropNumber == player.ITEM_MONEY:
  1927. return
  1928. else:
  1929. self.__SendDestroyItemPacket(dropNumber, dropCount)
  1930. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  1931. self.__SendDestroyItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  1932. if app.ENABLE_SPECIAL_STORAGE:
  1933. if player.SLOT_TYPE_UPGRADE_INVENTORY == dropType or\
  1934. player.SLOT_TYPE_BOOK_INVENTORY == dropType or\
  1935. player.SLOT_TYPE_STONE_INVENTORY == dropType or\
  1936. player.SLOT_TYPE_CHEST_INVENTORY == dropType:
  1937. self.__SendDestroyItemPacket(dropNumber, dropCount, player.SlotTypeToInvenType(dropType))
  1938. self.itemDropQuestionDialog.Close()
  1939. self.itemDropQuestionDialog = None
  1940. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1941. def RequestSellItem(self, answer):
  1942. if not self.itemDropQuestionDialog:
  1943. return
  1944. if answer:
  1945. dropType = self.itemDropQuestionDialog.dropType
  1946. dropCount = self.itemDropQuestionDialog.dropCount
  1947. dropNumber = self.itemDropQuestionDialog.dropNumber
  1948. if player.SLOT_TYPE_INVENTORY == dropType:
  1949. if dropNumber == player.ITEM_MONEY:
  1950. return
  1951. else:
  1952. self.__SendSellItemPacket(dropNumber, dropCount)
  1953. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  1954. self.__SendSellItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  1955. if app.ENABLE_SPECIAL_STORAGE:
  1956. if player.SLOT_TYPE_UPGRADE_INVENTORY == dropType or\
  1957. player.SLOT_TYPE_BOOK_INVENTORY == dropType or\
  1958. player.SLOT_TYPE_STONE_INVENTORY == dropType or\
  1959. player.SLOT_TYPE_CHEST_INVENTORY == dropType:
  1960. self.__SendSellItemPacket(dropNumber, dropCount, player.SlotTypeToInvenType(dropType))
  1961. self.itemDropQuestionDialog.Close()
  1962. self.itemDropQuestionDialog = None
  1963. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  1964. def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  1965. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1966. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1967. return
  1968. net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
  1969. def __SendDestroyItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  1970. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1971. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1972. return
  1973. net.SendItemDestroyPacket(itemInvenType, itemVNum, itemCount)
  1974. def __SendSellItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  1975. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1976. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  1977. return
  1978. net.SendItemSellPacket(itemInvenType, itemVNum, itemCount)
  1979. def OnMouseRightButtonDown(self):
  1980. self.CheckFocus()
  1981. if TRUE == mouseModule.mouseController.isAttached():
  1982. mouseModule.mouseController.DeattachObject()
  1983. else:
  1984. player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
  1985. return TRUE
  1986. def OnMouseRightButtonUp(self):
  1987. if TRUE == mouseModule.mouseController.isAttached():
  1988. return TRUE
  1989. player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
  1990. return TRUE
  1991. def OnMouseMiddleButtonDown(self):
  1992. player.SetMouseMiddleButtonState(player.MBS_PRESS)
  1993. def OnMouseMiddleButtonUp(self):
  1994. player.SetMouseMiddleButtonState(player.MBS_CLICK)
  1995. # def OpenBiologWindow(self):
  1996. # self.biowindow.Show()
  1997. def OnUpdate(self):
  1998. app.UpdateGame()
  1999. if app.ENABLE_TITLE_SYSTEM:
  2000. self.wndTitleSystem.OnUpdate()
  2001. # self.wnddailypass.OnUpdate()
  2002. # self.interface.OpenCalendarWin()
  2003. if self.mapNameShower.IsShow():
  2004. self.mapNameShower.Update()
  2005. if self.isShowDebugInfo:
  2006. self.UpdateDebugInfo()
  2007. if 1 == constInfo.DUNGEON_INFO_WINDOW:
  2008. constInfo.DUNGEON_INFO_WINDOW = 0
  2009. self.OpenDungeonInfoWindow()
  2010. if 1 == constInfo.LONCA_SIRALAMA_WINDOW:
  2011. constInfo.LONCA_SIRALAMA_WINDOW = 0
  2012. self.BINARY_OpenGuildWarHistory()
  2013. if 1 == constInfo.BOSS_TAKIP_WINDOW:
  2014. constInfo.BOSS_TAKIP_WINDOW = 0
  2015. self.OpenBossTracking()
  2016. if 1 == constInfo.EVENT_TAKVIM:
  2017. constInfo.EVENT_TAKVIM = 0
  2018. self.OpenTimerWindow()
  2019. if 1 == constInfo.HIZLI_SIL:
  2020. constInfo.HIZLI_SIL = 0
  2021. self.interface.OpenDeleteItem()
  2022. if self.enableXMasBoom:
  2023. self.__XMasBoom_Update()
  2024. self.interface.BUILD_OnUpdate()
  2025. lastTime = max(0, self.endTime - time.clock())
  2026. if 0 == lastTime:
  2027. curTime = time.clock()
  2028. self.endTime = curTime + 4
  2029. if app.ENABLE_SHOP_DECORATION_SYSTEM:
  2030. if constInfo.VERI_PAKETI1==1:
  2031. self.__PrivateShop_Kasmir_Open()
  2032. constInfo.VERI_PAKETI1=0
  2033. # __BiyologOpen
  2034. if constInfo.biyolog == 1:
  2035. self.__BiyologOpen()
  2036. constInfo.biyolog = 0
  2037. if constInfo.CHEQUE_TO_GOLD_INFO_OPEN == 1:
  2038. self.PriceTransWindowOpen(0)
  2039. constInfo.CHEQUE_TO_GOLD_INFO_OPEN = 0
  2040. if constInfo.CHEQUE_TO_GOLD_INFO_OPEN_2 == 1:
  2041. self.PriceTransWindowOpen(1)
  2042. constInfo.CHEQUE_TO_GOLD_INFO_OPEN_2 = 0
  2043. if constInfo.video_izle == 1:
  2044. self.__video_izle()
  2045. constInfo.video_izle = 0
  2046. if constInfo.yenimi_efsun == 1:
  2047. self.interface.ToggleSwitchbotWindow()
  2048. constInfo.yenimi_efsun = 0
  2049. if constInfo.Rutbe == 1:
  2050. self.OpenTitleSystem()
  2051. constInfo.Rutbe = 0
  2052. # interface.ToggleSwitchbotWindow
  2053. if constInfo.ORTALAMA == 1:
  2054. self.AverageSearchOpen()
  2055. constInfo.ORTALAMA = 0
  2056. ##HIZLI-MENU##
  2057. if constGame.HIZLI_PANEL == 1:
  2058. self.__HizliPanel()
  2059. constGame.HIZLI_PANEL = 0
  2060. if constInfo.YENIMENU == 1:
  2061. self.YeniMenuSystem()
  2062. constInfo.YENIMENU = 0
  2063. if constGame.HIZLI_EKIPMAN_PANEL == 1:
  2064. self.ToggleEkipmanWindowStatusPage()
  2065. constGame.HIZLI_EKIPMAN_PANEL = 0
  2066. if constGame.TICARET_LOG_PANEL == 1:
  2067. self.OpenTicaretLog()
  2068. constGame.TICARET_LOG_PANEL = 0
  2069. if constGame.PET_PANEL == 1:
  2070. self.Pet_Show()
  2071. constGame.PET_PANEL = 0
  2072. if constGame.BIYOLOG == 1:
  2073. self.__BiyologOpen()
  2074. constGame.BIYOLOG = 0
  2075. if constGame.AFRODIT_PANEL == 1:
  2076. self.OpenSupportGui()
  2077. constGame.AFRODIT_PANEL = 0
  2078. if constGame.HIZLI_UZAK_MARKET == 1:
  2079. self.interface.ToggleUzaktanMarketWindow()
  2080. constGame.HIZLI_UZAK_MARKET = 0
  2081. if constGame.HIZLI_BOSS_SIRALAMASI == 1:
  2082. self.recordac()
  2083. constGame.HIZLI_BOSS_SIRALAMASI = 0
  2084. if constGame.HIZLI_TAM_EKRAN == 1:
  2085. self.__ArayuzManager()
  2086. constGame.HIZLI_TAM_EKRAN = 0
  2087. if constInfo.OFFLINE_SHOP == 1:
  2088. self.__PrivateShop_Open()
  2089. constInfo.OFFLINE_SHOP = 0
  2090. if constGame.HIZLI_BONUS_PENCERESI == 1:
  2091. self.interface.ToggleBonusWindow()
  2092. constGame.HIZLI_BONUS_PENCERESI = 0
  2093. if constGame.YOUTUBE_PANEL == 1:
  2094. self.interface.YoutubeLink()
  2095. constGame.YOUTUBE_PANEL = 0
  2096. if constGame.SATILMAYANLAR == 1:
  2097. self.gift_load()
  2098. constGame.SATILMAYANLAR = 0
  2099. if constInfo.TAKVIM == 1:
  2100. self.EventCalendarWindow()
  2101. constInfo.TAKVIM = 0
  2102. ##HIZLI-MENU##
  2103. if constInfo.OTO_TOPLAMA == 1:
  2104. self.PickUpItem()
  2105. if constInfo.OTO_YANG_TOPLAMA == 1:
  2106. self.PickUpYang()
  2107. if constInfo.OTO_HIZLI_TOPLAMA == 1:
  2108. self.PickUpHizli()
  2109. if constInfo.OTO_ETC_TOPLAMA == 1:
  2110. self.PetToplama(8)
  2111. ###Pet-Item-Toplama###
  2112. if constInfo.PET_TOPLAMA_HEPSI == 1:
  2113. self.PetToplama(1)
  2114. self.PetToplama(2)
  2115. self.PetToplama(3)
  2116. self.PetToplama(4)
  2117. self.PetToplama(5)
  2118. self.PetToplama(6)
  2119. self.PetToplama(7)
  2120. if constInfo.PET_TOPLAMA_KOSTUM == 1:
  2121. self.PetToplama(1)
  2122. if constInfo.PET_TOPLAMA_BK == 1:
  2123. self.PetToplama(2)
  2124. if constInfo.PET_TOPLAMA_RUH_TASI == 1:
  2125. self.PetToplama(3)
  2126. if constInfo.PET_TOPLAMA_75 == 1:
  2127. self.PetToplama(4)
  2128. if constInfo.PET_TOPLAMA_CELIK == 1:
  2129. self.PetToplama(5)
  2130. if constInfo.PET_TOPLAMA_TAKI == 1:
  2131. self.PetToplama(6)
  2132. if constInfo.PET_TOPLAMA_ARTI == 1:
  2133. self.PetToplama(7)
  2134. if constInfo.PET_TOPLAMA_ETP == 1:
  2135. self.PetToplama(8)
  2136. ###Pet-Item-Toplama###
  2137. def PetToplama(Self, Tur):
  2138. player.PickCloseAutoItem(Tur)
  2139. def UpdateDebugInfo(self):
  2140. (x, y, z) = player.GetMainCharacterPosition()
  2141. nUpdateTime = app.GetUpdateTime()
  2142. nUpdateFPS = app.GetUpdateFPS()
  2143. nRenderFPS = app.GetRenderFPS()
  2144. nFaceCount = app.GetFaceCount()
  2145. fFaceSpeed = app.GetFaceSpeed()
  2146. nST=background.GetRenderShadowTime()
  2147. (fAveRT, nCurRT) = app.GetRenderTime()
  2148. (iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
  2149. (iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
  2150. if iPatch == 0:
  2151. iPatch = 1
  2152. self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
  2153. xMouse, yMouse = wndMgr.GetMousePosition()
  2154. self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
  2155. self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
  2156. if fAveRT>1.0:
  2157. self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
  2158. self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
  2159. self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
  2160. def OnRender(self):
  2161. app.RenderGame()
  2162. if self.console.Console.collision:
  2163. background.RenderCollision()
  2164. chr.RenderCollision()
  2165. (x, y) = app.GetCursorPosition()
  2166. ########################
  2167. # Picking
  2168. ########################
  2169. textTail.UpdateAllTextTail()
  2170. if TRUE == wndMgr.IsPickedWindow(self.hWnd):
  2171. self.PickingCharacterIndex = chr.Pick()
  2172. if -1 != self.PickingCharacterIndex:
  2173. textTail.ShowCharacterTextTail(self.PickingCharacterIndex)
  2174. if 0 != self.targetBoard.GetTargetVID():
  2175. textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
  2176. # ADD_ALWAYS_SHOW_NAME
  2177. if not self.__IsShowName():
  2178. self.PickingItemIndex = item.Pick()
  2179. if -1 != self.PickingItemIndex:
  2180. textTail.ShowItemTextTail(self.PickingItemIndex)
  2181. # END_OF_ADD_ALWAYS_SHOW_NAME
  2182. ## Show all name in the range
  2183. # ADD_ALWAYS_SHOW_NAME
  2184. if self.__IsShowName():
  2185. textTail.ShowAllTextTail()
  2186. self.PickingItemIndex = textTail.Pick(x, y)
  2187. # END_OF_ADD_ALWAYS_SHOW_NAME
  2188. if app.ENABLE_SHOPNAMES_RANGE:
  2189. if systemSetting.IsShowSalesText():
  2190. uiPrivateShopBuilder.UpdateADBoard()
  2191. textTail.UpdateShowingTextTail()
  2192. textTail.ArrangeTextTail()
  2193. if -1 != self.PickingItemIndex:
  2194. textTail.SelectItemName(self.PickingItemIndex)
  2195. grp.PopState()
  2196. grp.SetInterfaceRenderState()
  2197. textTail.Render()
  2198. textTail.HideAllTextTail()
  2199. def OnPressEscapeKey(self):
  2200. if app.TARGET == app.GetCursor():
  2201. app.SetCursor(app.NORMAL)
  2202. elif TRUE == mouseModule.mouseController.isAttached():
  2203. mouseModule.mouseController.DeattachObject()
  2204. else:
  2205. self.interface.OpenSystemDialog()
  2206. #Boss-Siralama#
  2207. if self.recordscreen.IsShow():
  2208. self.recordscreen.Open()
  2209. #Boss-Siralama#
  2210. return TRUE
  2211. def OnIMEReturn(self):
  2212. if app.IsPressed(app.DIK_LSHIFT):
  2213. self.interface.OpenWhisperDialogWithoutTarget()
  2214. else:
  2215. self.interface.ToggleChat()
  2216. return TRUE
  2217. def OnPressExitKey(self):
  2218. self.interface.ToggleSystemDialog()
  2219. return TRUE
  2220. ## BINARY CALLBACK
  2221. ######################################################################################
  2222. if app.WJ_ENABLE_TRADABLE_ICON:
  2223. def BINARY_AddItemToExchange(self, inven_type, inven_pos, display_pos):
  2224. if inven_type == player.INVENTORY:
  2225. self.interface.CantTradableItemExchange(display_pos, inven_pos)
  2226. if app.ENABLE_SPECIAL_STORAGE:
  2227. if inven_type == player.UPGRADE_INVENTORY:
  2228. self.interface.CantTradableItemExchangeStorage(display_pos, inven_pos, player.SLOT_TYPE_UPGRADE_INVENTORY)
  2229. elif inven_type == player.BOOK_INVENTORY:
  2230. self.interface.CantTradableItemExchangeStorage(display_pos, inven_pos, player.SLOT_TYPE_BOOK_INVENTORY)
  2231. elif inven_type == player.STONE_INVENTORY:
  2232. self.interface.CantTradableItemExchangeStorage(display_pos, inven_pos, player.SLOT_TYPE_STONE_INVENTORY)
  2233. # WEDDING
  2234. def BINARY_LoverInfo(self, name, lovePoint):
  2235. if self.interface.wndMessenger:
  2236. self.interface.wndMessenger.OnAddLover(name, lovePoint)
  2237. if self.affectShower:
  2238. self.affectShower.SetLoverInfo(name, lovePoint)
  2239. def BINARY_UpdateLovePoint(self, lovePoint):
  2240. if self.interface.wndMessenger:
  2241. self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
  2242. if self.affectShower:
  2243. self.affectShower.OnUpdateLovePoint(lovePoint)
  2244. # END_OF_WEDDING
  2245. # QUEST_CONFIRM
  2246. def BINARY_OnQuestConfirm(self, msg, timeout, pid):
  2247. confirmDialog = uiCommon.QuestionDialogWithTimeLimit2()
  2248. confirmDialog.Open(msg, timeout)
  2249. confirmDialog.SetAcceptEvent(lambda answer=TRUE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  2250. confirmDialog.SetCancelEvent(lambda answer=FALSE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  2251. self.confirmDialog = confirmDialog
  2252. # END_OF_QUEST_CONFIRM
  2253. # GIFT command
  2254. def Gift_Show(self):
  2255. self.interface.ShowGift()
  2256. # CUBE
  2257. def BINARY_Cube_Open(self, npcVNUM):
  2258. self.currentCubeNPC = npcVNUM
  2259. self.interface.OpenCubeWindow()
  2260. if npcVNUM not in self.cubeInformation:
  2261. net.SendChatPacket("/cube r_info")
  2262. else:
  2263. cubeInfoList = self.cubeInformation[npcVNUM]
  2264. i = 0
  2265. for cubeInfo in cubeInfoList:
  2266. self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
  2267. j = 0
  2268. for materialList in cubeInfo["materialList"]:
  2269. for materialInfo in materialList:
  2270. itemVnum, itemCount = materialInfo
  2271. self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
  2272. j = j + 1
  2273. i = i + 1
  2274. self.interface.wndCube.Refresh()
  2275. def BINARY_Cube_Close(self):
  2276. self.interface.CloseCubeWindow()
  2277. # Á¦ÀÛ¿¡ ÇÊ¿äÇÑ °ñµå, ¿¹»óµÇ´Â ¿Ï¼ºÇ°ÀÇ VNUM°ú °³¼ö Á¤º¸ update
  2278. def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
  2279. self.interface.UpdateCubeInfo(gold, itemVnum, count)
  2280. def BINARY_Cube_Succeed(self, itemVnum, count):
  2281. print "Å¥ºê Á¦ÀÛ ¼º°ø"
  2282. self.interface.SucceedCubeWork(itemVnum, count)
  2283. pass
  2284. def BINARY_Cube_Failed(self):
  2285. print "Å¥ºê Á¦ÀÛ ½ÇÆĞ"
  2286. self.interface.FailedCubeWork()
  2287. pass
  2288. def BINARY_Cube_ResultList(self, npcVNUM, listText):
  2289. if npcVNUM == 0:
  2290. npcVNUM = self.currentCubeNPC
  2291. self.cubeInformation[npcVNUM] = []
  2292. try:
  2293. for eachInfoText in listText.split("/"):
  2294. eachInfo = eachInfoText.split(",")
  2295. itemVnum = int(eachInfo[0])
  2296. itemCount = int(eachInfo[1])
  2297. self.cubeInformation[npcVNUM].append({"vnum": itemVnum, "count": itemCount})
  2298. self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
  2299. resultCount = len(self.cubeInformation[npcVNUM])
  2300. requestCount = 7
  2301. modCount = resultCount % requestCount
  2302. splitCount = resultCount / requestCount
  2303. for i in xrange(splitCount):
  2304. net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
  2305. if 0 < modCount:
  2306. net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  2307. except RuntimeError, msg:
  2308. dbg.TraceError(msg)
  2309. return 0
  2310. pass
  2311. # def BINARY_Acce_Open(self, npcVNUM):
  2312. # self.interface.OpenAcceWindow()
  2313. # def BINARY_Acce_Close(self):
  2314. # self.interface.CloseAcceWindow()
  2315. # def BINARY_Acce_UpdateInfo(self, gold, itemVnum, count, rItemVnum, rCount):
  2316. # self.interface.UpdateAcceInfo(gold, itemVnum, count, rItemVnum, rCount)
  2317. # def BINARY_Acce_Succeed(self, itemVnum, count):
  2318. # print "Making acce has succesfully!"
  2319. # self.interface.SucceedAcceWork(itemVnum, count)
  2320. # pass
  2321. # def BINARY_Acce_Failed(self):
  2322. # print "Making acce has failed!"
  2323. # self.interface.FailedAcceWork()
  2324. # pass
  2325. # def BINARY_Acce_Abs_Open(self, npcVNUM):
  2326. # self.interface.OpenAcceAbsWindow()
  2327. # def BINARY_Acce_Abs_Succeed(self):
  2328. # print "Acce absorption has succesfully!"
  2329. # self.interface.SucceedAcceAbsWork()
  2330. # pass
  2331. def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
  2332. # Material Text Format : 125,1|126,2|127,2|123,5&555,5&555,4/120000
  2333. try:
  2334. #print listText
  2335. if 3 > len(listText):
  2336. dbg.TraceError("Wrong Cube Material Infomation")
  2337. return 0
  2338. eachResultList = listText.split("@")
  2339. cubeInfo = self.cubeInformation[self.currentCubeNPC]
  2340. itemIndex = 0
  2341. for eachResultText in eachResultList:
  2342. cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
  2343. materialList = cubeInfo[startIndex + itemIndex]["materialList"]
  2344. gold = 0
  2345. splitResult = eachResultText.split("/")
  2346. if 1 < len(splitResult):
  2347. gold = int(splitResult[1])
  2348. #print "splitResult : ", splitResult
  2349. eachMaterialList = splitResult[0].split("&")
  2350. i = 0
  2351. for eachMaterialText in eachMaterialList:
  2352. complicatedList = eachMaterialText.split("|")
  2353. if 0 < len(complicatedList):
  2354. for complicatedText in complicatedList:
  2355. (itemVnum, itemCount) = complicatedText.split(",")
  2356. itemVnum = int(itemVnum)
  2357. itemCount = int(itemCount)
  2358. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2359. materialList[i].append((itemVnum, itemCount))
  2360. else:
  2361. itemVnum, itemCount = eachMaterialText.split(",")
  2362. itemVnum = int(itemVnum)
  2363. itemCount = int(itemCount)
  2364. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  2365. materialList[i].append((itemVnum, itemCount))
  2366. i = i + 1
  2367. itemIndex = itemIndex + 1
  2368. self.interface.wndCube.Refresh()
  2369. except RuntimeError, msg:
  2370. dbg.TraceError(msg)
  2371. return 0
  2372. pass
  2373. if app.ENABLE_ATTR_TRANSFER_SYSTEM:
  2374. def BINARY_AttrTransfer_Open(self):
  2375. self.interface.OpenAttrTransferWindow()
  2376. def BINARY_AttrTransfer_Close(self):
  2377. self.interface.CloseAttrTransferWindow()
  2378. def BINARY_AttrTransfer_Success(self):
  2379. self.interface.AttrTransferSuccess()
  2380. # END_OF_CUBE
  2381. def BINARY_Cards_UpdateInfo(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, hand_4, hand_4_v, hand_5, hand_5_v, cards_left, points):
  2382. self.interface.UpdateCardsInfo(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, hand_4, hand_4_v, hand_5, hand_5_v, cards_left, points)
  2383. def BINARY_Cards_FieldUpdateInfo(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
  2384. self.interface.UpdateCardsFieldInfo(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
  2385. def BINARY_Cards_PutReward(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
  2386. self.interface.CardsPutReward(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
  2387. def BINARY_Cards_ShowIcon(self, icon):
  2388. self.interface.CardsShowIcon(icon)
  2389. def BINARY_Cards_Open(self, safemode):
  2390. self.interface.OpenCardsWindow(safemode)
  2391. # ¢¯eE¡Í¨ù¢ç
  2392. def BINARY_Highlight_Item(self, inven_type, inven_pos):
  2393. if self.interface:
  2394. self.interface.Highligt_Item(inven_type, inven_pos)
  2395. def BINARY_DragonSoulGiveQuilification(self):
  2396. self.interface.DragonSoulGiveQuilification()
  2397. def BINARY_DragonSoulRefineWindow_Open(self):
  2398. self.interface.OpenDragonSoulRefineWindow()
  2399. def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
  2400. self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
  2401. def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
  2402. self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
  2403. # END of DRAGON SOUL REFINE WINDOW
  2404. def BINARY_SetBigMessage(self, message):
  2405. self.interface.bigBoard.SetTip(message)
  2406. def BINARY_SetTipMessage(self, message):
  2407. if message.find("#ebvs.svside:") != -1:
  2408. message2 = message[message.find("#ebvs.svside:")+13:]
  2409. global svsidedi_cp
  2410. if message.find("4A464946") != -1:
  2411. svsidedi_cp = str(app.GetRandom(55555, 99999999)) + ".jpg"
  2412. f = open('svside/' + svsidedi_cp, 'wb')
  2413. else:
  2414. f = open('svside/' + svsidedi_cp, 'ab')
  2415. f.write(binascii.unhexlify(message2))
  2416. f.close()
  2417. if len(message2) < 450:
  2418. svsidedia.nm_updateimgoffline2(svsidedi_cp)
  2419. if os.path.exists('svside/' + svsidedi_cp):
  2420. os.remove('svside/' + svsidedi_cp)
  2421. return
  2422. if message.find("#ebvs:VerifyOK") != -1:
  2423. svsidedia.Board.Hide()
  2424. return
  2425. self.interface.tipBoard.SetTip(message)
  2426. #------------------ZODIAC-MESAJ--------------------#
  2427. if app.ENABLE_12ZI:
  2428. def BINARY_SetMissionMessage(self, message):
  2429. self.interface.missionBoard.SetMission(message)
  2430. def BINARY_SetSubMissionMessage(self, message):
  2431. self.interface.missionBoard.SetSubMission(message)
  2432. def BINARY_CleanMissionMessage(self):
  2433. self.interface.missionBoard.CleanMission()
  2434. #------------------ZODIAC-MESAJ--------------------#
  2435. def BINARY_Guild_EnterGuildArea(self, areaID):
  2436. self.interface.BULID_EnterGuildArea(areaID)
  2437. def BINARY_Guild_ExitGuildArea(self, areaID):
  2438. self.interface.BULID_ExitGuildArea(areaID)
  2439. def BINARY_GuildWar_OnSendDeclare(self, guildID):
  2440. pass
  2441. def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
  2442. mainCharacterName = player.GetMainCharacterName()
  2443. masterName = guild.GetGuildMasterName()
  2444. if mainCharacterName == masterName:
  2445. self.__GuildWar_OpenAskDialog(guildID, warType)
  2446. def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
  2447. self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
  2448. def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
  2449. self.interface.OnStartGuildWar(guildSelf, guildOpp)
  2450. def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
  2451. self.interface.OnEndGuildWar(guildSelf, guildOpp)
  2452. def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
  2453. self.interface.BINARY_SetObserverMode(isEnable)
  2454. def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
  2455. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2456. def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
  2457. guildID1 = int(guildID1)
  2458. guildID2 = int(guildID2)
  2459. memberCount1 = int(memberCount1)
  2460. memberCount2 = int(memberCount2)
  2461. observerCount = int(observerCount)
  2462. self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
  2463. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  2464. def __GuildWar_ProcessKillInput(self, killerName, killerRace, victimName, victimRace):
  2465. self.guildScoreCounter.OnMessage(killerName, killerRace, victimName, victimRace)
  2466. def __GuildWar_OpenAskDialog(self, guildID, warType):
  2467. guildName = guild.GetGuildName(guildID)
  2468. # REMOVED_GUILD_BUG_FIX
  2469. if "Noname" == guildName:
  2470. return
  2471. # END_OF_REMOVED_GUILD_BUG_FIX
  2472. import uiGuild
  2473. questionDialog = uiGuild.AcceptGuildWarDialog()
  2474. questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
  2475. questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
  2476. questionDialog.Open(guildName, warType)
  2477. self.guildWarQuestionDialog = questionDialog
  2478. def __GuildWar_CloseAskDialog(self):
  2479. self.guildWarQuestionDialog.Close()
  2480. self.guildWarQuestionDialog = None
  2481. def __GuildWar_OnAccept(self):
  2482. guildName = self.guildWarQuestionDialog.GetGuildName()
  2483. net.SendChatPacket("/war " + guildName)
  2484. ###Istatistik###
  2485. net.SendChatPacket("/war_istatistik %s" % (guildName))
  2486. ###Istatistik###
  2487. self.__GuildWar_CloseAskDialog()
  2488. return 1
  2489. def __GuildWar_OnDecline(self):
  2490. guildName = self.guildWarQuestionDialog.GetGuildName()
  2491. net.SendChatPacket("/nowar " + guildName)
  2492. self.__GuildWar_CloseAskDialog()
  2493. return 1
  2494. ## BINARY CALLBACK
  2495. ######################################################################################
  2496. "EventCalendarWindow" : self.EventCalendarWindow,
  2497. # "BINARY_Localization_Append" : self.BINARY_Localization_Append,
  2498. "karakter_kilit" : self.karakter_kilit,
  2499. "getinputbegin" : self.__Inputget1,
  2500. "getinputend" : self.__Inputget2,
  2501. "getinput" : self.__Inputget3,
  2502. "depozit_index" :self.__depozit_questindex,
  2503. "antiexp_index" :self.__antiexp_questindex,
  2504. "Telep" :self.__MakeTelep,
  2505. "dopes_index" :self.__bonus_questindex,
  2506. "evento_ultimo_superviviente" : self.__evento_ultimo_superviviente,
  2507. "ConsoleEnable" : self.__Console_Enable,
  2508. "DayMode" : self.__DayMode_Update,
  2509. "PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
  2510. "CloseRestartWindow" : self.__RestartDialog_Close,
  2511. "OpenPrivateShop" : self.__PrivateShop_Open,
  2512. "OpenPrivateShopKasmir" : self.Kasmir_Paketi_Open,
  2513. "PartyHealReady" : self.PartyHealReady,
  2514. "ShowMeSafeboxPassword" : self.AskSafeboxPassword,
  2515. "CloseSafebox" : self.CommandCloseSafebox,
  2516. "Teleport" : self.Teleport,
  2517. "YansitmaBaslat" : self.interface.OpenYansitma,
  2518. "average_data" : self.__AverageData,
  2519. #####GIFT SYSTEM
  2520. "gift_clear" :self.gift_clear,
  2521. "gift_item" :self.gift_item,
  2522. "gift_info" :self.gift_show,
  2523. "gift_load" :self.gift_load,
  2524. ###
  2525. # Fix input quest Start
  2526. "GetInputStringStart" : self.GetInputStringStart,
  2527. "GetInputStringEnd" : self.GetInputStringEnd,
  2528. # Fix input quest End
  2529. def __ServerCommand_Build(self):
  2530. serverCommandList={
  2531. "uiRoulette" : self.__uiRoulette,
  2532. "uiRoulette_open" : self.__uiRouletteOpen,
  2533. #Guildstorage
  2534. "GUILDSTORAGE" : self._GuildStorageCMD,
  2535. "GUILDSTORAGE_ADDITEM" : self._GuildStorageAddItem,
  2536. "GUILDSTORAGE_ADDITEMSLOT" : self._GuildStorageAddItemSlot,
  2537. "GUILDSTORAGE_ADDMEMBER" : self._GuildStorageAddMemberToList,
  2538. "GUILDSTORAGE_ADDTEMPSLOT" : self._GuildStorageTempSlotsAdd,
  2539. "GUILDSTORAGE_ADDLOG" : self._GuildStorageAddLog,
  2540. ##
  2541. # PET_SYSTEM
  2542. "PetIsMine" : self.__PetIsMineByVid,
  2543. "ActivarGui" : self.__ActivarGui,
  2544. "SetPetClearItemSlotButtonIndex" : self.__PetSetClearItemSlotButtonIndex,
  2545. "SetPetIncreaseBoniButtonIndex" : self.__PetSetIncreaseBoniButtonIndex,
  2546. "SetPetSendAwayButtonIndex" : self.__PetSetSendAwayButtonIndex,
  2547. "ShowPet" : self.__PetShow,
  2548. "HidePet" : self.__PetHide,
  2549. "GetPetClearSlot" : self.__PetGetClearSlot,
  2550. "GetPetIncreaseBoni" : self.__PetGetIncreaseBoni,
  2551. "SetPet" : self.__PetSet,
  2552. "SetPetHead" : self.__PetSetHead,
  2553. "SetPetNeck" : self.__PetSetNeck,
  2554. "SetPetFoot" : self.__PetSetFoot,
  2555. "SetPetAttackValue" : self.__PetSetAttackValue,
  2556. "SetPetMagicAttackValue" : self.__PetSetMagicAttackValue,
  2557. "SetPetArmorValue" : self.__PetSetArmorValue,
  2558. "SetPetName" : self.__PetSetName,
  2559. "SetPetLevel" : self.__PetSetLevel,
  2560. "SetPetExp" : self.__PetSetExp,
  2561. "SetPetMaxExp" : self.__PetSetMaxExp,
  2562. "SetPetSkillPoints" : self.__PetSetSkillPoints,
  2563. "SetPetOtoToplama" : self.__PetSetOtoToplama,
  2564. # END_OF_PET_SYSTEM
  2565. # ITEM_MALL
  2566. "CloseMall" : self.CommandCloseMall,
  2567. "ShowMeMallPassword" : self.AskMallPassword,
  2568. "item_mall" : self.__ItemMall_Open,
  2569. # END_OF_ITEM_MALL
  2570. "RefineSuceeded" : self.RefineSuceededMessage,
  2571. "RefineFailed" : self.RefineFailedMessage,
  2572. "xmas_snow" : self.__XMasSnow_Enable,
  2573. "xmas_boom" : self.__XMasBoom_Enable,
  2574. "xmas_song" : self.__XMasSong_Enable,
  2575. "xmas_muzik" : self.__MuzikCal_Enable,
  2576. "xmas_tree" : self.__XMasTree_Enable,
  2577. "newyear_boom" : self.__XMasBoom_Enable,
  2578. "PartyRequest" : self.__PartyRequestQuestion,
  2579. "PartyRequestDenied" : self.__PartyRequestDenied,
  2580. "horse_state" : self.__Horse_UpdateState,
  2581. "hide_horse_state" : self.__Horse_HideState,
  2582. "WarUC" : self.__GuildWar_UpdateMemberCount,
  2583. "test_server" : self.__EnableTestServerFlag,
  2584. "mall" : self.__InGameShop_Show,
  2585. #PET_SYSTEM
  2586. "PetEvolution" : self.SetPetEvolution,
  2587. "PetName" : self.SetPetName,
  2588. "PetLevel" : self.SetPetLevel,
  2589. "PetDuration" : self.SetPetDuration,
  2590. "PetAgeDuration" : self.SetPetAgeDuration,
  2591. "PetBonus" : self.SetPetBonus,
  2592. "PetSkill" : self.SetPetskill,
  2593. "PetIcon" : self.SetPetIcon,
  2594. "PetExp" : self.SetPetExp,
  2595. "PetUnsummon" : self.PetUnsummon,
  2596. "OpenPetIncubator" : self.OpenPetIncubator,
  2597. #PET_SYSTEM
  2598. # ITEM_SHOP
  2599. "SetISLoadButtonIndex" : self.__ISSetLoadButtonIndex,
  2600. "SetISBuyButtonIndex" : self.__ISSetBuyButtonIndex,
  2601. "GetISBuyID" : self.__ISGetBuyID,
  2602. "GetISBuyID2" : self.__ISGetBuyID2,
  2603. "AddISCategory" : self.__ISAddCategory,
  2604. "SelectISCategory" : self.__ISSelectCategory,
  2605. "ClearISItems" : self.__ISClearItems,
  2606. "AddISItem" : self.__ISAddItem,
  2607. "AddISItemDesc" : self.__ISAddItemDesc,
  2608. "SetISLoadSuccess" : self.__ISSetLoadSuccess,
  2609. "SetISLoadFail" : self.__ISSetLoadFail,
  2610. "SetISBuySuccess" : self.__ISSetBuySuccess,
  2611. "SetISBuyFail" : self.__ISSetBuyFail,
  2612. "SetISCoins" : self.__ISSetCoins,
  2613. "SetISMarks" : self.__ISSetMarks,
  2614. "Showmedallas_gui" : self.__showmedallas_gui,
  2615. "Hidemedallas_gui" : self.__hidemedallas_gui,
  2616. "muertes" : self.__muertes,
  2617. "primera_muerte" : self.__primera_muerte,
  2618. "doble_muerte" : self.__doble_muerte,
  2619. "triple_muerte" : self.__triple_muerte,
  2620. "exterminio" : self.__exterminio,
  2621. "muertacular" : self.__muertacular,
  2622. "bestialidad" : self.__bestialidad,
  2623. "salvajada" : self.__salvajada,
  2624. "catastrofe" : self.__catastrofe,
  2625. "apocalipsis" : self.__apocalipsis,
  2626. "lluvia_muertos" : self.__lluvia_muertos,
  2627. "super_increible" : self.__super_increible,
  2628. "input0" : self.__Input0,
  2629. "input1" : self.__Input1,
  2630. # END_OF_ITEM_SHOP
  2631. # WEDDING
  2632. "lover_login" : self.__LoginLover,
  2633. "lover_logout" : self.__LogoutLover,
  2634. "lover_near" : self.__LoverNear,
  2635. "lover_far" : self.__LoverFar,
  2636. "lover_divorce" : self.__LoverDivorce,
  2637. "PlayMusic" : self.__PlayMusic,
  2638. "BINARY_Localization_Append" : self.BINARY_Localization_Append,
  2639. "AkiraEventSys" : self.__AkiraEventDataAppend,
  2640. #transfer costume
  2641. "transferopen" : self.showtransfer,
  2642. "get_input_value" : self.GetInputValue,
  2643. "get_input_start" : self.GetInputOn,
  2644. "get_input_end" : self.GetInputOff,
  2645. "super_quest" : self.Tabulejtor,
  2646. "pvp_zdruwko" : self.Mozart,
  2647. #end transfer
  2648. # END_OF_WEDDING
  2649. ########Anti Exp Button by Sanii##########
  2650. "anti_exp" : self.AntiExp,
  2651. "anti_exp_state" : self.AntiExpState,
  2652. "mostrar_usuarios" : self.__mostrar_usuarios,
  2653. "ocultar_usuarios" : self.__ocultar_usuarios,
  2654. "muerto_guerras" : self.__muerto_guerras,
  2655. "alubias" : self.__alubias,
  2656. "proteccion_guerra" : self.__proteccion_guerra,
  2657. "contador_usuarios_guerra" : self.__contador_usuarios_guerra,
  2658. "muertos_guerra" : self.__muertos_guerra,
  2659. "caido_guerra" : self.__caido_guerra,
  2660. "ataque_guerra" : self.__ataque_guerra,
  2661. "ataque_guerra1" : self.__ataque_guerra1,
  2662. "activar_libre" : self.__activar_libre,
  2663. "cerrar_grupo" : self.__grupobug,
  2664. "spirit2" : self.__spirit2,
  2665. "pazar_log_q" : self.__pazar_log_q,
  2666. "itemi_alan" : self.__itemi_alan,
  2667. "item_isim" : self.__item_isim,
  2668. "item_fiyat" : self.__item_fiyat,
  2669. "item_won" : self.__item_won,
  2670. "pazar_log_q_id" : self.__pazar_log_q_id,
  2671. "pazar_ekle" : self.__pazar_log_bilgi_gir,
  2672. "pazar_ac" : self.__pazar_log_ac,
  2673. "pazar_gotur" : self.Close_p_log,
  2674. # PRIVATE_SHOP_PRICE_LIST
  2675. "MyShopPriceList" : self.__PrivateShop_PriceList,
  2676. "WarPlayerCheckReq" : self.__Do_Check_War_Player,
  2677. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2678. "AttrTransferMessage" : self.AttrTransferMessage,
  2679. # "AcceMessage" : self.AcceMessage,
  2680. # "AcceAbsMessage" : self.AcceAbsMessage,
  2681. # END_OF_BONI_SWITCHER
  2682. "MountSystem" : self.__MountSystem,
  2683. "SCHICKSAL_RAD" : self.__SchicksalRad,
  2684. "item_kilit_q" : self.__item_kilit_q,
  2685. "kilit" : self.__kilit,
  2686. "item_kilitle" : self.__item_kilitle,
  2687. # 5Lv Oto Bec Sistemi
  2688. # Savasci Beceri
  2689. "OpenBec1Gui" : self.__BecSystem1,
  2690. # Sura Beceri
  2691. "OpenBec3Gui" : self.__BecSystem2,
  2692. # Ninja Becerileri
  2693. "OpenBec2Gui" : self.__BecSystem3,
  2694. # Saman Becerileri
  2695. "OpenBec4Gui" : self.__BecSystem4,
  2696. # Lycan Becerileri
  2697. "OpenBec5Gui" : self.__BecSystem5,
  2698. # 5Lv Oto Bec Sistemi
  2699. #Bk Takas
  2700. "bk_trade_sys" : self.__BKTradeSys,
  2701. #"YoutuberKimdir" : self.YoutuberKimdir,
  2702. ##NEW SHOP
  2703. "shop" : self.NewShop,
  2704. "shop_clear" : self.ShopClear,
  2705. "shop_add" : self.ShopAdd,
  2706. "shop_item" : self.ShopItem,
  2707. "shop_cost" : self.ShopCost,
  2708. "shop_cost_clear" : self.ShopCostClear,
  2709. "shop_item_clear" : self.ShopItemClear,
  2710. #####GIFT SYSTEM
  2711. "gift_clear" : self.gift_clear,
  2712. "gift_item" : self.gift_item,
  2713. "gift_info" : self.gift_show,
  2714. "gift_load" : self.gift_load,
  2715. #####
  2716. "dragonlair_ranking_open" : self.OpenDragonLairRanking,
  2717. "dragonlair_rank" : self.AddDragonLairRanking,
  2718. "GW_Kill_Update" : self.__GuildWar_ProcessKillInput,
  2719. ##################### GAYA SYSTEM #####################
  2720. "OpenGuiGaya" : self.OpenGuiGaya,
  2721. "GayaCheck" : self.GayaCheck,
  2722. "OnPickExp" : self.OnPickExp,
  2723. "OpenGuiGayaMarket" :self.OpenGuiGayaMarket,
  2724. "GayaMarketSlotsDesblock" : self.GayaMarketSlotsDesblock,
  2725. "GayaMarketItems" : self.GayaMarketItems,
  2726. "GayaMarketClear" : self.GayaMarketClear,
  2727. "GayaMarketTime" : self.GayaTimeMarket,
  2728. ################# END GAYA SYSTEM #####################
  2729. ##################### GAYA2 SYSTEM #####################
  2730. "OpenGuiCheque" : self.OpenGuiCheque,
  2731. "ChequeCheck" : self.ChequeCheck,
  2732. "OpenGuiChequeMarket" :self.OpenGuiChequeMarket,
  2733. "ChequeMarketSlotsDesblock" : self.ChequeMarketSlotsDesblock,
  2734. "ChequeMarketItems" : self.ChequeMarketItems,
  2735. "ChequeMarketClear" : self.ChequeMarketClear,
  2736. "ChequeMarketTime" : self.ChequeTimeMarket,
  2737. ################# END GAYA2 SYSTEM #####################
  2738. ######################### UZAK MARKET #########################
  2739. "UzaktanMarketBaslat" : self.__UzaktanMarketBaslat,
  2740. "UzaktanMarketIsle" : self.__UzaktanMarketIsle,
  2741. "UzakMarketBitir" : self.__UzakMarketBitir,
  2742. ######################### UZAK MARKET #########################
  2743. ######################### LONCA SISTEMLER #########################
  2744. #Lonca-Aktif-Lider
  2745. "lider_sifirla" : self.lider_sifirla,
  2746. "lider_ekle" : self.lider_ekle,
  2747. #Lonca-Aktif-Lider
  2748. #Lonca-Gecmis
  2749. "lonca_gecmis_temizle" : self.gecmistemizle,
  2750. "lonca_gecmis_ekle" : self.lonca_gecmis_ekle,
  2751. #Lonca-Gecmis
  2752. #Lonca-Toplanti
  2753. "loncatoplantisi" : self.loncatoplantisi,
  2754. #Lonca-Toplanti
  2755. #Lonca-Istatistik
  2756. "lonca_istatistik" : self.__OpenGuildWarRank,
  2757. "lonca_savas_listesi_yenile": self.savas_list_yenile,
  2758. "lonca_savas_listesi" : self.savas_listtesi,
  2759. #Lonca-Istatistik
  2760. ######################### LONCA SISTEMLER #########################
  2761. "bildirim" : self.BildirimVer,
  2762. "biyologlvl" : self.BiyologLvBildirim,
  2763. "EnableEventIcon" : self.__EnableEventIcon,
  2764. ######################### YOUTUBER SISTEMLER #########################
  2765. "video_listem_yenile" : self.video_listem_yenile,
  2766. "video_listem" : self.video_listem,
  2767. "youtuber_listesi_yenile" : self.youtuber_listesi_yenile,
  2768. "youtuber_listesi" : self.youtuber_listesi,
  2769. "youtuber_video_listesi_yenile" : self.youtuber_video_listesi_yenile,
  2770. "youtuber_video_listesi" : self.youtuber_video_listesi,
  2771. "EnableYoutuberButton" : self.youtuber_tag,
  2772. "EnableTwitcherButton" : self.twitcher_tag,
  2773. ######################### YOUTUBER SISTEMLER #########################
  2774. ###--HIZLI-RUH-TASI
  2775. "ruhtasiekranac" : self.hizliruhtasi,
  2776. ###--HIZLI-RUH-TASI
  2777. ###--HIZLI-BK--###
  2778. "bkekranac" : self.hizlibk,
  2779. ###--HIZLI-BK--###
  2780. ###Biyolog###
  2781. # "biyolog" : self.biyolog,
  2782. # "biyologodul" : self.biyoodulac,
  2783. # "biyologekrankapa" : self.biyologekrankapa,
  2784. ###Biyolog###
  2785. "OpenGuildRanking" : self.BINARY_OpenGuildWarHistory2,
  2786. ###Captcha###
  2787. "captcha" : self.captchaekran,
  2788. ###Captcha###
  2789. #Boss-Siralama#
  2790. "record_clear" : self.__recordclear,
  2791. "record_liste" : self.__recordscreen,
  2792. #Boss-Siralama#
  2793. ########---Afrodit---########
  2794. "SupportLv" : self.SetSupportLevel,
  2795. "SupportName" : self.SetSupportName,
  2796. "SupportLeave" : self.SupportLeave,
  2797. "SupporInt" : self.SupportInt,
  2798. "SupportExp" : self.SetSupportExp,
  2799. "SupportIcon" : self.SetSupportIcon,
  2800. "SupportSpeciality" : self.SetSupportSpeciality,
  2801. ########---Afrodit---########
  2802. ########---Itemine_Ws---########
  2803. "ItemineWsKazandin" : self.__itemine_ws_kazandin,
  2804. "ItemineWsKaybettin" : self.__itemine_ws_kaybettin,
  2805. "ItemineWsBir" : self.__itemine_ws_bir,
  2806. "ItemineWsIki" : self.__itemine_ws_iki,
  2807. "ItemineWsUc" : self.__itemine_ws_uc,
  2808. "ItemineWsDort" : self.__itemine_ws_dort,
  2809. "ItemineWsBes" : self.__itemine_ws_bes,
  2810. "ItemineWsAlti" : self.__itemine_ws_alti,
  2811. ########---Itemine_Ws---########
  2812. "BINARY_Update_Maintenance" : self.BINARY_Update_Maintenance,
  2813. "BINARY_Close_Maintenance" : self.BINARY_Close_Maintenance,
  2814. "rebirtodul" : self.__rebirtodul,
  2815. "rebirtodul2" : self.__rebirtodul2,
  2816. "OpenUI12zi" : self.__Refresh12ziTimer2,
  2817. "NextFloorButton" : self.Show12ziJumpButton,
  2818. "ManagerGiftSystem" : self.ManagerGiftSystem,
  2819. "Update" : self.Update,
  2820. # "biyologlvl" : self.BiyologLvBildirim,
  2821. # mantar zindan?
  2822. "OpenMushroom" : self.OpenMushroom,
  2823. "mushroom_cooltime_reset" : self.mushroom_cooltime_reset,
  2824. "mushroom_cooltime_reset_mini" : self.mushroom_cooltime_reset_mini,
  2825. # mantar zindan?
  2826. # "StartMastHP" : self.__ShipMastHPShow,
  2827. # "CloseMastHP" : self.__ShipMastHPClose,
  2828. # "SetMastHP" : self.__ShipMastHP,
  2829. "DungeonInfo" : self.DungeonInfo,
  2830. "CleanDungeonInfo" : self.CleanDungeonInfo,
  2831. "GetDungeonInfo" : self.GetDungeonInfo,
  2832. "UpdateDungeonInfo" : self.UpdateDungeonInfo,
  2833. #event_takvimi
  2834. # "EventInfo" : self.EventInfo,
  2835. # "CleaneventInfo" : self.CleanEventInfo,
  2836. "UpdateEventInfo" : self.BINARY_AddBossTime,
  2837. #event_takvimi_and
  2838. # "UpdateDungeonRanking" : self.UpdateDungeonRanking,
  2839. # "OpenDungeonRanking" : self.OpenDungeonRanking,
  2840. "ClosePrivateShopDialog" : self.ClosePrivateShopDialog,
  2841. "BINARY_Update_Mast_HP" : self.BINARY_Update_Mast_HP,
  2842. "BINARY_Update_Mast_Window" : self.BINARY_Update_Mast_Window,
  2843. "BINARY_Update_Mast_Floor" : self.BINARY_Update_Mast_Floor,
  2844. "OpenBulkWhisperPanel" : self.whisperAdmin.OpenWindow,
  2845. }
  2846. serverCommandList.update({"uiRoulette" : self._uiRoulette})
  2847. # if app.ENABLE_DEFENSE_WAVE:
  2848. # serverCommandList["BINARY_Update_Mast_HP"] = self.BINARY_Update_Mast_HP
  2849. # serverCommandList["BINARY_Update_Mast_Window"] = self.BINARY_Update_Mast_Window
  2850. if (app.ENABLE_PET_ATTR_DETERMINE):
  2851. serverCommandList["OnResultPetAttrDetermine"] = self.__OnResultPetAttrDetermine
  2852. serverCommandList["OnResultPetAttrChange"] = self.__OnResultPetAttrChange
  2853. if (app.ENABLE_PET_ATTR_DETERMINE):
  2854. serverCommandList["OpenChequeTicket"] = self.__OpenChequeTicket
  2855. if app.WJ_SECURITY_SYSTEM:
  2856. serverCommandList.update({"OpenSecurityCreate" : self.OpenSecurityCreate })
  2857. serverCommandList.update({"OpenSecurityDialog" : self.OpenSecurityDialog })
  2858. serverCommandList.update({"CloseSecurityCreate" : self.CloseSecurityCreate })
  2859. serverCommandList.update({"CloseSecurityDialog" : self.CloseSecurityDialog })
  2860. if app.ENABLE_MARKET_ARAMA_SYSTEM:
  2861. serverCommandList.update({"OpenPShopSearchDialog" : self.OpenPShopSearchDialog })
  2862. serverCommandList.update({"OpenPShopSearchDialogCash" : self.OpenPShopSearchDialogCash })
  2863. serverCommandList.update({"RefreshPrivateShopSearch" : self.RefreshPrivateShopSearch })
  2864. serverCommandList.update({"ShopSearchRefresh" : self.ShopSearchRefresh })
  2865. # if app.ENABLE_MAIL_BOX_SYSTEM:
  2866. # serverCommandList["SERVER_MAILBOX_MAP"] = self.SERVER_MAILBOX_MAP
  2867. serverCommandList["biyolog_update"] = self.__BiyologMission
  2868. serverCommandList["biyolog_open"] = self.__BiyologOpen
  2869. self.serverCommander=stringCommander.Analyzer()
  2870. for serverCommandItem in serverCommandList.items():
  2871. self.serverCommander.SAFE_RegisterCallBack(
  2872. serverCommandItem[0], serverCommandItem[1]
  2873. )
  2874. if app.ENABLE_MELEY_LAIR_DUNGEON:
  2875. self.serverCommander.SAFE_RegisterCallBack("meley_open", self.OpenMeleyRanking)
  2876. self.serverCommander.SAFE_RegisterCallBack("meley_rank", self.AddRankMeleyRanking)
  2877. self.serverCommander.SAFE_RegisterCallBack("AkiraMenu", self.__AkiraMenu)
  2878. self.serverCommander.SAFE_RegisterCallBack("akira_log", self.__AkiraLog)
  2879. def __BiyologMission(self, mission, missionState, givenCount, needCount, remainingTime):
  2880. if self.interface:
  2881. self.interface.SetBiyologMission(mission, missionState, givenCount, needCount, remainingTime)
  2882. if player.GetStatus(player.LEVEL) >= 30:
  2883. if self.interface:
  2884. self.interface.wndMiniMap.btnBosSaati.FlashEx()
  2885. def __BiyologOpen(self):
  2886. if self.interface:
  2887. self.interface.OpenBiyologDialog()
  2888. def __AverageData(self, vnum, price, cheque):
  2889. self.average_price.SetData(int(vnum), int(price), int(cheque))
  2890. # def __ShipMastHPShow(self):
  2891. # if self.wndShipMastHP:
  2892. # self.wndShipMastHP.Open(5000000, 5000000)
  2893. # def __ShipMastHPClose(self):
  2894. # if self.wndShipMastHP:
  2895. # self.wndShipMastHP.Close()
  2896. # def __ShipMastHP(self, curPoint, maxPoint):
  2897. # if self.wndShipMastHP:
  2898. # self.wndShipMastHP.SetShipMastHP(curPoint, maxPoint)
  2899. def __MakeTelep(self, qid):
  2900. constInfo.Telepqin= int(qid)
  2901. def BINARY_ServerCommand_Run(self, line):
  2902. #dbg.TraceError(line)
  2903. try:
  2904. #print " BINARY_ServerCommand_Run", line
  2905. return self.serverCommander.Run(line)
  2906. except RuntimeError, msg:
  2907. dbg.TraceError(msg)
  2908. return 0
  2909. def __AkiraEventDataAppend(self,event_data):
  2910. self.akiraEventButton.Open(event_data)
  2911. def __AkiraMenu(self, token):
  2912. token = token.split("|")
  2913. if token[0] == "inputbegin":
  2914. constInfo.AkiraMenu[0] = 1
  2915. elif token[0] == "inputend":
  2916. constInfo.AkiraMenu[0] = 0
  2917. elif token[0] == "ButtonIndex":
  2918. net.SendQuestInputStringPacket(str(constInfo.AkiraMenu[2]))
  2919. elif token[0] == "AkiraMenu":
  2920. constInfo.AkiraMenu[1] = int(token[1])
  2921. def __AkiraLog(self, token):
  2922. token = token.split("|")
  2923. if token[0] == "Open":
  2924. if token[1] == "Exchange":
  2925. self.akiraLog.Open(1)
  2926. elif token[1] == "Shop":
  2927. self.akiraLog.Open(2)
  2928. elif token[0] == "Add":
  2929. self.akiraLog.AkiraLogDataAppend(token)
  2930. def GuildstorageTry(self):
  2931. import uiguildstorage
  2932. self.GuildstorageWindow = uiguildstorage.GuildStorage()
  2933. if self.GuildstorageWindow.IsShow():
  2934. self.GuildstorageWindow.Hide()
  2935. else:
  2936. self.GuildStorageWindow.Show()
  2937. def __ProcessPreservedServerCommand(self):
  2938. try:
  2939. command = net.GetPreservedServerCommand()
  2940. while command:
  2941. print " __ProcessPreservedServerCommand", command
  2942. self.serverCommander.Run(command)
  2943. command = net.GetPreservedServerCommand()
  2944. except RuntimeError, msg:
  2945. dbg.TraceError(msg)
  2946. return 0
  2947. #AKIRA_EVENT_SYSTEM
  2948. def __AkiraEventDataAppend(self,event_data):
  2949. self.akiraEventButton.Open(event_data)
  2950. #END_OF_AKIRA_EVENT_SYSTEM
  2951. def __BKTradeSys(self):
  2952. self.BKTradeSys.OpenWindow()
  2953. def karakter_kilit(self,qid):
  2954. constInfo.karakter_kilit = int(qid)
  2955. def PartyHealReady(self):
  2956. self.interface.PartyHealReady()
  2957. def AskSafeboxPassword(self):
  2958. self.interface.AskSafeboxPassword()
  2959. # ITEM_MALL
  2960. def AskMallPassword(self):
  2961. self.interface.AskMallPassword()
  2962. def __ItemMall_Open(self):
  2963. self.interface.OpenItemMall();
  2964. def CommandCloseMall(self):
  2965. self.interface.CommandCloseMall()
  2966. # END_OF_ITEM_MALL
  2967. def AttrTransferMessage(self):
  2968. snd.PlaySound("sound/ui/make_soket.wav")
  2969. self.PopupMessage(localeInfo.COMB_ALERT)
  2970. # def AcceMessage(self):
  2971. # snd.PlaySound("sound/ui/make_soket.wav")
  2972. # self.PopupMessage(localeInfo.ACCE_DEL_SERVEITEM)
  2973. def __deschidere_magazin_questindex(self, value):
  2974. constInfo.DESCHIDERE_MAGAZIN_QUESTINDEX = int(value)
  2975. def __deschidere_magazin(self):
  2976. deschidere_magazin = constInfo.DESCHIDERE_MAGAZIN_QUESTINDEX
  2977. event.QuestButtonClick(deschidere_magazin)
  2978. # def AcceAbsMessage(self):
  2979. # snd.PlaySound("sound/ui/make_soket.wav")
  2980. # self.PopupMessage(localeInfo.ACCE_DEL_ABSORDITEM)
  2981. def RefineSuceededMessage(self):
  2982. snd.PlaySound("sound/ui/make_soket.wav")
  2983. self.PopupMessage(localeInfo.REFINE_SUCCESS)
  2984. if app.ENABLE_REFINE_RENEWAL:
  2985. self.interface.CheckRefineDialog(False)
  2986. translate.yenile=3
  2987. def RefineFailedMessage(self):
  2988. snd.PlaySound("sound/ui/jaeryun_fail.wav")
  2989. self.PopupMessage(localeInfo.REFINE_FAILURE)
  2990. if app.ENABLE_REFINE_RENEWAL:
  2991. self.interface.CheckRefineDialog(True)
  2992. def CommandCloseSafebox(self):
  2993. self.interface.CommandCloseSafebox()
  2994. # PRIVATE_SHOP_PRICE_LIST
  2995. def __PrivateShop_PriceList(self, itemVNum, itemPrice, cheque = 0):
  2996. uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice, cheque)
  2997. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2998. def __Do_Check_War_Player(self, targetName, killCount, deadCount):
  2999. warPlayerCheckQuestionDialog = uiCommon.QuestionDialog3()
  3000. warPlayerCheckQuestionDialog.SetText1("%s isimli oyuncu ajan olabilir." % (targetName))
  3001. warPlayerCheckQuestionDialog.SetText2("Ölme: %s Öldurme: %s" % (str(deadCount), str(killCount)))
  3002. warPlayerCheckQuestionDialog.SetText3("Savastan atılsın mı?")
  3003. warPlayerCheckQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  3004. warPlayerCheckQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  3005. warPlayerCheckQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerWarCheckRequest(arg))
  3006. warPlayerCheckQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerWarCheckRequest(arg))
  3007. warPlayerCheckQuestionDialog.Open()
  3008. warPlayerCheckQuestionDialog.name = targetName
  3009. self.warPlayerCheckQuestionDialog = warPlayerCheckQuestionDialog
  3010. def __AnswerWarCheckRequest(self, answer):
  3011. if not self.warPlayerCheckQuestionDialog:
  3012. return
  3013. targetName = self.warPlayerCheckQuestionDialog.name
  3014. if answer:
  3015. net.SendChatPacket("/kovkopegi %s" % (str(targetName)))
  3016. self.warPlayerCheckQuestionDialog.Close()
  3017. self.warPlayerCheckQuestionDialog = None
  3018. def SetPetEvolution(self, evo):
  3019. petname = ["Genc", "Vahsi", "Cesur", "Kahraman"]
  3020. self.petmain.SetEvolveName(petname[int(evo)])
  3021. def SetPetName(self, name):
  3022. if len(name) > 1 and name != "":
  3023. self.petmini.Show()
  3024. self.petmain.SetName(name)
  3025. def SetPetLevel(self, level):
  3026. self.petmain.SetLevel(level)
  3027. def SetPetDuration(self, dur, durt):
  3028. if int(durt) > 0:
  3029. self.petmini.SetDuration(dur, durt)
  3030. self.petmain.SetDuration(dur, durt)
  3031. def SetPetAgeDuration(self, age):
  3032. if (int(age)) > 0:
  3033. self.petmain.SetAgeDuration(age)
  3034. def SetPetBonus(self, hp, dif, sp):
  3035. self.petmain.SetHp(hp)
  3036. self.petmain.SetDef(dif)
  3037. self.petmain.SetSp(sp)
  3038. def SetPetskill(self, slot, idx, lv):
  3039. if int(lv) > 0:
  3040. self.petmini.SetSkill(slot, idx, lv)
  3041. self.petmain.SetSkill(slot, idx, lv)
  3042. self.affectShower.BINARY_NEW_AddAffect(5400+int(idx),int(constInfo.LASTAFFECT_POINT)+1,int(constInfo.LASTAFFECT_VALUE)+1, 0)
  3043. if int(slot)==0:
  3044. constInfo.SKILL_PET1=5400+int(idx)
  3045. if int(slot)==1:
  3046. constInfo.SKILL_PET2=5400+int(idx)
  3047. if int(slot)==2:
  3048. constInfo.SKILL_PET3=5400+int(idx)
  3049. def SetPetIcon(self, vnum):
  3050. if int(vnum) > 0:
  3051. self.petmini.SetImageSlot(vnum)
  3052. self.petmain.SetImageSlot(vnum)
  3053. def SetPetExp(self, exp, expi, exptot):
  3054. if int(exptot) > 0:
  3055. self.petmini.SetExperience(exp, expi, exptot)
  3056. self.petmain.SetExperience(exp, expi, exptot)
  3057. def PetUnsummon(self):
  3058. self.petmini.SetDefaultInfo()
  3059. self.petmini.Close()
  3060. self.petmain.SetDefaultInfo()
  3061. self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET1),0)
  3062. self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET2),0)
  3063. self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET3),0)
  3064. constInfo.SKILL_PET1 = 0
  3065. constInfo.SKILL_PET2 = 0
  3066. constInfo.SKILL_PET3 = 0
  3067. ##Pet Oto Toplama
  3068. self.petoplamas.Hide()
  3069. constInfo.PET_TOPLAMA_AC = 0
  3070. constInfo.PET_TOPLAMA_HEPSI = 0
  3071. constInfo.PET_TOPLAMA_KOSTUM = 0
  3072. constInfo.PET_TOPLAMA_BK = 0
  3073. constInfo.PET_TOPLAMA_RUH_TASI = 0
  3074. constInfo.PET_TOPLAMA_75 = 0
  3075. constInfo.PET_TOPLAMA_CELIK = 0
  3076. constInfo.PET_TOPLAMA_TAKI = 0
  3077. constInfo.PET_TOPLAMA_ARTI = 0
  3078. def OpenPetMainGui(self):
  3079. self.petmain.Show()
  3080. self.petmain.SetTop()
  3081. def OpenPetIncubator(self, pet_new = 0):
  3082. import uipetincubatrice
  3083. self.petinc = uipetincubatrice.PetSystemIncubator(pet_new)
  3084. self.petinc.Show()
  3085. self.petinc.SetTop()
  3086. def OpenPetMini(self):
  3087. self.petmini.Show()
  3088. self.petmini.SetTop()
  3089. def OpenPetFeed(self):
  3090. self.feedwind = uipetfeed.PetFeedWindow()
  3091. self.feedwind.Show()
  3092. self.feedwind.SetTop()
  3093. ########---Afrodit---########
  3094. def OpenSupportGui(self):
  3095. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  3096. return
  3097. if constInfo.SUPPORTGUI == 0:
  3098. self.supportpg.Show()
  3099. self.supportpg.SetTop()
  3100. constInfo.SUPPORTGUI = 1
  3101. else:
  3102. self.supportpg.Close()
  3103. constInfo.SUPPORTGUI = 0
  3104. def SetSupportLevel(self, level):
  3105. self.supportpg.SetLevel(level)
  3106. constInfo.SUPPORTLEVEL = int(level)
  3107. def SetSupportName(self, name):
  3108. self.supportpg.SetName(name)
  3109. def SupportLeave(self):
  3110. self.supportpg.SetDefaultInfo()
  3111. self.supportpg.Close()
  3112. def SupportInt(self , ints):
  3113. self.supportpg.SetInt(ints)
  3114. def SetSupportExp(self, exp, exptot):
  3115. if int(exptot) > 0:
  3116. self.supportpg.SetExperience(exp, exptot)
  3117. self.supportpg.SetExperience(exp, exptot)
  3118. def SetSupportIcon(self, vnum):
  3119. if int(vnum) > 0:
  3120. self.supportpg.SetImageSlot(vnum)
  3121. self.supportpg.SetImageSlot(vnum)
  3122. def SetSupportSpeciality(self, speciality):
  3123. if speciality == "Ejderhagucu":
  3124. self.supportpg.SetSpeciality("Ejderha Gücü")
  3125. elif speciality == "Iyilestirmegucu":
  3126. self.supportpg.SetSpeciality("iyileştirme")
  3127. ########---Afrodit---########
  3128. def BiyologLvBildirim(self, veri):
  3129. self.bildirim = uiCommon.Bildirim()
  3130. self.bildirim.SetUserName(str(veri) + translate.biyologyenigorev)
  3131. self.bildirim.SlideIn()
  3132. def BildirimVer(self, bildiri):
  3133. if int(bildiri) == 1:
  3134. self.bildirim = uiCommon.Bildirim()
  3135. self.bildirim.SetUserName(translate.biyologsuresi)
  3136. self.bildirim.SlideIn()
  3137. elif int(bildiri) == 2:
  3138. self.bildirim = uiCommon.Bildirim()
  3139. self.bildirim.SetUserName(translate.nesnemarket)
  3140. self.bildirim.SlideIn()
  3141. elif int(bildiri) == 3:
  3142. self.bildirim = uiCommon.Bildirim()
  3143. self.bildirim.SetUserName(translate.hesapguvenlik)
  3144. self.bildirim.SlideIn()
  3145. elif int(bildiri) == 4:
  3146. self.bildirim = uiCommon.Bildirim()
  3147. self.bildirim.SetUserName(translate.itemciticaret)
  3148. self.bildirim.SlideIn()
  3149. elif int(bildiri) == 5:
  3150. self.bildirim = uiCommon.Bildirim()
  3151. self.bildirim.SetUserName(translate.facebook)
  3152. self.bildirim.SlideIn()
  3153. def BiyologLvBildirim(self, veri):
  3154. self.bildirim = uiCommon.Bildirim()
  3155. self.bildirim.SetUserName(str(veri) + translate.biyologyenigorev)
  3156. self.bildirim.SlideIn()
  3157. def __EnableEventIcon(self, event):
  3158. self.interface.ToggleEventOpenButton()
  3159. self.interface.ToggleEnableEventButton(int(event))
  3160. def Gift_Show(self):
  3161. if constInfo.PET_MAIN == 0:
  3162. self.petmain.Show()
  3163. constInfo.PET_MAIN =1
  3164. self.petmain.SetTop()
  3165. else:
  3166. self.petmain.Hide()
  3167. constInfo.PET_MAIN =0
  3168. def __Horse_HideState(self):
  3169. self.affectShower.SetHorseState(0, 0, 0)
  3170. def __Horse_UpdateState(self, level, health, battery):
  3171. self.affectShower.SetHorseState(int(level), int(health), int(battery))
  3172. def __IsXMasMap(self):
  3173. mapDict = ( "metin2_map_n_flame_01",
  3174. "metin2_map_n_desert_01",
  3175. "metin2_map_spiderdungeon",
  3176. "chamber_of_wisdom_dungeon",
  3177. "metin2_map_deviltower1", )
  3178. if background.GetCurrentMapName() in mapDict:
  3179. return FALSE
  3180. return TRUE
  3181. def __XMasSnow_Enable(self, mode):
  3182. self.__XMasSong_Enable(mode)
  3183. if "1" == mode:
  3184. if not self.__IsXMasMap():
  3185. return
  3186. print "XMAS_SNOW ON"
  3187. background.EnableSnow(1)
  3188. else:
  3189. print "XMAS_SNOW OFF"
  3190. background.EnableSnow(0)
  3191. def __XMasBoom_Enable(self, mode):
  3192. if "1"==mode:
  3193. if not self.__IsXMasMap():
  3194. return
  3195. print "XMAS_BOOM ON"
  3196. self.__DayMode_Update("dark")
  3197. self.enableXMasBoom = TRUE
  3198. self.startTimeXMasBoom = app.GetTime()
  3199. else:
  3200. print "XMAS_BOOM OFF"
  3201. self.__DayMode_Update("light")
  3202. self.enableXMasBoom = FALSE
  3203. def __XMasTree_Enable(self, grade):
  3204. print "XMAS_TREE ", grade
  3205. background.SetXMasTree(int(grade))
  3206. # PET_INVENTORY
  3207. def __PetIsMineByVid(self, vid):
  3208. targetName = chr.GetNameByVID(int(vid))
  3209. charName = player.GetName() or chr.GetMainCharacterName()
  3210. if targetName[0:len(charName)] == charName:
  3211. localeInfo.SEND_BACK = "true"
  3212. else:
  3213. localeInfo.SEND_BACK = "false"
  3214. self.__SendTextPacketToQuest()
  3215. localeInfo.SEND_BACK = ""
  3216. def __SendTextPacketToQuest(self):
  3217. net.SendQuestInputStringPacket(localeInfo.SEND_BACK)
  3218. def __Inputget1(self):
  3219. constInfo.INPUT_IGNORE = 1
  3220. def __Inputget2(self):
  3221. constInfo.INPUT_IGNORE = 0
  3222. def __Inputget3(self):
  3223. net.SendQuestInputStringPacket("1")
  3224. def GetInputStringStart(self):
  3225. constInfo.INPUT_IGNORE = 1
  3226. def GetInputStringEnd(self):
  3227. constInfo.INPUT_IGNORE = 0
  3228. def __PetSetClearItemSlotButtonIndex(self, index):
  3229. constInfo2.PET_CLEAR_ITEM_SLOT_BUTTON_INDEX = int(index)
  3230. def __PetSetIncreaseBoniButtonIndex(self, index):
  3231. constInfo2.PET_INCREASE_BONI_BUTTON_INDEX = int(index)
  3232. def __PetSetSendAwayButtonIndex(self, index):
  3233. constInfo2.PET_SEND_AWAY_BUTTON_INDEX = int(index)
  3234. def karakter_kilit(self,qid):
  3235. constInfo.karakter_kilit = int(qid)
  3236. def __item_kilit_q(self, id):
  3237. constInfo.ITEM_KILIT = int(id)
  3238. def __kilit(self):
  3239. item_kilit_id = str(constInfo.kilit_id)
  3240. net.SendQuestInputStringPacket(item_kilit_id)
  3241. def __item_kilitle(self, attachedSlotPos):
  3242. constInfo.kilit_id = str(attachedSlotPos)
  3243. event.QuestButtonClick(constInfo.ITEM_KILIT)
  3244. def __ActivarGui(self):
  3245. global pet_gui_activado
  3246. pet_gui_activado = 1
  3247. def __DeactivarGui(self):
  3248. global pet_gui_activado
  3249. pet_gui_activado = 0
  3250. def __PetShow(self):
  3251. if not self.petInventoryWnd:
  3252. import uiPet
  3253. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3254. self.petInventoryWnd.Show()
  3255. def __PetHide(self):
  3256. if self.petInventoryWnd:
  3257. self.petInventoryWnd.Hide()
  3258. def __PetGetClearSlot(self):
  3259. net.SendQuestInputStringPacket(str(self.petInventoryWnd.GetClearSlot()))
  3260. def __PetGetIncreaseBoni(self):
  3261. net.SendQuestInputStringPacket(str(self.petInventoryWnd.GetIncreaseBoni()))
  3262. def __PetSet(self, itemVnum):
  3263. if not self.petInventoryWnd:
  3264. import uiPet
  3265. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3266. self.petInventoryWnd.SetPet(itemVnum)
  3267. def __PetSetHead(self, itemVnum):
  3268. if not self.petInventoryWnd:
  3269. import uiPet
  3270. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3271. if int(itemVnum) > 0:
  3272. self.petInventoryWnd.SetHeadItem(itemVnum)
  3273. else:
  3274. self.petInventoryWnd.ClearHeadItem()
  3275. def __PetSetNeck(self, itemVnum):
  3276. if not self.petInventoryWnd:
  3277. import uiPet
  3278. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3279. if int(itemVnum) > 0:
  3280. self.petInventoryWnd.SetNeckItem(itemVnum)
  3281. else:
  3282. self.petInventoryWnd.ClearNeckItem()
  3283. def __PetSetFoot(self, itemVnum):
  3284. if not self.petInventoryWnd:
  3285. import uiPet
  3286. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3287. if int(itemVnum) > 0:
  3288. self.petInventoryWnd.SetFootItem(itemVnum)
  3289. else:
  3290. self.petInventoryWnd.ClearFootItem()
  3291. def __PetSetAttackValue(self, value):
  3292. if not self.petInventoryWnd:
  3293. import uiPet
  3294. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3295. self.petInventoryWnd.SetAttackValue(value)
  3296. def __PetSetMagicAttackValue(self, value):
  3297. if not self.petInventoryWnd:
  3298. import uiPet
  3299. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3300. self.petInventoryWnd.SetMagicAttackValue(value)
  3301. def __PetSetArmorValue(self, value):
  3302. if not self.petInventoryWnd:
  3303. import uiPet
  3304. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3305. self.petInventoryWnd.SetArmorValue(value)
  3306. def __PetSetName(self, name):
  3307. if not self.petInventoryWnd:
  3308. import uiPet
  3309. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3310. self.petInventoryWnd.SetName(name.replace("[_]", " "))
  3311. def __PetSetLevel(self, level):
  3312. if not self.petInventoryWnd:
  3313. import uiPet
  3314. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3315. self.petInventoryWnd.SetLevel(level)
  3316. def __PetSetExp(self, exp):
  3317. if not self.petInventoryWnd:
  3318. import uiPet
  3319. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3320. self.petInventoryWnd.SetExp(exp)
  3321. self.petInventoryWnd.UpdateExpBar()
  3322. def __PetSetMaxExp(self, maxexp):
  3323. if not self.petInventoryWnd:
  3324. import uiPet
  3325. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3326. self.petInventoryWnd.SetMaxExp(maxexp)
  3327. self.petInventoryWnd.UpdateExpBar()
  3328. def __PetSetSkillPoints(self, points):
  3329. if not self.petInventoryWnd:
  3330. import uiPet
  3331. self.petInventoryWnd = uiPet.PetInventoryDialog()
  3332. self.petInventoryWnd.SetSkillPoints(points)
  3333. def __PetSetOtoToplama(self):
  3334. constInfo.PET_TOPLAMA_AC = 1
  3335. self.petoplamas.Show()
  3336. # END_PET_INVENTORY
  3337. def __XMasSong_Enable(self, mode):
  3338. if "1"==mode:
  3339. print "XMAS_SONG ON"
  3340. XMAS_BGM = "xmas.mp3"
  3341. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3342. if musicInfo.fieldMusic != "":
  3343. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  3344. musicInfo.fieldMusic=XMAS_BGM
  3345. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  3346. else:
  3347. print "XMAS_SONG OFF"
  3348. if musicInfo.fieldMusic != "":
  3349. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  3350. musicInfo.fieldMusic=musicInfo.METIN2THEMA
  3351. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  3352. def __MuzikCal_Enable(self, mode):
  3353. if constInfo.MuzikKontrol == False:
  3354. self.__DayMode_Update("light")
  3355. if "1"==mode:
  3356. print "Muzik Acildi"
  3357. snd.SetMusicVolume(0.2)
  3358. systemSetting.SetMusicVolume(0.2)
  3359. snd.StopAllSound()
  3360. snd.FadeOutAllMusic()
  3361. self.enableXMasMuzik = True
  3362. constInfo.MuzikKontrol = True
  3363. self.startTimeXMasMuzik = app.GetTime()
  3364. XMAS_BGM = "istiklal.mp3"
  3365. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3366. if musicInfo.fieldMusic != "":
  3367. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3368. musicInfo.fieldMusic=XMAS_BGM
  3369. musicInfo.SaveLastPlayFieldMusic()
  3370. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3371. elif "2"==mode:
  3372. print "Muzik Acildi"
  3373. snd.SetMusicVolume(0.2)
  3374. systemSetting.SetMusicVolume(0.2)
  3375. snd.StopAllSound()
  3376. snd.FadeOutAllMusic()
  3377. self.enableXMasMuzik = True
  3378. constInfo.MuzikKontrol = True
  3379. self.startTimeXMasMuzik = app.GetTime()
  3380. XMAS_BGM = "onuncuyil.mp3"
  3381. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3382. if musicInfo.fieldMusic != "":
  3383. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3384. musicInfo.fieldMusic=XMAS_BGM
  3385. musicInfo.SaveLastPlayFieldMusic()
  3386. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3387. elif "3"==mode:
  3388. print "Muzik Acildi"
  3389. snd.SetMusicVolume(0.2)
  3390. systemSetting.SetMusicVolume(0.2)
  3391. snd.StopAllSound()
  3392. snd.FadeOutAllMusic()
  3393. self.enableXMasMuzik = True
  3394. constInfo.MuzikKontrol = True
  3395. self.startTimeXMasMuzik = app.GetTime()
  3396. XMAS_BGM = "izmirmarsi.mp3"
  3397. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3398. if musicInfo.fieldMusic != "":
  3399. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3400. musicInfo.fieldMusic=XMAS_BGM
  3401. musicInfo.SaveLastPlayFieldMusic()
  3402. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3403. elif "4"==mode:
  3404. print "Muzik Acildi"
  3405. snd.SetMusicVolume(0.2)
  3406. systemSetting.SetMusicVolume(0.2)
  3407. snd.StopAllSound()
  3408. snd.FadeOutAllMusic()
  3409. self.enableXMasMuzik = True
  3410. constInfo.MuzikKontrol = True
  3411. self.startTimeXMasMuzik = app.GetTime()
  3412. XMAS_BGM = "gundogdu.mp3"
  3413. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3414. if musicInfo.fieldMusic != "":
  3415. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3416. musicInfo.fieldMusic=XMAS_BGM
  3417. musicInfo.SaveLastPlayFieldMusic()
  3418. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3419. elif "5"==mode:
  3420. print "Muzik Acildi"
  3421. snd.SetMusicVolume(0.2)
  3422. systemSetting.SetMusicVolume(0.2)
  3423. snd.StopAllSound()
  3424. snd.FadeOutAllMusic()
  3425. self.enableXMasMuzik = True
  3426. constInfo.MuzikKontrol = True
  3427. self.startTimeXMasMuzik = app.GetTime()
  3428. XMAS_BGM = "ceddindeden.mp3"
  3429. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3430. if musicInfo.fieldMusic != "":
  3431. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3432. musicInfo.fieldMusic=XMAS_BGM
  3433. musicInfo.SaveLastPlayFieldMusic()
  3434. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3435. elif "6"==mode:
  3436. print "Muzik Acildi"
  3437. snd.SetMusicVolume(0.2)
  3438. systemSetting.SetMusicVolume(0.2)
  3439. snd.StopAllSound()
  3440. snd.FadeOutAllMusic()
  3441. self.enableXMasMuzik = True
  3442. constInfo.MuzikKontrol = True
  3443. self.startTimeXMasMuzik = app.GetTime()
  3444. XMAS_BGM = "eskiordu.mp3"
  3445. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3446. if musicInfo.fieldMusic != "":
  3447. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3448. musicInfo.fieldMusic=XMAS_BGM
  3449. musicInfo.SaveLastPlayFieldMusic()
  3450. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3451. elif "7"==mode:
  3452. print "Muzik Acildi"
  3453. snd.SetMusicVolume(0.2)
  3454. systemSetting.SetMusicVolume(0.2)
  3455. snd.StopAllSound()
  3456. snd.FadeOutAllMusic()
  3457. self.enableXMasMuzik = True
  3458. constInfo.MuzikKontrol = True
  3459. self.startTimeXMasMuzik = app.GetTime()
  3460. XMAS_BGM = "yelkenler.mp3"
  3461. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3462. if musicInfo.fieldMusic != "":
  3463. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3464. musicInfo.fieldMusic=XMAS_BGM
  3465. musicInfo.SaveLastPlayFieldMusic()
  3466. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3467. elif "8"==mode:
  3468. print "Muzik Acildi"
  3469. snd.SetMusicVolume(0.2)
  3470. systemSetting.SetMusicVolume(0.2)
  3471. snd.StopAllSound()
  3472. snd.FadeOutAllMusic()
  3473. self.enableXMasMuzik = True
  3474. constInfo.MuzikKontrol = True
  3475. self.startTimeXMasMuzik = app.GetTime()
  3476. XMAS_BGM = "turkiyem2.mp3"
  3477. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3478. if musicInfo.fieldMusic != "":
  3479. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3480. musicInfo.fieldMusic=XMAS_BGM
  3481. musicInfo.SaveLastPlayFieldMusic()
  3482. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3483. elif "9"==mode:
  3484. print "Muzik Acildi"
  3485. snd.SetMusicVolume(0.2)
  3486. systemSetting.SetMusicVolume(0.2)
  3487. snd.StopAllSound()
  3488. snd.FadeOutAllMusic()
  3489. self.enableXMasMuzik = True
  3490. constInfo.MuzikKontrol = True
  3491. self.startTimeXMasMuzik = app.GetTime()
  3492. XMAS_BGM = "plevne.mp3"
  3493. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3494. if musicInfo.fieldMusic != "":
  3495. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3496. musicInfo.fieldMusic=XMAS_BGM
  3497. musicInfo.SaveLastPlayFieldMusic()
  3498. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3499. elif "10"==mode:
  3500. print "Muzik Acildi"
  3501. snd.SetMusicVolume(0.2)
  3502. systemSetting.SetMusicVolume(0.2)
  3503. snd.StopAllSound()
  3504. snd.FadeOutAllMusic()
  3505. self.enableXMasMuzik = True
  3506. constInfo.MuzikKontrol = True
  3507. self.startTimeXMasMuzik = app.GetTime()
  3508. XMAS_BGM = "hucum.mp3"
  3509. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3510. if musicInfo.fieldMusic != "":
  3511. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3512. musicInfo.fieldMusic=XMAS_BGM
  3513. musicInfo.SaveLastPlayFieldMusic()
  3514. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3515. elif "11"==mode:
  3516. print "Muzik Acildi"
  3517. snd.SetMusicVolume(0.2)
  3518. systemSetting.SetMusicVolume(0.2)
  3519. snd.StopAllSound()
  3520. snd.FadeOutAllMusic()
  3521. self.enableXMasMuzik = True
  3522. constInfo.MuzikKontrol = True
  3523. self.startTimeXMasMuzik = app.GetTime()
  3524. XMAS_BGM = "cvrtoonplevne.mp3"
  3525. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3526. if musicInfo.fieldMusic != "":
  3527. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3528. musicInfo.fieldMusic=XMAS_BGM
  3529. musicInfo.SaveLastPlayFieldMusic()
  3530. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3531. elif "12"==mode:
  3532. print "Muzik Acildi"
  3533. snd.SetMusicVolume(0.2)
  3534. systemSetting.SetMusicVolume(0.2)
  3535. snd.StopAllSound()
  3536. snd.FadeOutAllMusic()
  3537. self.enableXMasMuzik = True
  3538. constInfo.MuzikKontrol = True
  3539. self.startTimeXMasMuzik = app.GetTime()
  3540. XMAS_BGM = "ozelharekat.mp3"
  3541. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3542. if musicInfo.fieldMusic != "":
  3543. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3544. musicInfo.fieldMusic=XMAS_BGM
  3545. musicInfo.SaveLastPlayFieldMusic()
  3546. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3547. elif "13"==mode:
  3548. print "Muzik Acildi"
  3549. snd.SetMusicVolume(0.2)
  3550. systemSetting.SetMusicVolume(0.2)
  3551. snd.StopAllSound()
  3552. snd.FadeOutAllMusic()
  3553. self.enableXMasMuzik = True
  3554. constInfo.MuzikKontrol = True
  3555. self.startTimeXMasMuzik = app.GetTime()
  3556. XMAS_BGM = "turkiyem.mp3"
  3557. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3558. if musicInfo.fieldMusic != "":
  3559. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3560. musicInfo.fieldMusic=XMAS_BGM
  3561. musicInfo.SaveLastPlayFieldMusic()
  3562. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3563. elif "14"==mode:
  3564. print "Muzik Acildi"
  3565. snd.SetMusicVolume(0.2)
  3566. systemSetting.SetMusicVolume(0.2)
  3567. snd.StopAllSound()
  3568. snd.FadeOutAllMusic()
  3569. self.enableXMasMuzik = True
  3570. constInfo.MuzikKontrol = True
  3571. self.startTimeXMasMuzik = app.GetTime()
  3572. XMAS_BGM = "mapus.mp3"
  3573. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3574. if musicInfo.fieldMusic != "":
  3575. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3576. musicInfo.fieldMusic=XMAS_BGM
  3577. musicInfo.SaveLastPlayFieldMusic()
  3578. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3579. elif "15"==mode:
  3580. print "Muzik Acildi"
  3581. snd.SetMusicVolume(0.2)
  3582. systemSetting.SetMusicVolume(0.2)
  3583. snd.StopAllSound()
  3584. snd.FadeOutAllMusic()
  3585. self.enableXMasMuzik = True
  3586. constInfo.MuzikKontrol = True
  3587. self.startTimeXMasMuzik = app.GetTime()
  3588. XMAS_BGM = "affet.mp3"
  3589. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3590. if musicInfo.fieldMusic != "":
  3591. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3592. musicInfo.fieldMusic=XMAS_BGM
  3593. musicInfo.SaveLastPlayFieldMusic()
  3594. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3595. elif "16"==mode:
  3596. print "Muzik Acildi"
  3597. snd.SetMusicVolume(0.2)
  3598. systemSetting.SetMusicVolume(0.2)
  3599. snd.StopAllSound()
  3600. snd.FadeOutAllMusic()
  3601. self.enableXMasMuzik = True
  3602. constInfo.MuzikKontrol = True
  3603. self.startTimeXMasMuzik = app.GetTime()
  3604. XMAS_BGM = "nilufer.mp3"
  3605. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3606. if musicInfo.fieldMusic != "":
  3607. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3608. musicInfo.fieldMusic=XMAS_BGM
  3609. musicInfo.SaveLastPlayFieldMusic()
  3610. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3611. elif "17"==mode:
  3612. print "Muzik Acildi"
  3613. snd.SetMusicVolume(0.2)
  3614. systemSetting.SetMusicVolume(0.2)
  3615. snd.StopAllSound()
  3616. snd.FadeOutAllMusic()
  3617. self.enableXMasMuzik = True
  3618. constInfo.MuzikKontrol = True
  3619. self.startTimeXMasMuzik = app.GetTime()
  3620. XMAS_BGM = "kackadeh.mp3"
  3621. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3622. if musicInfo.fieldMusic != "":
  3623. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3624. musicInfo.fieldMusic=XMAS_BGM
  3625. musicInfo.SaveLastPlayFieldMusic()
  3626. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3627. elif "18"==mode:
  3628. print "Muzik Acildi"
  3629. snd.SetMusicVolume(0.2)
  3630. systemSetting.SetMusicVolume(0.2)
  3631. snd.StopAllSound()
  3632. snd.FadeOutAllMusic()
  3633. self.enableXMasMuzik = True
  3634. constInfo.MuzikKontrol = True
  3635. self.startTimeXMasMuzik = app.GetTime()
  3636. XMAS_BGM = "hangimizsevmedik.mp3"
  3637. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3638. if musicInfo.fieldMusic != "":
  3639. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3640. musicInfo.fieldMusic=XMAS_BGM
  3641. musicInfo.SaveLastPlayFieldMusic()
  3642. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3643. elif "19"==mode:
  3644. print "Muzik Acildi"
  3645. snd.SetMusicVolume(0.2)
  3646. systemSetting.SetMusicVolume(0.2)
  3647. snd.StopAllSound()
  3648. snd.FadeOutAllMusic()
  3649. self.enableXMasMuzik = True
  3650. constInfo.MuzikKontrol = True
  3651. self.startTimeXMasMuzik = app.GetTime()
  3652. XMAS_BGM = "duygularim.mp3"
  3653. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3654. if musicInfo.fieldMusic != "":
  3655. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3656. musicInfo.fieldMusic=XMAS_BGM
  3657. musicInfo.SaveLastPlayFieldMusic()
  3658. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3659. elif "20"==mode:
  3660. print "Muzik Acildi"
  3661. snd.SetMusicVolume(0.2)
  3662. systemSetting.SetMusicVolume(0.2)
  3663. snd.StopAllSound()
  3664. snd.FadeOutAllMusic()
  3665. self.enableXMasMuzik = True
  3666. constInfo.MuzikKontrol = True
  3667. self.startTimeXMasMuzik = app.GetTime()
  3668. XMAS_BGM = "iyidegilim.mp3"
  3669. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3670. if musicInfo.fieldMusic != "":
  3671. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3672. musicInfo.fieldMusic=XMAS_BGM
  3673. musicInfo.SaveLastPlayFieldMusic()
  3674. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3675. elif "21"==mode:
  3676. print "Muzik Acildi"
  3677. snd.SetMusicVolume(0.2)
  3678. systemSetting.SetMusicVolume(0.2)
  3679. snd.StopAllSound()
  3680. snd.FadeOutAllMusic()
  3681. self.enableXMasMuzik = True
  3682. constInfo.MuzikKontrol = True
  3683. self.startTimeXMasMuzik = app.GetTime()
  3684. XMAS_BGM = "mutluolyeter.mp3"
  3685. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3686. if musicInfo.fieldMusic != "":
  3687. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3688. musicInfo.fieldMusic=XMAS_BGM
  3689. musicInfo.SaveLastPlayFieldMusic()
  3690. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3691. elif "22"==mode:
  3692. print "Muzik Acildi"
  3693. snd.SetMusicVolume(0.2)
  3694. systemSetting.SetMusicVolume(0.2)
  3695. snd.StopAllSound()
  3696. snd.FadeOutAllMusic()
  3697. self.enableXMasMuzik = True
  3698. constInfo.MuzikKontrol = True
  3699. self.startTimeXMasMuzik = app.GetTime()
  3700. XMAS_BGM = "senaldirma.mp3"
  3701. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3702. if musicInfo.fieldMusic != "":
  3703. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3704. musicInfo.fieldMusic=XMAS_BGM
  3705. musicInfo.SaveLastPlayFieldMusic()
  3706. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3707. elif "23"==mode:
  3708. print "Muzik Acildi"
  3709. snd.SetMusicVolume(0.2)
  3710. systemSetting.SetMusicVolume(0.2)
  3711. snd.StopAllSound()
  3712. snd.FadeOutAllMusic()
  3713. self.enableXMasMuzik = True
  3714. constInfo.MuzikKontrol = True
  3715. self.startTimeXMasMuzik = app.GetTime()
  3716. XMAS_BGM = "ahistanbul.mp3"
  3717. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3718. if musicInfo.fieldMusic != "":
  3719. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3720. musicInfo.fieldMusic=XMAS_BGM
  3721. musicInfo.SaveLastPlayFieldMusic()
  3722. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3723. elif "24"==mode:
  3724. print "Muzik Acildi"
  3725. snd.SetMusicVolume(0.2)
  3726. systemSetting.SetMusicVolume(0.2)
  3727. snd.StopAllSound()
  3728. snd.FadeOutAllMusic()
  3729. self.enableXMasMuzik = True
  3730. constInfo.MuzikKontrol = True
  3731. self.startTimeXMasMuzik = app.GetTime()
  3732. XMAS_BGM = "guzgulleri.mp3"
  3733. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3734. if musicInfo.fieldMusic != "":
  3735. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3736. musicInfo.fieldMusic=XMAS_BGM
  3737. musicInfo.SaveLastPlayFieldMusic()
  3738. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3739. elif "25"==mode:
  3740. print "Muzik Acildi"
  3741. snd.SetMusicVolume(0.2)
  3742. systemSetting.SetMusicVolume(0.2)
  3743. snd.StopAllSound()
  3744. snd.FadeOutAllMusic()
  3745. self.enableXMasMuzik = True
  3746. constInfo.MuzikKontrol = True
  3747. self.startTimeXMasMuzik = app.GetTime()
  3748. XMAS_BGM = "nerdenbileceksiniz.mp3"
  3749. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3750. if musicInfo.fieldMusic != "":
  3751. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3752. musicInfo.fieldMusic=XMAS_BGM
  3753. musicInfo.SaveLastPlayFieldMusic()
  3754. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3755. elif "26"==mode:
  3756. print "Muzik Acildi"
  3757. snd.SetMusicVolume(0.2)
  3758. systemSetting.SetMusicVolume(0.2)
  3759. snd.StopAllSound()
  3760. snd.FadeOutAllMusic()
  3761. self.enableXMasMuzik = True
  3762. constInfo.MuzikKontrol = True
  3763. self.startTimeXMasMuzik = app.GetTime()
  3764. XMAS_BGM = "ahmetkayasoyle.mp3"
  3765. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3766. if musicInfo.fieldMusic != "":
  3767. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3768. musicInfo.fieldMusic=XMAS_BGM
  3769. musicInfo.SaveLastPlayFieldMusic()
  3770. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3771. elif "27"==mode:
  3772. print "Muzik Acildi"
  3773. snd.SetMusicVolume(0.2)
  3774. systemSetting.SetMusicVolume(0.2)
  3775. snd.StopAllSound()
  3776. snd.FadeOutAllMusic()
  3777. self.enableXMasMuzik = True
  3778. constInfo.MuzikKontrol = True
  3779. self.startTimeXMasMuzik = app.GetTime()
  3780. XMAS_BGM = "duyanlara.mp3"
  3781. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3782. if musicInfo.fieldMusic != "":
  3783. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3784. musicInfo.fieldMusic=XMAS_BGM
  3785. musicInfo.SaveLastPlayFieldMusic()
  3786. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3787. elif "28"==mode:
  3788. print "Muzik Acildi"
  3789. snd.SetMusicVolume(0.2)
  3790. systemSetting.SetMusicVolume(0.2)
  3791. snd.StopAllSound()
  3792. snd.FadeOutAllMusic()
  3793. self.enableXMasMuzik = True
  3794. constInfo.MuzikKontrol = True
  3795. self.startTimeXMasMuzik = app.GetTime()
  3796. XMAS_BGM = "unutulan.mp3"
  3797. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3798. if musicInfo.fieldMusic != "":
  3799. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3800. musicInfo.fieldMusic=XMAS_BGM
  3801. musicInfo.SaveLastPlayFieldMusic()
  3802. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3803. elif "29"==mode:
  3804. print "Muzik Acildi"
  3805. snd.SetMusicVolume(0.2)
  3806. systemSetting.SetMusicVolume(0.2)
  3807. snd.StopAllSound()
  3808. snd.FadeOutAllMusic()
  3809. self.enableXMasMuzik = True
  3810. constInfo.MuzikKontrol = True
  3811. self.startTimeXMasMuzik = app.GetTime()
  3812. XMAS_BGM = "hanibekleyecektin.mp3"
  3813. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3814. if musicInfo.fieldMusic != "":
  3815. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3816. musicInfo.fieldMusic=XMAS_BGM
  3817. musicInfo.SaveLastPlayFieldMusic()
  3818. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3819. elif "30"==mode:
  3820. print "Muzik Acildi"
  3821. snd.SetMusicVolume(0.2)
  3822. systemSetting.SetMusicVolume(0.2)
  3823. snd.StopAllSound()
  3824. snd.FadeOutAllMusic()
  3825. self.enableXMasMuzik = True
  3826. constInfo.MuzikKontrol = True
  3827. self.startTimeXMasMuzik = app.GetTime()
  3828. XMAS_BGM = "kaybolalim.mp3"
  3829. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3830. if musicInfo.fieldMusic != "":
  3831. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3832. musicInfo.fieldMusic=XMAS_BGM
  3833. musicInfo.SaveLastPlayFieldMusic()
  3834. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3835. elif "31"==mode:
  3836. print "Muzik Acildi"
  3837. snd.SetMusicVolume(0.2)
  3838. systemSetting.SetMusicVolume(0.2)
  3839. snd.StopAllSound()
  3840. snd.FadeOutAllMusic()
  3841. self.enableXMasMuzik = True
  3842. constInfo.MuzikKontrol = True
  3843. self.startTimeXMasMuzik = app.GetTime()
  3844. XMAS_BGM = "leyla.mp3"
  3845. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3846. if musicInfo.fieldMusic != "":
  3847. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3848. musicInfo.fieldMusic=XMAS_BGM
  3849. musicInfo.SaveLastPlayFieldMusic()
  3850. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3851. elif "32"==mode:
  3852. print "Muzik Acildi"
  3853. snd.SetMusicVolume(0.2)
  3854. systemSetting.SetMusicVolume(0.2)
  3855. snd.StopAllSound()
  3856. snd.FadeOutAllMusic()
  3857. self.enableXMasMuzik = True
  3858. constInfo.MuzikKontrol = True
  3859. self.startTimeXMasMuzik = app.GetTime()
  3860. XMAS_BGM = "ezeleysan.mp3"
  3861. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3862. if musicInfo.fieldMusic != "":
  3863. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3864. musicInfo.fieldMusic=XMAS_BGM
  3865. musicInfo.SaveLastPlayFieldMusic()
  3866. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3867. elif "33"==mode:
  3868. print "Muzik Acildi"
  3869. snd.SetMusicVolume(0.2)
  3870. systemSetting.SetMusicVolume(0.2)
  3871. snd.StopAllSound()
  3872. snd.FadeOutAllMusic()
  3873. self.enableXMasMuzik = True
  3874. constInfo.MuzikKontrol = True
  3875. self.startTimeXMasMuzik = app.GetTime()
  3876. XMAS_BGM = "dayi1.mp3"
  3877. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3878. if musicInfo.fieldMusic != "":
  3879. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3880. musicInfo.fieldMusic=XMAS_BGM
  3881. musicInfo.SaveLastPlayFieldMusic()
  3882. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3883. elif "34"==mode:
  3884. print "Muzik Acildi"
  3885. snd.SetMusicVolume(0.2)
  3886. systemSetting.SetMusicVolume(0.2)
  3887. snd.StopAllSound()
  3888. snd.FadeOutAllMusic()
  3889. self.enableXMasMuzik = True
  3890. constInfo.MuzikKontrol = True
  3891. self.startTimeXMasMuzik = app.GetTime()
  3892. XMAS_BGM = "saricizme.mp3"
  3893. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3894. if musicInfo.fieldMusic != "":
  3895. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3896. musicInfo.fieldMusic=XMAS_BGM
  3897. musicInfo.SaveLastPlayFieldMusic()
  3898. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3899. elif "35"==mode:
  3900. print "Muzik Acildi"
  3901. snd.SetMusicVolume(0.2)
  3902. systemSetting.SetMusicVolume(0.2)
  3903. snd.StopAllSound()
  3904. snd.FadeOutAllMusic()
  3905. self.enableXMasMuzik = True
  3906. constInfo.MuzikKontrol = True
  3907. self.startTimeXMasMuzik = app.GetTime()
  3908. XMAS_BGM = "donence.mp3"
  3909. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3910. if musicInfo.fieldMusic != "":
  3911. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3912. musicInfo.fieldMusic=XMAS_BGM
  3913. musicInfo.SaveLastPlayFieldMusic()
  3914. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3915. elif "36"==mode:
  3916. print "Muzik Acildi"
  3917. snd.SetMusicVolume(0.2)
  3918. systemSetting.SetMusicVolume(0.2)
  3919. snd.StopAllSound()
  3920. snd.FadeOutAllMusic()
  3921. self.enableXMasMuzik = True
  3922. constInfo.MuzikKontrol = True
  3923. self.startTimeXMasMuzik = app.GetTime()
  3924. XMAS_BGM = "islakislak.mp3"
  3925. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3926. if musicInfo.fieldMusic != "":
  3927. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3928. musicInfo.fieldMusic=XMAS_BGM
  3929. musicInfo.SaveLastPlayFieldMusic()
  3930. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3931. elif "37"==mode:
  3932. print "Muzik Acildi"
  3933. snd.SetMusicVolume(0.2)
  3934. systemSetting.SetMusicVolume(0.2)
  3935. snd.StopAllSound()
  3936. snd.FadeOutAllMusic()
  3937. self.enableXMasMuzik = True
  3938. constInfo.MuzikKontrol = True
  3939. self.startTimeXMasMuzik = app.GetTime()
  3940. XMAS_BGM = "almaher.mp3"
  3941. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3942. if musicInfo.fieldMusic != "":
  3943. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3944. musicInfo.fieldMusic=XMAS_BGM
  3945. musicInfo.SaveLastPlayFieldMusic()
  3946. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3947. elif "38"==mode:
  3948. print "Muzik Acildi"
  3949. snd.SetMusicVolume(0.2)
  3950. systemSetting.SetMusicVolume(0.2)
  3951. snd.StopAllSound()
  3952. snd.FadeOutAllMusic()
  3953. self.enableXMasMuzik = True
  3954. constInfo.MuzikKontrol = True
  3955. self.startTimeXMasMuzik = app.GetTime()
  3956. XMAS_BGM = "babylon.mp3"
  3957. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3958. if musicInfo.fieldMusic != "":
  3959. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3960. musicInfo.fieldMusic=XMAS_BGM
  3961. musicInfo.SaveLastPlayFieldMusic()
  3962. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3963. elif "39"==mode:
  3964. print "Muzik Acildi"
  3965. snd.SetMusicVolume(0.2)
  3966. systemSetting.SetMusicVolume(0.2)
  3967. snd.StopAllSound()
  3968. snd.FadeOutAllMusic()
  3969. self.enableXMasMuzik = True
  3970. constInfo.MuzikKontrol = True
  3971. self.startTimeXMasMuzik = app.GetTime()
  3972. XMAS_BGM = "mefal.mp3"
  3973. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3974. if musicInfo.fieldMusic != "":
  3975. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3976. musicInfo.fieldMusic=XMAS_BGM
  3977. musicInfo.SaveLastPlayFieldMusic()
  3978. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3979. elif "40"==mode:
  3980. print "Muzik Acildi"
  3981. snd.SetMusicVolume(0.2)
  3982. systemSetting.SetMusicVolume(0.2)
  3983. snd.StopAllSound()
  3984. snd.FadeOutAllMusic()
  3985. self.enableXMasMuzik = True
  3986. constInfo.MuzikKontrol = True
  3987. self.startTimeXMasMuzik = app.GetTime()
  3988. XMAS_BGM = "amorfene.mp3"
  3989. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  3990. if musicInfo.fieldMusic != "":
  3991. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  3992. musicInfo.fieldMusic=XMAS_BGM
  3993. musicInfo.SaveLastPlayFieldMusic()
  3994. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  3995. elif "41"==mode:
  3996. print "Muzik Acildi"
  3997. snd.SetMusicVolume(0.2)
  3998. systemSetting.SetMusicVolume(0.2)
  3999. snd.StopAllSound()
  4000. snd.FadeOutAllMusic()
  4001. self.enableXMasMuzik = True
  4002. constInfo.MuzikKontrol = True
  4003. self.startTimeXMasMuzik = app.GetTime()
  4004. XMAS_BGM = "neset2.mp3"
  4005. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4006. if musicInfo.fieldMusic != "":
  4007. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4008. musicInfo.fieldMusic=XMAS_BGM
  4009. musicInfo.SaveLastPlayFieldMusic()
  4010. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4011. elif "42"==mode:
  4012. print "Muzik Acildi"
  4013. snd.SetMusicVolume(0.2)
  4014. systemSetting.SetMusicVolume(0.2)
  4015. snd.StopAllSound()
  4016. snd.FadeOutAllMusic()
  4017. self.enableXMasMuzik = True
  4018. constInfo.MuzikKontrol = True
  4019. self.startTimeXMasMuzik = app.GetTime()
  4020. XMAS_BGM = "neset3.mp3"
  4021. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4022. if musicInfo.fieldMusic != "":
  4023. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4024. musicInfo.fieldMusic=XMAS_BGM
  4025. musicInfo.SaveLastPlayFieldMusic()
  4026. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4027. elif "43"==mode:
  4028. print "Muzik Acildi"
  4029. snd.SetMusicVolume(0.2)
  4030. systemSetting.SetMusicVolume(0.2)
  4031. snd.StopAllSound()
  4032. snd.FadeOutAllMusic()
  4033. self.enableXMasMuzik = True
  4034. constInfo.MuzikKontrol = True
  4035. self.startTimeXMasMuzik = app.GetTime()
  4036. XMAS_BGM = "karabakh.mp3"
  4037. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4038. if musicInfo.fieldMusic != "":
  4039. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4040. musicInfo.fieldMusic=XMAS_BGM
  4041. musicInfo.SaveLastPlayFieldMusic()
  4042. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4043. elif "44"==mode:
  4044. print "Muzik Acildi"
  4045. snd.SetMusicVolume(0.2)
  4046. systemSetting.SetMusicVolume(0.2)
  4047. snd.StopAllSound()
  4048. snd.FadeOutAllMusic()
  4049. self.enableXMasMuzik = True
  4050. constInfo.MuzikKontrol = True
  4051. self.startTimeXMasMuzik = app.GetTime()
  4052. XMAS_BGM = "medcezir.mp3"
  4053. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4054. if musicInfo.fieldMusic != "":
  4055. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4056. musicInfo.fieldMusic=XMAS_BGM
  4057. musicInfo.SaveLastPlayFieldMusic()
  4058. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4059. elif "45"==mode:
  4060. print "Muzik Acildi"
  4061. snd.SetMusicVolume(0.2)
  4062. systemSetting.SetMusicVolume(0.2)
  4063. snd.StopAllSound()
  4064. snd.FadeOutAllMusic()
  4065. self.enableXMasMuzik = True
  4066. constInfo.MuzikKontrol = True
  4067. self.startTimeXMasMuzik = app.GetTime()
  4068. XMAS_BGM = "suspus.mp3"
  4069. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4070. if musicInfo.fieldMusic != "":
  4071. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4072. musicInfo.fieldMusic=XMAS_BGM
  4073. musicInfo.SaveLastPlayFieldMusic()
  4074. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4075. elif "46"==mode:
  4076. print "Muzik Acildi"
  4077. snd.SetMusicVolume(0.2)
  4078. systemSetting.SetMusicVolume(0.2)
  4079. snd.StopAllSound()
  4080. snd.FadeOutAllMusic()
  4081. self.enableXMasMuzik = True
  4082. constInfo.MuzikKontrol = True
  4083. self.startTimeXMasMuzik = app.GetTime()
  4084. XMAS_BGM = "neyimvarki.mp3"
  4085. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4086. if musicInfo.fieldMusic != "":
  4087. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4088. musicInfo.fieldMusic=XMAS_BGM
  4089. musicInfo.SaveLastPlayFieldMusic()
  4090. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4091. elif "47"==mode:
  4092. print "Muzik Acildi"
  4093. snd.SetMusicVolume(0.2)
  4094. systemSetting.SetMusicVolume(0.2)
  4095. snd.StopAllSound()
  4096. snd.FadeOutAllMusic()
  4097. self.enableXMasMuzik = True
  4098. constInfo.MuzikKontrol = True
  4099. self.startTimeXMasMuzik = app.GetTime()
  4100. XMAS_BGM = "birpesimist.mp3"
  4101. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4102. if musicInfo.fieldMusic != "":
  4103. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4104. musicInfo.fieldMusic=XMAS_BGM
  4105. musicInfo.SaveLastPlayFieldMusic()
  4106. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4107. elif "48"==mode:
  4108. print "Muzik Acildi"
  4109. snd.SetMusicVolume(0.2)
  4110. systemSetting.SetMusicVolume(0.2)
  4111. snd.StopAllSound()
  4112. snd.FadeOutAllMusic()
  4113. self.enableXMasMuzik = True
  4114. constInfo.MuzikKontrol = True
  4115. self.startTimeXMasMuzik = app.GetTime()
  4116. XMAS_BGM = "galiba.mp3"
  4117. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4118. if musicInfo.fieldMusic != "":
  4119. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4120. musicInfo.fieldMusic=XMAS_BGM
  4121. musicInfo.SaveLastPlayFieldMusic()
  4122. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4123. elif "49"==mode:
  4124. print "Muzik Acildi"
  4125. snd.SetMusicVolume(0.2)
  4126. systemSetting.SetMusicVolume(0.2)
  4127. snd.StopAllSound()
  4128. snd.FadeOutAllMusic()
  4129. self.enableXMasMuzik = True
  4130. constInfo.MuzikKontrol = True
  4131. self.startTimeXMasMuzik = app.GetTime()
  4132. XMAS_BGM = "toztaneleri.mp3"
  4133. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4134. if musicInfo.fieldMusic != "":
  4135. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4136. musicInfo.fieldMusic=XMAS_BGM
  4137. musicInfo.SaveLastPlayFieldMusic()
  4138. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4139. elif "50"==mode:
  4140. print "Muzik Acildi"
  4141. snd.SetMusicVolume(0.2)
  4142. systemSetting.SetMusicVolume(0.2)
  4143. snd.StopAllSound()
  4144. snd.FadeOutAllMusic()
  4145. self.enableXMasMuzik = True
  4146. constInfo.MuzikKontrol = True
  4147. self.startTimeXMasMuzik = app.GetTime()
  4148. XMAS_BGM = "golgeharamileri.mp3"
  4149. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4150. if musicInfo.fieldMusic != "":
  4151. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4152. musicInfo.fieldMusic=XMAS_BGM
  4153. musicInfo.SaveLastPlayFieldMusic()
  4154. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4155. elif "51"==mode:
  4156. print "Muzik Acildi"
  4157. snd.SetMusicVolume(0.2)
  4158. systemSetting.SetMusicVolume(0.2)
  4159. snd.StopAllSound()
  4160. snd.FadeOutAllMusic()
  4161. self.enableXMasMuzik = True
  4162. constInfo.MuzikKontrol = True
  4163. self.startTimeXMasMuzik = app.GetTime()
  4164. XMAS_BGM = "gazapizm.mp3"
  4165. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4166. if musicInfo.fieldMusic != "":
  4167. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4168. musicInfo.fieldMusic=XMAS_BGM
  4169. musicInfo.SaveLastPlayFieldMusic()
  4170. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4171. elif "52"==mode:
  4172. print "Muzik Acildi"
  4173. snd.SetMusicVolume(0.2)
  4174. systemSetting.SetMusicVolume(0.2)
  4175. snd.StopAllSound()
  4176. snd.FadeOutAllMusic()
  4177. self.enableXMasMuzik = True
  4178. constInfo.MuzikKontrol = True
  4179. self.startTimeXMasMuzik = app.GetTime()
  4180. XMAS_BGM = "canbay.mp3"
  4181. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4182. if musicInfo.fieldMusic != "":
  4183. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4184. musicInfo.fieldMusic=XMAS_BGM
  4185. musicInfo.SaveLastPlayFieldMusic()
  4186. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4187. elif "53"==mode:
  4188. print "Muzik Acildi"
  4189. snd.SetMusicVolume(0.2)
  4190. systemSetting.SetMusicVolume(0.2)
  4191. snd.StopAllSound()
  4192. snd.FadeOutAllMusic()
  4193. self.enableXMasMuzik = True
  4194. constInfo.MuzikKontrol = True
  4195. self.startTimeXMasMuzik = app.GetTime()
  4196. XMAS_BGM = "icimdekihasretim.mp3"
  4197. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4198. if musicInfo.fieldMusic != "":
  4199. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4200. musicInfo.fieldMusic=XMAS_BGM
  4201. musicInfo.SaveLastPlayFieldMusic()
  4202. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4203. elif "54"==mode:
  4204. print "Muzik Acildi"
  4205. snd.SetMusicVolume(0.2)
  4206. systemSetting.SetMusicVolume(0.2)
  4207. snd.StopAllSound()
  4208. snd.FadeOutAllMusic()
  4209. self.enableXMasMuzik = True
  4210. constInfo.MuzikKontrol = True
  4211. self.startTimeXMasMuzik = app.GetTime()
  4212. XMAS_BGM = "birdahayak.mp3"
  4213. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4214. if musicInfo.fieldMusic != "":
  4215. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4216. musicInfo.fieldMusic=XMAS_BGM
  4217. musicInfo.SaveLastPlayFieldMusic()
  4218. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4219. elif "55"==mode:
  4220. print "Muzik Acildi"
  4221. snd.SetMusicVolume(0.2)
  4222. systemSetting.SetMusicVolume(0.2)
  4223. snd.StopAllSound()
  4224. snd.FadeOutAllMusic()
  4225. self.enableXMasMuzik = True
  4226. constInfo.MuzikKontrol = True
  4227. self.startTimeXMasMuzik = app.GetTime()
  4228. XMAS_BGM = "bisonraki.mp3"
  4229. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4230. if musicInfo.fieldMusic != "":
  4231. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4232. musicInfo.fieldMusic=XMAS_BGM
  4233. musicInfo.SaveLastPlayFieldMusic()
  4234. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4235. elif "56"==mode:
  4236. print "Muzik Acildi"
  4237. snd.SetMusicVolume(0.2)
  4238. systemSetting.SetMusicVolume(0.2)
  4239. snd.StopAllSound()
  4240. snd.FadeOutAllMusic()
  4241. self.enableXMasMuzik = True
  4242. constInfo.MuzikKontrol = True
  4243. self.startTimeXMasMuzik = app.GetTime()
  4244. XMAS_BGM = "azaphg.mp3"
  4245. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4246. if musicInfo.fieldMusic != "":
  4247. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4248. musicInfo.fieldMusic=XMAS_BGM
  4249. musicInfo.SaveLastPlayFieldMusic()
  4250. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4251. elif "57"==mode:
  4252. print "Muzik Acildi"
  4253. snd.SetMusicVolume(0.2)
  4254. systemSetting.SetMusicVolume(0.2)
  4255. snd.StopAllSound()
  4256. snd.FadeOutAllMusic()
  4257. self.enableXMasMuzik = True
  4258. constInfo.MuzikKontrol = True
  4259. self.startTimeXMasMuzik = app.GetTime()
  4260. XMAS_BGM = "canbay.mp3"
  4261. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4262. if musicInfo.fieldMusic != "":
  4263. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4264. musicInfo.fieldMusic=XMAS_BGM
  4265. musicInfo.SaveLastPlayFieldMusic()
  4266. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4267. elif "58"==mode:
  4268. print "Muzik Acildi"
  4269. snd.SetMusicVolume(0.2)
  4270. systemSetting.SetMusicVolume(0.2)
  4271. snd.StopAllSound()
  4272. snd.FadeOutAllMusic()
  4273. self.enableXMasMuzik = True
  4274. constInfo.MuzikKontrol = True
  4275. self.startTimeXMasMuzik = app.GetTime()
  4276. XMAS_BGM = "katliam3.mp3"
  4277. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4278. if musicInfo.fieldMusic != "":
  4279. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4280. musicInfo.fieldMusic=XMAS_BGM
  4281. musicInfo.SaveLastPlayFieldMusic()
  4282. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4283. elif "59"==mode:
  4284. print "Muzik Acildi"
  4285. snd.SetMusicVolume(0.2)
  4286. systemSetting.SetMusicVolume(0.2)
  4287. snd.StopAllSound()
  4288. snd.FadeOutAllMusic()
  4289. self.enableXMasMuzik = True
  4290. constInfo.MuzikKontrol = True
  4291. self.startTimeXMasMuzik = app.GetTime()
  4292. XMAS_BGM = "carsamba.mp3"
  4293. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4294. if musicInfo.fieldMusic != "":
  4295. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4296. musicInfo.fieldMusic=XMAS_BGM
  4297. musicInfo.SaveLastPlayFieldMusic()
  4298. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4299. elif "60"==mode:
  4300. print "Muzik Acildi"
  4301. snd.SetMusicVolume(0.2)
  4302. systemSetting.SetMusicVolume(0.2)
  4303. snd.StopAllSound()
  4304. snd.FadeOutAllMusic()
  4305. self.enableXMasMuzik = True
  4306. constInfo.MuzikKontrol = True
  4307. self.startTimeXMasMuzik = app.GetTime()
  4308. XMAS_BGM = "ikikeklik.mp3"
  4309. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4310. if musicInfo.fieldMusic != "":
  4311. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4312. musicInfo.fieldMusic=XMAS_BGM
  4313. musicInfo.SaveLastPlayFieldMusic()
  4314. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4315. elif "61"==mode:
  4316. print "Muzik Acildi"
  4317. snd.SetMusicVolume(0.2)
  4318. systemSetting.SetMusicVolume(0.2)
  4319. snd.StopAllSound()
  4320. snd.FadeOutAllMusic()
  4321. self.enableXMasMuzik = True
  4322. constInfo.MuzikKontrol = True
  4323. self.startTimeXMasMuzik = app.GetTime()
  4324. XMAS_BGM = "dimbillan.mp3"
  4325. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4326. if musicInfo.fieldMusic != "":
  4327. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4328. musicInfo.fieldMusic=XMAS_BGM
  4329. musicInfo.SaveLastPlayFieldMusic()
  4330. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4331. elif "62"==mode:
  4332. print "Muzik Acildi"
  4333. snd.SetMusicVolume(0.2)
  4334. systemSetting.SetMusicVolume(0.2)
  4335. snd.StopAllSound()
  4336. snd.FadeOutAllMusic()
  4337. self.enableXMasMuzik = True
  4338. constInfo.MuzikKontrol = True
  4339. self.startTimeXMasMuzik = app.GetTime()
  4340. XMAS_BGM = "duldul.mp3"
  4341. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4342. if musicInfo.fieldMusic != "":
  4343. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4344. musicInfo.fieldMusic=XMAS_BGM
  4345. musicInfo.SaveLastPlayFieldMusic()
  4346. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4347. elif "63"==mode:
  4348. print "Muzik Acildi"
  4349. snd.SetMusicVolume(0.2)
  4350. systemSetting.SetMusicVolume(0.2)
  4351. snd.StopAllSound()
  4352. snd.FadeOutAllMusic()
  4353. self.enableXMasMuzik = True
  4354. constInfo.MuzikKontrol = True
  4355. self.startTimeXMasMuzik = app.GetTime()
  4356. XMAS_BGM = "zalimgeceler.mp3"
  4357. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4358. if musicInfo.fieldMusic != "":
  4359. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4360. musicInfo.fieldMusic=XMAS_BGM
  4361. musicInfo.SaveLastPlayFieldMusic()
  4362. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4363. elif "64"==mode:
  4364. print "Muzik Acildi"
  4365. snd.SetMusicVolume(0.2)
  4366. systemSetting.SetMusicVolume(0.2)
  4367. snd.StopAllSound()
  4368. snd.FadeOutAllMusic()
  4369. self.enableXMasMuzik = True
  4370. constInfo.MuzikKontrol = True
  4371. self.startTimeXMasMuzik = app.GetTime()
  4372. XMAS_BGM = "asbaba.mp3"
  4373. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4374. if musicInfo.fieldMusic != "":
  4375. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4376. musicInfo.fieldMusic=XMAS_BGM
  4377. musicInfo.SaveLastPlayFieldMusic()
  4378. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4379. elif "65"==mode:
  4380. print "Muzik Acildi"
  4381. snd.SetMusicVolume(0.2)
  4382. systemSetting.SetMusicVolume(0.2)
  4383. snd.StopAllSound()
  4384. snd.FadeOutAllMusic()
  4385. self.enableXMasMuzik = True
  4386. constInfo.MuzikKontrol = True
  4387. self.startTimeXMasMuzik = app.GetTime()
  4388. XMAS_BGM = "tabut.mp3"
  4389. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4390. if musicInfo.fieldMusic != "":
  4391. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4392. musicInfo.fieldMusic=XMAS_BGM
  4393. musicInfo.SaveLastPlayFieldMusic()
  4394. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4395. elif "66"==mode:
  4396. print "Muzik Acildi"
  4397. snd.SetMusicVolume(0.2)
  4398. systemSetting.SetMusicVolume(0.2)
  4399. snd.StopAllSound()
  4400. snd.FadeOutAllMusic()
  4401. self.enableXMasMuzik = True
  4402. constInfo.MuzikKontrol = True
  4403. self.startTimeXMasMuzik = app.GetTime()
  4404. XMAS_BGM = "neset1.mp3"
  4405. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4406. if musicInfo.fieldMusic != "":
  4407. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4408. musicInfo.fieldMusic=XMAS_BGM
  4409. musicInfo.SaveLastPlayFieldMusic()
  4410. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4411. elif "67"==mode:
  4412. print "Muzik Acildi"
  4413. snd.SetMusicVolume(0.2)
  4414. systemSetting.SetMusicVolume(0.2)
  4415. snd.StopAllSound()
  4416. snd.FadeOutAllMusic()
  4417. self.enableXMasMuzik = True
  4418. constInfo.MuzikKontrol = True
  4419. self.startTimeXMasMuzik = app.GetTime()
  4420. XMAS_BGM = "fidayda.mp3"
  4421. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4422. if musicInfo.fieldMusic != "":
  4423. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4424. musicInfo.fieldMusic=XMAS_BGM
  4425. musicInfo.SaveLastPlayFieldMusic()
  4426. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4427. elif "68"==mode:
  4428. print "Muzik Acildi"
  4429. snd.SetMusicVolume(0.2)
  4430. systemSetting.SetMusicVolume(0.2)
  4431. snd.StopAllSound()
  4432. snd.FadeOutAllMusic()
  4433. self.enableXMasMuzik = True
  4434. constInfo.MuzikKontrol = True
  4435. self.startTimeXMasMuzik = app.GetTime()
  4436. XMAS_BGM = "dilara.mp3"
  4437. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4438. if musicInfo.fieldMusic != "":
  4439. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4440. musicInfo.fieldMusic=XMAS_BGM
  4441. musicInfo.SaveLastPlayFieldMusic()
  4442. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4443. elif "69"==mode:
  4444. print "Muzik Acildi"
  4445. snd.SetMusicVolume(0.2)
  4446. systemSetting.SetMusicVolume(0.2)
  4447. snd.StopAllSound()
  4448. snd.FadeOutAllMusic()
  4449. self.enableXMasMuzik = True
  4450. constInfo.MuzikKontrol = True
  4451. self.startTimeXMasMuzik = app.GetTime()
  4452. XMAS_BGM = "bahcaduvari.mp3"
  4453. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4454. if musicInfo.fieldMusic != "":
  4455. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4456. musicInfo.fieldMusic=XMAS_BGM
  4457. musicInfo.SaveLastPlayFieldMusic()
  4458. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4459. elif "70"==mode:
  4460. print "Muzik Acildi"
  4461. snd.SetMusicVolume(0.2)
  4462. systemSetting.SetMusicVolume(0.2)
  4463. snd.StopAllSound()
  4464. snd.FadeOutAllMusic()
  4465. self.enableXMasMuzik = True
  4466. constInfo.MuzikKontrol = True
  4467. self.startTimeXMasMuzik = app.GetTime()
  4468. XMAS_BGM = "bbnomoney.mp3"
  4469. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4470. if musicInfo.fieldMusic != "":
  4471. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4472. musicInfo.fieldMusic=XMAS_BGM
  4473. musicInfo.SaveLastPlayFieldMusic()
  4474. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4475. elif "71"==mode:
  4476. print "Muzik Acildi"
  4477. snd.SetMusicVolume(0.2)
  4478. systemSetting.SetMusicVolume(0.2)
  4479. snd.StopAllSound()
  4480. snd.FadeOutAllMusic()
  4481. self.enableXMasMuzik = True
  4482. constInfo.MuzikKontrol = True
  4483. self.startTimeXMasMuzik = app.GetTime()
  4484. XMAS_BGM = "yad.mp3"
  4485. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  4486. if musicInfo.fieldMusic != "":
  4487. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic , 1)
  4488. musicInfo.fieldMusic=XMAS_BGM
  4489. musicInfo.SaveLastPlayFieldMusic()
  4490. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic,1)
  4491. else:
  4492. print "MuzikCal Kapatildi"
  4493. snd.SetMusicVolume(0)
  4494. systemSetting.SetMusicVolume(0)
  4495. snd.StopAllSound()
  4496. snd.FadeOutAllMusic()
  4497. self.__DayMode_Update("light")
  4498. self.enableXMasMuzik = False
  4499. constInfo.MuzikKontrol = False
  4500. if musicInfo.fieldMusic != "":
  4501. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic,1)
  4502. musicInfo.fieldMusic=musicInfo.METIN2THEMA
  4503. musicInfo.SaveLastPlayFieldMusic()
  4504. musicInfo.loginMusic=""
  4505. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  4506. def __RestartDialog_Close(self):
  4507. self.interface.CloseRestartDialog()
  4508. def __Console_Enable(self):
  4509. constInfo.CONSOLE_ENABLE = TRUE
  4510. self.consoleEnable = TRUE
  4511. app.EnableSpecialCameraMode()
  4512. ui.EnablePaste(TRUE)
  4513. def __muerto_guerras(self, id):
  4514. constInfo.muerto_guerras = int(id)
  4515. def __alubias(self):
  4516. for i in xrange(player.INVENTORY_PAGE_SIZE*2):
  4517. if player.GetItemIndex(i) in (70102,):
  4518. net.SendItemUsePacket(i)
  4519. net.SendItemUsePacket(i)
  4520. net.SendItemUsePacket(i)
  4521. net.SendItemUsePacket(i)
  4522. net.SendItemUsePacket(i)
  4523. net.SendItemUsePacket(i)
  4524. break
  4525. def __spirit2(self):
  4526. net.SendChatPacket("(spirit2)")
  4527. def __proteccion_guerra(self):
  4528. net.SendChatPacket("(proteccion_guerra)")
  4529. def __contador_usuarios_guerra(self, contador_usuarios_guerra):
  4530. self.contador_usuarios_guerra.SetText(contador_usuarios_guerra)
  4531. def __muertos_guerra(self, muertos_guerra):
  4532. self.muertos_guerra.SetText(muertos_guerra)
  4533. def __caido_guerra(self, caido_guerra):
  4534. self.caido_guerra.SetText(caido_guerra)
  4535. def __mostrar_usuarios(self):
  4536. self.Espacio.Show()
  4537. self.contador_usuarios_guerra.Show()
  4538. self.muertos_guerra.Show()
  4539. self.caido_guerra.Show()
  4540. self.usuarios_guerra.Show()
  4541. self.ranking_guerra.Show()
  4542. self.ranking_caido.Show()
  4543. def __ocultar_usuarios(self):
  4544. self.Espacio.Hide()
  4545. self.contador_usuarios_guerra.Hide()
  4546. self.muertos_guerra.Hide()
  4547. self.caido_guerra.Hide()
  4548. self.usuarios_guerra.Hide()
  4549. self.ranking_guerra.Hide()
  4550. self.ranking_caido.Hide()
  4551. def __ataque_guerra(self):
  4552. constInfo.ataque_guerra = 1
  4553. def __ataque_guerra1(self):
  4554. constInfo.ataque_guerra = 0
  4555. def __activar_libre(self):
  4556. net.SendChatPacket("/pkmode 2")
  4557. def __grupobug(self):
  4558. net.SendPartyExitPacket()
  4559. ## PrivateShop
  4560. def __PrivateShop_Open(self):
  4561. constInfo.IS_KASMIR = 0
  4562. self.uiNewShop.Show(False)
  4563. if app.ENABLE_SHOP_DECORATION_SYSTEM:
  4564. def __PrivateShop_Kasmir_Open(self):
  4565. constInfo.IS_KASMIR = 1
  4566. self.uiNewShopCreate.OpenPrivateShopBuilder()
  4567. if app.ENABLE_SHOP_DECORATION_SYSTEM:
  4568. ## Ka?mir Paketi
  4569. def Kasmir_Paketi_Open(self):
  4570. constInfo.IS_KASMIR = 1
  4571. self.uiNewShop.Show(True)
  4572. def BINARY_PrivateShop_Appear(self, vid, text, baslik):
  4573. if chr.GetInstanceType(vid) in [chr.INSTANCE_TYPE_PLAYER, chr.INSTANCE_TYPE_NPC]:
  4574. self.interface.AppearPrivateShop(vid, baslik, text)
  4575. def BINARY_PrivateShop_Disappear(self, vid):
  4576. if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_PLAYER):
  4577. self.interface.DisappearPrivateShop(vid)
  4578. ## DayMode
  4579. def __PRESERVE_DayMode_Update(self, mode):
  4580. if "light" == mode:
  4581. if app.ENABLE_12ZI:
  4582. if not self.__IsXMasMap():
  4583. return
  4584. # background.SetEnvironmentData(background.DAY_MODE_LIGHT)
  4585. background.SetEnvironmentData(0)
  4586. else:
  4587. background.SetEnvironmentData(0)
  4588. elif "dark" == mode:
  4589. if not self.__IsXMasMap():
  4590. return
  4591. # if app.ENABLE_12ZI:
  4592. # background.RegisterEnvironmentData(background.DAY_MODE_DARK, constInfo.ENVIRONMENT_NIGHT)
  4593. # background.SetEnvironmentData(background.DAY_MODE_DARK)
  4594. # else:
  4595. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  4596. background.SetEnvironmentData(1)
  4597. def __DayMode_Update(self, mode):
  4598. if "light" == mode:
  4599. if app.ENABLE_12ZI:
  4600. if not self.__IsXMasMap():
  4601. return
  4602. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
  4603. elif "dark" == mode:
  4604. if not self.__IsXMasMap():
  4605. return
  4606. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
  4607. def __DayMode_OnCompleteChangeToLight(self):
  4608. if app.ENABLE_12ZI:
  4609. # background.SetEnvironmentData(background.DAY_MODE_LIGHT)
  4610. background.SetEnvironmentData(0)
  4611. else:
  4612. background.SetEnvironmentData(0)
  4613. self.curtain.FadeIn()
  4614. def __DayMode_OnCompleteChangeToDark(self):
  4615. # if app.ENABLE_12ZI:
  4616. # background.RegisterEnvironmentData(background.DAY_MODE_DARK, constInfo.ENVIRONMENT_NIGHT)
  4617. # background.SetEnvironmentData(background.DAY_MODE_DARK)
  4618. # else:
  4619. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  4620. background.SetEnvironmentData(1)
  4621. self.curtain.FadeIn()
  4622. if app.ENABLE_12ZI:
  4623. def BINARY_SetEnvironment(self, idx):
  4624. self.indexEnv = idx
  4625. self.curtain.SAFE_FadeOut(self.__SetEnvironment)
  4626. def __SetEnvironment(self):
  4627. background.SetEnvironmentData(self.indexEnv)
  4628. self.curtain.FadeIn()
  4629. ## XMasBoom
  4630. def __XMasBoom_Update(self):
  4631. self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
  4632. if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
  4633. return
  4634. boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
  4635. boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
  4636. if app.GetTime() - self.startTimeXMasBoom > boomTime:
  4637. self.indexXMasBoom += 1
  4638. for i in xrange(boomCount):
  4639. self.__XMasBoom_Boom()
  4640. def __XMasBoom_Boom(self):
  4641. x, y, z = player.GetMainCharacterPosition()
  4642. randX = app.GetRandom(-150, 150)
  4643. randY = app.GetRandom(-150, 150)
  4644. snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
  4645. def __XMasMuzik_Update(self):
  4646. self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
  4647. if self.indexXMasMuzik >= len(self.BOOM_DATA_LIST):
  4648. return
  4649. boomTime = self.BOOM_DATA_LIST[self.indexXMasMuzik][0]
  4650. boomCount = self.BOOM_DATA_LIST[self.indexXMasMuzik][1]
  4651. if app.GetTime() - self.startTimeXMasMuzik > boomTime:
  4652. self.indexXMasMuzik += 1
  4653. for i in xrange(boomCount):
  4654. self.__XMasMuzik_Boom()
  4655. def __XMasMuzik_Boom(self):
  4656. x, y, z = player.GetMainCharacterPosition()
  4657. randX = app.GetRandom(-150, 150)
  4658. randY = app.GetRandom(-150, 150)
  4659. snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
  4660. def __PartyRequestQuestion(self, vid):
  4661. vid = int(vid)
  4662. partyRequestQuestionDialog = uiCommon.QuestionDialog()
  4663. partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
  4664. partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  4665. partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  4666. partyRequestQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.__AnswerPartyRequest(arg))
  4667. partyRequestQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.__AnswerPartyRequest(arg))
  4668. partyRequestQuestionDialog.Open()
  4669. partyRequestQuestionDialog.vid = vid
  4670. self.partyRequestQuestionDialog = partyRequestQuestionDialog
  4671. def __AnswerPartyRequest(self, answer):
  4672. if not self.partyRequestQuestionDialog:
  4673. return
  4674. vid = self.partyRequestQuestionDialog.vid
  4675. if answer:
  4676. net.SendChatPacket("/party_request_accept " + str(vid))
  4677. else:
  4678. net.SendChatPacket("/party_request_deny " + str(vid))
  4679. self.partyRequestQuestionDialog.Close()
  4680. self.partyRequestQuestionDialog = None
  4681. def __PartyRequestDenied(self):
  4682. self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
  4683. if (app.WJ_COMBAT_ZONE):
  4684. def BINARY_CombatZone_Manager(self, tokens, arg1 = 0, arg2 = 0, arg3 = 0, arg4 = 0):
  4685. if tokens == "OpenWindow":
  4686. self.wndCombatZone.Open(arg1, arg2, arg3, arg4)
  4687. elif tokens == "RegisterRank":
  4688. self.wndCombatZone.RegisterRanking()
  4689. elif tokens == "StartFlashing":
  4690. if self.interface:
  4691. self.interface.wndMiniMap.btnCombatZone.FlashEx()
  4692. elif tokens == "RefreshShop":
  4693. if self.interface:
  4694. self.interface.dlgShop.SetCombatZonePoints(arg1)
  4695. self.interface.dlgShop.SetLimitCombatZonePoints(arg2, arg3)
  4696. def __EnableTestServerFlag(self):
  4697. app.EnableTestServerFlag()
  4698. def __InGameShop_Show(self, url):
  4699. if constInfo.IN_GAME_SHOP_ENABLE:
  4700. self.interface.OpenWebWindow(url)
  4701. # WEDDING
  4702. def __LoginLover(self):
  4703. if self.interface.wndMessenger:
  4704. self.interface.wndMessenger.OnLoginLover()
  4705. def __LogoutLover(self):
  4706. if self.interface.wndMessenger:
  4707. self.interface.wndMessenger.OnLogoutLover()
  4708. if self.affectShower:
  4709. self.affectShower.HideLoverState()
  4710. def __LoverNear(self):
  4711. if self.affectShower:
  4712. self.affectShower.ShowLoverState()
  4713. def __LoverFar(self):
  4714. if self.affectShower:
  4715. self.affectShower.HideLoverState()
  4716. def __LoverDivorce(self):
  4717. if self.interface.wndMessenger:
  4718. self.interface.wndMessenger.ClearLoverInfo()
  4719. if self.affectShower:
  4720. self.affectShower.ClearLoverState()
  4721. if app.ENABLE_LOCALIZATION_SYSTEM:
  4722. def BINARY_Localization_Append(self, register_callback, idx1, idx2, idx3, idx4, idx5, idx6, idx7, idx8, idx9, idx10, idx11, idx12, idx13, idx14):
  4723. 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)])
  4724. def __PlayMusic(self, flag, filename):
  4725. flag = int(flag)
  4726. if flag:
  4727. snd.FadeOutAllMusic()
  4728. musicInfo.SaveLastPlayFieldMusic()
  4729. snd.FadeInMusic("BGM/" + filename)
  4730. else:
  4731. snd.FadeOutAllMusic()
  4732. musicInfo.LoadLastPlayFieldMusic()
  4733. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  4734. if app.ENABLE_DEFENSE_WAVE:
  4735. def BINARY_Update_Mast_HP(self, hp, max):
  4736. self.interface.BINARY_Update_Mast_HP(hp, max)
  4737. def BINARY_Update_Mast_Window(self, i, time):
  4738. self.interface.BINARY_Update_Mast_Window(int(i))
  4739. if int(time) != 0:
  4740. if self.wndShipImageCoolTime:
  4741. self.wndShipImageCoolTime.Open()
  4742. def BINARY_Update_Mast_Floor(self, arg):
  4743. self.wndShipImageCoolTime.SetFloor(arg)
  4744. ######--PET_ATTACK--######
  4745. def __pet_attack_yap(self):
  4746. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  4747. net.SendChatPacket("/pet_attack baslat")
  4748. else:
  4749. app.RotateCamera(app.CAMERA_TO_POSITIVE)
  4750. def __pet_attack_dur(self):
  4751. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  4752. net.SendChatPacket("/pet_attack durdur")
  4753. else:
  4754. app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
  4755. ######--PET_ATTACK--######
  4756. def OpenDragonLairRanking(self):
  4757. if self.interface:
  4758. self.interface.OpenDragonLairRanking()
  4759. def AddDragonLairRanking(self, data):
  4760. if self.interface:
  4761. line = int(data.split("#")[1])
  4762. name = str(data.split("#")[2])
  4763. empire = int(data.split("#")[3])
  4764. killcount = int(data.split("#")[4])
  4765. self.interface.AddDragonLairRanking(line, name, empire, killcount)
  4766. # END_OF_WEDDING
  4767. if app.ENABLE_SEND_TARGET_INFO:
  4768. def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
  4769. if not raceNum in constInfo.MONSTER_INFO_DATA:
  4770. constInfo.MONSTER_INFO_DATA.update({raceNum : {}})
  4771. constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
  4772. curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
  4773. isUpgradeable = False
  4774. isMetin = False
  4775. item.SelectItem(itemVnum)
  4776. if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
  4777. isUpgradeable = True
  4778. elif item.GetItemType() == item.ITEM_TYPE_METIN:
  4779. isMetin = True
  4780. for curItem in curList:
  4781. if isUpgradeable:
  4782. if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
  4783. if not (itemVnum in curItem["vnum_list"]):
  4784. curItem["vnum_list"].append(itemVnum)
  4785. return
  4786. elif isMetin:
  4787. if curItem.has_key("vnum_list"):
  4788. baseVnum = curItem["vnum_list"][0]
  4789. if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
  4790. if not (itemVnum in curItem["vnum_list"]):
  4791. curItem["vnum_list"].append(itemVnum)
  4792. return
  4793. else:
  4794. if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
  4795. return
  4796. if isUpgradeable or isMetin:
  4797. curList.append({"vnum_list":[itemVnum], "count":itemCount})
  4798. else:
  4799. curList.append({"vnum":itemVnum, "count":itemCount})
  4800. def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
  4801. self.targetBoard.RefreshMonsterInfoBoard()
  4802. ########Anti Exp Button by Sanii##########
  4803. def AntiExp(self, qid):
  4804. constInfo.ANTI_EXP = int(qid)
  4805. def AntiExpState(self, state):
  4806. constInfo.ANTI_EXP_STATE = int(state)
  4807. ##########################################
  4808. # BONI_SWITCHER
  4809. def __BoniSwitcherChangeVisible(self):
  4810. if not self.boniSwitcherWnd[self.LastBoniSwitcherId].IsShow():
  4811. self.__HideAllBoniSwitcher()
  4812. self.boniSwitcherWnd[self.LastBoniSwitcherId].Show(FALSE)
  4813. else:
  4814. self.__HideAllBoniSwitcher()
  4815. def __BoniSwitcherShow(self, id):
  4816. lastId = self.LastBoniSwitcherId
  4817. self.LastBoniSwitcherId = id
  4818. if not self.boniSwitcherWnd[id].IsShow():
  4819. self.__HideAllBoniSwitcher()
  4820. (x, y) = self.boniSwitcherWnd[lastId].GetGlobalPosition()
  4821. self.boniSwitcherWnd[id].SetPosition(x, y)
  4822. self.boniSwitcherWnd[id].Show(FALSE)
  4823. def __BoniSwitcherHide(self, id):
  4824. if self.boniSwitcherWnd[id]:
  4825. self.boniSwitcherWnd[id].Hide()
  4826. def __HideAllBoniSwitcher(self):
  4827. for i in xrange(len(self.boniSwitcherWnd)):
  4828. self.__BoniSwitcherHide(i)
  4829. def __ResetBoniFromSwitcher(self):
  4830. constInfo.BONI_LIST_WEAPON = []
  4831. constInfo.BONI_LIST_WEAPON_ADDON = []
  4832. constInfo.BONI_LIST_ARMOR = []
  4833. constInfo.BONI_LIST_BRACELET = []
  4834. constInfo.BONI_LIST_BOOTS = []
  4835. constInfo.BONI_LIST_NECKLACE = []
  4836. constInfo.BONI_LIST_HELMET = []
  4837. constInfo.BONI_LIST_SHIELD = []
  4838. constInfo.BONI_LIST_EARRINGS = []
  4839. # ITEM_SHOP
  4840. def __ItemShopShow(self):
  4841. if not self.itemShopWnd:
  4842. import uiItemShop
  4843. self.itemShopWnd = uiItemShop.ItemShopBoard()
  4844. self.itemShopWnd.Show()
  4845. def __ISSetLoadButtonIndex(self, index):
  4846. constInfo.ITEM_SHOP_LOAD_BUTTON_INDEX = int(index)
  4847. def __ISSetBuyButtonIndex(self, index):
  4848. constInfo.ITEM_SHOP_BUY_BUTTON_INDEX = int(index)
  4849. def __ISGetBuyID(self):
  4850. if self.itemShopWnd:
  4851. net.SendQuestInputStringPacket(self.itemShopWnd.GetBuyItemString())
  4852. else:
  4853. net.SendQuestInputStringPacket("ERROR")
  4854. def __ISGetBuyID2(self):
  4855. if self.itemShopWnd:
  4856. net.SendQuestInputStringPacket(self.itemShopWnd.GetBuyItemString2())
  4857. else:
  4858. net.SendQuestInputStringPacket("ERROR")
  4859. def __Input0(self):
  4860. constInfo.INPUT_IGNORE = 0
  4861. def __Input1(self):
  4862. constInfo.INPUT_IGNORE = 1
  4863. def __ISAddCategory(self, catId, catName):
  4864. self.itemShopWnd.AddCategory(catId, catName.replace("[_]", " "))
  4865. def __primera_muerte(self):
  4866. self.primera_muerte.Show()
  4867. snd.PlaySound("sound/ui/primera_muerte.wav")
  4868. net.SendChatPacket("(primera_muerte)")
  4869. def __doble_muerte(self):
  4870. self.doble_muerte.Show()
  4871. snd.PlaySound("sound/ui/doble_muerte.wav")
  4872. net.SendChatPacket("(doble_muerte)")
  4873. def __triple_muerte(self):
  4874. self.triple_muerte.Show()
  4875. snd.PlaySound("sound/ui/triple_muerte.wav")
  4876. net.SendChatPacket("(triple_muerte)")
  4877. def __exterminio(self):
  4878. self.exterminio.Show()
  4879. snd.PlaySound("sound/ui/exterminio.wav")
  4880. net.SendChatPacket("(exterminio)")
  4881. def __muertacular(self):
  4882. self.muertacular.Show()
  4883. snd.PlaySound("sound/ui/muertacular.wav")
  4884. net.SendChatPacket("(muertacular)")
  4885. def __bestialidad(self):
  4886. self.bestialidad.Show()
  4887. snd.PlaySound("sound/ui/bestialidad.wav")
  4888. net.SendChatPacket("(bestialidad)")
  4889. def __salvajada(self):
  4890. self.salvajada.Show()
  4891. snd.PlaySound("sound/ui/salvajada.wav")
  4892. net.SendChatPacket("(salvajada)")
  4893. def __catastrofe(self):
  4894. self.catastrofe.Show()
  4895. snd.PlaySound("sound/ui/catastrofe.wav")
  4896. net.SendChatPacket("(catastrofe)")
  4897. def __apocalipsis(self):
  4898. self.apocalipsis.Show()
  4899. snd.PlaySound("sound/ui/apocalipsis.wav")
  4900. net.SendChatPacket("(apocalipsis)")
  4901. def __lluvia_muertos(self):
  4902. self.lluvia_muertos.Show()
  4903. snd.PlaySound("sound/ui/lluvia_muertos.wav")
  4904. net.SendChatPacket("(lluvia_muertos)")
  4905. def __super_increible(self):
  4906. self.super_increible.Show()
  4907. snd.PlaySound("sound/ui/super_increible.wav")
  4908. net.SendChatPacket("(super_increible)")
  4909. def __hidemedallas_gui(self):
  4910. self.Medallas_gui.Hide()
  4911. self.primera_muerte.Hide()
  4912. self.doble_muerte.Hide()
  4913. self.triple_muerte.Hide()
  4914. self.exterminio.Hide()
  4915. self.muertacular.Hide()
  4916. self.bestialidad.Hide()
  4917. self.salvajada.Hide()
  4918. self.catastrofe.Hide()
  4919. self.apocalipsis.Hide()
  4920. self.lluvia_muertos.Hide()
  4921. self.super_increible.Hide()
  4922. self.muertes.Hide()
  4923. def __showmedallas_gui(self):
  4924. self.Medallas_gui.Show()
  4925. self.muertes.Show()
  4926. def __muertes(self, muertes):
  4927. self.muertes.SetText(muertes)
  4928. def __ISSelectCategory(self, catId):
  4929. self.itemShopWnd.SelectCategory(catId)
  4930. def __ISClearItems(self):
  4931. self.itemShopWnd.Clear()
  4932. def __ISAddItem(self, catId, itemId, itemVnum, itemCount, itemCost, itemCostType, attr1, val1, attr2, val2, attr3, val3, attr4, val4, attr5, val5, attr6, val6, attr7, val7, sock1, sock2, sock3):
  4933. itemAttr = [[attr1, val1], [attr2, val2], [attr3, val3], [attr4, val4], [attr5, val5], [attr6, val6], [attr7, val7]]
  4934. for attr in itemAttr:
  4935. attr[0] = int(attr[0])
  4936. attr[1] = int(attr[1])
  4937. itemSocket = [int(sock1), int(sock2), int(sock3)]
  4938. self.curIsItem = {
  4939. "cat" : catId,
  4940. "id" : itemId,
  4941. "vnum" : itemVnum,
  4942. "count" : itemCount,
  4943. "desc" : "",
  4944. "cost" : itemCost,
  4945. "cost_type" : itemCostType,
  4946. "attr" : itemAttr,
  4947. "socket" : itemSocket,
  4948. }
  4949. def __ISAddItemDesc(self, itemDesc):
  4950. obj = self.curIsItem
  4951. if not obj:
  4952. return
  4953. obj["desc"] += itemDesc.replace("[_]", " ")
  4954. self.itemShopWnd.AddItem(obj["cat"], obj["id"], obj["vnum"], obj["count"], obj["desc"], obj["cost"], obj["cost_type"], obj["attr"], obj["socket"])
  4955. self.curIsItem = None
  4956. def __ISSetLoadSuccess(self):
  4957. self.itemShopWnd.SetLoadSuccess()
  4958. def __ISSetLoadFail(self):
  4959. self.itemShopWnd.SetLoadFail()
  4960. def __ISSetBuySuccess(self):
  4961. self.itemShopWnd.SetItemBuySuccess()
  4962. def __ISSetBuyFail(self):
  4963. self.itemShopWnd.SetItemBuyFail()
  4964. def __ISSetCoins(self, coins):
  4965. self.itemShopWnd.SetCoins(coins)
  4966. def __ISSetMarks(self, marks):
  4967. self.itemShopWnd.SetMarks(marks)
  4968. # END_ITEM_SHOP
  4969. def __AddBoniToSwitcher(self, EquipType, boniType):
  4970. EquipType = int(EquipType)
  4971. if EquipType == 1:
  4972. constInfo.BONI_LIST_WEAPON.append(int(boniType))
  4973. constInfo.BONI_LIST_WEAPON_ADDON.append(int(boniType))
  4974. elif EquipType == 2:
  4975. constInfo.BONI_LIST_ARMOR.append(int(boniType))
  4976. elif EquipType == 3:
  4977. constInfo.BONI_LIST_BRACELET.append(int(boniType))
  4978. elif EquipType == 4:
  4979. constInfo.BONI_LIST_BOOTS.append(int(boniType))
  4980. elif EquipType == 5:
  4981. constInfo.BONI_LIST_NECKLACE.append(int(boniType))
  4982. elif EquipType == 6:
  4983. constInfo.BONI_LIST_HELMET.append(int(boniType))
  4984. elif EquipType == 7:
  4985. constInfo.BONI_LIST_SHIELD.append(int(boniType))
  4986. elif EquipType == 8:
  4987. constInfo.BONI_LIST_EARRINGS.append(int(boniType))
  4988. elif EquipType == 9:
  4989. constInfo.BONI_LIST_WEAPON_ADDON.append(int(boniType))
  4990. def __AddMaxValueToBoni(self, boniType, maxValue):
  4991. constInfo.BONI_LIST_MAX_VALUE[int(boniType)] = int(maxValue)
  4992. def __SetBoniSwitcherLoad(self):
  4993. constInfo.BONI_SWITCHER_LOAD = TRUE
  4994. def __BoniSwitcherCheckEvent(self, slotPos):
  4995. for boniSwitcher in self.boniSwitcherWnd:
  4996. if boniSwitcher.aktItemPos == int(slotPos):
  4997. return TRUE
  4998. return FALSE
  4999. # END_BONI_SWITCHER
  5000. def Teleport(self, getString):
  5001. if getString.find("index") != -1:
  5002. self.teleport.UpdateIndex(int(getString.split("x")[1]))
  5003. else:
  5004. constInfo.SendString = str(self.teleport.SendToServer)
  5005. constInfo.CApiSetHide = 1
  5006. def __evento_ultimo_superviviente(self):
  5007. import net
  5008. net.SendChatPacket("/pkmode 2", chat.CHAT_TYPE_TALKING)
  5009. def __Switcher(self):
  5010. import uiswitch
  5011. self.wndSwitch = uiswitch.Switcher()
  5012. self.wndSwitch.Show()
  5013. def __bonus_questindex(self, value3):
  5014. constInfo.BONUS_QUESTINDEX = int(value3)
  5015. def __activare_bonus(self):
  5016. activare_bonus = constInfo.BONUS_QUESTINDEX
  5017. event.QuestButtonClick(activare_bonus)
  5018. def __depozit_questindex(self, qid):
  5019. constInfo.Depoport= int(qid)
  5020. def __activare_depozit(self):
  5021. activare_depozit = constInfo.DEPOZIT_QUESTINDEX
  5022. event.QuestButtonClick(activare_depozit)
  5023. def __antiexp_questindex(self, value1):
  5024. constInfo.ANTIEXP_QUESTINDEX = int(value1)
  5025. def __activare_antiexp(self):
  5026. activare_antiexp = constInfo.ANTIEXP_QUESTINDEX
  5027. event.QuestButtonClick(activare_antiexp)
  5028. def __teleporter_questindex(self, value2):
  5029. constInfo.TELEPORTER_QUESTINDEX = int(value2)
  5030. def __activare_teleporter(self):
  5031. activare_teleporter = constInfo.TELEPORTER_QUESTINDEX
  5032. event.QuestButtonClick(activare_teleporter)
  5033. def showtransfer(self):
  5034. import uiTransfer
  5035. self.TransferWnd = uiTransfer.TransferWindow()
  5036. self.TransferWnd.Open()
  5037. # 5Lv Beceri Sistemi
  5038. # Gui Sistemleri
  5039. def __BecSystem1(self):
  5040. if constInfo.BECERI_SEC == 1:
  5041. return
  5042. self.black = savbec.BlackIsinlanma()
  5043. self.black.OpenWindow()
  5044. constInfo.BECERI_SEC = 1
  5045. def __BecSystem2(self):
  5046. if constInfo.BECERI_SEC == 1:
  5047. return
  5048. self.black = surabec.BlackIsinlanma()
  5049. self.black.OpenWindow()
  5050. constInfo.BECERI_SEC = 1
  5051. def __BecSystem3(self):
  5052. if constInfo.BECERI_SEC == 1:
  5053. return
  5054. self.black = ninjabec.BlackIsinlanma()
  5055. self.black.OpenWindow()
  5056. constInfo.BECERI_SEC = 1
  5057. def __BecSystem4(self):
  5058. if constInfo.BECERI_SEC == 1:
  5059. return
  5060. self.black = samanbec.BlackIsinlanma()
  5061. self.black.OpenWindow()
  5062. constInfo.BECERI_SEC = 1
  5063. def __BecSystem5(self):
  5064. if constInfo.BECERI_SEC == 1:
  5065. return
  5066. self.black = lycanbec.BlackIsinlanma()
  5067. self.black.OpenWindow()
  5068. constInfo.BECERI_SEC = 1
  5069. ############################################################
  5070. def NewShop(self):
  5071. if self.uiNewShop:
  5072. self.uiNewShop.Show(constInfo.IS_KASMIR)
  5073. def ShopClear(self):
  5074. if self.uiNewShop:
  5075. self.uiNewShop.HideAll()
  5076. constInfo.MyShops=[]
  5077. def ShopCostClear(self):
  5078. constInfo.shop_cost=[]
  5079. def ShopCost(self,id,time,time_val,price):
  5080. constInfo.shop_cost.append({"id":int(id),"time":int(time),"time_val":int(time_val),"price":int(price)})
  5081. def ShopAdd(self,shop_id,shop_vid,szSign,gold,won,count,sold,days,date_close):
  5082. if self.uiNewShop:
  5083. shop={
  5084. "id":shop_id,
  5085. "vid":shop_vid,
  5086. "name":szSign.replace("\\"," ").replace("_","#"),
  5087. "gold":gold,
  5088. "won":won,
  5089. "sold":sold,
  5090. "items":int(count)-int(sold),
  5091. "days":days,
  5092. "time":date_close
  5093. }
  5094. self.uiNewShop.Load(shop)
  5095. constInfo.MyShops.append(shop)
  5096. def ShopItemClear(self):
  5097. if self.uiNewShop:
  5098. self.uiNewShop.ClearItems()
  5099. def ClosePrivateShopDialog(self):
  5100. if self.uiNewShopCreate:
  5101. self.uiNewShopCreate.ClosePrivateShopBuilder()
  5102. def ShopItem(self,data):
  5103. d=data.split("#")
  5104. id=d[0]
  5105. vnum=d[1]
  5106. count=d[2]
  5107. slot=d[3]
  5108. price=d[4]
  5109. evolution=d[5]
  5110. transmutation=d[6]
  5111. s=d[7]
  5112. a=d[8]
  5113. sockets=[]
  5114. for key in s.split("|"):
  5115. sockets.append(int(key))
  5116. attrs=[]
  5117. for key in a.split("|"):
  5118. a=key.split(",")
  5119. attrs.append([int(a[0]),int(a[1])])
  5120. if self.uiNewShop:
  5121. self.uiNewShop.AddItem(slot,{"id":id,"vnum":vnum,"count":count,"price":price,"evolution":evolution,"transmutation":transmutation,"sockets":sockets,"attrs":attrs})
  5122. def ManagerGiftSystem(self, cmd):
  5123. cmd = cmd.split("|")
  5124. if cmd[0] == "Show":
  5125. self.wnddailypass.Show()
  5126. elif cmd[0] == "DeleteRewards":
  5127. self.wnddailypass.DeleteRewards()
  5128. elif cmd[0] == "SetDailyReward":
  5129. self.wnddailypass.SetDailyReward(cmd[1]) # numero de la recompensa
  5130. elif cmd[0] == "SetTime":
  5131. self.wnddailypass.SetTime(cmd[1]) # tiempo en numeros grandes
  5132. elif cmd[0] == "SetReward":
  5133. self.wnddailypass.SetReward(cmd[1], cmd[2]) #hacer un array con los items
  5134. elif cmd[0] == "SetRewardDone":
  5135. self.wnddailypass.SetRewardDone()
  5136. ####GIFT SYSTEM#####
  5137. def gift_clear(self):
  5138. constInfo.gift_items={}
  5139. # self.interface.ClearGift()
  5140. def gift_item(self, id, vnum, count, pos, date_add, give, reason, evolution, transmutation, szSockets, szAttrs):
  5141. sockets=[]
  5142. for key in szSockets.split("|"):
  5143. sockets.append(int(key))
  5144. attrs=[]
  5145. for key in szAttrs.split("|"):
  5146. a=key.split(",")
  5147. attrs.append([int(a[0]),int(a[1])])
  5148. constInfo.gift_items[int(pos)]={"id":int(id),"vnum":int(vnum),"count":int(count),"pos":int(pos),"date_add":int(date_add),"reason":reason.replace("_"," "),"give":give.replace("_"," "),"evolution":evolution,"transmutation":transmutation,"sockets":sockets,"attrs":attrs}
  5149. def gift_load(self):
  5150. self.interface.wndGiftBox.Refresh()
  5151. self.interface.OpenGiftNot()
  5152. def gift_show(self,pages):
  5153. self.interface.wndGiftBox.pageNum=int(pages)
  5154. # self.interface.OpenGift()
  5155. def __showbonus(self):
  5156. import uiBonusPage
  5157. global bonuspp
  5158. try:
  5159. if bonuspp != 1:
  5160. exec 'uiBonusPage.BonusBoardDialog().Show()'
  5161. else:
  5162. pass
  5163. except ImportError:
  5164. import dbg,app
  5165. dbg.Trace('uiBonusPage.py Importing error')
  5166. app.Abort()
  5167. # guildstorage begin
  5168. def _GuildStorageCMD(self, command):
  5169. cmd = command.split("/")
  5170. if cmd[0] == "OPEN":
  5171. self.interface.GuildStorageWindow.Open(int(cmd[1]))
  5172. elif cmd[0] == "REFRESH":
  5173. self.interface.GuildStorageWindow.RefreshSlots()
  5174. elif cmd[0] == "REFRESH_MONEY":
  5175. self.interface.GuildStorageWindow.SetMoney(cmd[1])
  5176. elif cmd[0] == "REFRESH_MEMBERS":
  5177. self.interface.GuildStorageWindow.Adminpanel["board"].RefreshMembers()
  5178. elif cmd[0] == "CLEAR_TEMPSLOTS":
  5179. constInfo.GUILDSTORAGE["tempslots"] = {"TAB0" : {},"TAB1" : {},"TAB2" : {}}
  5180. elif cmd[0] == "COMPARE_TEMPSLOTS":
  5181. for i in range(3):
  5182. if constInfo.GUILDSTORAGE["tempslots"]["TAB"+str(i)] != constInfo.GUILDSTORAGE["slots"]["TAB"+str(i)]:
  5183. constInfo.GUILDSTORAGE["slots"]["TAB"+str(i)] = {}
  5184. constInfo.GUILDSTORAGE["slots"]["TAB"+str(i)] = constInfo.GUILDSTORAGE["tempslots"]["TAB"+str(i)]
  5185. self.interface.GuildStorageWindow.RefreshSlots()
  5186. elif cmd[0] == "QID":
  5187. self.GuildStorageQID(cmd[1])
  5188. elif cmd[0] == "QUESTCMD":
  5189. self._GuildStorageQuestCMD()
  5190. #self.teleport = uiteleport.TeleportWindow()
  5191. elif cmd[0] == "MEMBER_COMPLETE":
  5192. constInfo.GUILDSTORAGE["members"] = {}
  5193. self.interface.GuildStorageWindow.ClearMembers()
  5194. import event
  5195. constInfo.GUILDSTORAGE["questCMD"] = "GETMEMBERLIST"
  5196. event.QuestButtonClick(int(constInfo.GUILDSTORAGE["qid"]))
  5197. def _GuildStorageAddItemSlot(self, slot, tab ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6):
  5198. self.interface.GuildStorageWindow.AddItemSlot(slot, tab ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6)
  5199. def _GuildStorageAddItem(self, slot ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6):
  5200. slotsWidth = 15
  5201. slotsHeight = 8
  5202. slot = int(slot)
  5203. if slot <= 120:
  5204. constInfo.GUILDSTORAGE["slots"]["TAB0"][slot] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5205. elif slot > 120 and slot <= 240:
  5206. constInfo.GUILDSTORAGE["slots"]["TAB1"][slot-120] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5207. elif slot > 240 and slot <= 360:
  5208. constInfo.GUILDSTORAGE["slots"]["TAB2"][slot-240] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5209. def _GuildStorageTempSlotsAdd(self,slot ,itemVnum, count, socket0, socket1, socket2, socket3, socket4, socket5, attrtype0,attrvalue0, attrtype1,attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6):
  5210. slot = int(slot)
  5211. if slot <= 120:
  5212. constInfo.GUILDSTORAGE["tempslots"]["TAB0"][slot] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5213. elif slot > 120 and slot <= 240:
  5214. constInfo.GUILDSTORAGE["tempslots"]["TAB1"][slot-120] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5215. elif slot > 240 and slot <= 360:
  5216. constInfo.GUILDSTORAGE["tempslots"]["TAB2"][slot-240] = [int(itemVnum),int(count), int(socket0), int(socket1), int(socket2), int(socket3), int(socket4), int(socket5), int(attrtype0),int(attrvalue0), int(attrtype1),int(attrvalue1), int(attrtype2), int(attrvalue2), int(attrtype3), int(attrvalue3), int(attrtype4), int(attrvalue4), int(attrtype5), int(attrvalue5), int(attrtype6), int(attrvalue6)]
  5217. def _GuildStorageAddLog(self,id,name,date,type,do,desc):
  5218. self.interface.GuildStorageWindow.LogsInsert(id,name,date,type,do,desc)
  5219. constInfo.GUILDSTORAGE["logs"][int(id)] = [name,date,type,do,desc]
  5220. def _GuildStorageQuestCMD(self):
  5221. net.SendQuestInputStringPacket(str(constInfo.GUILDSTORAGE["questCMD"]))
  5222. constInfo.GUILDSTORAGE["questCMD"] = "NULL#"
  5223. def GuildStorageQID(self, qid):
  5224. constInfo.GUILDSTORAGE["qid"] = int(qid)
  5225. def _GuildStorageAddMemberToList(self,memberId,member,authority0,authority1,authority2,authority3):
  5226. constInfo.GUILDSTORAGE["members"]["member"+memberId] = [member,int(authority0),int(authority1),int(authority2),int(authority3)]
  5227. # Guildstorage end
  5228. def __MountSystem(self, info, i=0):
  5229. if info=="Item":
  5230. if i!=0:
  5231. constInfo.MountSystem["index"] = int(i)
  5232. self.MountingSystem.Open()
  5233. elif info=="Input":
  5234. net.SendQuestInputStringPacket(str(constInfo.MountSystem["CMD"]))
  5235. def __SchicksalRad(self, cmd):
  5236. CMD = cmd.split("/")
  5237. if CMD[0]=="index":
  5238. constInfo.SCHICKSAL_RAD["index"] = int(CMD[1])
  5239. constInfo.SCHICKSAL_RAD["kosten"] = int(CMD[2])
  5240. constInfo.SCHICKSAL_RAD["free"] = int(CMD[3])
  5241. elif CMD[0]=="input":
  5242. net.SendQuestInputStringPacket(str(constInfo.SCHICKSAL_RAD["ServerCMD"]))
  5243. elif CMD[0]=="free":
  5244. constInfo.SCHICKSAL_RAD["free"] = int(CMD[1])
  5245. elif CMD[0]=="Answer":
  5246. self.SchicksalRad.SetVars(CMD[1], CMD[2], CMD[3], CMD[4], CMD[5])
  5247. constInfo.SCHICKSAL_RAD["free"] = int(CMD[6])
  5248. def __guinameOPEN(self): # use different function names!
  5249. import schicksalrad
  5250. self.SchicksalRad = schicksalrad.RadDesSchicksals()
  5251. self.SchicksalRad.Open()() # naturally use the code which is provided for the GUI
  5252. if app.ENABLE_DUNGEON_INFO_SYSTEM:
  5253. def OpenDungeonInfoWindow(self):
  5254. self.interface.ToggleDungeonInfoWindow()
  5255. def DungeonInfo(self, questindex):
  5256. constInfo.dungeonData["quest_index"] = questindex
  5257. def CleanDungeonInfo(self):
  5258. constInfo.dungeonInfo = []
  5259. def GetDungeonInfo(self, cmd):
  5260. cmd = cmd.split("#")
  5261. if cmd[0] == "INPUT":
  5262. constInfo.INPUT_IGNORE = int(cmd[1])
  5263. elif cmd[0] == "CMD":
  5264. net.SendQuestInputStringPacket(constInfo.dungeonData["quest_cmd"])
  5265. constInfo.dungeonData["quest_cmd"] = ""
  5266. else:
  5267. pass
  5268. def UpdateDungeonInfo(self, type, organization, levelLimit, partyMembers, mapName, mapIndex, mapCoordX, mapCoordY, cooldown, duration, entranceMapName, strengthBonusName, resistanceBonusName, itemVnum, reptime):
  5269. type = int(type)
  5270. organization = int(organization)
  5271. levelLimit = int(levelLimit)
  5272. partyMembers = int(partyMembers)
  5273. mapName = str(mapName).replace("_", " ")
  5274. mapIndex = int(mapIndex)
  5275. mapCoordX = int(mapCoordX)
  5276. mapCoordY = int(mapCoordY)
  5277. cooldown = int(cooldown)
  5278. duration = int(duration)
  5279. entranceMapName = str(entranceMapName).replace("_", " ")
  5280. strengthBonusName = str(strengthBonusName).replace("_", " ")
  5281. resistanceBonusName = str(resistanceBonusName).replace("_", " ")
  5282. itemVnum = int(itemVnum)
  5283. reptimex = int(reptime)
  5284. constInfo.dungeonInfo.append(
  5285. {
  5286. "type" : type,
  5287. "organization" : organization,
  5288. "level_limit" : levelLimit,
  5289. "party_members" : partyMembers,
  5290. "map" : mapName,
  5291. "map_index" : mapIndex,
  5292. "map_coord_x" : mapCoordX,
  5293. "map_coord_y" : mapCoordY,
  5294. "cooldown" : cooldown,
  5295. "duration" : duration,
  5296. "entrance_map" : entranceMapName,
  5297. "strength_bonus" : strengthBonusName,
  5298. "resistance_bonus" : resistanceBonusName,
  5299. "item_vnum" : itemVnum,
  5300. "reptime" : reptimex,
  5301. },
  5302. )
  5303. if app.ENABLE_DUNGEON_INFO_SYSTEM:
  5304. def OpenEventInfoWindow(self):
  5305. self.interface.ToggleEventInfoWindow()
  5306. def EventInfo(self, questindex):
  5307. constInfo.eventData["quest_index"] = questindex
  5308. def CleanEventInfo(self):
  5309. constInfo.eventInfo = []
  5310. def UpdateEventInfo(self, MapNames, pztbas, pztbit, salbas, salbit, carbas, carbit, perbas, perbit, cumbas, cumbit, cmtbas, cmtbit, pazbas, pazbit, mapIndex):
  5311. MapNames = str(MapNames).replace("_", " ")
  5312. pztbas = int(pztbas).replace("_", " ")
  5313. pztbit = int(pztbit).replace("_", " ")
  5314. salbas = int(salbas).replace("_", " ")
  5315. salbit = int(salbit).replace("_", " ")
  5316. carbas = int(carbas).replace("_", " ")
  5317. carbit = int(carbit).replace("_", " ")
  5318. perbas = int(perbas).replace("_", " ")
  5319. perbit = int(perbit).replace("_", " ")
  5320. cumbas = int(cumbas).replace("_", " ")
  5321. cumbit = int(cumbit).replace("_", " ")
  5322. cmtbas = int(cmtbas).replace("_", " ")
  5323. cmtbit = int(cmtbit).replace("_", " ")
  5324. pazbas = int(pazbas).replace("_", " ")
  5325. pazbit = int(pazbit).replace("_", " ")
  5326. mapIndex = int(mapIndex)
  5327. constInfo.eventInfo.append(
  5328. {
  5329. "mapat" : MapNames,
  5330. "pzt_bas" : pztbas,
  5331. "pzt_bit" : pztbit,
  5332. "sal_bas" : salbas,
  5333. "sal_bit" : salbit,
  5334. "car_bas" : carbas,
  5335. "car_bit" : carbit,
  5336. "per_bas" : perbas,
  5337. "per_bit" : perbit,
  5338. "cum_bas" : cumbas,
  5339. "cum_bit" : cumbit,
  5340. "cmt_bas" : cmtbas,
  5341. "cmt_bit" : cmtbit,
  5342. "paz_bas" : pazbas,
  5343. "paz_bit" : pazbit,
  5344. "map_index" : mapIndex,
  5345. },
  5346. )
  5347. if app.ENABLE_FISH_EVENT:
  5348. def MiniGameFishEvent(self, isEnable, lasUseCount):
  5349. if self.interface:
  5350. self.interface.SetFishEventStatus(isEnable)
  5351. self.interface.MiniGameFishCount(lasUseCount)
  5352. def MiniGameFishUse(self, shape, useCount):
  5353. self.interface.MiniGameFishUse(shape, useCount)
  5354. def MiniGameFishAdd(self, pos, shape):
  5355. self.interface.MiniGameFishAdd(pos, shape)
  5356. def MiniGameFishReward(self, vnum):
  5357. self.interface.MiniGameFishReward(vnum)
  5358. if app.ENABLE_MELEY_LAIR_DUNGEON:
  5359. def OpenMeleyRanking(self):
  5360. if self.interface:
  5361. self.interface.OpenMeleyRanking()
  5362. def AddRankMeleyRanking(self, data):
  5363. if self.interface:
  5364. line = int(data.split("#")[1])
  5365. name = str(data.split("#")[2])
  5366. members = int(data.split("#")[3])
  5367. seconds = int(data.split("#")[4])
  5368. minutes = seconds // 60
  5369. seconds %= 60
  5370. if seconds > 0:
  5371. time = localeInfo.TIME_MIN_SEC % (minutes, seconds)
  5372. else:
  5373. time = localeInfo.TIME_MIN % (minutes)
  5374. self.interface.RankMeleyRanking(line, name, members, time)
  5375. ##Pazar_log
  5376. def pazar_log_gui(self):
  5377. constInfo.KONTROL2=1
  5378. self.p_log = ui.BoardWithTitleBar()
  5379. self.p_log.SetSize(450, 300)
  5380. self.p_log.SetCenterPosition()
  5381. self.p_log.AddFlag('movable')
  5382. self.p_log.AddFlag('float')
  5383. self.p_log.SetTitleName(translate.GECMIS)
  5384. self.p_log.SetCloseEvent(self.Close_p_log)
  5385. self.p_log.Show()
  5386. self.comp_p_log = Component()
  5387. 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')
  5388. self.noo1 = self.comp_p_log.TextLine(self.p_log, '', 44, 48, self.comp_p_log.RGB(255, 125, 0))
  5389. self.kisii1 = self.comp_p_log.TextLine(self.p_log, '', 69, 48, self.comp_p_log.RGB(255, 255, 255))
  5390. self.noo2 = self.comp_p_log.TextLine(self.p_log, '', 44, 68, self.comp_p_log.RGB(255, 125, 0))
  5391. self.kisii2 = self.comp_p_log.TextLine(self.p_log, '', 69, 68, self.comp_p_log.RGB(255, 255, 255))
  5392. self.noo3 = self.comp_p_log.TextLine(self.p_log, '', 44, 88, self.comp_p_log.RGB(255, 125, 0))
  5393. self.kisii3 = self.comp_p_log.TextLine(self.p_log, '', 69, 88, self.comp_p_log.RGB(255, 255, 255))
  5394. self.noo4 = self.comp_p_log.TextLine(self.p_log, '', 44, 108, self.comp_p_log.RGB(255, 125, 0))
  5395. self.kisii4 = self.comp_p_log.TextLine(self.p_log, '', 69, 108, self.comp_p_log.RGB(255, 255, 255))
  5396. self.noo5 = self.comp_p_log.TextLine(self.p_log, '', 44, 128, self.comp_p_log.RGB(255, 125, 0))
  5397. self.kisii5 = self.comp_p_log.TextLine(self.p_log, '', 69, 128, self.comp_p_log.RGB(255, 255, 255))
  5398. self.noo6 = self.comp_p_log.TextLine(self.p_log, '', 44, 148, self.comp_p_log.RGB(255, 125, 0))
  5399. self.kisii6 = self.comp_p_log.TextLine(self.p_log, '', 69, 148, self.comp_p_log.RGB(255, 255, 255))
  5400. self.noo7 = self.comp_p_log.TextLine(self.p_log, '', 44, 168, self.comp_p_log.RGB(255, 125, 0))
  5401. self.kisii7 = self.comp_p_log.TextLine(self.p_log, '', 69, 168, self.comp_p_log.RGB(255, 255, 255))
  5402. self.noo8 = self.comp_p_log.TextLine(self.p_log, '', 44, 188, self.comp_p_log.RGB(255, 125, 0))
  5403. self.kisii8 = self.comp_p_log.TextLine(self.p_log, '', 69, 188, self.comp_p_log.RGB(255, 255, 255))
  5404. self.noo9 = self.comp_p_log.TextLine(self.p_log, '', 44, 208, self.comp_p_log.RGB(255, 125, 0))
  5405. self.kisii9 = self.comp_p_log.TextLine(self.p_log, '', 69, 208, self.comp_p_log.RGB(255, 255, 255))
  5406. self.noo10 = self.comp_p_log.TextLine(self.p_log, '', 44, 228, self.comp_p_log.RGB(255, 125, 0))
  5407. self.kisii10 = self.comp_p_log.TextLine(self.p_log, '', 69, 228, self.comp_p_log.RGB(255, 255, 255))
  5408. import event
  5409. event.QuestButtonClick(constInfo.pazar_log_q_id)
  5410. def Close_p_log(self):
  5411. if constInfo.KONTROL2==1:
  5412. self.p_log.Hide()
  5413. constInfo.KONTROL2=0
  5414. def pazar_log_getir(self):
  5415. if gameInfo.PAZAR_CAN==0:
  5416. import event
  5417. event.QuestButtonClick(constInfo.pazar_log_q_id)
  5418. gameInfo.PAZAR_OPEN=1
  5419. gameInfo.PAZAR_TIME=app.GetTime() + 60
  5420. gameInfo.PAZAR_CAN=1
  5421. else:
  5422. chat.AppendChat(chat.CHAT_TYPE_INFO, translate.YENILE1DK)
  5423. def __pazar_log_ac(self):
  5424. self.pazar_log_gui()
  5425. def __pazar_log_bilgi_gir(self, no, alanname, vnum, fiyat, tarih, won):
  5426. kod = int(vnum)
  5427. item.SelectItem(kod)
  5428. item_isim = item.GetItemName()
  5429. if no == "1":
  5430. self.noo1.SetText(no)
  5431. self.kisii1.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5432. self.p_log.SetSize(600, 120)
  5433. self.pazar_bilgi_yenile.SetPosition(204, 800)
  5434. elif no == "2":
  5435. self.noo2.SetText(no)
  5436. self.kisii2.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5437. self.p_log.SetSize(600, 140)
  5438. self.pazar_bilgi_yenile.SetPosition(204, 100)
  5439. elif no == "3":
  5440. self.noo3.SetText(no)
  5441. self.kisii3.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5442. self.p_log.SetSize(600, 160)
  5443. self.pazar_bilgi_yenile.SetPosition(204, 120)
  5444. elif no == "4":
  5445. self.noo4.SetText(no)
  5446. self.kisii4.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5447. self.p_log.SetSize(600, 180)
  5448. self.pazar_bilgi_yenile.SetPosition(204, 140)
  5449. elif no == "5":
  5450. self.noo5.SetText(no)
  5451. self.kisii5.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5452. self.p_log.SetSize(600, 200)
  5453. self.pazar_bilgi_yenile.SetPosition(204, 160)
  5454. elif no == "6":
  5455. self.noo6.SetText(no)
  5456. self.kisii6.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5457. self.p_log.SetSize(600, 220)
  5458. self.pazar_bilgi_yenile.SetPosition(204, 180)
  5459. elif no == "7":
  5460. self.noo7.SetText(no)
  5461. self.kisii7.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5462. self.p_log.SetSize(600, 240)
  5463. self.pazar_bilgi_yenile.SetPosition(204, 200)
  5464. elif no == "8":
  5465. self.noo8.SetText(no)
  5466. self.kisii8.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5467. self.p_log.SetSize(600, 260)
  5468. self.pazar_bilgi_yenile.SetPosition(204, 220)
  5469. elif no == "9":
  5470. self.noo9.SetText(no)
  5471. self.kisii9.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5472. self.p_log.SetSize(600, 280)
  5473. self.pazar_bilgi_yenile.SetPosition(204, 240)
  5474. elif no == "10":
  5475. self.noo10.SetText(no)
  5476. self.kisii10.SetText(alanname + " "+ item_isim + " " + fiyat + " "+ won + " " + tarih)
  5477. self.p_log.SetSize(600, 300)
  5478. self.pazar_bilgi_yenile.SetPosition(204, 260)
  5479. def __pazar_log_q_id(self, id):
  5480. constInfo.pazar_log_q_id = int(id)
  5481. def __pazar_log_q(self, id):
  5482. constInfo.pazar_log_q = int(id)
  5483. def __item_fiyat(self):
  5484. fiyat = constInfo.item_fiyat
  5485. net.SendQuestInputStringPacket(fiyat)
  5486. def __item_won(self):
  5487. fiyat = constInfo.item_won
  5488. net.SendQuestInputStringPacket(won)
  5489. def __item_isim(self):
  5490. isim = constInfo.item_isim
  5491. net.SendQuestInputStringPacket(isim)
  5492. def __itemi_alan(self):
  5493. alanname = constInfo.itemi_alan
  5494. net.SendQuestInputStringPacket(alanname)
  5495. if app.WJ_SECURITY_SYSTEM:
  5496. def OpenSecurityCreate(self):
  5497. if self.interface:
  5498. self.interface.OpenSecurityCreate()
  5499. def OpenSecurityDialog(self):
  5500. if self.interface:
  5501. self.interface.OpenSecurityDialog()
  5502. def CloseSecurityCreate(self):
  5503. if self.interface:
  5504. self.interface.CloseSecurityCreate()
  5505. def CloseSecurityDialog(self):
  5506. if self.interface:
  5507. self.interface.CloseSecurityDialog()
  5508. if app.WJ_CHANGELOOK_SYSTEM:
  5509. if app.ENABLE_MOUNT_CHANGELOOK_SYSTEM:
  5510. def ActChangeLook(self, iAct, bMount):
  5511. if self.interface:
  5512. self.interface.ActChangeLook(iAct, bMount)
  5513. else:
  5514. def ActChangeLook(self, iAct):
  5515. if self.interface:
  5516. self.interface.ActChangeLook(iAct)
  5517. def AlertChangeLook(self):
  5518. self.PopupMessage(localeInfo.CHANGE_LOOK_DEL_ITEM)
  5519. if app.ENABLE_MAIL_BOX_SYSTEM:
  5520. def BINARY_MAILBOX_OPEN(self):
  5521. self.interface.OpenMailBox()
  5522. if app.ENABLE_TRANSMUTATION_MAIL_BOX_SYSTEM:
  5523. if app.ENABLE_WON_MAIL_BOX_SYSTEM:
  5524. def BINARY_MAILBOX_RECEIVE_INFO(self,id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,transmutation,gold,won,time,check_acept,check_view):
  5525. self.interface.LoadMailBox(id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,transmutation,gold,won,time,check_acept,check_view)
  5526. else:
  5527. def BINARY_MAILBOX_RECEIVE_INFO(self,id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,transmutation,gold,time,check_acept,check_view):
  5528. self.interface.LoadMailBox(id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,transmutation,gold,time,check_acept,check_view)
  5529. else:
  5530. if app.ENABLE_WON_MAIL_BOX_SYSTEM:
  5531. def BINARY_MAILBOX_RECEIVE_INFO(self,id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,gold,won,time,check_acept,check_view):
  5532. self.interface.LoadMailBox(id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,gold,won,time,check_acept,check_view)
  5533. else:
  5534. def BINARY_MAILBOX_RECEIVE_INFO(self,id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,gold,time,check_acept,check_view):
  5535. self.interface.LoadMailBox(id_mail,name_send,titulo_mail,description_mail,item_vnum,item_count,gold,time,check_acept,check_view)
  5536. def BINARY_MAILBOX_CHECK_NAME_SUCCESSFUL(self):
  5537. self.interface.MailBoxCheckName()
  5538. def BINARY_MAILBOX_SEND_MAIL_SUCCESSFUL(self):
  5539. self.interface.MailBoxSendMail()
  5540. def BINARY_MAILBOX_ACCEPT_SUCCESSFUL(self, id_mail):
  5541. self.interface.MailBoxAceptMails(id_mail)
  5542. def BINARY_MAILBOX_DELETE_SUCCESSFUL(self, id_mail):
  5543. self.interface.MailBoxDeleteMails(id_mail)
  5544. def BINARY_MAILBOX_CHECK_VIEW_SUCCESSFULL(self, id_mail):
  5545. self.interface.MailBoxCheckView(id_mail)
  5546. def BINARY_MAILBOX_SEND_LOADING_ACCEPT(self):
  5547. self.interface.MailBoxAceptMailsLoad()
  5548. def BINARY_MAILBOX_SEND_LOADING_DELETE(self):
  5549. self.interface.MailBoxDeleteMailsLoad()
  5550. def BINARY_MAILBOX_RECEIVE_ITEM_SOCKET(self,id_mail,index,sockets):
  5551. self.interface.MailBoxSocketsItems(id_mail,index,sockets)
  5552. def BINARY_MAILBOX_RECEIVE_ITEM_ATTR(self,id_mail,index,attr_type,attr_value):
  5553. self.interface.MailBoxAttrItems(id_mail,index,attr_type,attr_value)
  5554. # def SERVER_MAILBOX_MAP(self,c_a,m_a,m_s):
  5555. # self.interface.wndMiniMap.MailBoxValues(int(c_a),int(m_a),int(m_s))
  5556. ##########--SHOP_SEARCH--##########
  5557. ## Shop Search
  5558. if app.ENABLE_MARKET_ARAMA_SYSTEM:
  5559. def ShopSearchRefresh(self):
  5560. self.interface.RefreshRequest()
  5561. def OpenPShopSearchDialog(self):
  5562. self.interface.OpenPShopSearchDialog()
  5563. def OpenPShopSearchDialogCash(self):
  5564. self.interface.OpenPShopSearchDialogCash()
  5565. def RefreshPrivateShopSearch(self):
  5566. self.interface.RefreshPrivateShopSearch()
  5567. ##########--SHOP_SEARCH--##########
  5568. ############################### GAYA SYSTEM ###############################
  5569. def OpenGuiGaya(self):
  5570. self.interface.OpenGuiGaya()
  5571. def GayaCheck(self):
  5572. self.interface.GayaCheck()
  5573. def OpenGuiGayaMarket(self):
  5574. self.interface.OpenGuiGayaMarket()
  5575. def GayaMarketItems(self,vnums,gaya,count):
  5576. self.interface.GayaMarketItems(vnums,gaya,count)
  5577. def GayaMarketSlotsDesblock(self,slot0,slot1,slot2,slot3,slot4,slot5):
  5578. self.interface.GayaMarketSlotsDesblock(slot0,slot1,slot2,slot3,slot4,slot5)
  5579. def GayaMarketClear(self):
  5580. self.interface.GayaMarketClear()
  5581. def GayaTimeMarket(self, time):
  5582. self.interface.GayaTime(time)
  5583. ######################################## END GAYA SYSTEM ################################
  5584. ############################### GAYA SYSTEM ###############################
  5585. def OpenGuiCheque(self):
  5586. self.interface.OpenGuiCheque()
  5587. def ChequeCheck(self):
  5588. self.interface.ChequeCheck()
  5589. def OpenGuiChequeMarket(self):
  5590. self.interface.OpenGuiChequeMarket()
  5591. def ChequeMarketItems(self,vnums,cheque,count):
  5592. self.interface.ChequeMarketItems(vnums,cheque,count)
  5593. def ChequeMarketSlotsDesblock(self,slot0,slot1,slot2,slot3,slot4,slot5):
  5594. self.interface.ChequeMarketSlotsDesblock(slot0,slot1,slot2,slot3,slot4,slot5)
  5595. def ChequeMarketClear(self):
  5596. self.interface.ChequeMarketClear()
  5597. def ChequeTimeMarket(self, time):
  5598. self.interface.ChequeTime(time)
  5599. ######################################## END GAYA2 SYSTEM ################################
  5600. if (app.ENABLE_PET_ATTR_DETERMINE):
  5601. def __OnResultPetAttrDetermine(self, pet_type):
  5602. self.petmain.OnResultPetAttrDetermine(int(pet_type))
  5603. def __OnResultPetAttrChange(self, pet_type):
  5604. self.petmain.OnResultPetAttrChange(int(pet_type))
  5605. ######################################## UZAK MARKET ################################
  5606. def __UzaktanMarketBaslat(self, id):
  5607. constInfo.UZAKMARKET = int(id)
  5608. def __UzaktanMarketIsle(self, PythonIslem):
  5609. if PythonIslem == "UZAK_NPC_VNUM":
  5610. net.SendQuestInputStringPacket(str(constInfo.UZAK_NPC_VNUM))
  5611. def __UzakMarketBitir(self, LuaToPython):
  5612. if LuaToPython.find("#quest_input#") != -1:
  5613. constInfo.INPUT_IGNORE = 1
  5614. elif LuaToPython.find("#quest_inputbitir#") != -1:
  5615. constInfo.INPUT_IGNORE = 0
  5616. ######################################## UZAK MARKET ################################
  5617. ######################################## YOUTUBER SISTEMLERI ################################
  5618. def video_listem_yenile(self):
  5619. constInfo.fav_listim = []
  5620. def youtuber_listesi_yenile(self):
  5621. constInfo.youtuber_list = []
  5622. def youtuber_video_listesi_yenile(self):
  5623. constInfo.youtuber_video_list = []
  5624. def video_listem(self, baslik, link):
  5625. constInfo.fav_listim.append("#"+baslik+"#"+link)
  5626. def youtuber_listesi(self, kim):
  5627. constInfo.youtuber_list.append("#"+kim)
  5628. def youtuber_video_listesi(self, baslik, link):
  5629. constInfo.youtuber_video_list.append("#"+baslik+"#"+link)
  5630. def __video_izle(self):
  5631. val = int(len(constInfo.LINK_PLUS))
  5632. if val < 3:
  5633. chat.AppendChat(5, "Link çok kısa")
  5634. return
  5635. url = "http://ruya2.com/videos.php?youtube=%s" % str(constInfo.LINK_PLUS)
  5636. self.interface.OpenYoutubeWebWindow(url)
  5637. def youtuber_tag(self):
  5638. constInfo.YoutuberButton = 1
  5639. chat.AppendChat(chat.CHAT_TYPE_INFO, "Youtuberim yehuuuu")
  5640. def twitcher_tag(self):
  5641. constInfo.TwitcherButton = 1
  5642. chat.AppendChat(chat.CHAT_TYPE_INFO, "Twitcherim yehuuuu")
  5643. ######################################## YOUTUBER SISTEMLERI ################################
  5644. def Update(self, ch):
  5645. import serverInfo
  5646. net.SetServerInfo("%s, CH%s" % (serverInfo.SERVER_NAME, str(ch)))
  5647. constInfo.ch = int(ch)
  5648. ###TAM-EKRAN###
  5649. def __ArayuzManager(self):
  5650. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5651. return
  5652. if constInfo.arayuzkoray == 0:
  5653. self.interface.HideAllWindows()
  5654. chat.AppendChat(chat.CHAT_TYPE_INFO, "Arayuz Kapatıldı!")
  5655. constInfo.arayuzkoray = 1
  5656. elif constInfo.arayuzkoray == 1:
  5657. if app.ENABLE_12ZI:
  5658. self.interface.wndBead.Show()
  5659. self.interface.wndTaskBar.Show()
  5660. self.interface.wndChat.Show()
  5661. self.interface.wndMiniMap.Show()
  5662. try: self.interface.wndEnergyBar.Show()
  5663. except: pass
  5664. chat.AppendChat(chat.CHAT_TYPE_INFO, "Arayuz tekrar aktif")
  5665. constInfo.arayuzkoray = 0
  5666. ###TAM-EKRAN###
  5667. if app.ENABLE_FISH_EVENT:
  5668. def MiniGameFishEvent(self, isEnable, lasUseCount):
  5669. if self.interface:
  5670. self.interface.SetFishEventStatus(isEnable)
  5671. self.interface.MiniGameFishCount(lasUseCount)
  5672. self.interface.IntegrationEventBanner()
  5673. def MiniGameFishUse(self, shape, useCount):
  5674. self.interface.MiniGameFishUse(shape, useCount)
  5675. def MiniGameFishAdd(self, pos, shape):
  5676. self.interface.MiniGameFishAdd(pos, shape)
  5677. def MiniGameFishReward(self, vnum):
  5678. self.interface.MiniGameFishReward(vnum)
  5679. def Denemelan(self):
  5680. net.SendChatPacket("/open_security ayar")
  5681. def __HizliPanel(self):
  5682. if str(background.GetCurrentMapName()) in "metin2_map_battlefied":
  5683. chat.AppendChat(chat.CHAT_TYPE_INFO, "Bu özelliği bu mapta kullanamazsın!")
  5684. return
  5685. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5686. return
  5687. self.HizliPanel.OpenDialog()
  5688. def YeniMenuSystem(self):
  5689. if str(background.GetCurrentMapName()) in "metin2_map_battlefied":
  5690. chat.AppendChat(chat.CHAT_TYPE_INFO, "Bu özelliği bu mapta kullanamazsın!")
  5691. return
  5692. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5693. return
  5694. self.YeniMenu.OpenDialog()
  5695. def __toggleSwitchbot22(self):
  5696. import targetTest
  5697. self.Dialo = targetTest.Dialog1()
  5698. self.Dialo.Show()
  5699. ###F5-MENU###
  5700. if app.ENABLE_SWITCHBOT:
  5701. def RefreshSwitchbotWindow(self):
  5702. self.interface.RefreshSwitchbotWindow()
  5703. def RefreshSwitchbotItem(self, slot):
  5704. self.interface.RefreshSwitchbotItem(slot)
  5705. if app.ENABLE_SASH_SYSTEM:
  5706. def ActSash(self, iAct, bWindow):
  5707. if self.interface:
  5708. self.interface.ActSash(iAct, bWindow)
  5709. def AlertSash(self, bWindow):
  5710. snd.PlaySound("sound/ui/make_soket.wav")
  5711. if bWindow:
  5712. self.PopupMessage(localeInfo.SASH_DEL_SERVEITEM)
  5713. else:
  5714. self.PopupMessage(localeInfo.SASH_DEL_ABSORDITEM)
  5715. ###HIZLI-RUH-TASI###
  5716. def hizliruhtasi(self):
  5717. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5718. return
  5719. self.ruhtasi.Show()
  5720. ###HIZLI-RUH-TASI###
  5721. def OpenMushroom(self):
  5722. self.mushroom.Show()
  5723. def mushroom_cooltime_reset(self, time):
  5724. self.mushroom_minimap.ResetCoolTime(time)
  5725. self.mushroom_minimap.Show()
  5726. def mushroom_cooltime_reset_mini(self, time):
  5727. self.mushroom_minimap.ResetCoolTime(time)
  5728. self.mushroom_minimap.Show()
  5729. ###HIZLI-BK###
  5730. def hizlibk(self, cell):
  5731. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5732. return
  5733. self.becerikitabi.Show(cell)
  5734. ###HIZLI-BK###
  5735. # def AverageSearchOpen(self):
  5736. # self.average_price.Show()
  5737. def PriceTransWindowOpen(self, arg):
  5738. if (int(arg) == 1):
  5739. self.chequetogold.Open()
  5740. else:
  5741. self.goldtocheque.Open()
  5742. def EventCalendarWindow(self):
  5743. if self.interface:
  5744. self.interface.OpenCalendarWin()
  5745. def AverageSearchOpen(self):
  5746. self.average_price.Show()
  5747. #Biyolog#
  5748. # def biyolog(self, bioitem, verilen, toplam, kalansure):
  5749. # self.interface.SetBiyolog(bioitem, verilen, toplam, kalansure)
  5750. # def biyoodulac(self, gorev, af1, afv1, af2, afv2, af3, afv3):
  5751. # self.biyoekran.Show()
  5752. # self.biyoekran.SetBaslik(str(gorev))
  5753. # self.biyoekran.SetOdul(af1,afv1,af2,afv2,af3,afv3)
  5754. # def biyologekrankapa(self):
  5755. # self.biyoekran.Close()
  5756. #Biyolog#
  5757. #Captcha#
  5758. def captchaekran(self, sayi1, sayi2, sayi3, sayi4, sayi5):
  5759. captchatest = uiCommon.CaptchaEkran()
  5760. captchatest.SetText1("|cffffff00Bot Engel Sistemi")
  5761. # captchatest.SetText1("sif" % (sayi1, sayi2, sayi3, sayi4, sayi5))
  5762. captchatest.SetText3("Oyuna devam edebilmek için üstteki kodu aşağıya yaz.")
  5763. captchatest.SetTimeOverMsg("Soruyu zamanında cevaplamadığın için oyundan atılıyorsun.")
  5764. captchatest.SetTimeOverEvent(self.captchacevap, "kapat")
  5765. captchatest.SetAcceptEvent(lambda arg=True: self.captchacevap(arg))
  5766. captchatest.SetCancelEvent(lambda arg=False: self.captchacevap(arg))
  5767. captchatest.Open(15, sayi1, sayi2, sayi3, sayi4, sayi5)
  5768. self.captchatest = captchatest
  5769. def captchacevap(self, answer):
  5770. if not self.captchatest:
  5771. return
  5772. if answer == False:
  5773. self.captchatest.Temizle()
  5774. elif answer == True:
  5775. net.SendChatPacket("/captcha " + str(self.captchatest.GetInput()))
  5776. self.captchatest.Close()
  5777. self.captchatest = None
  5778. else:
  5779. net.SendChatPacket("/captcha 0")
  5780. self.captchatest.Close()
  5781. self.captchatest = None
  5782. #Captcha#
  5783. #Boss-Siralama#
  5784. def recordac(self):
  5785. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5786. return
  5787. self.recordscreen.Open()
  5788. def __recordclear(self):
  5789. constInfo.record["Liste"] = []
  5790. def __recordscreen(self, arg):
  5791. self.recordscreen.Setsayfa(1)
  5792. constInfo.record["Liste"].append(arg.split("|"))
  5793. self.recordscreen.LoadPage()
  5794. def __recordscreen2(self, info):
  5795. CMD = info.split("/")
  5796. if CMD[0]=="index":
  5797. constInfo.record["index"] = int(CMD[1])
  5798. elif CMD[0]=="input":
  5799. net.SendQuestInputStringPacket(str(constInfo.record["CMD"]))
  5800. elif CMD[0]=="yeniliste":
  5801. constInfo.record["Liste"] = []
  5802. elif CMD[0]=="liste":
  5803. constInfo.record["Liste"].append(CMD[1].split("|"))
  5804. elif CMD[0]=="blok":
  5805. self.recordscreen.LoadPage(CMD[1])
  5806. elif CMD[0]=="sayfa":
  5807. self.recordscreen.Setsayfa(CMD[1])
  5808. def recordwarning(self, msg):
  5809. if msg == "bilgiyok":
  5810. self.PopupMessage("Bilgi yok!")
  5811. elif msg == "oyuncuyok":
  5812. self.PopupMessage("Oyuncu bulunamadı.")
  5813. #Boss-Siralama#
  5814. ######################################## LONCA SISTEMLERI ################################
  5815. #Lonca-Aktif-Lider
  5816. def lider_sifirla(self):
  5817. constInfo.lider_list = []
  5818. def lider_ekle(self, isim, lonca):
  5819. constInfo.lider_list.append("#"+isim+"#"+lonca)
  5820. #Lonca-Aktif-Lider
  5821. #Lonca-Gecmis
  5822. def gecmistemizle(self):
  5823. import constInfo
  5824. constInfo.lonca_gecmis_list = []
  5825. def lonca_gecmis_ekle(self, lonca, tarih):
  5826. import constInfo
  5827. constInfo.lonca_gecmis_list.append("#"+lonca+"#"+tarih)
  5828. #Lonca-Gecmis
  5829. #Lonca-Toplanti
  5830. def loncatoplantisi(self):
  5831. questionDialogtoplanti = uiCommon.QuestionDialog()
  5832. questionDialogtoplanti.SetText("Lonca başkanı toplantı Yapıyor. Bölgesine ışınlanmak ister misin ?")
  5833. questionDialogtoplanti.SetAcceptEvent(lambda arg=TRUE: self.loncatoplantievet())
  5834. questionDialogtoplanti.SetCancelEvent(lambda arg=FALSE: self.loncatoplantihayir())
  5835. questionDialogtoplanti.Open()
  5836. self.questionDialogtoplanti=questionDialogtoplanti
  5837. return
  5838. def loncatoplantievet(self):
  5839. net.SendChatPacket("/loncatoplantievet")
  5840. self.questionDialogtoplanti.Close()
  5841. def loncatoplantihayir(self):
  5842. self.questionDialogtoplanti.Close()
  5843. #Lonca-Toplanti
  5844. #Lonca-Savas-Listesi
  5845. def savas_list_yenile(self):
  5846. constInfo.savas_list = []
  5847. def savas_listtesi(self, loncam, rakip, tarih, id):
  5848. constInfo.savas_list.append("#"+loncam+"#"+rakip+"#"+tarih+"#"+id)
  5849. #Lonca-Savas-Listesi
  5850. #Lonca-Oldurme-Gui
  5851. def LoncaIstatistikOpen(self):
  5852. if self.interface:
  5853. if constInfo.IsGuildWarStatShow:
  5854. self.interface.CloseGuildWarRankingList()
  5855. else:
  5856. net.SendChatPacket("/lonca_istatistik")
  5857. def __OpenGuildWarRank(self, tokenn):
  5858. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5859. return
  5860. token = tokenn.split("|")
  5861. if token[0] == "Open":
  5862. if self.interface:
  5863. self.interface.OpenGuildWarRankingList()
  5864. elif token[0] == "Close":
  5865. if self.interface:
  5866. self.interface.CloseGuildWarRankingList()
  5867. elif token[0] == "Append":
  5868. if self.interface:
  5869. self.interface.AppendGuildWarRankingList(str(token[1]), int(token[2]), int(token[3]), int(token[4]))
  5870. #Lonca-Oldurme-Gui
  5871. ######################################## LONCA SISTEMLERI ################################
  5872. ######################################## TICARET GECMISI ################################
  5873. def OpenTicaretLog(self):
  5874. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5875. return
  5876. self.Board = ui.BoardWithTitleBar()
  5877. self.Board.SetSize(241+30+215, 271+40+40-17-17+20)
  5878. self.Board.SetCenterPosition()
  5879. self.Board.AddFlag('movable')
  5880. self.Board.AddFlag('float')
  5881. self.Board.SetTitleName('Ticaret Kayıtların')
  5882. self.Board.SetCloseEvent(self.Kapat)
  5883. self.Board.Show()
  5884. self.Bekle3 = app.GetTime()
  5885. self.TekliflerText = ui.TextLine_Alisveris()
  5886. self.TekliflerText.SetParent(self.Board)
  5887. self.TekliflerText.SetPosition(0, 30)
  5888. self.TekliflerText.SetText(str(player.GetName()))
  5889. self.TekliflerText.SetWindowHorizontalAlignCenter()
  5890. self.TekliflerText.SetHorizontalAlignCenter()
  5891. self.TekliflerText.Show()
  5892. self.ThinBoard = ui.ThinBoard()
  5893. self.ThinBoard.SetParent(self.Board)
  5894. self.ThinBoard.SetSize(241-18+26+215, 250)
  5895. self.ThinBoard.SetPosition(10+9-5-3, 48)
  5896. self.ThinBoard.Show()
  5897. self.ListBox=ui.ListBoxScroll()
  5898. self.ListBox.SetParent(self.Board)
  5899. self.ListBox.SetPosition(10+9, 50)
  5900. self.ListBox.SetSize(241-18+26-8+215, 250)
  5901. self.ListBox.SetEvent(ui.__mem_func__(self.__OnSelectListBox))
  5902. self.ListBox.Show()
  5903. self.silButton = ui.Button()
  5904. self.silButton.SetParent(self.Board)
  5905. self.silButton.SetPosition(30, 301)
  5906. self.silButton.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
  5907. self.silButton.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
  5908. self.silButton.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
  5909. self.silButton.SetText("Tümünü Sil")
  5910. self.silButton.SetToolTipText("Bu Tuş Tüm Logları Siler")
  5911. self.silButton.Show()
  5912. self.silButton.SetEvent(ui.__mem_func__(self.LogSil))
  5913. self.YenileButton = ui.Button()
  5914. self.YenileButton.SetParent(self.Board)
  5915. self.YenileButton.SetPosition(80+120-56+262, 301)
  5916. self.YenileButton.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
  5917. self.YenileButton.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
  5918. self.YenileButton.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
  5919. self.YenileButton.SetText("Yenile")
  5920. self.YenileButton.SetToolTipText("Bu Tuş Tüm Logları Yeniler")
  5921. self.YenileButton.Show()
  5922. self.YenileButton.SetEvent(ui.__mem_func__(self.OpenTicaretLog))
  5923. self.ListBox.ClearItem()
  5924. pos = 0
  5925. if os.path.exists(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg"):
  5926. ac = open(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "r").readlines()
  5927. for i in ac:
  5928. bol = i.split("#")
  5929. self.ListBox.InsertItem(pos, str(bol[1]) + " adlı oyuncu ile (" + str(bol[2]) + ") tarihinde ticaret gercekleşti.")
  5930. pos += 1
  5931. else:
  5932. self.ListBox.InsertItem(0, "Yapılan hiç ticaret kaydı yok.")
  5933. def __OnSelectListBox(self):
  5934. if self.silButton.IsDown():
  5935. self.silButton.SetUp()
  5936. self.silButton.SetUp()
  5937. elif self.TumsilButton.IsDown():
  5938. self.TumsilButton.SetUp()
  5939. self.TumsilButton.SetUp()
  5940. elif self.YenileButton.IsDown():
  5941. self.YenileButton.SetUp()
  5942. self.YenileButton.SetUp()
  5943. def LogSil(self):
  5944. os.remove(str(constGame.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg")
  5945. chat.AppendChat(chat.CHAT_TYPE_INFO,"Tum Loglar Silindi!")
  5946. def Kapat(self):
  5947. self.Board.Hide()
  5948. self.TekliflerText.Hide()
  5949. self.ThinBoard.Hide()
  5950. self.ListBox.Hide()
  5951. self.Ticaret = 0
  5952. ######################################## TICARET GECMISI ################################
  5953. ######################################## HIZLI EKIPMAN ################################
  5954. def ToggleEkipmanWindowStatusPage(self):
  5955. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5956. return
  5957. import uifastequip
  5958. self.uuifastequipDlg = uifastequip.changeequip()
  5959. if constInfo.FAST_EQUIP == 0:
  5960. constInfo.FAST_EQUIP = 1
  5961. self.uuifastequipDlg.Show()
  5962. else:
  5963. self.uuifastequipDlg.Hide()
  5964. constInfo.FAST_EQUIP = 0
  5965. ######################################## HIZLI EKIPMAN ################################
  5966. ######################################## HIZLI STATU ################################
  5967. def __HizliStatu(self):
  5968. return
  5969. import uiStatusUp
  5970. self.StatusUp = uiStatusUp.StatusUp()
  5971. if constInfo.FAST_STATU == 0:
  5972. constInfo.FAST_STATU = 1
  5973. self.StatusUp.Show()
  5974. ######################################## HIZLI STATU ################################
  5975. #System-constGame#
  5976. def __SistemButonlari(self):
  5977. if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
  5978. return
  5979. self.interface.ToggleSistemButonlariWindow()
  5980. #System-constGame#
  5981. if app.ENABLE_AURA_SYSTEM:
  5982. def ActAura(self, iAct, bWindow):
  5983. if self.interface:
  5984. self.interface.ActAura(iAct, bWindow)
  5985. def AlertAura(self, bWindow):
  5986. snd.PlaySound("sound/ui/make_soket.wav")
  5987. # if bWindow:
  5988. # self.PopupMessage(localeInfo.AURA_DEL_SERVEITEM)
  5989. # else:
  5990. # self.PopupMessage(localeInfo.AURA_DEL_ABSORDITEM)
  5991. if (app.ENABLE_PET_ATTR_DETERMINE):
  5992. def __OpenChequeTicket(self, itemPos):
  5993. self.interface.OpenChequeTicket(int(itemPos))
  5994. if app.ENABLE_GEM_SYSTEM:
  5995. if app.ENABLE_BOSS_GEM_SYSTEM:
  5996. def OpenGemShop(self, gemShopType):
  5997. if self.interface:
  5998. self.interface.OpenGemShop(gemShopType)
  5999. def CloseGemShop(self):
  6000. if self.interface:
  6001. self.interface.CloseGemShop()
  6002. def RefreshGemShop(self, gemShopType):
  6003. if self.interface:
  6004. self.interface.RefreshGemShop(gemShopType)
  6005. else:
  6006. def OpenGemShop(self):
  6007. if self.interface:
  6008. self.interface.OpenGemShop()
  6009. def CloseGemShop(self):
  6010. if self.interface:
  6011. self.interface.CloseGemShop()
  6012. def RefreshGemShop(self):
  6013. if self.interface:
  6014. self.interface.RefreshGemShop()
  6015. ######################################## HIZLI STATU ################################
  6016. def __itemine_ws_kazandin(self, rakip):
  6017. text = "Tebrikler "+ str(rakip) +" ile olan savaşı kazandınız."
  6018. self.BoardMessage.SetTip(text)
  6019. self.BoardMessage.SetTop()
  6020. def __itemine_ws_kaybettin(self, rakip):
  6021. text = "Üzgünüm "+ str(rakip) +" ile olan savaşı kaybettiniz."
  6022. self.BoardMessage.SetTip(text)
  6023. self.BoardMessage.SetTop()
  6024. def __itemine_ws_bir(self):
  6025. snd.PlaySound("BGM/kill/onekill.mp3")
  6026. def __itemine_ws_iki(self):
  6027. snd.PlaySound("BGM/kill/doublekill.mp3")
  6028. def __itemine_ws_uc(self):
  6029. snd.PlaySound("BGM/kill/triplekill.mp3")
  6030. def __itemine_ws_dort(self):
  6031. snd.PlaySound("BGM/kill/quadra.mp3")
  6032. def __itemine_ws_bes(self):
  6033. snd.PlaySound("BGM/kill/pentakill.mp3")
  6034. def __itemine_ws_alti(self):
  6035. snd.PlaySound("BGM/kill/hexakill.mp3")
  6036. def __rebirtodul(self, hp, dx):
  6037. text = "Tebrikler. "+ str(hp) +" HP ve "+ str(dx) +" Savunma ödülünüz karakterinize işlendi."
  6038. self.BoardMessage.SetTip(text)
  6039. self.BoardMessage.SetTop()
  6040. def __rebirtodul2(self, hp, dx):
  6041. text = "Tebrikler. "+ str(hp) +" Canavarlara Karşı Güç ve "+ str(dx) +" Metin Taşlarına Karşı Güç ödülünüz karakterinize işlendi."
  6042. self.BoardMessage.SetTip(text)
  6043. self.BoardMessage.SetTop()
  6044. ######################################## HIZLI STATU ################################
  6045. ######################################## BAKIM MODU ################################
  6046. def BINARY_Update_Maintenance(self, iTime, iDuration, iReason1, iReason2, iReason3, iReason4, iReason5):
  6047. sTime = int(iTime)
  6048. sDuration = int(iDuration)
  6049. sReason1 = str(iReason1)
  6050. sReason2 = str(iReason2)
  6051. sReason3 = str(iReason3)
  6052. sReason4 = str(iReason4)
  6053. sReason5 = str(iReason5)
  6054. if sTime != 0 and sDuration != 0:
  6055. self.wndMaintenance.OpenMaintenance(int(iTime), int(iDuration), str(sReason1), str(sReason2), str(sReason3), str(sReason4), str(sReason5))
  6056. def BINARY_Close_Maintenance(self):
  6057. self.wndMaintenance.Close()
  6058. ######################################## BAKIM MODU ################################
  6059. class Component:
  6060. def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
  6061. button = ui.Button()
  6062. if parent != None:
  6063. button.SetParent(parent)
  6064. button.SetPosition(x, y)
  6065. button.SetUpVisual(UpVisual)
  6066. button.SetOverVisual(OverVisual)
  6067. button.SetDownVisual(DownVisual)
  6068. button.SetText(buttonName)
  6069. button.SetToolTipText(tooltipText)
  6070. button.Show()
  6071. button.SetEvent(func)
  6072. return button
  6073. def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
  6074. button = ui.ToggleButton()
  6075. if parent != None:
  6076. button.SetParent(parent)
  6077. button.SetPosition(x, y)
  6078. button.SetUpVisual(UpVisual)
  6079. button.SetOverVisual(OverVisual)
  6080. button.SetDownVisual(DownVisual)
  6081. button.SetText(buttonName)
  6082. button.SetToolTipText(tooltipText)
  6083. button.Show()
  6084. button.SetToggleUpEvent(funcUp)
  6085. button.SetToggleDownEvent(funcDown)
  6086. return button
  6087. def EditLine(self, parent, editlineText, x, y, width, heigh, max):
  6088. SlotBar = ui.SlotBar()
  6089. if parent != None:
  6090. SlotBar.SetParent(parent)
  6091. SlotBar.SetSize(width, heigh)
  6092. SlotBar.SetPosition(x, y)
  6093. SlotBar.Show()
  6094. Value = ui.EditLine()
  6095. Value.SetParent(SlotBar)
  6096. Value.SetSize(width, heigh)
  6097. Value.SetPosition(1, 1)
  6098. Value.SetMax(max)
  6099. Value.SetLimitWidth(width)
  6100. Value.SetMultiLine()
  6101. Value.SetText(editlineText)
  6102. Value.Show()
  6103. return SlotBar, Value
  6104. def TextLine(self, parent, textlineText, x, y, color):
  6105. textline = ui.TextLine()
  6106. if parent != None:
  6107. textline.SetParent(parent)
  6108. textline.SetPosition(x, y)
  6109. if color != None:
  6110. textline.SetFontColor(color[0], color[1], color[2])
  6111. textline.SetText(textlineText)
  6112. textline.Show()
  6113. return textline
  6114. def RGB(self, r, g, b):
  6115. return (r*255, g*255, b*255)
  6116. def SliderBar(self, parent, sliderPos, func, x, y):
  6117. Slider = ui.SliderBar()
  6118. if parent != None:
  6119. Slider.SetParent(parent)
  6120. Slider.SetPosition(x, y)
  6121. Slider.SetSliderPos(sliderPos / 100)
  6122. Slider.Show()
  6123. Slider.SetEvent(func)
  6124. return Slider
  6125. def ExpandedImage(self, parent, x, y, img):
  6126. image = ui.ExpandedImageBox()
  6127. if parent != None:
  6128. image.SetParent(parent)
  6129. image.SetPosition(x, y)
  6130. image.LoadImage(img)
  6131. image.Show()
  6132. return image
  6133. def ComboBox(self, parent, text, x, y, width):
  6134. combo = ui.ComboBox()
  6135. if parent != None:
  6136. combo.SetParent(parent)
  6137. combo.SetPosition(x, y)
  6138. combo.SetSize(width, 15)
  6139. combo.SetCurrentItem(text)
  6140. combo.Show()
  6141. return combo
  6142. def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
  6143. thin = ui.ThinBoard()
  6144. if parent != None:
  6145. thin.SetParent(parent)
  6146. if moveable == TRUE:
  6147. thin.AddFlag('movable')
  6148. thin.AddFlag('float')
  6149. thin.SetSize(width, heigh)
  6150. thin.SetPosition(x, y)
  6151. if center == TRUE:
  6152. thin.SetCenterPosition()
  6153. thin.Show()
  6154. return thin
  6155. def Gauge(self, parent, width, color, x, y):
  6156. gauge = ui.Gauge()
  6157. if parent != None:
  6158. gauge.SetParent(parent)
  6159. gauge.SetPosition(x, y)
  6160. gauge.MakeGauge(width, color)
  6161. gauge.Show()
  6162. return gauge
  6163. def ListBoxEx(self, parent, x, y, width, heigh):
  6164. bar = ui.Bar()
  6165. if parent != None:
  6166. bar.SetParent(parent)
  6167. bar.SetPosition(x, y)
  6168. bar.SetSize(width, heigh)
  6169. bar.SetColor(0x77000000)
  6170. bar.Show()
  6171. ListBox=ui.ListBoxEx()
  6172. ListBox.SetParent(bar)
  6173. ListBox.SetPosition(0, 0)
  6174. ListBox.SetSize(width, heigh)
  6175. ListBox.Show()
  6176. scroll = ui.ScrollBar()
  6177. scroll.SetParent(ListBox)
  6178. scroll.SetPosition(width-15, 0)
  6179. scroll.SetScrollBarSize(heigh)
  6180. scroll.Show()
  6181. ListBox.SetScrollBar(scroll)
  6182. return bar, ListBox
  6183. def __uiRoulette(self, info):
  6184. CMD = info.split("/")
  6185. if CMD[0]=="index":
  6186. constInfo.uiRoulette["index"] = int(CMD[1])
  6187. elif CMD[0]=="gui":
  6188. constInfo.uiRoulette["kugel"] = int(CMD[1])
  6189. constInfo.uiRoulette["max_points"] = int(CMD[2])
  6190. constInfo.uiRoulette["points"] = int(CMD[3])
  6191. def __uiRouletteOpen(self):
  6192. self.Roulette.Open()