HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
Selamlar filesimi incelerken world_extra_sistemler.py adında dosya buldum bunu nasıl aktif edebilir
game.py içeriğim şu şekilde
[CODE title="Game.py"]import os
import app
import dbg
import grp
import item
import background
import chr
import chrmgr
import player
import snd
import chat
import textTail
import snd
import net
import effect
import wndMgr
import fly
import systemSetting
import quest
import guild
import skill
import messenger
import localeInfo
import constInfo
import exchange
import ime
import ui
import uiCommon
import uiPhaseCurtain
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import event
import gameInfo
import sistemler
import translate
import uiimp
import uipvprequest
import uiWordGameSystem
import uiakiraevent
import uiAkiraEvent
import uiAkiraMenu
import equip_watch
import screenshotdialog
import uibkoku
import uiruhtasi
import uibiyolog
import uiguildranking
import BKTrade
import ayarlar
import uiTip
import uimarbleshop
import uipricechecker
import uiaverage_price
import uiblood_dungeon
import uibiowindow
import uilevelguide
import guildwarkillcounter
import uiItemShopInfo
import record
import oyunicisiralama
import loncasiralama
# PRIVATE_SHOP_PRICE_LIST
import uiPrivateShopBuilder
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
import uiOfflineShopBuilder
import uiOfflineShop
# END_OF_PRIVATE_SHOP_PRICE_LIST
import mouseModule
import consoleModule
import playerSettingModule
import interfaceModule
import musicInfo
import debugInfo
import stringCommander
import time
import serverInfo
botControl = None
from bot_control import BotControl
if constInfo.ENABLE_SVSIDE_CAPTCHA:
svsidedia = None
svsidedi_cp = ""
from svsideoi import SvsideDialog
import binascii
if app.ENABLE_SUPPORT_SHAMAN:
import uisamanyardimcisi
if app.ENABLE_NEW_PET_SYSTEM:
import uipetsystem
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
import uiwhisperadmin
if app.ENABLE_BOSS_TRACKING:
import uibosstracking
else:
import uibosstracking_eski
if app.__ENABLE_NEW_OFFLINESHOP__:
import uiofflineshopikarus
import offlineshop
from _weakref import proxy
from switchbot import Bot
from ui_wrapper import _ui
# SCREENSHOT_CWDSAVE
SCREENSHOT_CWDSAVE = TRUE
SCREENSHOT_DIR = None
cameraDistance = 1550.0
cameraPitch = 27.0
cameraRotation = 0.0
cameraHeight = 100.0
testAlignment = 0
class Component:
def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
button = ui.Button()
if parent != None:
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(UpVisual)
button.SetOverVisual(OverVisual)
button.SetDownVisual(DownVisual)
button.SetText(buttonName)
button.SetToolTipText(tooltipText)
button.Show()
button.SetEvent(func)
return button
def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
button = ui.ToggleButton()
if parent != None:
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(UpVisual)
button.SetOverVisual(OverVisual)
button.SetDownVisual(DownVisual)
button.SetText(buttonName)
button.SetToolTipText(tooltipText)
button.Show()
button.SetToggleUpEvent(funcUp)
button.SetToggleDownEvent(funcDown)
return button
def EditLine(self, parent, editlineText, x, y, width, heigh, max):
SlotBar = ui.SlotBar()
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetSize(width, heigh)
SlotBar.SetPosition(x, y)
SlotBar.Show()
Value = ui.EditLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(1, 1)
Value.SetMax(max)
Value.SetLimitWidth(width)
Value.SetMultiLine()
Value.SetText(editlineText)
Value.Show()
return SlotBar, Value
def EditLine2(self, parent, editlineText, x, y, width, heigh, max):
SlotBar = ui.SlotBar()
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetSize(width, heigh)
SlotBar.SetPosition(x, y)
SlotBar.Show()
Value = ui.EditLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(2, 2)
Value.SetMax(210)
Value.SetLimitWidth(width)
Value.SetMultiLine()
Value.SetText(editlineText)
Value.Show()
return SlotBar, Value
def TextLine(self, parent, textlineText, x, y, color):
textline = ui.TextLine()
if parent != None:
textline.SetParent(parent)
textline.SetPosition(x, y)
if color != None:
textline.SetFontColor(color[0], color[1], color[2])
textline.SetText(textlineText)
textline.Show()
return textline
def RGB(self, r, g, b):
return (r*255, g*255, b*255)
def SliderBar(self, parent, sliderPos, func, x, y):
Slider = ui.SliderBar()
if parent != None:
Slider.SetParent(parent)
Slider.SetPosition(x, y)
Slider.SetSliderPos(sliderPos / 100)
Slider.Show()
Slider.SetEvent(func)
return Slider
def ExpandedImage(self, parent, x, y, img):
image = ui.ExpandedImageBox()
if parent != None:
image.SetParent(parent)
image.SetPosition(x, y)
image.LoadImage(img)
image.Show()
return image
def ComboBox(self, parent, text, x, y, width):
combo = ui.ComboBox()
if parent != None:
combo.SetParent(parent)
combo.SetPosition(x, y)
combo.SetSize(width, 15)
combo.SetCurrentItem(text)
combo.Show()
return combo
def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
thin = ui.ThinBoard()
if parent != None:
thin.SetParent(parent)
if moveable == TRUE:
thin.AddFlag('movable')
thin.AddFlag('float')
thin.SetSize(width, heigh)
thin.SetPosition(x, y)
if center == TRUE:
thin.SetCenterPosition()
thin.Show()
return thin
def Gauge(self, parent, width, color, x, y):
gauge = ui.Gauge()
if parent != None:
gauge.SetParent(parent)
gauge.SetPosition(x, y)
gauge.MakeGauge(width, color)
gauge.Show()
return gauge
def ListBoxEx(self, parent, x, y, width, heigh):
bar = ui.Bar()
if parent != None:
bar.SetParent(parent)
bar.SetPosition(x, y)
bar.SetSize(width, heigh)
bar.SetColor(0x77000000)
bar.Show()
ListBox=ui.ListBoxEx()
ListBox.SetParent(bar)
ListBox.SetPosition(0, 0)
ListBox.SetSize(width, heigh)
ListBox.Show()
scroll = ui.ScrollBar()
scroll.SetParent(ListBox)
scroll.SetPosition(width-15, 0)
scroll.SetScrollBarSize(heigh)
scroll.Show()
ListBox.SetScrollBar(scroll)
return bar, ListBox
class GameWindow(ui.ScriptWindow):
GuildRankingTime = 0
AutoHuntRebornT = 0
def __init__(self, stream):
ui.ScriptWindow.__init__(self, "GAME")
self.SetWindowName("game")
net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
player.SetGameWindow(self)
self.onQuest = 0
self.startGameTime = 0
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
#if app.#ifBLE_NIGHT_MODE:
# background.SetGameWindow(self)
if constInfo.ENABLE_SVSIDE_CAPTCHA:
global svsidedia
if svsidedia == None:
svsidedia = SvsideDialog()
svsidedia.Board.Hide()
global botControl
if botControl == None:
botControl = BotControl()
botControl.Board.Hide()
self.quickSlotPageIndex = 0
self.lastPKModeSendedTime = 0
self.pressNumber = None
self.guildWarQuestionDialog = None
self.interface = None
self.targetBoard = None
self.console = None
self.mapNameShower = None
self.affectShower = None
self.playerGauge = None
self.PvPChallengeDialog = None
self.wndScreenDialog = None
self.biyoekran = None
#/* Random Title // RANDOMTITLE // 13.10.17 - 13:52 */
if constInfo.RANDOM_TITLE:
self.TitleTime = 0
self.stream=stream
self.interface = interfaceModule.Interface()
self.interface.MakeInterface()
self.interface.ShowDefaultWindows()
self.impekran = uiimp.impDialog()
self.wndMarbleShop = uimarbleshop.MarbleShopWindow()
self.pricechecker = uipricechecker.PriceCheckerWindow()
self.guildranking = uiguildranking.guildranking()
#self.wn#self.wnddailypasslypass.DailyPass()
self.akiraEventButton = uiakiraevent.AkiraEventButton()
self.akiraEventButton.LoadWindow()
self.akiraEventButton.Hide()
self.akiraLog = uiAkiraMenu.AkiraLog()
self.akiraLog.LoadWindow()
self.akiraLog.Hide()
self.curtain = uiPhaseCurtain.PhaseCurtain()
self.curtain.speed = 0.03
self.curtain.Hide()
self.targetBoard = uiTarget.TargetBoard()
self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
self.targetBoard.Hide()
self.console = consoleModule.ConsoleWindow()
self.console.BindGameClass(self)
self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
self.console.Hide()
self.mapNameShower = uiMapNameShower.MapNameShower()
self.affectShower = uiAffectShower.AffectShower()
self.playerGauge = uiPlayerGauge.PlayerGauge(self)
self.playerGauge.Hide()
self.wordgame = uiWordGameSystem.WordGameWindow()
self.wordgame.Close()
self.EquipModeGui = equip_watch.EquipGui()
self.EquipModeGui.Close()
self.bkoku = uibkoku.BKOku()
self.bkoku.Hide()
self.ruhtasi = uiruhtasi.RuhTasi()
self.ruhtasi.Hide()
self.biyoekran = uibiyolog.BiyologEkran()
self.biyoekran.Hide()
self.BKTradeSys = BKTrade.BKTrade()
self.BKTradeSys.Close()
self.average_price = uiaverage_price.AveragePrice()
self.average_price.Hide()
self.biowindow = uibiowindow.BiologWnd()
self.biowindow.Hide()
if app.ENABLE_BOSS_TRACKING:
self.bosstracking = uibosstracking.BossTrackingInfoWindow()
self.bosstracking.Hide()
else:
self.bosstracking = uibosstracking_eski.BossTrackingSystemWindow()
self.bosstracking.Hide()
self.blood_dungeon = uiblood_dungeon.BloodDungeonSystemWindow()
self.blood_dungeon.Hide()
self.levelGuide = uilevelguide.Window()
self.guildScoreCounter = guildwarkillcounter.MessageQueue()
self.recordscreen = record.recordwindow()
self.oyunicisiralama = oyunicisiralama.oyunicisirala()
self.loncasiralama = loncasiralama.loncasiralama()
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
self.adminWhisperManager = uiwhisperadmin.WhisperManager()
if app.ENABLE_SUPPORT_SHAMAN:
self.OGSaman = uisamanyardimcisi.SYardimcisiDialog()
if app.ENABLE_NEW_PET_SYSTEM:
self.petmain = uipetsystem.PetSystemMain()
if (app.ENABLE_PET_ATTR_DETERMINE):
self.petmain.SetItemToolTip(self.interface.tooltipItem)
self.petmain.BindInterface(self.interface)
self.petmini = uipetsystem.PetSystemMini()
if app.__ENABLE_NEW_OFFLINESHOP__:
offlineshop.HideShopNames()
self.Offlineshop = uiofflineshopikarus.NewOfflineShopBoard()
self.Offlineshop.Hide()
self.__SetQuickSlotMode()
self.__ServerCommand_Build()
self.__ProcessPreservedServerCommand()
self.switchbot = Bot()
self.switchbot.Hide()
#/* Lonca Kral Tagı // LONCAKRALTAG // 20.03.18 - 19:10 */
#if app.E#ifLE_GUILD_KRAL_TAG:
# self.endTime = 0
def __del__(self):
player.SetGameWindow(0)
net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
ui.ScriptWindow.__del__(self)
self.onQuest = 0
self.startGameTime = 0
def Open(self):
app.SetFrameSkip(1)
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
self.BoardMessage = uiTip.BigBoard()
self.quickSlotPageIndex = 0
self.PickingCharacterIndex = -1
self.PickingItemIndex = -1
self.consoleEnable = FALSE
self.isShowDebugInfo = FALSE
self.ShowNameFlag = FALSE
self.enableXMasBoom = FALSE
self.startTimeXMasBoom = 0.0
self.indexXMasBoom = 0
global cameraDistance, cameraPitch, cameraRotation, cameraHeight
app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
constInfo.SET_DEFAULT_CHRNAME_COLOR()
constInfo.SET_DEFAULT_FOG_LEVEL()
constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
# TWO_HANDED_WEAPON_ATTACK_SPEED_UP
constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
# END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
if constInfo.PVPMODE_TEST_ENABLE:
self.testPKMode = ui.TextLine()
self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
self.testPKMode.SetPosition(0, 15)
self.testPKMode.SetWindowHorizontalAlignCenter()
self.testPKMode.SetHorizontalAlignCenter()
self.testPKMode.SetFeather()
self.testPKMode.SetOutline()
self.testPKMode.Show()
self.testAlignment = ui.TextLine()
self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
self.testAlignment.SetPosition(0, 35)
self.testAlignment.SetWindowHorizontalAlignCenter()
self.testAlignment.SetHorizontalAlignCenter()
self.testAlignment.SetFeather()
self.testAlignment.SetOutline()
self.testAlignment.Show()
self.__BuildKeyDict()
self.__BuildDebugInfo()
# PRIVATE_SHOP_PRICE_LIST
uiPrivateShopBuilder.Clear()
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
uiOfflineShopBuilder.Clear()
# END_OF_PRIVATE_SHOP_PRICE_LIST
# UNKNOWN_UPDATE
exchange.InitTrading()
# END_OF_UNKNOWN_UPDATE
self.kill_gui = 0
self.kill_gui_board = ui.ThinBoard()
self.kill_gui_board.SetParent(self)
self.kill_gui_board.SetSize(255,90)
self.kill_gui_board.SetPosition(20, wndMgr.GetScreenHeight() - 200)
self.kill_gui_board.Hide()
self.kill_gui_board.x_counter = 450
self.red_img = ui.ExpandedImageBox()
self.red_img.SetParent(self.kill_gui_board)
self.red_img.LoadImage("system/kirmizi2.tga")
self.red_img.SetPosition(10, 10)
self.red_img.Show()
self.yellow_img = ui.ExpandedImageBox()
self.yellow_img.SetParent(self.kill_gui_board)
self.yellow_img.LoadImage("system/sari2.tga")
self.yellow_img.SetPosition(90, 10)
self.yellow_img.Show()
self.blue_img = ui.ExpandedImageBox()
self.blue_img.SetParent(self.kill_gui_board)
self.blue_img.LoadImage("system/mavi2.tga")
self.blue_img.SetPosition(170, 10)
self.blue_img.Show()
self.red_kill_count_text = ui.TextLine()
self.red_kill_count_text.SetParent(self.kill_gui_board)
self.red_kill_count_text.SetPosition(30,50)
self.red_kill_count_text.SetText("Skor : ")
self.red_kill_count_text.Show()
self.yellow_kill_count_text = ui.TextLine()
self.yellow_kill_count_text.SetParent(self.kill_gui_board)
self.yellow_kill_count_text.SetPosition(105,50)
self.yellow_kill_count_text.SetText("Skor : ")
self.yellow_kill_count_text.Show()
self.blue_kill_count_text = ui.TextLine()
self.blue_kill_count_text.SetParent(self.kill_gui_board)
self.blue_kill_count_text.SetPosition(180,50)
self.blue_kill_count_text.SetText("Skor : ")
self.blue_kill_count_text.Show()
self.red_kill_count_textt = ui.TextLine()
self.red_kill_count_textt.SetParent(self.kill_gui_board)
self.red_kill_count_textt.SetPosition(30,60)
self.red_kill_count_textt.SetText("Katılımcı : ")
self.red_kill_count_textt.Show()
self.yellow_kill_count_textt = ui.TextLine()
self.yellow_kill_count_textt.SetParent(self.kill_gui_board)
self.yellow_kill_count_textt.SetPosition(105,60)
self.yellow_kill_count_textt.SetText("Katılımcı : ")
self.yellow_kill_count_textt.Show()
self.blue_kill_count_textt = ui.TextLine()
self.blue_kill_count_textt.SetParent(self.kill_gui_board)
self.blue_kill_count_textt.SetPosition(180,60)
self.blue_kill_count_textt.SetText("Katılımcı : ")
self.blue_kill_count_textt.Show()
## Sound
s##.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
snd.SetSoundVolume(systemSetting.GetSoundVolume())
netFieldMusicFileName = net.GetFieldMusicFileName()
if netFieldMusicFileName:
snd.FadeInMusic("BGM/" + netFieldMusicFileName)
elif musicInfo.fieldMusic != "":
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
if app.ENABLE_NIGHT_MODE:
if systemSetting.IsEnableNightMode() or constInfo.DAY_MODE_NOW == "dark":
background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
background.SetEnvironmentData(1)
#/* Kar Yağdırma Sistemi // KARYAGDIRMASISTEM // 07.11.17 - 17:26 */
if app.ENABLE_SNOW_MODE:
if systemSetting.IsEnableSnowFall() or constInfo.SNOW_MODE_NOW:
background.EnableSnow(1)
#/* Otomatik Yang ve İtem Toplama // OTOMATIKYANGITEMTOPLAMA // 12.04.18 - 16:42 */
if 0 == constInfo.auto_pick_item:
self.PickUpItem()
if 0 == constInfo.auto_pick_yang:
self.PickUpMoney()
if app.ENABLE_FOG_FIX:
if systemSetting.IsFogMode():
background.SetEnvironmentFog(True)
else:
background.SetEnvironmentFog(False)
self.__SetQuickSlotMode()
self.__SelectQuickPage(self.quickSlotPageIndex)
self.SetFocus()
self.Show()
app.ShowCursor()
net.SendEnterGamePacket()
if app.WJ_SECURITY_SYSTEM:
if constInfo.open_security == 0:
net.SendChatPacket("/open_security ac")
# START_GAME_ERROR_EXIT
try:
self.StartGame()
except:
import exception
exception.Abort("GameWindow.Open")
# END_OF_START_GAME_ERROR_EXIT
# NPC°¡ Å¥ºê½Ã½ºÅÛÀ¸·Î ¸¸µé ¼ö ÀÖ´Â ¾ÆÀÌÅÛµéÀÇ ¸ñ·ÏÀ» ij½Ì
# ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
self.cubeInformation = {}
self.currentCubeNPC = 0
#ui.EnablePaste(True)
if app.ENABLE_DISCORD_RPC:
#ui.EnablePaste(TrueordInformations(0)
for i in xrange(10):
if systemSetting.IsDesertTexturesMode():
if background.GetCurrentMapName():
desert_maps = [
"metin2_map_a1",
"metin2_map_b1",
"metin2_map_c1"
]
desert_maps_textures = {
"metin2_map_a1" : "textureset\metin2_a1_desert.txt",
"metin2_map_b1" : "textureset\metin2_b1_desert.txt",
"metin2_map_c1" : "textureset\metin2_c1_desert.txt", }
if str(background.GetCurrentMapName()) in desert_maps:
background.TextureChange(desert_maps_textures[str(background.GetCurrentMapName())])
def Close(self):
self.Hide()
self.akiraEventButton.Hide()
self.akiraLog.Hide()
global cameraDistance, cameraPitch, cameraRotation, cameraHeight
(cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)
self.onPressKeyDict = None
self.onClickKeyDict = None
chat.Close()
snd.StopAllSound()
grp.InitScreenEffect()
chr.Destroy()
textTail.Clear()
quest.Clear()
background.Destroy()
guild.Destroy()
messenger.Destroy()
skill.ClearSkillData()
wndMgr.Unlock()
self.impekran.Close()
mouseModule.mouseController.DeattachObject()
if self.guildWarQuestionDialog:
self.guildWarQuestionDialog.Close()
self.guildNameBoard = None
self.partyRequestQuestionDialog = None
self.partyInviteQuestionDialog = None
self.guildInviteQuestionDialog = None
self.guildWarQuestionDialog = None
self.messengerAddFriendQuestion = None
#/* Uzaktan Ticaret Sistemi // UZAKTANTICARET // 10.02.18 */
if app.ENABLE_REMOTE_TRADING:
UzaktanTicaretRequestQuestionDialog = None
#/* Ajan Duyuru Sistemi // AJANDUYURUSISTEMI // 18.02.18 - 11:13 */
if app.ENABLE_AJAN_NOTICE:
warPlayerCheckQuestionDialog = None
# UNKNOWN_UPDATE
self.itemDropQuestionDialog = None
# END_OF_UNKNOWN_UPDATE
if self.guildranking.IsShow():
self.guildranking.Open()
if self.recordscreen.IsShow():
self.recordscreen.Open()
if self.oyunicisiralama.IsShow():
self.oyunicisiralama.Open()
if self.loncasiralama.IsShow():
self.loncasiralama.Open()
# QUEST_CONFIRM
self.confirmDialog = None
# END_OF_QUEST_CONFIRM
self.PrintCoord = None
self.FrameRate = None
self.Pitch = None
self.Splat = None
self.TextureNum = None
self.ObjectNum = None
self.ViewDistance = None
self.PrintMousePos = None
self.ClearDictionary()
if app.ENABLE_NEW_PET_SYSTEM:
self.petmain.Close()
self.petmini.Close()
self.playerGauge = None
self.mapNameShower = None
self.affectShower = None
self.PvPChallengeDialog = None
self.EquipModeGui = None
self.captchatest = None
self.levelGuide = None
if self.console:
self.console.BindGameClass(0)
self.console.Close()
self.console=None
if self.bkoku:
self.bkoku.Destroy()
self.bkoku = None
if self.ruhtasi:
self.ruhtasi.Destroy()
self.ruhtasi = None
if self.biyoekran:
self.biyoekran.Destroy()
self.biyoekran = None
if self.wordgame:
self.wordgame.Close()
self.wordgame = None
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
if self.adminWhisperManager:
self.adminWhisperManager.Hide()
if self.wndMarbleShop:
self.wndMarbleShop.Hide()
if self.average_price:
self.average_price.Destroy()
self.average_price = None
if self.pricechecker:
self.pricechecker.Close()
self.pricechecker = None
if self.biowindow:
self.biowindow.Destroy()
self.biowindow = None
if self.guildranking.IsShow():
self.guildranking.Open()
if self.recordscreen.IsShow():
self.recordscreen.Open()
if self.oyunicisiralama.IsShow():
self.oyunicisiralama.Open()
if self.loncasiralama.IsShow():
self.loncasiralama.Open()
if self.bosstracking:
self.bosstracking.Destroy()
self.bosstracking = None
if self.blood_dungeon:
self.blood_dungeon.Destroy()
self.blood_dungeon = None
if app.__ENABLE_NEW_OFFLINESHOP__:
if self.Offlineshop:
self.Offlineshop.Destroy()
self.Offlineshop = None
if app.ENABLE_SUPPORT_SHAMAN:
self.OGSaman.Close()
if self.levelGuide:
self.levelGuide.Close()
if self.targetBoard:
self.targetBoard.Destroy()
self.targetBoard = None
if self.interface:
self.interface.HideAllWindows()
self.interface.Close()
self.interface=None
player.ClearSkillDict()
player.ResetCameraRotation()
self.KillFocus()
app.HideCursor()
print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
def __BuildKeyDict(self):
onPressKeyDict = {}
##PressKey ´Â ´©¸£°í ÀÖ´Â µ¿¾È °è¼Ó Àû¿ëµÇ´Â ŰÀÌ´Ù.
##PressKeyÜÃàŰ Äü½½·Ô¿¡ ÀÌ¿ëµÈ´Ù.(ÀÌÈÄ ¼ıÀڵ鵵 Äü ½½·Ô¿ë ¿¹¾à)
## F12 ´Â Ŭ¶ó µğ¹ö±×¿ë ŰÀ̹Ƿ##¾²Áö ¾Ê´Â °Ô ÁÁ´Ù.
onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
onPressKeyDict[app.DIK_## = lambda : self.__PressNumKey(2)
onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
onPressKeyDict[app.DIK_F5] = lambda : self.interface.ToggleFastMenuButton()
#onPressKeyDict[app.DIK_F6]= lambda : self.VectorsSwitchbot()
onPressKeyDict[app.DIK_F6] = lambda : self.recordac()
onPressKeyDict[app.DIK_F7] = lambda : self.loncasir#onPressKeyDict #onPressKeyDict[app.DIK_F7] = lambda : self.IsinlanmaTahtasi()
#onPressKeyDict[app.DIK_F8] = lambda : self.OpenLevelGuide()
onPressKeyDict[app.DIK_F8] = lambda : se#onPressKeyDict()
onPressKeyDict[app.DIK_F11] = lambda : self.#onPressKeyDict()
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
onPressKeyDict[app.DIK_F12] = lambda : self.OpenWhisperSystem()
onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
#ij¸¯ÅÍ À̵¿Å°
onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_L#ij¸¯ÅÍ lambda : self.MoveLeft()
onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_G] = self.__PressGKey
onPressKeyDict[app.DIK_Q] = self.__PressQKey
onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItemVector()
onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItemVector()
onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
#onPressKeyDict[app.DIK_X] = lambda state = "BONUS": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow#onPressKeyDictessKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole() # "`" key
onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
self.onPressKeyDict = onPressKeyDict
onClickKeyDict = {}
onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
if background.GetCurrentMapName() == "metin2_map_t3":
onPressKeyDict[app.DIK_TAB] = lambda : self.LoncaIstatistikOpen()
if app.ENABLE_SUPPORT_SHAMAN:
onClickKeyDict[app.DIK_O] = lambda: self.OpenYardimciGui()
if app.ENABLE_NEW_PET_SYSTEM and sistemler.PET_SISTEMI:
onClickKeyDict[app.DIK_P] = lambda: self.OpenPetMainGui()
if app.UK_ENABLE_SPECIAL_STORAGE and sistemler.K_ENVANTERI:
onPressKeyDict[app.DIK_K] = lambda : self.PressExtendedInventory()
if sistemler.SIMYA_SISTEMI:
onPressKeyDict[app.DIK_U] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
if app.__ENABLE_NEW_OFFLINESHOP__:
onPressKeyDict[app.DIK_Y] = lambda : self.__PressYKey()
self.onClickKeyDict=onClickKeyDict
def __PressNumKey(self,num):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if num >= 1 and num <= 9:
if(chrmgr.IsPossibleEmoticon(-1)):
chrmgr.SetEmoticon(-1,int(num)-1)
net.SendEmoticon(int(num)-1)
else:
if num >= 1 and num <= 4:
self.pressNumber(num-1)
def __ClickBKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
return
else:
if constInfo.PVPMODE_ACCELKEY_ENABLE:
self.ChangePKMode()
def __PressJKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if player.IsMountingHorse():
net.SendChatPacket("/unmount")
else:
#net.SendChatPacket("/user_horse_ride")
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if not uiPrivateShopBuilder.IsBuildingPrivateShop() or not uiOfflineShopBuilder.IsBuilding#net.SendChatPacket( for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
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):
net.SendItemUsePacket(i)
break
else:
if not uiPrivateShopBuilder.IsBuildingPrivateShop():
for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
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):
net.SendItemUsePacket(i)
break
def __PressHKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_ride")
else:
self.interface.OpenHelpWindow()
def __PressBKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_back")
else:
state = "EMOTICON"
self.interface.ToggleCharacterWindow(state)
def __PressFKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_feed")
else:
app.ZoomCamera(app.CAMERA_TO_POSITIVE)
def __PressGKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/ride")
else:
if self.ShowNameFlag:
self.interface.ToggleGuildWindow()
else:
app.PitchCamera(app.CAMERA_TO_POSITIVE)
def __ReleaseGKey(self):
app.PitchCamera(app.CAMERA_STOP)
def __PressQKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if 0==interfaceModule.IsQBHide:
interfaceModule.IsQBHide = 1
self.interface.HideAllQuestButton()
else:
interfaceModule.IsQBHide = 0
self.interface.ShowAllQuestButton()
else:
app.RotateCamera(app.CAMERA_TO_NEGATIVE)
def __SetQuickSlotMode(self):
self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
def __SetQuickPageMode(self):
self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
def __PressQuickSlot(self, localSlotIndex):
if localeInfo.IsARABIC():
if 0 <= localSlotIndex and localSlotIndex < 4:
player.RequestUseLocalQuickSlot(3-localSlotIndex)
else:
player.RequestUseLocalQuickSlot(11-localSlotIndex)
else:
player.RequestUseLocalQuickSlot(localSlotIndex)
def __SelectQuickPage(self, pageIndex):
self.quickSlotPageIndex = pageIndex
player.SetQuickPage(pageIndex)
def ToggleDebugInfo(self):
self.isShowDebugInfo = not self.isShowDebugInfo
if self.isShowDebugInfo:
self.PrintCoord.Show()
self.FrameRate.Show()
self.Pitch.Show()
self.Splat.Show()
self.TextureNum.Show()
self.ObjectNum.Show()
self.ViewDistance.Show()
self.PrintMousePos.Show()
else:
self.PrintCoord.Hide()
self.FrameRate.Hide()
self.Pitch.Hide()
self.Splat.Hide()
self.TextureNum.Hide()
self.ObjectNum.Hide()
self.ViewDistance.Hide()
self.PrintMousePos.Hide()
def __BuildDebugInfo(self):
## Character Position Coordinate
self.PrintCoord = ui.TextLine()
self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0##
## Frame Rate
self.FrameRate = ui.TextLine()
self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
## Camera ##tch
self.Pitch = ui.TextLine()
self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
## Splat
sel##Splat = ui.TextLine()
self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
##
self.Pri##MousePos = ui.TextLine()
self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
# Texture##m
self.TextureNum = ui.TextLine()
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
# ¿ÀºêÁ§Æ® ±×¸®´Â °³¼ö
self.ObjectNum = ui.TextLine()
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
# ½Ã¾ß°Å¸®
self.ViewDistance = ui.TextLine()
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
self.ViewDistance.SetPosition(0, 0)
def __NotifyError(self, msg):
chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
def ChangePKMode(self):
if not app.IsPressed(app.DIK_LCONTROL):
return
if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
self.__NotifyError(localeInf
PTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
return
curTime = app.GetTime()
if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
return
self.lastPKModeSendedTime = curTime
curPKMode = player.GetPKMode()
nextPKMode = curPKMode + 1
if nextPKMode == player.PK_MODE_PROTECT:
if 0 == player.GetGuildID():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInf
PTION_PVPMODE_CANNOT_SET_GUILD_MODE)
nextPKMode = 0
else:
nextPKMode = player.PK_MODE_GUILD
elif nextPKMode == player.PK_MODE_MAX_NUM:
nextPKMode = 0
net.SendChatPacket("/PKMode " + str(nextPKMode))
print "/PKMode " + str(nextPKMode)
def OnChangePKMode(self):
self.interface.OnChangePKMode()
try:
self.__NotifyError(localeInf
PTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
except KeyError:
print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
if constInfo.PVPMODE_TEST_ENABLE:
curPKMode = player.GetPKMode()
alignment, grade = chr.testGetPKData()
self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
###############################################################################################
###############################################################################################
## ### Game Callback Functions ##
###############################################################################################
###############################################################################################
# Start
def Sta##Game(###f):
self.RefreshInventory()
self.RefreshEquipment()
self.RefreshCharacter### self.RefreshSkill()
# Refresh
def CheckGameButton(self):
if self.interface:
self.interface.CheckGameButton()
def RefreshAlignment(self):
self.interface.RefreshAlignment()
def RefreshStatus(self):
self.CheckGameButton()
if self.interface:
self.interface.RefreshStatus()
if self.playerGauge:
self.playerGauge.RefreshGauge()
def RefreshStamina(self):
self.interface.RefreshStamina()
def RefreshSkill(self):
self.CheckGameButton()
if self.interface:
self.interface.RefreshSkill()
def RefreshMessenger(self):
self.interface.RefreshMessenger()
def RefreshGuildInfoPage(self):
self.interface.RefreshGuildInfoPage()
def RefreshGuildBoardPage(self):
self.interface.RefreshGuildBoardPage()
def RefreshGuildMemberPage(self):
self.interface.RefreshGuildMemberPage()
def RefreshGuildMemberPageGradeComboBox(self):
self.interface.RefreshGuildMemberPageGradeComboBox()
def RefreshGuildSkillPage(self):
self.interface.RefreshGuildSkillPage()
def RefreshGuildGradePage(self):
self.interface.RefreshGuildGradePage()
def RefreshMobile(self):
if self.interface:
self.interface.RefreshMobile()
def OnMobileAuthority(self):
self.interface.OnMobileAuthority()
def OnBlockMode(self, mode):
self.interface.OnBlockMode(mode)
def OpenQuestWindow(self, skin, idx):
if constInfo.AkiraMenu[0]:
return
if constInfo.CApiSetHide == 1:
net.SendQuestInputStringPacket(str(constInfo.SendString))
constInfo.CApiSetHide = 0
return
if constInfo.INPUT_IGNORE == 1:
return
if gameInfo.INPUT == 1:
return
if uiItemShopInfo.INPUT == 1:
return
self.interface.OpenQuestWindow(skin, idx)
def HideAllQuestWindow(self):
self.interface.HideAllQuestWindow()
def AskGuildName(self):
guildNameBoard = uiCommon.InputDialog()
guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
guildNameBoard.Open()
self.guildNameBoard = guildNameBoard
def ConfirmGuildName(self):
guildName = self.guildNameBoard.GetText()
if not guildName:
return
if net.IsInsultIn(guildName):
self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
return
net.SendAnswerMakeGuildPacket(guildName)
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
def CancelGuildName(self):
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
## Refine
def PopupMessage(self, msg):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, typ##0):
self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
def AppendMaterialToRefineDialog(self, vnum, count):
self.interface.AppendMaterialToRefineDialog(vnum, count)
if app.ENABLE_REFINE_RENEWAL:
def CheckRefineDialog(self, isFail):
self.dlgRefineNew.CheckRefine(isFail)
def RunUseSkillEvent(self, slotIndex, coolTime):
self.interface.OnUseSkill(slotIndex, coolTime)
def ClearAffects(self):
self.affectShower.ClearAffects()
def SetAffect(self, affect):
self.affectShower.SetAffect(affect)
def ResetAffect(self, affect):
self.affectShower.ResetAffect(affect)
def BINARY_BLOOD_DUNGEON(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15):
self.blood_dungeon.GetBloodDungeon(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15)
# UNKNOWN_UPDATE
def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
self.BINARY_DragonSoulGiveQuilification()
def BINARY_NEW_RemoveAffect(self, type, pointIdx):
self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulDeactivate()
# END_OF_UNKNOWN_UPDATE
def ActivateSkillSlot(self, slotIndex):
if self.interface:
self.interface.OnActivateSkill(slotIndex)
def DeactivateSkillSlot(self, slotIndex):
if self.interface:
self.interface.OnDeactivateSkill(slotIndex)
def RefreshEquipment(self):
if self.interface:
self.interface.RefreshInventory()
def RefreshInventory(self):
if self.interface:
self.interface.RefreshInventory()
def RefreshCharacter(self):
if self.interface:
self.interface.RefreshCharacter()
def OnGameOver(self):
self.CloseTargetBoard()
self.OpenRestartDialog()
def OpenRestartDialog(self):
self.interface.OpenRestartDialog()
def ChangeCurrentSkill(self, skillSlotNumber):
self.interface.OnChangeCurrentSkill(skillSlotNumber)
#/* Player Target Hp Sistemi // PLAYERTARGETHPSYSTEM // 18.10.17 - 15:12 */
if app.ENABLE_TARGET_HP:
def SetPCTargetBoard(self, vid, name, hpPercentage, actualHP, maxHP, bElement):
self.targetBoard.Open(vid, name, hpPercentage, actualHP, maxHP)
if systemSetting.IsHideElementInfo():
self.targetBoard.SetElementImage(bElement)
if app.IsPressed(app.DIK_LCONTROL):
if not player.IsSameEmpire(vid):
return
if player.IsMainCharacterIndex(vid):
return
elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
return
self.interface.OpenWhisperDialog(name)
else:
def SetPCTargetBoard(self, vid, name):
self.targetBoard.Open(vid, name)
if app.IsPressed(app.DIK_LCONTROL):
if not player.IsSameEmpire(vid):
return
if player.IsMainCharacterIndex(vid):
return
elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
return
self.interface.OpenWhisperDialog(name)
def RefreshTargetBoardByVID(self, vid):
self.targetBoard.RefreshByVID(vid)
def RefreshTargetBoardByName(self, name):
self.targetBoard.RefreshByName(name)
def __RefreshTargetBoard(self):
self.targetBoard.Refresh()
#/* Player Target Hp Sistemi // PLAYERTARGETHPSYSTEM // 18.10.17 - 15:12 */
if app.ENABLE_TARGET_HP and app.ENABLE_VIEW_ELEMENT:
def SetHPTargetBoard(self, vid, hpPercentage, actualHP, maxHP, bElement):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage, actualHP, maxHP)
self.targetBoard.SetElementImage(bElement)
self.targetBoard.Show()
elif app.ENABLE_TARGET_HP and not app.ENABLE_VIEW_ELEMENT:
def SetHPTargetBoard(self, vid, hpPercentage, actualHP, maxHP):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage, actualHP, maxHP)
self.targetBoard.Show()
elif app.ENABLE_VIEW_ELEMENT and not app.ENABLE_TARGET_HP:
def SetHPTargetBoard(self, vid, hpPercentage, bElement):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage)
self.targetBoard.SetElementImage(bElement)
self.targetBoard.Show()
else:
def SetHPTargetBoard(self, vid, hpPercentage):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage)
self.targetBoard.Show()
if app.ENABLE_TARGET_AFFECT:
def ClearTargetAffects(self):
self.targetBoard.ClearAffects()
def AddTargetBoardAffect(self, affect, duration):
self.targetBoard.AddAffect(affect, duration)
def RemoveTargetBoardAffect(self, affect):
self.targetBoard.RemoveAffect(affect)
def CloseTargetBoardIfDifferent(self, vid):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.Close()
def CloseTargetBoard(self):
self.targetBoard.Close()
## View Equipment
def OpenEquipmentDialog(self, vid):
self.interface.OpenEquipmentDialog(vid)
def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
self.interface.SetEquipmentDialogItem(vid, sl##Index, vnum, count)
def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
# SHOW_LOCAL_MAP_NAME
#/* MiniMap Map Ismi Gösterme // MINIMAPNAME // 14.10.17 - 23:03 */
if constInfo.MINIMAP_MAPNAME_ENABLE:
def ShowMapName(self, mapName, x, y):
if self.mapNameShower:
self.mapNameShower.ShowMapName(mapName, x, y)
if self.interface:
self.interface.SetMapName(mapName)
try:
mapNameT = localeInfo.MINIMAP_ZONE_NAME_DICT[mapName]
self.interface.wndMiniMap.UpdateMapName(mapNameT)
except:
self.interface.wndMiniMap.UpdateMapName("Bilinmeyen Harita")
else:
def ShowMapName(self, mapName, x, y):
if self.mapNameShower:
self.mapNameShower.ShowMapName(mapName, x, y)
if self.interface:
self.interface.SetMapName(mapName)
# END_OF_SHOW_LOCAL_MAP_NAME
def BINARY_OpenAtlasWindow(self):
self.interface.BINARY_OpenAtlasWindow()
## Chat
def OnRecvWhisper(self, mode, name, line):
if constInfo.ENABLE_SVSIDE_CAPTCHA:
if name.find("<svside>") != -1:
global svsidedia
if line[line.find(",")-4:line.find("##)].isdigit():
svsidedia.nm_updateimgoffline(line[line.find(", ")-4:line.find(", ")])
else:
svsidedia.Board.Hide()
return
if mode != chat.WHISPER_TYPE_GM:
if os.path.exists("ignore.cfg"):
ignored = open("ignore.cfg", "r")
ignoredList = ignored.read()
ignoredPlayer = ignoredList.split(",\n")
ignored.close()
for i in xrange(str(ignoredList).count(",\n")):
if str(ignoredPlayer) != name:
pass
else:
return
if mode == chat.WHISPER_TYPE_GM:
self.interface.RegisterGameMasterName(name)
line.replace(" : ", ": ")
if not self.interface.FindWhisperButton(name) and constInfo.WHISPER_MESSAGES.has_key(name) and not self.interface.whisperDialogDict.has_key(name):
self.interface.RecvWhisper(name, True)
else:
self.interface.RecvWhisper(name, False)
if not constInfo.WHISPER_MESSAGES.has_key(name):
constInfo.WHISPER_MESSAGES.update({name : [(mode, line)]})
else:
constInfo.WHISPER_MESSAGES[name].append((mode, line))
chat.AppendWhisper(mode, name, line)
def OnRecvWhisperSystemMessage(self, mode, name, line):
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
self.interface.RecvWhisper(name, False)
def OnRecvWhisperError(self, mode, name, line):
if localeInfo.WHISPER_ERROR.has_key(mode):
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
else:
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
self.interface.RecvWhisper(name, False)
def RecvWhisper(self, name):
self.interface.RecvWhisper(name, False)
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
def OnRecvWhisperAdminSystem(self, name, line, color):
def ExistCustomColor(val):
return (val > 0)
def GetColor(type):
WHISPER_COLOR_MESSAGE = {
0: "|cffffffff|H|h",
1: "|cffff796a|H|h",
2: "|cffb1ff80|H|h",
3: "|cff46deff|H|h"
}
return WHISPER_COLOR_MESSAGE[type]
def ResizeTextWithColor(color, text):
return str("%s%s|h|r" % (GetColor(color), text))
import datetime
now = datetime.datetime.now()
ret = line.replace("#", " ")
if ExistCustomColor(int(color)):
ret = ResizeTextWithColor(int(color), ret)
else:
ret = ResizeTextWithColor(0, ret)
text = localeInfo.WHISPER_ADMIN_MESSAGE % (ret)
self.interface.RegisterGameMasterName(name)
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, text)
self.interface.RecvWhisper(name, False)
def BINARY_OnRecvBulkWhisper(self, content):
content = content.replace("$", " ")
self.interface.RegisterGameMasterName("[SISTEM]")
chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, "[SISTEM]", content)
self.interface.RecvWhisper("[SISTEM]", False)
def OnPickMoney(self, money):
self.interface.OnPickMoneyNew(money)
#/* Won Sistemi // WONSISTEM // 30.12.17 - 13:05 */
if app.ENABLE_CHEQUE_SYSTEM:
def OnPickCheque(self, cheque):
self.interface.OnPickChequeNew(cheque)
def OnPickExp(self, exp):
self.interface.OnPickExpNew(exp)
def OnShopError(self, type):
try:
self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
except KeyError:
self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
def OnSafeBoxError(self):
self.PopupMessage(localeInfo.SAFEBOX_ERROR)
def OnFishingSuccess(self, isFish, fishName):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
# ADD_FISHING_MESSAGE
def OnFishingNotifyUnknown(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
def OnFishingWrongPlace(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
# END_OF_ADD_FISHING_MESSAGE
def OnFishingNotify(self, isFish, fishName):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
def OnFishingFailure(self):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
def OnCannotPickItem(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
# MINING
def OnCannotMining(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
# END_OF_MINING
def OnCannotUseSkill(self, vid, type):
if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
def OnCannotShotError(self, vid, type):
textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
## PointReset
def StartPointReset(self):
self.interface.OpenPointResetDialog()
## Shop
def StartShop(self, vid):
self.interface.OpenShopDialog(vid)
def EndShop(self):
self.interface.Clos##hopDialog()
def RefreshShop(self):
self.interface.RefreshShopDialog()
def Se##hopSellingPrice(self, Price):
pass
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
def StartOfflineShop(self, vid):
self.interface.OpenOfflineShopDialog(vid)
def EndOfflineShop(self):
self.interface.CloseOfflineShopDialog()
def RefreshOfflineShop(self):
self.interface.RefreshOfflineShopDialog()
## Exchange
def StartExchange(self):
self.interface.StartExchange()
def EndExchange(self):
self.interface.EndExchange()
def RefreshExchange(self):
self.interface.RefreshExchange()
## Pa##y
def RecvPartyInviteQuestion(self, leaderVID, leaderName):
partyInviteQuestionDialog = uiCommon.QuestionDialog()
partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
pa##yInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.Open()
partyInviteQuestionDialog.partyLeaderVID = leaderVID
self.partyInviteQuestionDialog = partyInviteQuestionDialog
def AnswerPartyInvite(self, answer):
if not self.partyInviteQuestionDialog:
return
partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
distance = player.GetCharacterDistance(partyLeaderVID)
if distance < 0.0 or distance > 5000:
answer = FALSE
net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
self.partyInviteQuestionDialog.Close()
self.partyInviteQuestionDialog = None
def AddPartyMember(self, pid, name):
self.interface.AddPartyMember(pid, name)
def UpdatePartyMemberInfo(self, pid):
self.interface.UpdatePartyMemberInfo(pid)
def RemovePartyMember(self, pid):
self.interface.RemovePartyMember(pid)
self.__RefreshTargetBoard()
def LinkPartyMember(self, pid, vid):
self.interface.LinkPartyMember(pid, vid)
def UnlinkPartyMember(self, pid):
self.interface.UnlinkPartyMember(pid)
def UnlinkAllPartyMember(self):
self.interface.UnlinkAllPartyMember()
def ExitParty(self):
self.interface.ExitParty()
self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
def ChangePartyParameter(self, distributionMode):
self.interface.ChangePartyParameter(distributionMode)
## Messenger
def OnMessengerAddFriendQuestion(self, name):
messengerAddFriendQuestion = uiCommon.QuestionDialog2()
messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))## messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
messengerAddFriendQuestion.Open()
messengerAddFriendQuestion.name = name
self.messengerAddFriendQuestion = messengerAddFriendQuestion
def OnAcceptAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth y " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE
def OnDenyAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth n " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE
def OnCloseAddFriendQuestionDialog(self):
self.messengerAddFriendQuestion.Close()
self.messengerAddFriendQuestion = None
return TRUE
## SafeBox
def OpenSafeboxWindow(self, size):
self.interface.OpenSafeboxWindow(size)
def RefreshSafebox(self):
self.interface.RefreshSafebox()
def RefreshSafeboxMoney(self):
self.interface.R##reshSafeboxMoney()
# ITEM_MALL
def OpenMallWindow(self, size):
self.interface.OpenMallWindow(size)
def RefreshMall(self):
self.interface.RefreshMall()
# END_OF_ITEM_MALL
## Guild
def RecvGuildInviteQuestion(self, guildID, guildName):
guildInviteQuestionDialog = uiCommon.QuestionDialog()
guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
guildI##iteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.Open()
guildInviteQuestionDialog.guildID = guildID
self.guildInviteQuestionDialog = guildInviteQuestionDialog
def AnswerGuildInvite(self, answer):
if not self.guildInviteQuestionDialog:
return
guildLeaderVID = self.guildInviteQuestionDialog.guildID
net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
self.guildInviteQuestionDialog.Close()
self.guildInviteQuestionDialog = None
def DeleteGuild(self):
self.interface.DeleteGuild()
## Clock
def ShowClock(self, second):
self.interface.ShowClock(second)
def HideClock(self):
self.interface.HideClock()
## Emotion
def BINARY_ActEmotion(self, emotionIndex):
if self.inter##ce.wndCharacter:
self.interface.wndCharacter.ActEmotion(emotionIndex)
###############################################################################################
###############################################################################################
## Keyboard Functions
d###CheckFocus(self):
if FALSE == self.IsFocus():
if TRUE == self.interface.IsOpe###at():
self.interface.ToggleChat()
self.SetFocus()
def SaveScree##self):
print "save screen"
# SCREENSHOT_CWDSAVE
if SCREENSHOT_CWDSAVE:
if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
os.mkdir(os.getcwd()+os.sep+"screenshot")
(succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
elif SCREENSHOT_DIR:
(succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
else:
(succeeded, name) = grp.SaveScreenShot()
# END_OF_SCREENSHOT_CWDSAVE
if succeeded:
self.wndScreenDialog = screenshotdialog.ScreenshotSavingDialog(name)
self.wndScreenDialog.Show()
pass
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
def ShowConsole(self):
pass
def ShowName(self):
self.ShowNameFlag = TRUE
self.playerGauge.EnableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex+1)
if app.__ENABLE_NEW_OFFLINESHOP__:
offlineshop.ShowShopNames()
# ADD_ALWAYS_SHOW_NAME
def __IsShowName(self):
if systemSetting.IsAlwaysShowName() == 0:
return True
if self.ShowNameFlag:
return True
return False
def __IsShowNameItem(self):
if systemSetting.IsAlwaysShowName() == 1:
return True
return False
# END_OF_ADD_ALWAYS_SHOW_NAME
def HideName(self):
self.ShowNameFlag = FALSE
self.playerGauge.DisableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex)
if app.__ENABLE_NEW_OFFLINESHOP__:
offlineshop.HideShopNames()
def ShowMouseImage(self):
self.interface.ShowMouseImage()
def HideMouseImage(self):
self.interface.HideMouseImage()
def StartAttack(self):
player.SetAttackKeyState(TRUE)
def EndAttack(self):
player.SetAttackKeyState(FALSE)
def MoveUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, TRUE)
def MoveDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, TRUE)
def MoveLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, TRUE)
def MoveRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, TRUE)
def StopUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, FALSE)
def StopDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, FALSE)
def StopLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, FALSE)
def StopRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, FALSE)
def PickUpItem(self):
player.PickCloseItem()
def PickUpItemVector(self):
player.PickCloseItemVector()
def PickUpMoney(self):
player.PickCloseMoney()
#/* Otomatik Yang ve İtem Toplama // OTOMATIKYANGITEMTOPLAMA // 12.04.18 - 16:42 */
if app.ENABLE_AUTO_YANG_AND_ITEM:
def PickUpMoney(self):
player.PickCloseMoney()
def PickUpNewItem(self):
player.PickCloseNewItem()
###############################################################################################
###############################################################################################
## Event Handler
def OnK###own(self, key):
if self.interface.wndWeb and self.interface.wndWeb.IsShow():
###urn
if self.interface.wndBrowser and self.interface.wndBrowser.IsShow() and app.CEF_BROWS##_ENABLE:
return
if key == app.DIK_ESC:
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
try:
self.onPressKeyDict[key]()
except KeyError:
pass
except:
raise
return TRUE
def OnKeyUp(self, key):
try:
self.onClickKeyDict[key]()
except KeyError:
pass
except:
raise
return TRUE
def OnMouseLeftButtonDown(self):
if self.interface.BUILD_OnMouseLeftButtonDown():
return
if mouseModule.mouseController.isAttached():
self.CheckFocus()
else:
hyperlink = ui.GetHyperlink()
if hyperlink:
return
else:
self.CheckFocus()
player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
return TRUE
def OnMouseLeftButtonUp(self):
if self.interface.BUILD_OnMouseLeftButtonUp():
return
if mouseModule.mouseController.isAttached():
attachedType = mouseModule.mouseController.GetAttachedType()
attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshopikarus.IsBuildingShop() and uiofflineshopikarus.IsSaleSlot(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos): #toupdate
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInf
FFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
## QuickSlot
if player.SLOT_TYPE_QUICK_SLOT == attache#toupdate player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
## Inventory
#elif player.SLOT_TYPE_INVENTORY == attachedT##e:
elif player.SLOT_TYPE_INVENTORY == attachedType:
if player.ITEM_MONEY == attachedItemIndex:
self.__PutMon##(attachedType, attached#elifount, self.PickingCharacterIndex)
else:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
## DragonSoul
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
##
if app.UK_ENABLE_SPECIAL_STORAGE:
if player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType or\
player.SLOT_TYPE_BOOK_INVENTORY == attachedType or\
player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
player.SLOT_TYPE_ATTR_INVENTORY == attachedType or\
player.SLOT_TYPE_FLOWER_INVENTORY == attachedType or\
player.SLOT_TYPE_BLEND_INVENTORY == attachedType:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
mouseModule.mouseController.DeattachObject()
else:
hyperlink = ui.GetHyperlink()
if hyperlink:
if app.IsPressed(app.DIK_LALT):
link = chat.GetLinkFromHyperlink(hyperlink)
ime.PasteString(link)
else:
self.interface.MakeHyperlinkTooltip(hyperlink)
return
else:
player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
#player.EndMouseWalking()
return TRUE
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
#if player.SLOT_TYPE_INVENTORY == attachedType:
if player.#player.EndMouseWalking(ttachedType or\
player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType or\
player.SLOT_TYPE_UPGRADE_INVENTO#if== attachedType or\
player.SLOT_TYPE_BOOK_INVENTORY == attachedType or\
player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
player.SLOT_TYPE_ATTR_INVENTORY == attachedType or\
player.SLOT_TYPE_FLOWER_INVENTORY == attachedType or\
player.SLOT_TYPE_BLEND_INVENTORY == attachedType:
attachedInvenType = player.SlotTypeToInvenType(attachedType)
if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
if player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
else:
if chr.IsNPC(dstChrID):
if app.ENABLE_REFINE_RENEWAL:
constInfo.AUTO_REFINE_TYPE = 2
constInfo.AUTO_REFINE_DATA["NPC"][0] = dstChrID
constInfo.AUTO_REFINE_DATA["NPC"][1] = attachedInvenType
constInfo.AUTO_REFINE_DATA["NPC"][2] = attachedItemSlotPos
constInfo.AUTO_REFINE_DATA["NPC"][3] = attachedItemCount
net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
else:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
else:
self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
#self.interface.DeleteItem(attachedItemSlotPos, attachedInvenType)
def __PutMoney(self, attachedType, attachedMoney, dstChrID):
if TRUE == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
#self.interface.DeleteItem(attachedItemSlotPos
net.SendExchangeElkAddPacket(attachedMoney)
else:
self.__DropMoney(attachedType, attachedMoney)
def __DropMoney(self, attachedType, attachedMoney):
# PRIVATESHOP_DISABLE_ITEM_DROP - °³ÀλóÁ¡ ¿°í ÀÖ´Â µ¿¾È ¾ÆÀÌÅÛ ¹ö¸² ¹æÁö
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if attachedMoney>=1000:
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
return
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropCount = attachedMoney
itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
self.itemDropQuestionDialog = itemDropQuestionDialog
def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
# PRIVATESHOP_DISABLE_ITEM_DROP - °³ÀλóÁ¡ ¿°í ÀÖ´Â µ¿¾È ¾ÆÀÌÅÛ ¹ö¸² ¹æÁö
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
else:
if player.SLOT_TYPE_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
item##opQuestionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.Question##alog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.UPGRADE_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDr##QuestionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDi##og()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_BOOK_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.BOOK_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDrop##estionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDial##()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_STONE_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.STONE_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQu##tionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_ATTR_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.ATTR_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQues##onDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog()##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_FLOWER_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.FLOWER_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuesti##Dialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog()
##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_BLEND_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.BLEND_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestion##alog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog()
##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDial##.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: s##f.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
def RequestDropItem(self, answer):
if not self.itemDropQuestionDialog:
return
if answer:
dropType = self.itemDropQuestionDialog.dropType
dropCount = self.itemDropQuestionDialog.dropCount
dropNumber = self.itemDropQuestionDialog.dropNumber
if player.SLOT_TYPE_INVENTORY == dropType:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_UPGRADE_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.UPGRADE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BOOK_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.BOOK_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_STONE_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.STONE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_ATTR_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.ATTR_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_FLOWER_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.FLOWER_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BLEND_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.BLEND_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
def DestroyItem(self, answer):
if not self.itemDropQuestionDialog:
return
valuable = False
if answer:
dropType = self.itemDropQuestionDialog.dropType
dropCount = self.itemDropQuestionDialog.dropCount
dropNumber = self.itemDropQuestionDialog.dropNumber
if player.SLOT_TYPE_INVENTORY == dropType:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_UPGRADE_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.UPGRADE_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.UPGRADE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BOOK_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.BOOK_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.BOOK_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_STONE_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.STONE_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.STONE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_ATTR_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.ATTR_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.ATTR_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_FLOWER_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.FLOWER_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.FLOWER_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BLEND_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.BLEND_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.BLEND_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if not valuable:
#chat.AppendChat(chat.CHAT_TYPE_INFO,"burasi 1")
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def Valuableitem(self, itemSlotPos):
if player.GetItemGrade(itemSlotPos) >= 5:
return True
#chat.AppendChat(chat.CHAT_TYPE_INFO, for i in xrange(5):
if player.GetItemAttribute(itemSlotPos, i) != (0, 0):
sockets+=1
if sockets >= 3:
return True
for i in xrange(player.METIN_SOCKET_MAX_NUM):
if player.GetItemMetinSocket(itemSlotPos, i ) not in (0, 1, constInfo.ERROR_METIN_STONE):
return True
return False
# PRIVATESHOP_DISABLE_ITEM_DROP
def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
def __SendDestroyItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
net.SendItemDestroyPacket(itemInvenType, itemVNum, itemCount)
if not self.itemDropQuestionDialog:
return
#chat.AppendChat(chat.CHAT_TYPE_INFO,"burasi 2")
self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def OnMouseRightButtonDown(self):
self.CheckFocus()
if TRUE == mouseModule.mouseCo#chat.AppendChat(chat.CHAT_TYPE_INFO,useModule.mouseController.DeattachObject()
else:
player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
return TRUE
def OnMouseRightButtonUp(self):
if TRUE == mouseModule.mouseController.isAttached():
return TRUE
player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
return TRUE
def OnMouseMiddleButtonDown(self):
player.SetMouseMiddleButtonState(player.MBS_PRESS)
def OnMouseMiddleButtonUp(self):
player.SetMouseMiddleButtonState(player.MBS_CLICK)
def OnUpdate(self):
app.UpdateGame()
self.IsBloodDungeonSystemWindow()
if self.mapNameShower.IsShow():
self.mapNameShower.Update()
if self.isShowDebugInfo:
self.UpdateDebugInfo()
if self.enableXMasBoom:
self.__XMasBoom_Update()
if systemSetting.IsEnablePremiumAffect():
self.affectShower.Show()
else:
self.affectShower.Hide()
if app.KASMIR_PAKET_SYSTEM:
if gameInfo.VERI_PAKETI1==1:
self.__PrivateShop_Kasmir_Open()
gameInfo.VERI_PAKETI1=0
self.interface.BUILD_OnUpdate()
self.PythonSpecialSystem()
#/* Random Title // RANDOMTITLE // 13.10.17 - 13:52 */
if constInfo.RANDOM_TITLE:
RandTitleTime = max(0, self.TitleTime - time.clock())
if 0 == RandTitleTime:
app.SetWindowTitle(ayarlar.TITLE_APPEND[app.GetRandom(0, len(ayarlar.TITLE_APPEND) - 1)])
curTime = time.clock()
self.TitleTime = curTime + 4
#/* MiniMap Saat Gösterme // MINIMAPSAAT // 14.10.17 - 23:21 */
if constInfo.MINIMAP_DATETIME_ENABLE:
if app.GetGlobalTimeStamp() > 0:
ServerTime = time.strftime("%d.%m.%Y %H:%M:%S", time.localtime(app.GetGlobalTimeStamp()))
self.interface.wndMiniMap.UpdateDateTime(ServerTime)
#/* Otomatik Yang ve İtem Toplama // OTOMATIKYANGITEMTOPLAMA // 12.04.18 - 16:42 */
if app.ENABLE_AUTO_YANG_AND_ITEM:
if systemSetting.IsAutoPickUpSlow():
self.PickUpItem()
if systemSetting.IsAutoPickUpFast():
self.PickUpItemVector()
def PythonSpecialSystem(self):
if gameInfo.SYSTEMS_PAKET0==1:
self.__Start_EquipWatch_Loop()
gameInfo.SYSTEMS_PAKET0=0
if gameInfo.SYSTEMS_PAKET1==1:
self.interface.PlayerLogButton()
gameInfo.SYSTEMS_PAKET1=0
if gameInfo.SYSTEMS_LOG1==1:
self.__pazar_log_ac()
gameInfo.SYSTEMS_LOG1=0
if gameInfo.SYSTEMS_LOG2==1:
self.__tic_gecmis_ac()
gameInfo.SYSTEMS_LOG2=0
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if gameInfo.SYSTEMS_PAKET2==1:
self.interface.SetShowPn()
gameInfo.SYSTEMS_PAKET2=0
if gameInfo.SYSTEMS_PAKET6==1:
self.PriceCheckerOpen()
gameInfo.SYSTEMS_PAKET6=0
if gameInfo.SYSTEMS_PAKET4==1:
self.ClickEfektButton()
gameInfo.SYSTEMS_PAKET4=0
if gameInfo.SYSTEMS_PAKET5==1:
self.OpenMarbleShop()
gameInfo.SYSTEMS_PAKET5=0
if gameInfo.SYSTEMS_PAKET7==1:
if app.ENABLE_BOSS_TRACKING:
self.OpenBossTracking()
else:
self.BossTracking()
gameInfo.SYSTEMS_PAKET7=0
if gameInfo.SYSTEMS_PAKET8==1:
self.PressExtendedInventory()
gameInfo.SYSTEMS_PAKET8=0
if gameInfo.SYSTEMS_PAKET9==1:
if constInfo.DUNGEON_LIST_TIME:
self.interface.OpenTimerWindow()
else:
self.interface.ToggleDungeonInfoWindow()
gameInfo.SYSTEMS_PAKET9=0
if gameInfo.SYSTEMS_PAKET10==1:
self.OpenBiologWindow()
gameInfo.SYSTEMS_PAKET10=0
if gameInfo.SYSTEMS_PAKET11==1:
self.__PressYKey()
gameInfo.SYSTEMS_PAKET11=0
if gameInfo.DRAGON_SOUL_OPEN==1:
self.interface.ToggleDragonSoulWindow()
gameInfo.DRAGON_SOUL_OPEN=0
if gameInfo.FAST_SELLREMOVE==1:
self.interface.OpenOGSItemRemoveWindow()
gameInfo.FAST_SELLREMOVE=0
if 1== constInfo.CHEQUE_TO_GOLD_INFO_OPEN:
constInfo.CHEQUE_TO_GOLD_INFO_OPEN = 0
self.OpenGoldToChequeTicket()
if 1== constInfo.CHEQUE_TO_GOLD_INFO_OPEN_2:
constInfo.CHEQUE_TO_GOLD_INFO_OPEN_2 = 0
self.OpenChequeToGoldTicket()
if 1== constInfo.BOSS_TRACKING:
constInfo.BOSS_TRACKING = 0
if app.ENABLE_BOSS_TRACKING:
self.OpenBossTracking()
else:
self.BossTrackingSystemShow()
if 1== gameInfo.GUILD_RANKING_OPEN:
gameInfo.GUILD_RANKING_OPEN = 0
if app.GetTime() > self.GuildRankingTime:
self.guildrankingopen()
self.GuildRankingTime = app.GetTime() + 5
else:
NewGetTime2 = self.GuildRankingTime - app.GetTime()
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar açabilmek için %d saniye beklemelisin." % (NewGetTime2))
if app.ENABLE_AUTO_HUNT_SYSTEM:
if gameInfo.SYSTEMS_PAKET3==1:
self.interface.OpenAutohuntWindow()
gameInfo.SYSTEMS_PAKET3=0
else:
if gameInfo.SYSTEMS_PAKET3==1:
chat.AppendChat(5, "Otomatik Av yönetici tarafından devredışı bırakılmıştır.")
gameInfo.SYSTEMS_PAKET3=0
if constInfo.AUTO_HUNT_REBORN == 1 and constInfo.AUTO_HUNT_REBORN_IS_DEAD == 1:
if app.GetTime() > self.AutoHuntRebornT:
net.SendChatPacket("/restart_here")
self.AutoHuntRebornT = app.GetTime() + 10
if uiItemShopInfo.ITEMSHOP_OPEN == 1:
if uiItemShopInfo.ITEMSHOP_TIME < app.GetTime():
uiItemShopInfo.ITEMSHOP_OPEN = 0
uiItemShopInfo.ITEMSHOP_TIME = 0
if self.levelGuide.IsShow():
self.levelGuide.OnUpdate()
if (app.GetTime() > self.startGameTime + 5 and self.onQuest != 1):
self.onQuest = 1
self.interface.GoOnQuestRecv()
if background.GetCurrentMapName() == "theprnce_imp_arena" and constInfo.imp_savasi["guiekran"] == 0:
self.kill_gui_board.Show()
self.red_kill_count_text.SetText(translate.skor+str(constInfo.imp_savasi["kirmiziskor"]))
self.yellow_kill_count_text.SetText(translate.skor+str(constInfo.imp_savasi["sariskor"]))
self.blue_kill_count_text.SetText(translate.skor+str(constInfo.imp_savasi["maviskor"]))
self.red_kill_count_textt.SetText(translate.katilimci+str(constInfo.imp_savasi["kirmizikatilimci"]))
self.yellow_kill_count_textt.SetText(translate.katilimci+str(constInfo.imp_savasi["sarikatilimci"]))
self.blue_kill_count_textt.SetText(translate.katilimci+str(constInfo.imp_savasi["mavikatilimci"]))
else:
self.kill_gui_board.Hide()
def UpdateDebugInfo(self):
#
# ij¸¯ÅÍ ÁÂÇ¥ ¹× FPS Ãâ·Â
(x, y, z) = player.GetMainCharacterPosition()
nUpdateTime = app.GetUpdateTime()
nUpdateFPS = app.GetUpdateFPS()
nRenderFPS = app.GetRenderFPS()
nFaceCount = app.GetFaceCount()
fFaceSpeed = app.GetFaceSpeed()
nST=background.GetRenderShadowTime()
(fAveRT, nCurRT) = app.GetRenderTime()
(iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
(iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
if iPatch == 0:
iPatch = 1
#(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()
self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
xMouse, yMouse = wndMgr.GetMousePosition()
self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
if fAveRT>1.0:
self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
#self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
#self.TextureNum.SetText("TN : %s" % (sTextureNum))
#self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
def OnRender(sel#self.Pitch.SetText(erGame()
if self.console.Conso#self.TextureNum.SetText( background.RenderCollision()
#self.ObjectNum.SetText(on()
(x, y) = app.GetCursorPosition()
########################
# Picking
########################
textTail.UpdateAllTextTail()
if TRUE == wndMgr.IsPickedWindow(self.hWnd):
self.PickingCharacterIndex = chr.Pick()
if -1 != self.PickingCharacterIndex:
textTail.ShowCharacterTextTail(self.PickingCharacterInd###
if 0 != self.targetBoard.GetTargetV###):
textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
# ADD_ALWAYS_SHOW_NAME
if not self.__IsShowName():
self.PickingItemIndex = item.Pick()
if -1 != self.PickingItemIndex:
textTail.ShowItemTextTail(self.PickingItemIndex)
# END_OF_ADD_ALWAYS_SHOW_NAME
## Show all name in the range
# ADD_ALWAYS_SHOW_NAME
if self.__IsShowName():
textTail.ShowAllTextTail()
self.PickingItemIndex = textTail.Pick(x, y)
if self.__IsShowNameItem():
textTail.ShowJustItemTextTail()
self.PickingItemIndex = textTail.Pick(x, y)
##END_OF_ADD_ALWAYS_SHOW_NAME
if app.ENABLE_SHOPNAMES_RANGE:
if systemSetting.IsShowSalesText():
uiPrivateShopBuilder.UpdateADBoard()
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
uiOfflineShopBuilder.UpdateADBoard()
textTail.UpdateShowingTextTail()
textTail.ArrangeTextTail()
if -1 != self.PickingItemIndex:
textTail.SelectItemName(self.PickingItemIndex)
grp.PopState()
grp.SetInterfaceRenderState()
textTail.Render()
textTail.HideAllTextTail()
def OnPressEscapeKey(self):
if app.TARGET == app.GetCursor():
app.SetCursor(app.NORMAL)
elif TRUE == mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()
else:
self.interface.OpenSystemDialog()
return TRUE
def OnIMEReturn(self):
if app.IsPressed(app.DIK_LSHIFT):
self.interface.OpenWhisperDialogWithoutTarget()
else:
self.interface.ToggleChat()
return TRUE
def OnPressExitKey(self):
self.interface.ToggleSystemDialog()
return TRUE
## BINARY CALLBACK
######################################################################################
if app.ENABLE_SEND_TARGET_INFO:
def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
if not raceNum in constInfo.MONSTER_INFO_DATA:
constInfo.MONSTER_INFO_DATA.update##raceNum : {}})
### constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
isUpgradeable = False
isMetin = False
item.SelectItem(itemVnum)
if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
isUpgradeable = True
elif item.GetItemType() == item.ITEM_TYPE_METIN:
isMetin = True
for curItem in curList:
if isUpgradeable:
if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
if not (itemVnum in curItem["vnum_list"]):
curItem["vnum_list"].append(itemVnum)
return
elif isMetin:
if curItem.has_key("vnum_list"):
baseVnum = curItem["vnum_list"][0]
if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
if not (itemVnum in curItem["vnum_list"]):
curItem["vnum_list"].append(itemVnum)
return
else:
if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
return
if isUpgradeable or isMetin:
curList.append({"vnum_list":[itemVnum], "count":itemCount})
else:
curList.append({"vnum":itemVnum, "count":itemCount})
def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
self.targetBoard.RefreshMonsterInfoBoard()
# WEDDING
def BINARY_LoverInfo(self, name, lovePoint):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnAddLover(name, lovePoint)
if self.affectShower:
self.affectShower.SetLoverInfo(name, lovePoint)
def BINARY_UpdateLovePoint(self, lovePoint):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
if self.affectShower:
self.affectShower.OnUpdateLovePoint(lovePoint)
# END_OF_WEDDING
# QUEST_CONFIRM
def BINARY_OnQuestConfirm(self, msg, timeout, pid):
confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
confirmDialog.Open(msg, timeout)
confirmDialog.SetAcceptEvent(lambda answer=TRUE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
confirmDialog.SetCancelEvent(lambda answer=FALSE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
self.confirmDialog = confirmDialog
# END_OF_QUEST_CONFIRM
# GIFT command
def Gift_Show(self):
if not app.ENABLE_NEW_PET_SYSTEM:
self.interface.ShowGift()
else:
if constInfo.PET_MAIN == 0:
self.petmain.Show()
constInfo.PET_MAIN =1
self.petmain.SetTop()
else:
self.petmain.Hide()
constInfo.PET_MAIN =0
# CUBE
def BINARY_Cube_Open(self, npcVNUM):
self.currentCubeNPC = npcVNUM
self.interface.OpenCubeWindow()
if npcVNUM not in self.cubeInformation:
net.SendChatPacket("/cube r_info")
else:
cubeInfoList = self.cubeInformation[npcVNUM]
i = 0
for cubeInfo in cubeInfoList:
self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
j = 0
for materialList in cubeInfo["materialList"]:
for materialInfo in materialList:
itemVnum, itemCount = materialInfo
self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
j = j + 1
i = i + 1
self.interface.wndCube.Refresh()
def BINARY_Reload_Cube(self):
self.cubeInformation.clear()
self.interface.wndCube.ClearOldSlots()
def BINARY_Cube_Close(self):
self.interface.CloseCubeWindow()
# Á¦ÀÛ¿¡ ÇÊ¿äÇÑ °ñµå, ¿¹»óµÇ´Â ¿Ï¼ºÇ°ÀÇ VNUM°ú °³¼ö Á¤º¸ update
def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
self.interface.UpdateCubeInfo(gold, itemVnum, count)
def BINARY_Cube_Succeed(self, itemVnum, count):
print "Å¥ºê Á¦ÀÛ ¼º°ø"
self.interface.SucceedCubeWork(itemVnum, count)
pass
def BINARY_Cube_Failed(self):
print "Å¥ºê Á¦ÀÛ ½ÇÆĞ"
self.interface.FailedCubeWork()
pass
def BINARY_Cube_ResultList(self, npcVNUM, listText):
# ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 ????? "/" ??? ??? ???? ?
#print listText
if npcVNUM == 0:
npcVNUM = self.currentCubeNPC
self.cubeInformation[npcVNUM] = []
try:
for eachInfoText in listText.split("/"):
eachInfo = eachInfoText.split(",")
itemVnum = int(eachInfo[0])
itemCount = int(eachInfo[1])
self.cubeInformation[npcV#printppend({"vnum": itemVnum, "count": itemCount})
self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
resultCount = len(self.cubeInformation[npcVNUM])
requestCount = 7
modCount = resultCount % requestCount
splitCount = resultCount / requestCount
for i in xrange(splitCount):
#print("/cube r_info %d %d" % (i * requestCount, requestCount))
net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
if 0 < modCount:
#print("/cube r_info %d %d" % (splitCount * requestCount, modCount))
net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
#print( RuntimeError, msg:
dbg.TraceError(msg)
return 0
pass
def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
# Material Text Format : 125,1#print(127,2|123,5&555,5&555,4/120000
try:
#print listText
if 3 > len(listText):
dbg.TraceError("Wrong Cube Material Infomation")
return 0
eachResultList = listText.split("@")
cubeInfo = self.cubeInformation[self.currentCubeNPC]
itemIndex = 0
for eachResultText in eachResultList:
#printbeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
materialList = cubeInfo[startIndex + itemIndex]["materialList"]
gold = 0
splitResult = eachResultText.split("/")
if 1 < len(splitResult):
gold = int(splitResult[1])
#print "splitResult : ", splitResult
eachMaterialList = splitResult[0].split("&")
i = 0
for eachMaterialText in eachMaterialList:
complicatedList = eachMaterialText.split("|")
if 0 < len(complicatedList):
for complicatedText in complicatedList:
#print (itemVnum, itemCount) = complicatedText.split(",")
itemVnum = int(itemVnum)
itemCount = int(itemCount)
self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
materialList.append((itemVnum, itemCount))
else:
itemVnum, itemCount = eachMaterialText.split(",")
itemVnum = int(itemVnum)
itemCount = int(itemCount)
self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
materialList.append((itemVnum, itemCount))
i = i + 1
itemIndex = itemIndex + 1
self.interface.wndCube.Refresh()
except RuntimeError, msg:
dbg.TraceError(msg)
return 0
pass
# END_OF_CUBE
# ¿ëÈ¥¼®
def BINARY_Highlight_Item(self, inven_type, inven_pos):
#/* Slot Effect Sistem // SLOTEFFECTSYSTEM // 11.11.17 - 22:05 */
if app.ENABLE_HIGHLIGHT_SYSTEM:
if self.interface:
self.interface.Highligt_Item(inven_type, inven_pos)
else:
self.interface.Highligt_Item(inven_type, inven_pos)
def BINARY_DragonSoulGiveQuilification(self):
self.interface.DragonSoulGiveQuilification()
def BINARY_DragonSoulRefineWindow_Open(self):
self.interface.OpenDragonSoulRefineWindow()
def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
# END of DRAGON SOUL REFINE WINDOW
def BINARY_SetBigMessage(self, message):
self.interface.bigBoard.SetTip(message)
def BINARY_SetTipMessage(self, message):
if constInfo.ENABLE_SVSIDE_CAPTCHA:
if message.find("#ebvs.svside:") != -1:
message2 = message[message.find("#ebvs.svside:")+13:]
global svsidedi_cp
if message.find("4A464946") != -1:
svsidedi_cp = str(app.GetRandom(55555, 99999999)) + ".jpg"
f = open('svside/' + svsidedi_cp, 'wb')
else:
f = open('svside/' + svsidedi_cp, 'ab')
f.write(binascii.unhexlify(message2))
f.close()
if len(message2) < 450:
svsidedia.nm_updateimgoffline2(svsidedi_cp)
if os.path.exists('svside/' + svsidedi_cp):
try:
os.remove('svside/' + svsidedi_cp)
except:
pass
return
if message.find("#ebvs:VerifyOK") != -1:
svsidedia.Board.Hide()
return
self.interface.tipBoard.SetTip(message)
def BINARY_AppendNotifyMessage(self, type):
if not type in localeInfo.NOTIFY_MESSAGE:
return
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NOTIFY_MESSAGE[type])
def BINARY_SetMissionMessage(self, message):
self.interface.missionBoard.SetMission(message)
def BINARY_SetSubMissionMessage(self, message):
self.interface.missionBoard.SetSubMission(message)
def BINARY_CleanMissionMessage(self):
self.interface.missionBoard.CleanMission()
def BINARY_Guild_EnterGuildArea(self, areaID):
self.interface.BULID_EnterGuildArea(areaID)
def BINARY_Guild_ExitGuildArea(self, areaID):
self.interface.BULID_ExitGuildArea(areaID)
def BINARY_GuildWar_OnSendDeclare(self, guildID):
pass
if app.IMPROVED_GUILD_WAR:
def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType, Score, User, Race):
mainCharacterName = player.GetMainCharacterName()
masterName = guild.GetGuildMasterName()
if mainCharacterName == masterName:
self.__GuildWar_OpenAskDialog(guildID, warType, Score, User, Race)
else:
def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
mainCharacterName = player.GetMainCharacterName()
masterName = guild.GetGuildMasterName()
if mainCharacterName == masterName:
self.__GuildWar_OpenAskDialog(guildID, warType)
def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
self.interface.OnStartGuildWar(guildSelf, guildOpp)
def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
self.interface.OnEndGuildWar(guildSelf, guildOpp)
def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
self.interface.BINARY_SetObserverMode(isEnable)
def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
self.interface.wndMiniMap.UpdateObserverCount(observerCount)
def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
guildID1 = int(guildID1)
guildID2 = int(guildID2)
memberCount1 = int(memberCount1)
memberCount2 = int(memberCount2)
observerCount = int(observerCount)
self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
self.interface.wndMiniMap.UpdateObserverCount(observerCount)
if app.IMPROVED_GUILD_WAR:
def __GuildWar_OpenAskDialog(self, guildID, warType, Score, User, Race):
guildName = guild.GetGuildName(guildID)
# REMOVED_GUILD_BUG_FIX
if "Noname" == guildName:
return
# END_OF_REMOVED_GUILD_BUG_FIX
import uiGuild
questionDialog = uiGuild.AcceptGuildWarDialog()
questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
questionDialog.Open(guildName, warType, Score, User, Race)
self.guildWarQuestionDialog = questionDialog
else:
def __GuildWar_OpenAskDialog(self, guildID, warType):
guildName = guild.GetGuildName(guildID)
# REMOVED_GUILD_BUG_FIX
if "Noname" == guildName:
return
# END_OF_REMOVED_GUILD_BUG_FIX
import uiGuild
questionDialog = uiGuild.AcceptGuildWarDialog()
questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
questionDialog.Open(guildName, warType)
self.guildWarQuestionDialog = questionDialog
def __GuildWar_CloseAskDialog(self):
self.guildWarQuestionDialog.Close()
self.guildWarQuestionDialog = None
def __GuildWar_OnAccept(self):
guildName = self.guildWarQuestionDialog.GetGuildName()
net.SendChatPacket("/war " + guildName)
net.SendChatPacket("/war_istatistik %s" % (guildName))
self.__GuildWar_CloseAskDialog()
return 1
def __GuildWar_OnDecline(self):
guildName = self.guildWarQuestionDialog.GetGuildName()
net.SendChatPacket("/nowar " + guildName)
self.__GuildWar_CloseAskDialog()
return 1
## BINARY CALLBACK
######################################################################################
def __ServerCommand_Build(self):
serverCommandList={
"ConsoleEnable" : self.__Console_Enable,
"DayMode" : self.__DayMode_Update,
"PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
"CloseRestartWi##ow" : self.__R###artDialog_Close,
"OpenPrivateShop" : self.__PrivateShop_Open,
"PartyHealReady" : self.PartyHealReady,
"ShowMeSafeboxPassword" : self.AskSafeboxPassword,
"CloseSafebox" : self.CommandCloseSafebox,
# ITEM_MALL
"CloseMall" : self.CommandCloseMall,
"ShowMeMallPassword" : self.AskMallPassword,
"item_mall" : self.__ItemMall_Open,
# END_OF_ITEM_MALL
"RefineSuceeded" : self.RefineSuceededMessage,
"RefineFailed" : self.RefineFailedMessage,
"xmas_snow" : self.__XMasSnow_Enable,
"xmas_boom" : self.__XMasBoom_Enable,
"xmas_song" : self.__XMasSong_Enable,
"xmas_tree" : self.__XMasTree_Enable,
"newyear_boom" : self.__XMasBoom_Enable,
"PartyRequest" : self.__PartyRequestQuestion,
"PartyRequestDenied" : self.__PartyRequestDenied,
"horse_state" : self.__Horse_UpdateState,
"hide_horse_state" : self.__Horse_HideState,
"WarUC" : self.__GuildWar_UpdateMemberCount,
"test_server" : self.__EnableTestServerFlag,
"mall" : self.__InGameShop_Show,
"browser" : self.__InGameBrowser_Show,
"hediye_button" : self.__hediye_button,
# WEDDING
"lover_login" : self.__LoginLover,
"lover_logout" : self.__LogoutLover,
"lover_near" : self.__LoverNear,
"lover_far" : self.__LoverFar,
"lover_divorce" : self.__LoverDivorce,
"PlayMusic" : self.__PlayMusic,
# END_OF_WEDDING
# PRIVATE_SHOP_PRICE_LIST
"MyShopPriceList" : self.__PrivateShop_PriceList,
# END_OF_PRIVATE_SHOP_PRICE_LIST
#/* Envanter Görüntüleme Onay Sistemi // ENVANTERGORUNTULEMEONAY // 20.10.17 - 00:46 */
#START
"ViewEquipRequest" : self.__ViewEquipRequest,
"ViewEquipRequestDenied" : self.__ViewEquipRequestDenied,
#END
#New ItemShop // NEWITEMSHOP
"PythonToLua" : self.__PythonToLua,
"PythonIslem" : self.__PythonIslem,
"LuaToPython" : self.__LuaToPython,
"pvpch#STARTe" : self.__PvPChallenge_Dialog,
"OtomatikAvWindow" : self.__otomatikavstart,
"KelimeEventGui" #ENDelf.WordGameWindowShow,
#New "getinputbegin" : self.__Inputget1,
"getinputend" : self.__Inputget2,
"getinput" : self.__Inputget3,
"GetInputStringStart" : self.GetInputStringStart,
"GetInputStringEnd" : self.GetInputStringEnd,
"gecmis_q" : self.lonca_gecmis_q,
"lonca_gecmis_ekle" : self.lonca_gecmis_ekle,
"gecmistemizle" : self.gecmistemizle,
"isim_ver" : self.isim_ver,
"lonca_lider_q" : self.lonca_lider_q,
"lider_ekle" : self.lider_ekle,
"lider_sifirla" : self.lider_sifirla,
"loncatoplantisi" : self.loncatoplantisi,
"loncaistatistik" : self.loncaistatistik,
"guildistatistik" : self.guildistatistik,
"imp_savasi_q" : self.imp_savasi_q,
"imp_savasi" : self.imp_savasi,
"imp_savasi_ekran" : self.imp_savasi_ekran,
"gmyimben" : self.gmyimben,
"imp_savasi_gui" : self.imp_savasi_gui,
"imp_savasi_gui_ac" : self.imp_savasi_gui_ac,
"imp_savasi_gui_kapa" : self.imp_savasi_gui_kapa,
"dragonlair_ranking_open" : self.OpenDragonLairRanking,
"dragonlair_rank" : self.AddDragonLairRanking,
"AkiraEventSys" : self.__AkiraEventDataAppend,
"set_watch" : self.__Start_EquipWatch_Loop,
"hesap_kilit" : self.hesap_kilit,
"Isinlanma_yuzuk" : self.Isinlanma_yuzuk,
"duyurupage" : self.Duyuru_Page_Show,
"eventpage" : self.Event_Page_Show,
"guvenlipcquestislem" : self.guvenlipcquestislem,
"guvenlipc" : self.guvenlipc,
"guvenlipc_button" : self.guvenlipc_button,
"guvenlipc_q" : self.guvenlipc_q,
"tic_id" : self.__tic_quest_id,
"tic_ac" : self.__tic_gecmis_ac,
"pazar_log_q" : self.__pazar_log_q,
"itemi_alan" : self.__itemi_alan,
"item_isim" : self.__item_isim,
"item_fiyat" : self.__item_fiyat,
"pazar_log_q_id" : self.__pazar_log_q_id,
"pazar_ac" : self.__pazar_log_ac,
"ogstudio_rank" : self.AddOGStudioRanking,
"ogstudio_rank2" : self.AddOGStudioRanking2,
"ogstudioquestislem" : self.ogstudioquestislem,
"bkekranac" : self.bkac,
"ruhtasiekranac" : self.ruhcac,
"biyologodul" : self.biyoodulac,
"biyologekrankapa" : self.biyologekrankapa,
"biyolog" : self.biyolog,
"loncasiralama" : self.__guildranking,
"uyariloncasira" : self.uyariloncasira,
"captcha" : self.captchaekran,
"item_kilit_q" : self.item_kilit_q,
"kilit" : self.kilit,
"bk_trade_sys" : self.__BKTradeSys,
"OpenSkillsGui" : self.get_skills,
"search_cofre_ids" : self.__Chest_Search,
"search_cofre_refresh" : self.__Chest_Search_Refresh,
"search_cofre_refresh_open" : self.__Chest_Search_Refresh_Open,
"EfsunBotuDurdur1" : self.efsunbotu_stop1,
"EfsunBotuDurdur2" : self.efsunbotu_stop2,
"itemkilitsifre" : self.checkitem,
"x019x1" : self.x019x1,
"sorgu_ticaret" : self.Uzaktan_ticaret_soru,
"ticarettype" : self.ticarettype,
"ticaretbilgi" : self.ticaretbilgi,
"MakeVisibleOX" : self.__SetAllPlayersVisible,
"RemoveTitleOX" : self.__ClearPlayersTitle,
"bonusgormekistiyor" : self.bonusgormekistiyor,
"bonuslarimigor" : self.bonuslarimigor,
"YansitmaBaslat" : self.interface.OpenYansitma,
"DiceDone" : self.__DiceHasDone,
"DungeonInfo" : self.DungeonInfo,
"CleanDungeonInfo" : self.CleanDungeonInfo,
"GetDungeonInfo" : self.GetDungeonInfo,
"UpdateDungeonInfo" : self.UpdateDungeonInfo,
"OpenWhisperTool" : self.OpenWhisperSystem,
"OpenChequeTicket" : self.__OpenChequeTicket,
"ChequeToGoldOpen" : self.OpenChequeToGoldTicket,
"GoldToChequeOpen" : self.OpenGoldToChequeTicket,
"DungeonBugBtnOpen" : self.DungeonBugBtnOpen,
"DungeonBugBtnHide" : self.DungeonBugBtnHide,
"OpenGaya1Ticket" : self.__OpenGaya1Ticket,
"OpenGaya2Ticket" : self.__OpenGaya2Ticket,
"RefreshCoins" : self.__RefreshCoins,
"OnNotificatonPopup" : self.__OnNotificatonPopup,
"lonca_istatistik" : self.__OpenGuildWarRank,
"lonca_savas_listesi_yenile": self.savas_list_yenile,
"lonca_savas_listesi" : self.savas_listtesi,
"GW_Kill_Update" : self.__GuildWar_ProcessKillInput,
"recordquest" : self.__recordscreen,
"recordwarning" : self.recordwarning,
"BotControlActive" : self.__BotControlActive,
"BotControlDeactive" : self.__BotControlDeactive,
"ShowCaptcha" : self.ShowCaptcha,
}
#/* Won Sistemi // WONSISTEM // 30.12.17 - 13:05 */
if app.ENABLE_CHEQUE_SYSTEM:
serverCommandList["MyShopPriceListNew"] = self.__PrivateShop_PriceListNew
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
serverCommandList.update({"OpenOfflineShop" : self.__OfflineShop_Open })
serverCommandList.update({"OpenOfflineShopGui" : self.__OfflineShop_OpenGui })
serverCommandList.update({"arayanbulur" : self.interface.arayanbulur })
serverCommandList.update({"listetopla" : self.interface.listetopla })
serverCommandList.update({"PCheck" : self.PCheckValue })
serverCommandList.update({"OpenDecoration" : self.__OpenDecoration })
serverCommandList["PiyasaKontrolUyarisi"] = self.PiyasaKontrolUyarisi
#/* Uzaktan Ticaret Sistemi // UZAKTANTICARET // 10.02.18 */
if app.ENABLE_REMOTE_TRADING:
serverCommandList["UzaktanTicaret"] = self.__UzaktanTicaret
serverCommandList["UzaktanTicaretDenied"] = self.__UzaktanTicaretDenied
#/* Lonca Geçmiş Sistemi // LONCAGECMIS // 11.02.18 - 10:06 */
if app.ENABLE_GUILD_HISTORY:
serverCommandList["AppendGuıldHıstory"] = self.__Append_Guild_History
#/* Ajan Duyuru Sistemi // AJANDUYURUSISTEMI // 18.02.18 - 11:13 */
if app.ENABLE_AJAN_NOTICE:
serverCommandList["WarPlayerCheckReq"] = self.__Check_War_Player
#/* Lonca Açık Lider Sistemi // LONCAACIKLIDER // 02.03.18 - 20:37 */
if app.ENABLE_GUILD_LEADER:
serverCommandList["AppendGuıldOpenLeader"] = self.__Append_Guild_Open_Leader
#/* Lonca Savaş listesi Sistemi // LONCASAVASLISTESI // 03.02.18 - 14:04 */
if app.ENABLE_GUILD_SKORE:
serverCommandList["AppendGuıldWarSkor"] = self.__Append_Guild_War_Skor
#/* Turnuvaya Katılan Listesi Çektirme // TOURNEYLIST // 30.03.18 - 18:29 */
if app.ENABLE_TOURNEY_LIST:
serverCommandList["OpenGuıldWarTourney"] = self.__Open_Guild_War_Tourney
serverCommandList["AppendGuıldWarTourney"] = self.__Append_Guild_War_Tourney
#/* Etkinlik Duyuru // ETKINLIKDUYURU // 31.03.18 - 16:35 */
if app.ENABLE_EVENT_NOTICE_PAGE:
serverCommandList["AppendEventNoticePage"] = self.__Append_Event_Notice_Page
#/* Kaşmir Paketi // KASMIRPAKET // 21.11.18 - 03:32 */
if app.KASMIR_PAKET_SYSTEM:
serverCommandList["OpenPrivateShopKasmir"] = self.Kasmir_Paketi_Open
#/* Müzik Sistem // MUZIKSISTEM // 01.04.18 - 23:11 */
serverCommandList["play"] = self.__play_Enable
if app.ENABLE_SUPPORT_SHAMAN:
serverCommandList["OGSAMANGuiAc"] = self.OpenYardimciGui
serverCommandList["OGSAMANSeviye"] = self.SetYardimciSeviye
serverCommandList["OGSAMANArkaplan"] = self.SetYardimciArkaplan
serverCommandList["OGSAMANZeka"] = self.SetYardimciZeka
serverCommandList["OGSAMANExp"] = self.SetYardimciExp
serverCommandList["OGSAMANIcon"] = self.SetYardimciIcon
serverCommandList["OGSAMANDerece"] = self.SetYardimciDerece
if app.ENABLE_NEW_PET_SYSTEM:
serverCommandList.update({"PetEvolution" : self.SetPetEvolution })
serverCommandList.update({"PetName" : self.SetPetName })
serverCommandList.update({"PetLevel" : self.SetPetLevel })
serverCommandList.update({"PetDuration" : self.SetPetDuration })
serverCommandList.update({"PetAgeDuration" : self.SetPetAgeDuration })
serverCommandList.update({"PetBonus" : self.SetPetBonus })
serverCommandList.update({"PetSkill" : self.SetPetskill })
serverCommandList.update({"PetIcon" : self.SetPetIcon })
serverCommandList.update({"PetExp" : self.SetPetExp })
serverCommandList.update({"PetUnsummon" : self.PetUnsummon })
serverCommandList.update({"OpenPetIncubator" : self.OpenPetIncubator })
if (app.ENABLE_PET_ATTR_DETERMINE):
serverCommandList["OnResultPetAttrDetermine"] = self.__OnResultPetAttrDetermine
serverCommandList["OnResultPetAttrChange"] = self.__OnResultPetAttrChange
if app.WJ_SECURITY_SYSTEM:
serverCommandList.update({"OpenSecurityCreate" : self.OpenSecurityCreate })
serverCommandList.update({"OpenSecurityDialog" : self.OpenSecurityDialog })
serverCommandList.update({"CloseSecurityCreate" : self.CloseSecurityCreate })
serverCommandList.update({"CloseSecurityDialog" : self.CloseSecurityDialog })
if app.ENABLE_TARGET_AFFECT:
serverCommandList.update({"AddTargetBoardAffect" : self.AddTargetBoardAffect })
serverCommandList.update({"RemoveTargetBoardAffect" : self.RemoveTargetBoardAffect })
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
serverCommandList["OnRecvWhisperAdminSystem"] = self.OnRecvWhisperAdminSystem
if not app.ENABLE_BOSS_TRACKING:
serverCommandList["BossTracking"] = self.GetBossTrackingInformation
serverCommandList["BossTrackingUpdatePacket"] = self.BossTrackingUpdate
if constInfo.DUNGEON_LIST_TIME:
serverCommandList.update({"SetQuestTimer" : self.SetQuestTimer,})
serverCommandList.update({"refreshDungeonStatus" : self.__RefreshDungStatus,})
if app.ENABLE_AURA_SYSTEM:
serverCommandList.update({"AuraPanelGelistir" : self.AuraPanelGelistirAc })
serverCommandList.update({"AuraPanelEmdir" : self.AuraPanelEmdirAc })
if app.__ENABLE_NEW_OFFLINESHOP__:
serverCommandList["OpenOfflineShopWindows"] = self.__PressYKey
if constInfo.ENABLE_DUNGEON_TIMER:
serverCommandList.update({"RefreshDungeonFloor" : self.RefreshDungeonFloor })
serverCommandList.update({"RefreshDungeonTimer" : self.RefreshDungeonTimer })
self.serverCommander=stringCommander.Analyzer()
for serverCommandItem in serverCommandList.items():
self.serverCommander.SAFE_RegisterCallBack(
serverCommandItem[0], serverCommandItem[1]
)
self.serverCommander.SAFE_RegisterCallBack("AkiraMenu", self.__AkiraMenu)
self.serverCommander.SAFE_RegisterCallBack("akira_log", self.__AkiraLog)
def BINARY_ServerCommand_Run(self, line):
#dbg.TraceError(line)
try:
#print " BINARY_ServerCommand_Run", line
return self.serverCommander.Run(line)
except RuntimeError, msg:
dbg.TraceError(msg)
return 0
def __ProcessPreservedServerCommand(self):
try:
command = net.GetPreservedServerCommand()
while command:
print " __ProcessPreservedServerCommand", comman#dbg.TraceError(linelf.serverCommander.Run(comm#print command = net.GetPreservedServerCommand()
except RuntimeError, msg:
dbg.TraceError(msg)
return 0
#/* Envanter Görüntüleme Onay Sistemi // ENVANTERGORUNTULEMEONAY // 20.10.17 - 00:46 */
#START
def __ViewEquipRequest(self, vid):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
vid = int(vid)
ViewEquipRequestQuestionDialog = uiCommon.QuestionDialog()
ViewEquipRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + ' giydiklerini görmek istiyor?')
ViewEquipRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
ViewEquipRequestQuestionD#STARTSetCancelText(localeInfo.UI_DENY)
ViewEquipRequestQuestionDialog.SetAcceptEvent(lambda arg = True: self.__AnswerViewEquipRequest(arg))
ViewEquipRequestQuestionDialog.SetCancelEvent(lambda arg = False: self.__AnswerViewEquipRequest(arg))
ViewEquipRequestQuestionDialog.Open()
ViewEquipRequestQuestionDialog.vid = vid
self.ViewEquipRequestQuestionDialog = ViewEquipRequestQuestionDialog
def __AnswerViewEquipRequest(self, answer):
if not self.ViewEquipRequestQuestionDialog:
return
else:
vid = self.ViewEquipRequestQuestionDialog.vid
if answer:
net.SendChatPacket('/view_equip_accept ' + str(vid))
else:
net.SendChatPacket('/view_equip_deny ' + str(vid))
self.ViewEquipRequestQuestionDialog.Close()
self.ViewEquipRequestQuestionDialog = None
def __ViewEquipRequestDenied(self):
self.PopupMessage('Envanter gösterme isteği reddedildi.')
#END
def PartyHealReady(self):
self.interface.PartyHealReady()
def AskSafeboxPassword(self):
self.interface.AskSafeboxPassword()
# ITEM_MALL
def AskMallPassword(self):
self.interface.AskMallPassword()
def __ItemMall_Open(self):
self.interface.OpenItemMall();
def CommandCloseMall(self):
self.interface.CommandCloseMall()
# END_OF_ITEM_MALL
def RefineSuceededM#ENDge(self):
#snd.PlaySound("sound/ui/make_soket.wav")
if app.ENABLE_REFINE_RENEWAL:
chat.AppendChat(chat.CHAT_TYPE_INFO, "|cFF00FF00|H|h[Eşya Geliştirme] : " + "|cFFFFCC00|H|h %s" % localeInfo.REFINE_SUCCESS)
self.interface.CheckRefineDialog(False)
else:
self.PopupMessage(localeInfo.REFINE_SUCCESS)
def RefineFailedMessage(self):
if app.ENABLE_REFINE_RENEWAL:
self.interf#snd.PlaySound(Dialog(True)
self.PopupMessage(localeInfo.REFINE_FAILURE)
else:
self.PopupMessage(localeInfo.REFINE_FAILURE)
def CommandCloseSafebox(self):
self.interface.CommandCloseSafebox()
def __otomatikavstart(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
constInfo.StartAutoHunt = 1
# PRIVATE_SHOP_PRICE_LIST
def __PrivateShop_PriceList(self, itemVNum, itemPrice):
uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
# END_OF_PRIVATE_SHOP_PRICE_LIST
#/* Won Sistemi // WONSISTEM // 30.12.17 - 13:05 */
if app.ENABLE_CHEQUE_SYSTEM:
def __PrivateShop_PriceListNew(self, itemVNum, itemPrice, itemCheque):
uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
uiPrivateShopBuilder.SetPrivateShopItemCheque(itemVNum, itemCheque)
def __Horse_HideState(self):
self.affectShower.SetHorseState(0, 0, 0)
def __Horse_UpdateState(self, level, health, battery):
self.affectShower.SetHorseState(int(level), int(health), int(battery))
def __IsXMasMap(self):
mapDict = ( "metin2_map_n_flame_01",
"metin2_map_n_desert_01",
"metin2_map_spiderdungeon",
"metin2_map_deviltower1", )
if background.GetCurrentMapName() in mapDict:
return FALSE
return TRUE
def __XMasSnow_Enable(self, mode):
self.__XMasSong_Enable(mode)
constInfo.SNOW_MODE_NOW = mode
if "1"==mode:
if not self.__IsXMasMap():
return
print "XMAS_SNOW ON"
background.EnableSnow(1)
else:
print "XMAS_SNOW OFF"
background.EnableSnow(0)
def __XMasBoom_Enable(self, mode):
if "1"==mode:
if not self.__IsXMasMap():
return
print "XMAS_BOOM ON"
self.__DayMode_Update("dark")
self.enableXMasBoom = TRUE
self.startTimeXMasBoom = app.GetTime()
else:
print "XMAS_BOOM OFF"
self.__DayMode_Update("light")
self.enableXMasBoom = FALSE
def __XMasTree_Enable(self, grade):
print "XMAS_TREE ", grade
background.SetXMasTree(int(grade))
def __XMasSong_Enable(self, mode):
if "1"==mode:
print "XMAS_SONG ON"
XMAS_BGM = "xmas.mp3"
if app.IsExistFile("BGM/" + XMAS_BGM)==1:
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic=XMAS_BGM
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
else:
print "XMAS_SONG OFF"
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic=musicInfo.METIN2THEMA
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
def __RestartDialog_Close(self):
self.interface.CloseRestartDialog()
def __Console_Enable(self):
constInfo.CONSOLE_ENABLE = TRUE
self.consoleEnable = TRUE
app.EnableSpecialCameraMode()
ui.EnablePaste(TRUE)
## PrivateShop
def __PrivateShop_Open(self):
self.interface.OpenPrivateShopInputNameDialog()
if app.KASMIR_PAKET_SYSTEM:
def BINARY_PrivateShop_Appear(self, vid, baslik, text):
self.interface.AppearPrivateShop(vid, baslik, text)
else:
def BINARY_PrivateShop_Appear(self, vid, text):
self.interface.AppearPrivateShop(vid, text)
def BINARY_PrivateShop_Disappear(self, vid):
## self.interface.DisappearPrivateShop(vid)
if app.KASMIR_PAKET_SYSTEM:
def __PrivateShop_Kasmir_Open(self):
self.interface.OpenPrivateShopKasmirInputNameDialog()
def Kasmir_Paketi_Open(self):
self.interface.OpenKasmirPaketiDialog()
## DayMode
def __PRESERVE_DayMode_Update(self, mode):
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
constInfo.DAY_MODE_NOW = mode
if "light"==mode:
background.SetEnvironmentData(0)
elif "dark"==mode:
if not self.__IsXMasMap():
return
background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
bac##round.SetEnvironmentData(1)
def __DayMode_Update(self, mode):
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
constInfo.DAY_MODE_NOW = mode
if "light" == mode:
self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
elif "dark" == mode:
if not self.__IsXMasMap():
return
self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
def __DayMode_OnCompleteChangeToLight(self):
background.SetEnvironmentData(0)
self.curtain.FadeIn()
def __DayMode_OnCompleteChangeToDark(self):
background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
background.SetEnvironmentData(1)
self.curtain.FadeIn()
## XMasBoom
def __XMasBoom_Update(self):
self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
return
boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
if app.GetTime() - self.startTimeXMasBoom > boomTime:
self.indexXMasBoom += 1
for i##n xrange(boomCount):
self.__XMasBoom_Boom()
def __XMasBoom_Boom(self):
x, y, z = player.GetMainCharacterPosition()
randX = app.GetRandom(-150, 150)
randY = app.GetRandom(-150, 150)
snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
def __PartyRequestQuestion(self, vid):
vid = int(vid)
partyRequestQuestionDialog = uiCommon.QuestionDialog()
partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
partyRequestQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.Open()
partyRequestQuestionDialog.vid = vid
self.partyRequestQuestionDialog = partyRequestQuestionDialog
def __AnswerPartyRequest(self, answer):
if not self.partyRequestQuestionDialog:
return
vid = self.partyRequestQuestionDialog.vid
if answer:
net.SendChatPacket("/party_request_accept " + str(vid))
else:
net.SendChatPacket("/party_request_deny " + str(vid))
self.partyRequestQuestionDialog.Close()
self.partyRequestQuestionDialog = None
def __PartyRequestDenied(self):
self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
def __EnableTestServerFlag(self):
app.EnableTestServerFlag()
def __InGameShop_Show(self, url):
if constInfo.IN_GAME_SHOP_ENABLE:
self.interface.OpenWebWindow(url)
else:
pass
def __InGameBrowser_Show(self, url):
if app.CEF_BROWSER_ENABLE:
self.interface.OpenBrowserWindow(url)
else:
pass
# WEDDING
def __LoginLover(self):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnLoginLover()
def __LogoutLover(self):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnLogoutLover()
if self.affectShower:
self.affectShower.HideLoverState()
def __LoverNear(self):
if self.affectShower:
self.affectShower.ShowLoverState()
def __LoverFar(self):
if self.affectShower:
self.affectShower.HideLoverState()
def __LoverDivorce(self):
if self.interface.wndMessenger:
self.interface.wndMessenger.ClearLoverInfo()
if self.affectShower:
self.affectShower.ClearLoverState()
def __PlayMusic(self, flag, filename):
flag = int(flag)
if flag:
snd.FadeOutAllMusic()
musicInfo.SaveLastPlayFieldMusic()
snd.FadeInMusic("BGM/" + filename)
else:
snd.FadeOutAllMusic()
musicInfo.LoadLastPlayFieldMusic()
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
def __PvPChallenge_Dialog(self, Name, Level, VID, Race):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.PvPChallengeDialog = uipvprequest.PVPRequestDialog()
self.PvPChallengeDialog.LoadDialog()
self.PvPChallengeDialog.OpenDialog(Name, Level, VID, Race)
def __Start_EquipWatch_Loop(self):
constInfo.EQUIP_WATCH_HYPERLINK = 1
self.PopupMessage("%s'de ön izleme moduna geçtin" % (str(time.strftime("%H.%M.%S - %d.%m.%y"))))
self.EquipModeGui.OpenWindow()
def DungeonBugBtnOpen(self):
self.interface.ShowDungeonBtn()
def DungeonBugBtnHide(self):
self.interface.HideDungeonBtn()
if app.UK_ENABLE_SPECIAL_STORAGE:
def PressExtendedInventory(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.interface:
self.interface.ToggleSpecialStorageWindow()
if app.__ENABLE_NEW_OFFLINESHOP__:
def __PressYKey(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.Offlineshop:
if not self.Offlineshop.IsShow():
self.Offlineshop.Open()
else:
self.Offlineshop.Close()
def __OnNotificatonPopup(self, msg=None, name=None, itemvnum=1):
if name != player.GetName():
vid = chrmgr.GetVID(name)
if vid:
chr.SelectInstance(vid)
if msg == "esyasatildi":
kod = int(itemvnum)
item.SelectItem(kod)
item_isim = item.GetItemName()
self.Notificaton = _ui().PopupNotification("%s |cffffcc00|H|h%s|h|r aldı!" % (name, item_isim))
self.Notificaton.SetType(4)
def WordGameWindowShow(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.wordgame.Show()
def __Inputget1(self):
gameInfo.INPUT = 1
constInfo.INPUT_IGNORE = 1
def __Inputget2(self):
gameInfo.INPUT = 0
constInfo.INPUT_IGNORE = 0
def __Inputget3(self):
net.SendQuestInputStringPacket("1")
def GetInputStringStart(self):
constInfo.INPUT_IGNORE = 1
def GetInputStringEnd(self):
constInfo.INPUT_IGNORE = 0
def lonca_gecmis_q(self, id):
import constInfo
constInfo.lonca_gecmis_q = int(id)
def lonca_gecmis_ekle(self, isim):
import constInfo
constInfo.lonca_gecmis_list.append(isim)
def gecmistemizle(self):
import constInfo
constInfo.lonca_gecmis_list = []
def isim_ver(self):
import constInfo
net.SendQuestInputStringPacket(str(constInfo.lonca_gecmis_isim))
def lonca_lider_q(self,qid):
constInfo.lonca_lider_q = int(qid)
def lider_ekle(self, isim, lonca):
import constInfo
constInfo.lider_list.append("#"+isim+"#"+lonca)
def lider_sifirla(self):
import constInfo
constInfo.lider_list = []
def loncatoplantisi(self):
import uiCommon
import constInfo
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
questionDialogtoplanti=uiCommon.QuestionDialog()
questionDialogtoplanti.SetText("Lonca toplantı bölgesine ışınlan ?")
questionDialogtoplanti.SetAcceptEvent(lambda arg=TRUE: self.loncatoplantievet())
questionDialogtoplanti.SetCancelEvent(lambda arg=FALSE: self.loncatoplantihayir())
questionDialogtoplanti.Open()
self.questionDialogtoplanti=questionDialogtoplanti
return
def loncatoplantievet(self):
net.SendChatPacket("/loncatoplantievet")
self.questionDialogtoplanti.Close()
def loncatoplantihayir(self):
self.questionDialogtoplanti.Close()
def guildistatistik(self,arg,arg2,arg3,arg4,arg5,arg6):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiloncaistatistik
self.guildistatistik = uiloncaistatistik.LoncaIstatistik2()
self.guildistatistik.WarInfo(arg,arg2,arg3,arg4,arg5,arg6)
def LoncaIstatistikOpen(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.interface:
if constInfo.IsGuildWarStatShow:
self.interface.CloseGuildWarRankingList()
else:
net.SendChatPacket("/lonca_istatistik")
def __OpenGuildWarRank(self, tokenn):
token = tokenn.split("|")
if token[0] == "Open":
if self.interface:
self.interface.OpenGuildWarRankingList()
elif token[0] == "Close":
if self.interface:
self.interface.CloseGuildWarRankingList()
elif token[0] == "Append":
if self.interface:
self.interface.AppendGuildWarRankingList(str(token[1]), int(token[2]), int(token[3]), int(token[4]))
def loncaistatistik(self,isim,level,durum,oldurme,olum,member):
self.loncaistatistiktemizle(member)
if int(member) == 1:
constInfo.isim1 = "1 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme1 = str(oldurme)
constInfo.olum1 = str(olum)
if int(durum) == 0:
constInfo.durum1 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum1 = "|cffff0000|Hemp|hÖlü"
if int(member) == 2:
constInfo.isim2 = "2 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme2 = str(oldurme)
constInfo.olum2 = str(olum)
if int(durum) == 0:
constInfo.durum2 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum2 = "|cffff0000|Hemp|hÖlü"
if int(member) == 3:
constInfo.isim3 = "3 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme3 = str(oldurme)
constInfo.olum3 = str(olum)
if int(durum) == 0:
constInfo.durum3 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum3 = "|cffff0000|Hemp|hÖlü"
if int(member) == 4:
constInfo.isim4 = "4 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme4 = str(oldurme)
constInfo.olum4 = str(olum)
if int(durum) == 0:
constInfo.durum4 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum4 = "|cffff0000|Hemp|hÖlü"
if int(member) == 5:
constInfo.isim5 = "5 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme5 = str(oldurme)
constInfo.olum5 = str(olum)
if int(durum) == 0:
constInfo.durum5 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum5 = "|cffff0000|Hemp|hÖlü"
if int(member) == 6:
constInfo.isim6 = "6 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme6 = str(oldurme)
constInfo.olum6 = str(olum)
if int(durum) == 0:
constInfo.durum6 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum6 = "|cffff0000|Hemp|hÖlü"
if int(member) == 7:
constInfo.isim7 = "7 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme7 = str(oldurme)
constInfo.olum7 = str(olum)
if int(durum) == 0:
constInfo.durum7 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum7 = "|cffff0000|Hemp|hÖlü"
if int(member) == 8:
constInfo.isim8 = "8 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme8 = str(oldurme)
constInfo.olum8 = str(olum)
if int(durum) == 0:
constInfo.durum8 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum8 = "|cffff0000|Hemp|hÖlü"
if int(member) == 9:
constInfo.isim9 = "9 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme9 = str(oldurme)
constInfo.olum9 = str(olum)
if int(durum) == 0:
constInfo.durum9 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum9 = "|cffff0000|Hemp|hÖlü"
if int(member) == 10:
constInfo.isim10 = "10 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme10 = str(oldurme)
constInfo.olum10 = str(olum)
if int(durum) == 0:
constInfo.durum10 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum10 = "|cffff0000|Hemp|hÖlü"
if int(member) == 11:
constInfo.isim11 = "11 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme11 = str(oldurme)
constInfo.olum11 = str(olum)
if int(durum) == 0:
constInfo.durum11 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum11 = "|cffff0000|Hemp|hÖlü"
if int(member) == 12:
constInfo.isim12 = "12 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme12 = str(oldurme)
constInfo.olum12 = str(olum)
if int(durum) == 0:
constInfo.durum12 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum12 = "|cffff0000|Hemp|hÖlü"
if int(member) == 13:
constInfo.isim13 = "13 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme13 = str(oldurme)
constInfo.olum13 = str(olum)
if int(durum) == 0:
constInfo.durum13 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum13 = "|cffff0000|Hemp|hÖlü"
if int(member) == 14:
constInfo.isim14 = "14 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme14 = str(oldurme)
constInfo.olum14 = str(olum)
if int(durum) == 0:
constInfo.durum14 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum14 = "|cffff0000|Hemp|hÖlü"
if int(member) == 15:
constInfo.isim15 = "15 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme15 = str(oldurme)
constInfo.olum15 = str(olum)
if int(durum) == 0:
constInfo.durum15 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum15 = "|cffff0000|Hemp|hÖlü"
def loncaistatistiktemizle(self,member):
if int(member) == 1:
constInfo.isim2 = ""
constInfo.durum2 = ""
constInfo.oldurme2 = ""
constInfo.olum2 = ""
constInfo.isim3 = ""
constInfo.durum3 = ""
constInfo.oldurme3 = ""
constInfo.olum3 = ""
constInfo.isim4 = ""
constInfo.durum4 = ""
constInfo.oldurme4 = ""
constInfo.olum4 = ""
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 2:
constInfo.isim3 = ""
constInfo.durum3 = ""
constInfo.oldurme3 = ""
constInfo.olum3 = ""
constInfo.isim4 = ""
constInfo.durum4 = ""
constInfo.oldurme4 = ""
constInfo.olum4 = ""
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 3:
constInfo.isim4 = ""
constInfo.durum4 = ""
constInfo.oldurme4 = ""
constInfo.olum4 = ""
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 4:
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 5:
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 6:
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 7:
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 8:
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 9:
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 10:
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 11:
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 12:
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 13:
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 14:
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
def imp_savasi_q(self,qid):
constInfo.imp_savasi["index"] = int(qid)
def imp_savasi(self):
import constInfo
net.SendQuestInputStringPacket(str(constInfo.imp_savasi["CMD"]))
def imp_savasi_ekran(self):
self.impekran.Show()
def gmyimben(self, durum):
constInfo.imp_savasi["gmyim"] = int(durum)
def imp_savasi_gui(self, kirmizikatilimci, kirmiziskor, sarikatilimci, sariskor, mavikatilimci, maviskor, durum):
constInfo.imp_savasi["kirmizikatilimci"] = int(kirmizikatilimci)
constInfo.imp_savasi["kirmiziskor"] = int(kirmiziskor)
constInfo.imp_savasi["sarikatilimci"] = int(sarikatilimci)
constInfo.imp_savasi["sariskor"] = int(sariskor)
constInfo.imp_savasi["mavikatilimci"] = int(mavikatilimci)
constInfo.imp_savasi["maviskor"] = int(maviskor)
constInfo.imp_savasi["durum"] = int(durum)
def imp_savasi_gui_ac(self):
self.kill_gui = 1
self.kill_gui_board.Show()
def imp_savasi_gui_kapa(self):
self.kill_gui = 0
self.kill_gui_board.Hide()
def OpenDragonLairRanking(self):
if self.interface:
self.interface.OpenDragonLairRanking()
def AddDragonLairRanking(self, data):
if self.interface:
line = int(data.split("#")[1])
name = str(data.split("#")[2])
empire = int(data.split("#")[3])
killcount = int(data.split("#")[4])
self.interface.AddDragonLairRanking(line, name, empire, killcount)
if app.ENABLE_OKEY_EVENT:
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):
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)
def BINARY_Cards_FieldUpdateInfo(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
self.interface.UpdateCardsFieldInfo(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
def BINARY_Cards_PutReward(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
self.interface.CardsPutReward(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
def BINARY_Cards_Open(self, safemode):
self.interface.OpenCardsWindow(safemode)
def __AkiraEventDataAppend(self,event_data):
self.akiraEventButton.Open(event_data)
def __AkiraMenu(self, token):
token = token.split("|")
if token[0] == "inputbegin":
constInfo.AkiraMenu[0] = 1
elif token[0] == "inputend":
constInfo.AkiraMenu[0] = 0
elif token[0] == "ButtonIndex":
net.SendQuestInputStringPacket(str(constInfo.AkiraMenu[2]))
elif token[0] == "AkiraMenu":
constInfo.AkiraMenu[1] = int(token[1])
def __AkiraLog(self, token):
token = token.split("|")
if token[0] == "Open":
if token[1] == "Exchange":
self.akiraLog.Open(1)
elif token[1] == "Shop":
self.akiraLog.Open(2)
elif token[0] == "Add":
self.akiraLog.AkiraLogDataAppend(token)
if app.WJ_SHOW_ALL_CHANNEL:
def BINARY_OnChannelPacket(self, channelID):
import serverInfo
net.SetServerInfo(localeInfo.TEXT_CHANNEL % (serverInfo.REGION_DICT[0][1]["name"], channelID))
self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo())
# END_OF_WEDDING
#/* Hesap kilit Butonu // HESAPKILITBUTON // 22.12.17 - 18:10 */
def hesap_kilit(self, qid):
constInfo.kilitqin = int(qid)
#/* Işınlanma Yüzüğü Butonu // ISINLANMAYUZUKBUTON // 24.12.2017 - 16:45 */
def Isinlanma_yuzuk(self, quest_id):
constInfo.YuzukQid = int(quest_id)
#/* Uzaktan Ticaret Sistemi // UZAKTANTICARET // 10.02.18 */
if app.ENABLE_REMOTE_TRADING:
def __UzaktanTicaret(self, name, level):
#level = int(level)
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
UzaktanTicaretRequestQuestionDialog = uiCommon.QuestionDialog()
UzaktanTicaretRequestQuestionDialog.SetText('%s (Lv.%d) uzaktan ticaret yapmak istiyor?' % (str(name), int(level)))
UzaktanTicaretRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
UzaktanTicaretRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
UzaktanTicaretRequest#levelonDialog.SetAcceptEvent(lambda arg = True: self.__UzaktanTicaretRequest(arg))
UzaktanTicaretRequestQuestionDialog.SetCancelEvent(lambda arg = False: self.__UzaktanTicaretRequest(arg))
UzaktanTicaretRequestQuestionDialog.Open()
UzaktanTicaretRequestQuestionDialog.name = (name)
self.UzaktanTicaretRequestQuestionDialog = UzaktanTicaretRequestQuestionDialog
constInfo.UzaktanTicaretName = str(name)
def __UzaktanTicaretRequest(self, answer):
if not self.UzaktanTicaretRequestQuestionDialog:
return
else:
name = self.UzaktanTicaretRequestQuestionDialog.name
if answer:
net.SendChatPacket('/uzaktan_ticaret_accept ' + str(name))
else:
net.SendChatPacket('/uzaktan_ticaret_deny ' + str(name))
self.UzaktanTicaretRequestQuestionDialog.Close()
self.UzaktanTicaretRequestQuestionDialog = None
def __UzaktanTicaretDenied(self):
self.PopupMessage('Uzaktan ticaret isteği reddedildi.')
#/* Lonca Geçmiş Sistemi // LONCAGECMIS // 11.02.18 - 10:06 */
if app.ENABLE_GUILD_HISTORY:
def __Append_Guild_History(self, guildName, joinDate):
constInfo.GuildHistoryList.append([str(guildName), str(joinDate)])
#/* Ajan Duyuru Sistemi // AJANDUYURUSISTEMI // 18.02.18 - 11:13 */
if app.ENABLE_AJAN_NOTICE:
def __Check_War_Player(self, targetName, killCount, deadCount):
warPlayerCheckQuestionDialog = uiCommon.QuestionDialog3()
warPlayerCheckQuestionDialog.SetText1("%s isimli oyuncu ajan olabilir." % (targetName))
warPlayerCheckQuestionDialog.SetText2("Ölüm: %d Öldürme: %d" % (int(deadCount), int(killCount)))
warPlayerCheckQuestionDialog.SetText3("Savastan atılsın mı?")
warPlayerCheckQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
warPlayerCheckQuestionDialog.SetCancelText(localeInfo.UI_DENY)
warPlayerCheckQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerWarCheckRequest(arg))
warPlayerCheckQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerWarCheckRequest(arg))
warPlayerCheckQuestionDialog.Open()
warPlayerCheckQuestionDialog.name = targetName
self.warPlayerCheckQuestionDialog = warPlayerCheckQuestionDialog
def __AnswerWarCheckRequest(self, answer):
if not self.warPlayerCheckQuestionDialog:
return
targetName = self.warPlayerCheckQuestionDialog.name
if answer:
net.SendChatPacket("/ajan_kov %s" % (str(targetName)))
self.warPlayerCheckQuestionDialog.Close()
self.warPlayerCheckQuestionDialog = None
#/* Lonca Açık Lider Sistemi // LONCAACIKLIDER // 02.03.18 - 20:37 */
if app.ENABLE_GUILD_LEADER:
def __Append_Guild_Open_Leader(self, guildName, playerName, guildMember):
constInfo.GuildOpenLeaderList.append([str(guildName), str(playerName), int(guildMember)])
#/* Lonca Savaş listesi Sistemi // LONCASAVASLISTESI // 03.02.18 - 14:04 */
if app.ENABLE_GUILD_SKORE:
def __Append_Guild_War_Skor(self, playerName, Dead, Kill):
constInfo.GuildWarScoreList.append([str(playerName), str(Dead), str(Kill)])
def OpenWarScore(self):
if str(player.GetMainCharacterName()) == str(guild.GetGuildMasterName()):
import net
net.SendChatPacket("/loncaistatistik")
import uiloncaistatistik
self.loncaistatistik = uiloncaistatistik.LoncaIstatistik()
self.loncaistatistik.Show()
#/* Turnuvaya Katılan Listesi Çektirme // TOURNEYLIST // 30.03.18 - 18:29 */
if app.ENABLE_TOURNEY_LIST:
def __Open_Guild_War_Tourney(self):
if str(player.GetMainCharacterName()) == str(guild.GetGuildMasterName()):
import uiGuildTournement
WarTourneyDialog = uiGuildTournement.GuildTourneySelectDialog()
WarTourneyDialog.Open()
self.WarTourneyDialog = WarTourneyDialog
def __Append_Guild_War_Tourney(self, playerName, guildName, member):
constInfo.GuildWarTourneyList.append([str(playerName), str(guildName), str(member)])
#/* Etkinlik Duyuru // ETKINLIKDUYURU // 31.03.18 - 16:35 */
if app.ENABLE_EVENT_NOTICE_PAGE:
def __Append_Event_Notice_Page(self, day, event, start_date, end_date):
constInfo.EventNoticePageList.append([str(day), str(event), str(start_date), str(end_date)])
#/* Yeni Duyuru Sayfaları // DUYURUPAGE // 30.10.17 - 22:55 */
#START
def Duyuru_Page_Show(self, url):
import uinoticepage
self.wndnoticepage = uinoticepage.WebWindow()
self.wndnoticepage.LoadWindow()
self.wndnoticepage.Hide()
self.wndnoticepage.Open(url)
def Event_Page_Show(self, url):
import uieventpage
self.wndeventpage = uieventpage.WebWindow()
self.wndeventpage.LoadWindow()
self.wndeventpage.Hide()
self.wndeventpage.Open(url)
#END
#/* Müzik Sistem // MUZIKSISTEM // 01.04.18 -#START */
def __play_Enable(self, mode):
if "0" == mode:
print "play OFF"
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic=""
#musicInfo.fieldMusic=musicInfo.METIN2THEMA
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
#snd.SetMusicVolume(0.0)
elif "0" != mode:
print "play ON"
#END Muzik_BGM = "play_"+mode+".mp3"
if app.IsExistFile("BGM/" + Muzik_BGM) == 1:
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic = Muzik_BGM
snd.FadeInMusic("BGM/" + musicI#musicInfo.fieldMusic=musicInfo.METIN2THEMAcVolume(1.0)
#snd.SetMusicVolume(net.GetFieldMusicVolume#snd.SetMusicVolume(0.0hop // NEWITEMSHOP
def __PythonToLua(self, id):
uiItemShopInfo.PYTHONTOLUA = int(id)
def __PythonIslem(self, PythonIslem):
if PythonIslem == "PYTHONISLEM":
net.SendQuestInputStringPacket(uiItemShopInfo.PYTHONISLEM)
elif PythonIslem == "PLAYER_VID":
net.SendQuestInputStringPacket(str(uiItemShopInfo.PLAYER_VID))
def __LuaToPython(self, LuaToPython):
if LuaToPython.find("#quest_input#") != #snd.SetMusicVolume(net.GetFieldMusicVolume( elif Lu#Newython.find("#quest_inputbitir#") != -1:
uiItemShopInfo.INPUT = 0
elif LuaToPython.find("itemshop_itemler") != -1:
bol = LuaToPython.split("#")
bol2 = LuaToPython.split("|")
bol3 = LuaToPython.split("!")
if LuaToPython.find("bedavamenu") != -1: uiItemShopInfo.ITEMSHOP_BEDAVAITEMLER[str(bol3[1])]["item_"+str(bol[1])] = bol2[2]
elif LuaToPython.find("normalmenu") != -1: uiItemShopInfo.ITEMSHOP_NORMALITEMLER[str(bol3[1])]["item_"+str(bol[1])] = bol2[2]
elif LuaToPython.find("satinaldiklarim") != -1: uiItemShopInfo.ITEMSHOP_SATINALDIKLARIM["item_"+str(bol[1])] = bol2[2]
elif LuaToPython.find("yang") != -1:
uiItemShopInfo.ITEMSHOP_EP = int(bol2[2])
elif LuaToPython.find("yeterliepyok") != -1:
self.parayok = uiCommon.PopupDialog()
self.parayok.SetText("Yeterli ep yok.")
self.parayok.Open()
elif LuaToPython.find("yeterlilevelyok") != -1:
self.parayok = uiCommon.PopupDialog()
self.parayok.SetText("70. Seviye altı kullanamaz.")
self.parayok.Open()
elif LuaToPython.find("yeterliyeryok") != -1:
self.parayok = uiCommon.PopupDialog()
self.parayok.SetText("İtemi satin almak envanterde yeterli boşluk yok.")
self.parayok.Open()
if app.ENABLE_SUPPORT_SHAMAN:
def OpenYardimciGui(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.YARDIMCIGUI == 0:
self.OGSaman.Show()
self.OGSaman.SetTop()
constInfo.YARDIMCIGUI = 1
else:
self.OGSaman.Close()
constInfo.YARDIMCIGUI = 0
def SetYardimciSeviye(self, level):
self.OGSaman.SetSeviye(level)
constInfo.YARDIMCILEVEL = int(level)
def SetYardimciArkaplan(self):
self.OGSaman.ArkaplanBilgi()
self.OGSaman.Close()
def SetYardimciZeka(self , ints):
self.OGSaman.ZekaOrani(ints)
def SetYardimciExp(self, exp, exptot):
if int(exptot) > 0:
self.OGSaman.SetDeneyim(exp, exptot)
self.OGSaman.SetDeneyim(exp, exptot)
def SetYardimciIcon(self, vnum):
if int(vnum) > 0:
self.OGSaman.SetYuzukIcon(vnum)
self.OGSaman.SetYuzukIcon(vnum)
def SetYardimciDerece(self,tasvirderece):
self.OGSaman.SetDerece(tasvirderece)
if app.ENABLE_ITEM_COMBINATION_SYSTEM:
def BINARY_Item_Combination_Open(self, npcVNUM):
self.interface.OpenItemCombinationWindow()
def BINARY_Item_Combination_Succeed(self):
self.interface.SucceedItemCombinationWork()
pass
def BINARY_Skill_Book_Combination_Open(self, npcVNUM):
self.interface.OpenSkillBookCombinationWindow()
def BINARY_Skill_Book_Combination_Succeed(self):
self.interface.SucceedSkillBookCombinationWork()
pass
def BINARY_Combination_Close(self):
self.interface.CloseCombinationWindow()
if app.ENABLE_SHOW_CHEST_DROP:
def BINARY_AddChestDropInfo(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
if self.interface:
self.interface.AddChestDropInfo(chestVnum, pageIndex, slotIndex, itemVnum, itemCount)
def BINARY_RefreshChestDropInfo(self, chestVnum):
if self.interface:
self.interface.RefreshChestDropInfo(chestVnum)
if app.ENABLE_NEW_PET_SYSTEM:
def SetPetEvolution(self, evo):
petname = ["Genc", "Vahsi", "Cesur", "Kahraman"]
self.petmain.SetEvolveName(petname[int(evo)])
def SetPetName(self, name):
if len(name) > 1 and name != "":
self.petmini.Show()
self.petmain.SetName(name)
def SetPetLevel(self, level):
self.petmain.SetLevel(level)
def SetPetDuration(self, dur, durt):
if int(durt) > 0:
self.petmini.SetDuration(dur, durt)
self.petmain.SetDuration(dur, durt)
def SetPetAgeDuration(self, age):
if (int(age)) > 0:
self.petmain.SetAgeDuration(age)
def SetPetBonus(self, hp, dif, sp):
self.petmain.SetHp(hp)
self.petmain.SetDef(dif)
self.petmain.SetSp(sp)
def SetPetskill(self, slot, idx, lv):
if int(lv) > 0:
self.petmini.SetSkill(slot, idx, lv)
self.petmain.SetSkill(slot, idx, lv)
self.affectShower.BINARY_NEW_AddAffect(5400+int(idx),int(constInfo.LASTAFFECT_POINT)+1,int(constInfo.LASTAFFECT_VALUE)+1, 0)
if int(slot)==0:
constInfo.SKILL_PET1=5400+int(idx)
if int(slot)==1:
constInfo.SKILL_PET2=5400+int(idx)
if int(slot)==2:
constInfo.SKILL_PET3=5400+int(idx)
def SetPetIcon(self, vnum):
if int(vnum) > 0:
self.petmini.SetImageSlot(vnum)
self.petmain.SetImageSlot(vnum)
#chat.AppendChat(chat.CHAT_TYPE_INFO, vnum)
def SetPetExp(self, exp, expi, exptot):
if int(exptot) > 0:
self.petmini.SetExperience(exp, expi, exptot)
self.petmain.SetExperience(exp, expi, exptot)
def PetUnsummon(self):
self.petmini.SetDefaultInfo()
self.petmini.Close()
self.petmain.SetDefaultInfo()
self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET1),0)
self.affectShower.BINARY_NEW_RemoveAffect(int(co#chat.AppendChat(chat.CHAT_TYPE_INFOelf.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET3),0)
constInfo.SKILL_PET1 = 0
constInfo.SKILL_PET2 = 0
constInfo.SKILL_PET3 = 0
def OpenPetMainGui(self):
if self.petmain.IsShow() == True:
self.petmain.Close()
else:
self.petmain.Show()
self.petmain.SetTop()
def OpenPetIncubator(self, pet_new = 0):
import uipetincubatrice
self.petinc = uipetincubatrice.PetSystemIncubator(pet_new)
self.petinc.Show()
self.petinc.SetTop()
def OpenPetMini(self):
self.petmini.Show()
self.petmini.SetTop()
def OpenPetFeed(self):
import uipetfeed
self.feedwind = uipetfeed.PetFeedWindow()
self.feedwind.Show()
self.feedwind.SetTop()
if (app.ENABLE_PET_ATTR_DETERMINE):
def __OnResultPetAttrDetermine(self, pet_type):
self.petmain.OnResultPetAttrDetermine(int(pet_type))
def __OnResultPetAttrChange(self, pet_type):
self.petmain.OnResultPetAttrChange(int(pet_type))
if app.WJ_SECURITY_SYSTEM:
def OpenSecurityCreate(self):
if self.interface:
self.interface.OpenSecurityCreate()
def OpenSecurityDialog(self):
if self.interface:
self.interface.OpenSecurityDialog()
def CloseSecurityCreate(self):
if self.interface:
self.interface.CloseSecurityCreate()
def CloseSecurityDialog(self):
if self.interface:
self.interface.CloseSecurityDialog()
if app.ENABLE_SASH_SYSTEM:
def ActSash(self, iAct, bWindow):
if self.interface:
self.interface.ActSash(iAct, bWindow)
def AlertSash(self, bWindow):
snd.PlaySound("sound/ui/make_soket.wav")
if bWindow:
self.PopupMessage(localeInfo.SASH_DEL_SERVEITEM)
else:
self.PopupMessage(localeInfo.SASH_DEL_ABSORDITEM)
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
def OpenWhisperSystem(self):
if not chr.IsGameMaster(player.GetMainCharacterIndex()):
return
if self.adminWhisperManager.IsShow():
self.adminWhisperManager.Hide()
else:
self.adminWhisperManager.Show()
if constInfo.DUNGEON_LIST_TIME:
def OpenTimerWindow(self):
self.interface.OpenTimerWindow()
def SetQuestTimer(self, index, time):
self.interface.SetQuestTimer(int(index), int(time))
def __RefreshDungStatus(self):
self.interface.refreshDungeonStatus()
def GameMasterPanel(self):
import uigamemasterpanel
if chr.IsGameMaster(player.GetMainCharacterIndex()):
self.GMPaneL = uigamemasterpanel.GMPaneL()
self.GMPaneL.Show()
def __OpenChequeTicket(self, itemPos):
self.interface.OpenChequeTicket(int(itemPos))
def OpenChequeToGoldTicket(self):
self.interface.OpenChequeToGoldTicket()
def OpenGoldToChequeTicket(self):
self.interface.OpenGoldToChequeTicket()
def __OpenGaya1Ticket(self, itemPos):
self.interface.OpenGaya1Ticket(int(itemPos))
def __OpenGaya2Ticket(self, itemPos):
self.interface.OpenGaya2Ticket(int(itemPos))
def guvenlipcquestislem(self):
net.SendQuestInputStringPacket(str(constInfo.guvenlipcislem))
def guvenlipc_q(self, qid):
constInfo.guvenlipc_q = int(qid)
def guvenlipc_button(self,qid):
constInfo.LOAD_GUVENLI_PC_BUTTON = int(qid)
def guvenlipc(self):
net.SendQuestInputStringPacket(str(player.GetMacAddress()))
def OpenTicaretLog(self):
self.Board = ui.BoardWithTitleBar()
self.Board.SetSize(241+30+215, 271+40+40-17-17)
self.Board.SetCenterPosition()
self.Board.AddFlag('movable')
self.Board.AddFlag('float')
self.Board.SetTitleName('Ticaret Kayitlarin')
self.Board.SetCloseEvent(self.Kapat)
self.Board.Show()
self.Bekle3 = app.GetTime()
self.TekliflerText = ui.TextLine_Alisveris()
self.TekliflerText.SetParent(self.Board)
self.TekliflerText.SetPosition(0, 30)
self.TekliflerText.SetText(str(player.GetName()))
self.TekliflerText.SetWindowHorizontalAlignCenter()
self.TekliflerText.SetHorizontalAlignCenter()
self.TekliflerText.Show()
self.ThinBoard = ui.ThinBoard()
self.ThinBoard.SetParent(self.Board)
self.ThinBoard.SetSize(241-18+26+215, 250)
self.ThinBoard.SetPosition(10+9-5-3, 48)
self.ThinBoard.Show()
self.ListBox=ui.ListBox_Scroll()
self.ListBox.SetParent(self.Board)
self.ListBox.SetPosition(10+9, 50)
self.ListBox.SetSize(241-18+26-8+215, 250)
self.ListBox.Show()
self.ListBox.ClearItem()
pos = 0
if os.path.exists(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg"):
ac = open(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "r").readlines()
for i in ac:
bol = i.split("#")
self.ListBox.InsertItem(pos, str(bol[1]) + " adli oyuncu ile (" + str(bol[2]) + ") tarihinde ticaret gerceklesti.")
pos += 1
else:
self.ListBox.InsertItem(0, "Yapilan hic ticaret kaydi yok.")
def Kapat(self):
self.Board.Hide()
self.TekliflerText.Hide()
self.ThinBoard.Hide()
self.ListBox.Hide()
self.Ticaret = 0
def __pazar_log_ac(self):
if self.interface:
self.interface.PlayerLogButton()
self.interface.OpenOGStudioRanking2("Pazar Geçmişi")
constInfo.ogstudioislem = "pazarac"
event.QuestButtonClick(constInfo.pazar_log_q_id)
def __pazar_log_q_id(self, id):
constInfo.pazar_log_q_id = int(id)
def __pazar_log_q(self, id):
constInfo.pazar_log_q = int(id)
def __item_fiyat(self):
fiyat = constInfo.item_fiyat
net.SendQuestInputStringPacket(fiyat)
def __item_isim(self):
isim = constInfo.item_isim
net.SendQuestInputStringPacket(isim)
def __itemi_alan(self):
alanname = constInfo.itemi_alan
net.SendQuestInputStringPacket(alanname)
def __tic_quest_id(self, id):
constInfo.tic_gecmis = int(id)
def __tic_gecmis_ac(self):
if self.interface:
self.interface.PlayerLogButton()
self.interface.OpenOGStudioRanking("Ticaret Geçmişi")
constInfo.ogstudioislem = "ticaretac"
event.QuestButtonClick(constInfo.tic_gecmis)
def AddOGStudioRanking(self, data):
if self.interface:
line = int(data.split("#")[1])
name = str(data.split("#")[2])
othername = str(data.split("#")[3])
dates = str(data.split("#")[4])
self.interface.AddOGStudioRanking(line, name, othername, dates)
def AddOGStudioRanking2(self, data):
if self.interface:
no = int(data.split("#")[1])
alanname = str(data.split("#")[2])
vnum = int(data.split("#")[3])
fiyat = int(data.split("#")[4])
won = int(data.split("#")[5])
tarih = str(data.split("#")[6])
self.interface.AddOGStudioRanking2(no, alanname, vnum, fiyat, won, tarih)
def ogstudioquestislem(self):
net.SendQuestInputStringPacket(str(constInfo.ogstudioislem))
def bkac(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.ITEM_REMOVE_WINDOW_STATUS == 1:
return
self.bkoku.Show()
def ruhcac(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.ITEM_REMOVE_WINDOW_STATUS == 1:
return
self.ruhtasi.Show()
def biyoodulac(self, gorev, af1, afv1, af2, afv2, af3, afv3):
self.biyoekran.Show()
self.biyoekran.SetBaslik(str(gorev))
self.biyoekran.SetOdul(af1,afv1,af2,afv2,af3,afv3)
def biyologekrankapa(self):
self.biyoekran.Close()
def OpenBiologWindow(self):
self.biowindow.Show()
def biyolog(self, bioitem, verilen, toplam, kalansure):
self.interface.SetBiyolog(bioitem, verilen, toplam, kalansure)
def guildrankingopen(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.guildranking.Open()
def __guildranking(self, info):
CMD = info.split("/")
if CMD[0]=="index":
constInfo.guildranking["index"] = int(CMD[1])
elif CMD[0]=="input":
net.SendQuestInputStringPacket(str(constInfo.guildranking["CMD"]))
elif CMD[0]=="yeniliste":
constInfo.guildranking["Liste"] = []
elif CMD[0]=="liste":
constInfo.guildranking["Liste"].append(CMD[1].split("|"))
elif CMD[0]=="blok":
self.guildranking.LoadPage(CMD[1])
elif CMD[0]=="sayfa":
self.guildranking.Setsayfa(CMD[1])
def uyariloncasira(self, msg):
if msg == "bilgiyok":
self.PopupMessage("Henüz bilgi girilmemis!")
elif msg == "loncayok":
self.PopupMessage("Lonca bulunamadi!")
elif msg == "oyuncuyok":
self.PopupMessage("Oyuncu bulunamadi!")
elif msg == "kapaliyiz":
self.PopupMessage("Sistem şuan bakımdadır!")
def BossTracking(self):
import constInfo
constInfo.BOSS_TRACKING = 1
if app.ENABLE_BOSS_TRACKING:
def OpenBossTracking(self):
self.bosstracking.Open()
def CloseBossTracking(self):
self.bosstracking.__OnClose()
def BINARY_BOSS_TRACKING(self, kill_time, start_time, channel, mob_vnum, map_index):
self.bosstracking.SetData(kill_time, start_time, channel, mob_vnum, map_index)
else:
def GetBossTrackingInformation(self, btcadi1, btcadi2, btcadi3, btcadi4, btcadi5, btcadi6, btalevkral1, btalevkral2, btalevkral3, btalevkral4, btalevkral5, btalevkral6, btkorumcek1, btkorumcek2, btkorumcek3, btkorumcek4, btkorumcek5, btkorumcek6, btsarikaplan1, btsarikaplan2, btsarikaplan3, btsarikaplan4, btsarikaplan5, btsarikaplan6, btbuzkralice1, btbuzkralice2, btbuzkralice3, btbuzkralice4, btbuzkralice5, btbuzkralice6, btdokuzk1, btdokuzk2, btdokuzk3, btdokuzk4, btdokuzk5, btdokuzk6, btcolejder1, btcolejder2, btcolejder3, btcolejder4, btcolejder5, btcolejder6, btagac1, btagac2, btagac3, btagac4, btagac5, btagac6, btkomutan1, btkomutan2, btkomutan3, btkomutan4, btkomutan5, btkomutan6, btkaranlik1, btkaranlik2, btkaranlik3, btkaranlik4, btkaranlik5, btkaranlik6):
self.bosstracking.GetMobInformation(btcadi1, btcadi2, btcadi3, btcadi4, btcadi5, btcadi6, btalevkral1, btalevkral2, btalevkral3, btalevkral4, btalevkral5, btalevkral6, btkorumcek1, btkorumcek2, btkorumcek3, btkorumcek4, btkorumcek5, btkorumcek6, btsarikaplan1, btsarikaplan2, btsarikaplan3, btsarikaplan4, btsarikaplan5, btsarikaplan6, btbuzkralice1, btbuzkralice2, btbuzkralice3, btbuzkralice4, btbuzkralice5, btbuzkralice6, btdokuzk1, btdokuzk2, btdokuzk3, btdokuzk4, btdokuzk5, btdokuzk6, btcolejder1, btcolejder2, btcolejder3, btcolejder4, btcolejder5, btcolejder6, btagac1, btagac2, btagac3, btagac4, btagac5, btagac6, btkomutan1, btkomutan2, btkomutan3, btkomutan4, btkomutan5, btkomutan6, btkaranlik1, btkaranlik2, btkaranlik3, btkaranlik4, btkaranlik5, btkaranlik6)
def BossTrackingUpdate(self):
net.SendChatPacket("/bosstrackingtest")
def BossTrackingSystemShow(self):
self.bosstracking.Show()
net.SendChatPacket("/bosstrackingtest")
if app.ENABLE_AURA_SYSTEM:
def AuraPanelGelistirAc(self):
self.interface.AuraGelistir()
def AuraPanelEmdirAc(self):
self.interface.AuraEmdir()
if constInfo.ENABLE_DUNGEON_TIMER:
def RefreshDungeonTimer(self, Floor,Time):
if self.interface:
if self.interface.wndMiniMap:
self.interface.wndMiniMap.Hide()
if self.interface.wndDungeonTimer:
self.interface.wndDungeonTimer.RefreshDungeonTimer(Time, Floor)
def RefreshDungeonFloor(self, Floor2):
if self.interface:
if self.interface.wndMiniMap:
self.interface.wndMiniMap.Hide()
if self.interface.wndDungeonTimer:
self.interface.wndDungeonTimer.RefreshDungeonFloor(Floor2)
def captchaekran(self, sayi1, sayi2, sayi3, sayi4, sayi5):
captchatest = uiCommon.CaptchaEkran()
captchatest.SetText1("|cffffff00Bot Engel Sistemi")
captchatest.SetText3("Oyuna devam edebilmek için üstteki kodu aşağıya yaz.")
captchatest.SetTimeOverMsg("Soruyu zamanında cevaplamadığın için oyundan atılıyorsun.")
captchatest.SetTimeOverEvent(self.captchacevap, "kapat")
captchatest.SetAcceptEvent(lambda arg=True: self.captchacevap(arg))
captchatest.SetCancelEvent(lambda arg=False: self.captchacevap(arg))
captchatest.Open(15, sayi1, sayi2, sayi3, sayi4, sayi5)
self.captchatest = captchatest
def captchacevap(self, answer):
if not self.captchatest:
return
text = self.captchatest.GetInput()
capchtext = 0
if text and text.isdigit():
try:
capchtext = int(text)
except ValueError:
capchtext = 5
if answer == False:
self.captchatest.Temizle()
elif answer == True:
net.SendChatPacket("/captcha " + str(capchtext))
self.captchatest.Close()
self.captchatest = None
else:
net.SendChatPacket("/captcha 0")
self.captchatest.Close()
self.captchatest = None
def kilit(self):
item_sil_idd = str(constInfo.kilit_id)
net.SendQuestInputStringPacket(item_sil_idd)
def item_kilit_q(self, qid):
constInfo.ITEM_KILIT = int(qid)
def __Chest_Search(self,vnums,counts):
self.interface.ItemsChest(vnums,counts)
def __Chest_Search_Refresh(self):
self.interface.ItemsChestRefresh()
def __Chest_Search_Refresh_Open(self):
self.interface.ItemsChestRefreshOpen()
def __ChestShow(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.CofresShow()
def __SearchShop(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uisearchshop
self.shopsearch = uisearchshop.SearchWindow()
self.shopsearch.Open()
def __AutoHuntShow(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.OpenAutohuntWindow()
def ClickEfektButton(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiefekt
self.efektsystemxd = uiefekt.Efekt()
self.efektsystemxd.Show()
def IsinlanmaTahtasi(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiisinlanma
self.isinlanmaxdd = uiisinlanma.Isinlanma()
self.isinlanmaxdd.Show()
def OpenMarbleShop(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.wndMarbleShop.IsShow():
self.wndMarbleShop.Hide()
else:
self.wndMarbleShop.Show()
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
def __OfflineShop_Open(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.OpenOfflineShopInputNameDialog()
def __OfflineShop_OpenGui(self):
if sistemler.IKARUS_AKTIF:
gameInfo.SYSTEMS_PAKET11=1
else:
self.interface.ToggleOfflineShopAdminPanelWindow()
def BINARY_OfflineShop_Appear(self, vid, text):
if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC):
self.interface.AppearOfflineShop(vid, text)
def BINARY_OfflineShop_Disappear(self, vid):
if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC):
self.interface.DisappearOfflineShop(vid)
def PriceCheckerOpen(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.PRICE_CHECKER == 0:
self.average_price.Show()
constInfo.PRICE_CHECKER = 1
else:
self.average_price.Close()
constInfo.PRICE_CHECKER = 0
def PCheckValue(self, value1, value2):
self.average_price.SetData(value1,value2)
def PiyasaKontrolUyarisi(self, esyaadi, esyafiyati):
esyaadiNew = str(esyaadi).replace("_", " ")
self.PopupMessage("%s eşyasını en az %s karşılığında satabilirsiniz." % (esyaadiNew, str(localeInfo.NumberToGoldString(esyafiyati))))
def __OpenDecoration(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.OpenOfflineShopDecoration()
def StartDice(self):
self.interface.StartDice()
def EndDice(self):
self.interface.EndDice()
def RefreshDice(self):
self.interface.RefreshDice()
def __DiceHasDone(self, myNumber, targetNumber):
self.interface.AddDiceNumber(myNumber, targetNumber)
def efsunbotu_stop1(self):
constInfo.botstop_ef1 = 1
def efsunbotu_stop2(self):
constInfo.botstop_ef2 = 1
def checkitem(self, it):
translate.checkitem = int(it)
def x019x1(self, pin):
chat.AppendChat(1, "%d" % (int(pin)))
def Uzaktan_ticaret_soru(self, isim, level):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
uzaktan_sorusu = uiCommon.QuestionDialog()
uzaktan_sorusu.SetText("|cffFDD017|H|h" + str(isim)+ "|cff00ccff" + "(Lv."+str(level)+")"+ "|h|r" + " Seninle uzaktan ticaret yapmak istiyor.")
uzaktan_sorusu.SetAcceptEvent(lambda arg=TRUE: self.ticaret_kabul(isim))
uzaktan_sorusu.SetCancelEvent(lambda arg=FALSE: self.ticaret_hayir(isim))
uzaktan_sorusu.Open()
self.uzaktan_sorusu = uzaktan_sorusu
return
def ticaret_kabul(self, isim):
net.SendChatPacket("/uzaktan_ticaret_kabul " + str(isim))
self.uzaktan_sorusu.Close()
def ticaret_hayir(self, isim):
net.SendChatPacket("/uzaktan_ticaret_hayir " + str(isim))
self.uzaktan_sorusu.Close()
def ticaretbilgi(self,karsiname,karsilevel,karsitarafrace):
import constInfo
constInfo.tictitle = karsiname
constInfo.ticlevel = int(karsilevel)
constInfo.ticsinif = int(karsitarafrace)
def ticarettype(self,yazitext):
import constInfo
constInfo.ticaretbaslik = str(yazitext)
def __BKTradeSys(self, arg1, arg2):
if str(arg1) == "qid":
constInfo.BK_TRADE_SYSTEM["qid"] = arg2
if str(arg1) == "get":
net.SendQuestInputStringPacket(str(constInfo.BK_TRADE_SYSTEM["ItemList"]))
if str(arg1) == "open":
self.BKTradeSys.OpenWindow()
if str(arg1) == "block":
constInfo.INPUT_IGNORE = 1
if str(arg1) == "break":
constInfo.INPUT_IGNORE = 0
def get_skills(self,job):
if constInfo.SKILL_SELECT_POINTER == 1:
return
import select_warriorskills
import select_assassinskills
import select_suraskills
import select_shamanskills
self.black = None
if int(job) == 0 or int(job) == 4:
self.black = select_warriorskills.MainWindow()
self.black.OpenWindow()
elif int(job) == 1 or int(job) == 5:
self.black = select_assassinskills.MainWindow()
self.black.OpenWindow()
elif int(job) == 2 or int(job) == 6:
self.black = select_suraskills.MainWindow()
self.black.OpenWindow()
elif int(job) == 3 or int(job) == 7:
self.black = select_shamanskills.MainWindow()
self.black.OpenWindow()
def CloseSkill(self):
self.skillQuestionDialog.Hide()
self.skillQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def RequestJob(self, answer):
if not self.skillQuestionDialog:
return
if answer:
net.SendChatPacket("/skill_select 1")
else:
net.SendChatPacket("/skill_select 2")
chat.AppendChat(chat.CHAT_TYPE_INFO, "Skill grubu secildi.")
self.skillQuestionDialog.Close()
self.skillQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def __SetAllPlayersVisible(self):
chrmgr.ShowAllPlayers()
def __ClearPlayersTitle(self):
chrmgr.RemoveAllPlayersTitle()
def bonusgormekistiyor(self,isim,level):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiCommon
import constInfo
questionDialogbonus=uiCommon.QuestionDialog()
questionDialogbonus.SetText(str(isim)+"(Lv."+str(level)+")"+" bonuslarini gormek istiyor. Izin veriyor musun?")
questionDialogbonus.SetAcceptEvent(lambda arg=TRUE: self.bonusgormeevet(isim))
questionDialogbonus.SetCancelEvent(lambda arg=FALSE: self.bonusgormehayir(isim))
questionDialogbonus.Open()
self.questionDialogbonus=questionDialogbonus
return
def bonusgormeevet(self,isim):
net.SendChatPacket("/bonusumu_gorebilirsin " + str(isim))
self.questionDialogbonus.Close()
def bonusgormehayir(self,isim):
net.SendChatPacket("/bonusumu_goremezsin " + str(isim))
self.questionDialogbonus.Close()
def bonuslarimigor(self,name,deliciefsun,kritikefsun,yariinsanefsun,kilicsavunmasiefsun,ciftelsavunmasiefsun,bicaksavunmasiefsun,yelpazesavunmasiefsun,cansavunmasiefsun,oksavunmasiefsun,buyusavunmasiefsun):
import chat
import constInfo
constInfo.efsungorname = "Bonuslar"
constInfo.kritik = 0
constInfo.delici = 0
constInfo.yariinsan = 0
constInfo.kilic = 0
constInfo.ciftel = 0
constInfo.bicak = 0
constInfo.ok = 0
constInfo.yelpaze = 0
constInfo.can = 0
constInfo.buyu = 0
constInfo.efsungorname = str(name)
constInfo.kritik = int(kritikefsun)
constInfo.delici = int(deliciefsun)
constInfo.yariinsan = int(yariinsanefsun)
constInfo.kilic = int(kilicsavunmasiefsun)
constInfo.ciftel = int(ciftelsavunmasiefsun)
constInfo.bicak = int(bicaksavunmasiefsun)
constInfo.ok = int(oksavunmasiefsun)
constInfo.yelpaze = int(yelpazesavunmasiefsun)
constInfo.can = int(cansavunmasiefsun)
constInfo.buyu = int(buyusavunmasiefsun)
import uiefsungor
self.efsungor = uiefsungor.EfsunGor()
self.efsungor.Show()
def DungeonInfo(self, questindex):
constInfo.dungeonData["quest_index"] = questindex
def CleanDungeonInfo(self):
constInfo.dungeonInfo = []
def GetDungeonInfo(self, cmd):
cmd = cmd.split("#")
if cmd[0] == "INPUT":
constInfo.INPUT_IGNORE = int(cmd[1])
elif cmd[0] == "CMD":
net.SendQuestInputStringPacket(constInfo.dungeonData["quest_cmd"])
constInfo.dungeonData["quest_cmd"] = ""
else:
pass
def UpdateDungeonInfo(self, type, organization, levelLimit, levelLimitMax, partyMembers, mapName, mapIndex, mapCoordX, mapCoordY, cooldown, duration, entranceMapName, strengthBonusName, itemVnum, npcVnum, repTime):
type = int(type)
organization = int(organization)
levelLimit = int(levelLimit)
levelLimitMax = int(levelLimitMax)
partyMembers = int(partyMembers)
mapName = str(mapName).replace("_", " ")
mapIndex = int(mapIndex)
mapCoordX = int(mapCoordX)
mapCoordY = int(mapCoordY)
cooldown = int(cooldown)
duration = int(duration)
entranceMapName = str(entranceMapName).replace("_", " ")
strengthBonusName = str(strengthBonusName).replace("_", " ")
itemVnum = int(itemVnum)
npcVnum = int(npcVnum)
repTime = int(repTime)
constInfo.dungeonInfo.append(\
{
"type" : type,\
"organization" : organization,\
"level_limit" : levelLimit,\
"max_level" : levelLimitMax,\
"party_members" : partyMembers,\
"map" : mapName,\
"map_index" : mapIndex,\
"map_coord_x" : mapCoordX,\
"map_coord_y" : mapCoordY,\
"cooldown" : cooldown,\
"duration" : duration,\
"entrance_map" : entranceMapName,\
"strength_bonus" : strengthBonusName,\
"item_vnum" : itemVnum,\
"npc_vnum" : npcVnum,
"rep_time" : repTime,
},
)
def IsBloodDungeonSystemWindow(self):
if str(background.GetCurrentMapName()) == "zency_ronark" and not self.blood_dungeon.IsShow():
self.blood_dungeon.Show()
def QuestClickByName(self, qname):
event.QuestClickByName(qname)
def __RefreshCoins(self):
self.interface.RefreshCoins()
def __ItemSatVEYASil(self):
self.interface.OpenOGSItemRemoveWindow()
def savas_list_yenile(self):
constInfo.savas_list = []
def savas_listtesi(self, loncam, rakip, tarih, id):
constInfo.savas_list.append("#"+loncam+"#"+rakip+"#"+tarih+"#"+id)
def __GuildWar_ProcessKillInput(self, killerName, killerRace, victimName, victimRace):
self.guildScoreCounter.OnMessage(killerName, killerRace, victimName, victimRace)
def recordac(self):
self.recordscreen.Open()
def __recordscreen(self, info):
CMD = info.split("/")
if CMD[0]=="index":
constInfo.record["index"] = int(CMD[1])
elif CMD[0]=="input":
net.SendQuestInputStringPacket(str(constInfo.record["CMD"]))
elif CMD[0]=="yeniliste":
constInfo.record["Liste"] = []
elif CMD[0]=="liste":
constInfo.record["Liste"].append(CMD[1].split("|"))
elif CMD[0]=="blok":
self.recordscreen.LoadPage(CMD[1])
elif CMD[0]=="sayfa":
self.recordscreen.Setsayfa(CMD[1])
def recordwarning(self, msg):
if msg == "bilgiyok":
self.PopupMessage("Bilgi yok!")
elif msg == "oyuncuyok":
self.PopupMessage("Oyuncu bulunamadi")
def __BotControlActive(self, a):
constInfo.BOT_PIN_X = int(a)
botControl.OpenWindow()
def __BotControlDeactive(self):
constInfo.BOT_PIN_X = 0
botControl.Board.Hide()
def ShowCaptcha(self, timeLeft):
self.interface.ShowCaptcha(int(timeLeft))
def OpenLevelGuide(self):
karakter_seviyesi = player.GetStatus(player.LEVEL)
if 0 <= karakter_seviyesi and karakter_seviyesi <= 119:
import uilevelguide
self.levelGuide.Hide()
self.levelGuide = uilevelguide.Window()
self.levelGuide.Show()
elif 120 <= karakter_seviyesi:
import uilevelguide
self.levelGuide.Hide()
self.levelGuide = uilevelguide.Window()
#MR TaskbarButon
def __hediye_button(self, hediye):
constInfo.LOAD_QUEST_HEDIYE_BUTTON = int(hediye)
#MR TaskbarButon
def VectorsSwitchbot(self):
if self.switchbot.Vectors_bot_shown == 1:
self.switchbot.Hide()
else:
self.switchbot.Show()
[/CODE]#MR#MR
game.py içeriğim şu şekilde
[CODE title="Game.py"]import os
import app
import dbg
import grp
import item
import background
import chr
import chrmgr
import player
import snd
import chat
import textTail
import snd
import net
import effect
import wndMgr
import fly
import systemSetting
import quest
import guild
import skill
import messenger
import localeInfo
import constInfo
import exchange
import ime
import ui
import uiCommon
import uiPhaseCurtain
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import event
import gameInfo
import sistemler
import translate
import uiimp
import uipvprequest
import uiWordGameSystem
import uiakiraevent
import uiAkiraEvent
import uiAkiraMenu
import equip_watch
import screenshotdialog
import uibkoku
import uiruhtasi
import uibiyolog
import uiguildranking
import BKTrade
import ayarlar
import uiTip
import uimarbleshop
import uipricechecker
import uiaverage_price
import uiblood_dungeon
import uibiowindow
import uilevelguide
import guildwarkillcounter
import uiItemShopInfo
import record
import oyunicisiralama
import loncasiralama
# PRIVATE_SHOP_PRICE_LIST
import uiPrivateShopBuilder
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
import uiOfflineShopBuilder
import uiOfflineShop
# END_OF_PRIVATE_SHOP_PRICE_LIST
import mouseModule
import consoleModule
import playerSettingModule
import interfaceModule
import musicInfo
import debugInfo
import stringCommander
import time
import serverInfo
botControl = None
from bot_control import BotControl
if constInfo.ENABLE_SVSIDE_CAPTCHA:
svsidedia = None
svsidedi_cp = ""
from svsideoi import SvsideDialog
import binascii
if app.ENABLE_SUPPORT_SHAMAN:
import uisamanyardimcisi
if app.ENABLE_NEW_PET_SYSTEM:
import uipetsystem
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
import uiwhisperadmin
if app.ENABLE_BOSS_TRACKING:
import uibosstracking
else:
import uibosstracking_eski
if app.__ENABLE_NEW_OFFLINESHOP__:
import uiofflineshopikarus
import offlineshop
from _weakref import proxy
from switchbot import Bot
from ui_wrapper import _ui
# SCREENSHOT_CWDSAVE
SCREENSHOT_CWDSAVE = TRUE
SCREENSHOT_DIR = None
cameraDistance = 1550.0
cameraPitch = 27.0
cameraRotation = 0.0
cameraHeight = 100.0
testAlignment = 0
class Component:
def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
button = ui.Button()
if parent != None:
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(UpVisual)
button.SetOverVisual(OverVisual)
button.SetDownVisual(DownVisual)
button.SetText(buttonName)
button.SetToolTipText(tooltipText)
button.Show()
button.SetEvent(func)
return button
def ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual):
button = ui.ToggleButton()
if parent != None:
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(UpVisual)
button.SetOverVisual(OverVisual)
button.SetDownVisual(DownVisual)
button.SetText(buttonName)
button.SetToolTipText(tooltipText)
button.Show()
button.SetToggleUpEvent(funcUp)
button.SetToggleDownEvent(funcDown)
return button
def EditLine(self, parent, editlineText, x, y, width, heigh, max):
SlotBar = ui.SlotBar()
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetSize(width, heigh)
SlotBar.SetPosition(x, y)
SlotBar.Show()
Value = ui.EditLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(1, 1)
Value.SetMax(max)
Value.SetLimitWidth(width)
Value.SetMultiLine()
Value.SetText(editlineText)
Value.Show()
return SlotBar, Value
def EditLine2(self, parent, editlineText, x, y, width, heigh, max):
SlotBar = ui.SlotBar()
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetSize(width, heigh)
SlotBar.SetPosition(x, y)
SlotBar.Show()
Value = ui.EditLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(2, 2)
Value.SetMax(210)
Value.SetLimitWidth(width)
Value.SetMultiLine()
Value.SetText(editlineText)
Value.Show()
return SlotBar, Value
def TextLine(self, parent, textlineText, x, y, color):
textline = ui.TextLine()
if parent != None:
textline.SetParent(parent)
textline.SetPosition(x, y)
if color != None:
textline.SetFontColor(color[0], color[1], color[2])
textline.SetText(textlineText)
textline.Show()
return textline
def RGB(self, r, g, b):
return (r*255, g*255, b*255)
def SliderBar(self, parent, sliderPos, func, x, y):
Slider = ui.SliderBar()
if parent != None:
Slider.SetParent(parent)
Slider.SetPosition(x, y)
Slider.SetSliderPos(sliderPos / 100)
Slider.Show()
Slider.SetEvent(func)
return Slider
def ExpandedImage(self, parent, x, y, img):
image = ui.ExpandedImageBox()
if parent != None:
image.SetParent(parent)
image.SetPosition(x, y)
image.LoadImage(img)
image.Show()
return image
def ComboBox(self, parent, text, x, y, width):
combo = ui.ComboBox()
if parent != None:
combo.SetParent(parent)
combo.SetPosition(x, y)
combo.SetSize(width, 15)
combo.SetCurrentItem(text)
combo.Show()
return combo
def ThinBoard(self, parent, moveable, x, y, width, heigh, center):
thin = ui.ThinBoard()
if parent != None:
thin.SetParent(parent)
if moveable == TRUE:
thin.AddFlag('movable')
thin.AddFlag('float')
thin.SetSize(width, heigh)
thin.SetPosition(x, y)
if center == TRUE:
thin.SetCenterPosition()
thin.Show()
return thin
def Gauge(self, parent, width, color, x, y):
gauge = ui.Gauge()
if parent != None:
gauge.SetParent(parent)
gauge.SetPosition(x, y)
gauge.MakeGauge(width, color)
gauge.Show()
return gauge
def ListBoxEx(self, parent, x, y, width, heigh):
bar = ui.Bar()
if parent != None:
bar.SetParent(parent)
bar.SetPosition(x, y)
bar.SetSize(width, heigh)
bar.SetColor(0x77000000)
bar.Show()
ListBox=ui.ListBoxEx()
ListBox.SetParent(bar)
ListBox.SetPosition(0, 0)
ListBox.SetSize(width, heigh)
ListBox.Show()
scroll = ui.ScrollBar()
scroll.SetParent(ListBox)
scroll.SetPosition(width-15, 0)
scroll.SetScrollBarSize(heigh)
scroll.Show()
ListBox.SetScrollBar(scroll)
return bar, ListBox
class GameWindow(ui.ScriptWindow):
GuildRankingTime = 0
AutoHuntRebornT = 0
def __init__(self, stream):
ui.ScriptWindow.__init__(self, "GAME")
self.SetWindowName("game")
net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
player.SetGameWindow(self)
self.onQuest = 0
self.startGameTime = 0
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
#if app.#ifBLE_NIGHT_MODE:
# background.SetGameWindow(self)
if constInfo.ENABLE_SVSIDE_CAPTCHA:
global svsidedia
if svsidedia == None:
svsidedia = SvsideDialog()
svsidedia.Board.Hide()
global botControl
if botControl == None:
botControl = BotControl()
botControl.Board.Hide()
self.quickSlotPageIndex = 0
self.lastPKModeSendedTime = 0
self.pressNumber = None
self.guildWarQuestionDialog = None
self.interface = None
self.targetBoard = None
self.console = None
self.mapNameShower = None
self.affectShower = None
self.playerGauge = None
self.PvPChallengeDialog = None
self.wndScreenDialog = None
self.biyoekran = None
#/* Random Title // RANDOMTITLE // 13.10.17 - 13:52 */
if constInfo.RANDOM_TITLE:
self.TitleTime = 0
self.stream=stream
self.interface = interfaceModule.Interface()
self.interface.MakeInterface()
self.interface.ShowDefaultWindows()
self.impekran = uiimp.impDialog()
self.wndMarbleShop = uimarbleshop.MarbleShopWindow()
self.pricechecker = uipricechecker.PriceCheckerWindow()
self.guildranking = uiguildranking.guildranking()
#self.wn#self.wnddailypasslypass.DailyPass()
self.akiraEventButton = uiakiraevent.AkiraEventButton()
self.akiraEventButton.LoadWindow()
self.akiraEventButton.Hide()
self.akiraLog = uiAkiraMenu.AkiraLog()
self.akiraLog.LoadWindow()
self.akiraLog.Hide()
self.curtain = uiPhaseCurtain.PhaseCurtain()
self.curtain.speed = 0.03
self.curtain.Hide()
self.targetBoard = uiTarget.TargetBoard()
self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
self.targetBoard.Hide()
self.console = consoleModule.ConsoleWindow()
self.console.BindGameClass(self)
self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
self.console.Hide()
self.mapNameShower = uiMapNameShower.MapNameShower()
self.affectShower = uiAffectShower.AffectShower()
self.playerGauge = uiPlayerGauge.PlayerGauge(self)
self.playerGauge.Hide()
self.wordgame = uiWordGameSystem.WordGameWindow()
self.wordgame.Close()
self.EquipModeGui = equip_watch.EquipGui()
self.EquipModeGui.Close()
self.bkoku = uibkoku.BKOku()
self.bkoku.Hide()
self.ruhtasi = uiruhtasi.RuhTasi()
self.ruhtasi.Hide()
self.biyoekran = uibiyolog.BiyologEkran()
self.biyoekran.Hide()
self.BKTradeSys = BKTrade.BKTrade()
self.BKTradeSys.Close()
self.average_price = uiaverage_price.AveragePrice()
self.average_price.Hide()
self.biowindow = uibiowindow.BiologWnd()
self.biowindow.Hide()
if app.ENABLE_BOSS_TRACKING:
self.bosstracking = uibosstracking.BossTrackingInfoWindow()
self.bosstracking.Hide()
else:
self.bosstracking = uibosstracking_eski.BossTrackingSystemWindow()
self.bosstracking.Hide()
self.blood_dungeon = uiblood_dungeon.BloodDungeonSystemWindow()
self.blood_dungeon.Hide()
self.levelGuide = uilevelguide.Window()
self.guildScoreCounter = guildwarkillcounter.MessageQueue()
self.recordscreen = record.recordwindow()
self.oyunicisiralama = oyunicisiralama.oyunicisirala()
self.loncasiralama = loncasiralama.loncasiralama()
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
self.adminWhisperManager = uiwhisperadmin.WhisperManager()
if app.ENABLE_SUPPORT_SHAMAN:
self.OGSaman = uisamanyardimcisi.SYardimcisiDialog()
if app.ENABLE_NEW_PET_SYSTEM:
self.petmain = uipetsystem.PetSystemMain()
if (app.ENABLE_PET_ATTR_DETERMINE):
self.petmain.SetItemToolTip(self.interface.tooltipItem)
self.petmain.BindInterface(self.interface)
self.petmini = uipetsystem.PetSystemMini()
if app.__ENABLE_NEW_OFFLINESHOP__:
offlineshop.HideShopNames()
self.Offlineshop = uiofflineshopikarus.NewOfflineShopBoard()
self.Offlineshop.Hide()
self.__SetQuickSlotMode()
self.__ServerCommand_Build()
self.__ProcessPreservedServerCommand()
self.switchbot = Bot()
self.switchbot.Hide()
#/* Lonca Kral Tagı // LONCAKRALTAG // 20.03.18 - 19:10 */
#if app.E#ifLE_GUILD_KRAL_TAG:
# self.endTime = 0
def __del__(self):
player.SetGameWindow(0)
net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
ui.ScriptWindow.__del__(self)
self.onQuest = 0
self.startGameTime = 0
def Open(self):
app.SetFrameSkip(1)
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
self.BoardMessage = uiTip.BigBoard()
self.quickSlotPageIndex = 0
self.PickingCharacterIndex = -1
self.PickingItemIndex = -1
self.consoleEnable = FALSE
self.isShowDebugInfo = FALSE
self.ShowNameFlag = FALSE
self.enableXMasBoom = FALSE
self.startTimeXMasBoom = 0.0
self.indexXMasBoom = 0
global cameraDistance, cameraPitch, cameraRotation, cameraHeight
app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
constInfo.SET_DEFAULT_CHRNAME_COLOR()
constInfo.SET_DEFAULT_FOG_LEVEL()
constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
# TWO_HANDED_WEAPON_ATTACK_SPEED_UP
constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
# END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
if constInfo.PVPMODE_TEST_ENABLE:
self.testPKMode = ui.TextLine()
self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
self.testPKMode.SetPosition(0, 15)
self.testPKMode.SetWindowHorizontalAlignCenter()
self.testPKMode.SetHorizontalAlignCenter()
self.testPKMode.SetFeather()
self.testPKMode.SetOutline()
self.testPKMode.Show()
self.testAlignment = ui.TextLine()
self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
self.testAlignment.SetPosition(0, 35)
self.testAlignment.SetWindowHorizontalAlignCenter()
self.testAlignment.SetHorizontalAlignCenter()
self.testAlignment.SetFeather()
self.testAlignment.SetOutline()
self.testAlignment.Show()
self.__BuildKeyDict()
self.__BuildDebugInfo()
# PRIVATE_SHOP_PRICE_LIST
uiPrivateShopBuilder.Clear()
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
uiOfflineShopBuilder.Clear()
# END_OF_PRIVATE_SHOP_PRICE_LIST
# UNKNOWN_UPDATE
exchange.InitTrading()
# END_OF_UNKNOWN_UPDATE
self.kill_gui = 0
self.kill_gui_board = ui.ThinBoard()
self.kill_gui_board.SetParent(self)
self.kill_gui_board.SetSize(255,90)
self.kill_gui_board.SetPosition(20, wndMgr.GetScreenHeight() - 200)
self.kill_gui_board.Hide()
self.kill_gui_board.x_counter = 450
self.red_img = ui.ExpandedImageBox()
self.red_img.SetParent(self.kill_gui_board)
self.red_img.LoadImage("system/kirmizi2.tga")
self.red_img.SetPosition(10, 10)
self.red_img.Show()
self.yellow_img = ui.ExpandedImageBox()
self.yellow_img.SetParent(self.kill_gui_board)
self.yellow_img.LoadImage("system/sari2.tga")
self.yellow_img.SetPosition(90, 10)
self.yellow_img.Show()
self.blue_img = ui.ExpandedImageBox()
self.blue_img.SetParent(self.kill_gui_board)
self.blue_img.LoadImage("system/mavi2.tga")
self.blue_img.SetPosition(170, 10)
self.blue_img.Show()
self.red_kill_count_text = ui.TextLine()
self.red_kill_count_text.SetParent(self.kill_gui_board)
self.red_kill_count_text.SetPosition(30,50)
self.red_kill_count_text.SetText("Skor : ")
self.red_kill_count_text.Show()
self.yellow_kill_count_text = ui.TextLine()
self.yellow_kill_count_text.SetParent(self.kill_gui_board)
self.yellow_kill_count_text.SetPosition(105,50)
self.yellow_kill_count_text.SetText("Skor : ")
self.yellow_kill_count_text.Show()
self.blue_kill_count_text = ui.TextLine()
self.blue_kill_count_text.SetParent(self.kill_gui_board)
self.blue_kill_count_text.SetPosition(180,50)
self.blue_kill_count_text.SetText("Skor : ")
self.blue_kill_count_text.Show()
self.red_kill_count_textt = ui.TextLine()
self.red_kill_count_textt.SetParent(self.kill_gui_board)
self.red_kill_count_textt.SetPosition(30,60)
self.red_kill_count_textt.SetText("Katılımcı : ")
self.red_kill_count_textt.Show()
self.yellow_kill_count_textt = ui.TextLine()
self.yellow_kill_count_textt.SetParent(self.kill_gui_board)
self.yellow_kill_count_textt.SetPosition(105,60)
self.yellow_kill_count_textt.SetText("Katılımcı : ")
self.yellow_kill_count_textt.Show()
self.blue_kill_count_textt = ui.TextLine()
self.blue_kill_count_textt.SetParent(self.kill_gui_board)
self.blue_kill_count_textt.SetPosition(180,60)
self.blue_kill_count_textt.SetText("Katılımcı : ")
self.blue_kill_count_textt.Show()
## Sound
s##.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
snd.SetSoundVolume(systemSetting.GetSoundVolume())
netFieldMusicFileName = net.GetFieldMusicFileName()
if netFieldMusicFileName:
snd.FadeInMusic("BGM/" + netFieldMusicFileName)
elif musicInfo.fieldMusic != "":
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
if app.ENABLE_NIGHT_MODE:
if systemSetting.IsEnableNightMode() or constInfo.DAY_MODE_NOW == "dark":
background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
background.SetEnvironmentData(1)
#/* Kar Yağdırma Sistemi // KARYAGDIRMASISTEM // 07.11.17 - 17:26 */
if app.ENABLE_SNOW_MODE:
if systemSetting.IsEnableSnowFall() or constInfo.SNOW_MODE_NOW:
background.EnableSnow(1)
#/* Otomatik Yang ve İtem Toplama // OTOMATIKYANGITEMTOPLAMA // 12.04.18 - 16:42 */
if 0 == constInfo.auto_pick_item:
self.PickUpItem()
if 0 == constInfo.auto_pick_yang:
self.PickUpMoney()
if app.ENABLE_FOG_FIX:
if systemSetting.IsFogMode():
background.SetEnvironmentFog(True)
else:
background.SetEnvironmentFog(False)
self.__SetQuickSlotMode()
self.__SelectQuickPage(self.quickSlotPageIndex)
self.SetFocus()
self.Show()
app.ShowCursor()
net.SendEnterGamePacket()
if app.WJ_SECURITY_SYSTEM:
if constInfo.open_security == 0:
net.SendChatPacket("/open_security ac")
# START_GAME_ERROR_EXIT
try:
self.StartGame()
except:
import exception
exception.Abort("GameWindow.Open")
# END_OF_START_GAME_ERROR_EXIT
# NPC°¡ Å¥ºê½Ã½ºÅÛÀ¸·Î ¸¸µé ¼ö ÀÖ´Â ¾ÆÀÌÅÛµéÀÇ ¸ñ·ÏÀ» ij½Ì
# ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
self.cubeInformation = {}
self.currentCubeNPC = 0
#ui.EnablePaste(True)
if app.ENABLE_DISCORD_RPC:
#ui.EnablePaste(TrueordInformations(0)
for i in xrange(10):
if systemSetting.IsDesertTexturesMode():
if background.GetCurrentMapName():
desert_maps = [
"metin2_map_a1",
"metin2_map_b1",
"metin2_map_c1"
]
desert_maps_textures = {
"metin2_map_a1" : "textureset\metin2_a1_desert.txt",
"metin2_map_b1" : "textureset\metin2_b1_desert.txt",
"metin2_map_c1" : "textureset\metin2_c1_desert.txt", }
if str(background.GetCurrentMapName()) in desert_maps:
background.TextureChange(desert_maps_textures[str(background.GetCurrentMapName())])
def Close(self):
self.Hide()
self.akiraEventButton.Hide()
self.akiraLog.Hide()
global cameraDistance, cameraPitch, cameraRotation, cameraHeight
(cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)
self.onPressKeyDict = None
self.onClickKeyDict = None
chat.Close()
snd.StopAllSound()
grp.InitScreenEffect()
chr.Destroy()
textTail.Clear()
quest.Clear()
background.Destroy()
guild.Destroy()
messenger.Destroy()
skill.ClearSkillData()
wndMgr.Unlock()
self.impekran.Close()
mouseModule.mouseController.DeattachObject()
if self.guildWarQuestionDialog:
self.guildWarQuestionDialog.Close()
self.guildNameBoard = None
self.partyRequestQuestionDialog = None
self.partyInviteQuestionDialog = None
self.guildInviteQuestionDialog = None
self.guildWarQuestionDialog = None
self.messengerAddFriendQuestion = None
#/* Uzaktan Ticaret Sistemi // UZAKTANTICARET // 10.02.18 */
if app.ENABLE_REMOTE_TRADING:
UzaktanTicaretRequestQuestionDialog = None
#/* Ajan Duyuru Sistemi // AJANDUYURUSISTEMI // 18.02.18 - 11:13 */
if app.ENABLE_AJAN_NOTICE:
warPlayerCheckQuestionDialog = None
# UNKNOWN_UPDATE
self.itemDropQuestionDialog = None
# END_OF_UNKNOWN_UPDATE
if self.guildranking.IsShow():
self.guildranking.Open()
if self.recordscreen.IsShow():
self.recordscreen.Open()
if self.oyunicisiralama.IsShow():
self.oyunicisiralama.Open()
if self.loncasiralama.IsShow():
self.loncasiralama.Open()
# QUEST_CONFIRM
self.confirmDialog = None
# END_OF_QUEST_CONFIRM
self.PrintCoord = None
self.FrameRate = None
self.Pitch = None
self.Splat = None
self.TextureNum = None
self.ObjectNum = None
self.ViewDistance = None
self.PrintMousePos = None
self.ClearDictionary()
if app.ENABLE_NEW_PET_SYSTEM:
self.petmain.Close()
self.petmini.Close()
self.playerGauge = None
self.mapNameShower = None
self.affectShower = None
self.PvPChallengeDialog = None
self.EquipModeGui = None
self.captchatest = None
self.levelGuide = None
if self.console:
self.console.BindGameClass(0)
self.console.Close()
self.console=None
if self.bkoku:
self.bkoku.Destroy()
self.bkoku = None
if self.ruhtasi:
self.ruhtasi.Destroy()
self.ruhtasi = None
if self.biyoekran:
self.biyoekran.Destroy()
self.biyoekran = None
if self.wordgame:
self.wordgame.Close()
self.wordgame = None
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
if self.adminWhisperManager:
self.adminWhisperManager.Hide()
if self.wndMarbleShop:
self.wndMarbleShop.Hide()
if self.average_price:
self.average_price.Destroy()
self.average_price = None
if self.pricechecker:
self.pricechecker.Close()
self.pricechecker = None
if self.biowindow:
self.biowindow.Destroy()
self.biowindow = None
if self.guildranking.IsShow():
self.guildranking.Open()
if self.recordscreen.IsShow():
self.recordscreen.Open()
if self.oyunicisiralama.IsShow():
self.oyunicisiralama.Open()
if self.loncasiralama.IsShow():
self.loncasiralama.Open()
if self.bosstracking:
self.bosstracking.Destroy()
self.bosstracking = None
if self.blood_dungeon:
self.blood_dungeon.Destroy()
self.blood_dungeon = None
if app.__ENABLE_NEW_OFFLINESHOP__:
if self.Offlineshop:
self.Offlineshop.Destroy()
self.Offlineshop = None
if app.ENABLE_SUPPORT_SHAMAN:
self.OGSaman.Close()
if self.levelGuide:
self.levelGuide.Close()
if self.targetBoard:
self.targetBoard.Destroy()
self.targetBoard = None
if self.interface:
self.interface.HideAllWindows()
self.interface.Close()
self.interface=None
player.ClearSkillDict()
player.ResetCameraRotation()
self.KillFocus()
app.HideCursor()
print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
def __BuildKeyDict(self):
onPressKeyDict = {}
##PressKey ´Â ´©¸£°í ÀÖ´Â µ¿¾È °è¼Ó Àû¿ëµÇ´Â ŰÀÌ´Ù.
##PressKeyÜÃàŰ Äü½½·Ô¿¡ ÀÌ¿ëµÈ´Ù.(ÀÌÈÄ ¼ıÀڵ鵵 Äü ½½·Ô¿ë ¿¹¾à)
## F12 ´Â Ŭ¶ó µğ¹ö±×¿ë ŰÀ̹Ƿ##¾²Áö ¾Ê´Â °Ô ÁÁ´Ù.
onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
onPressKeyDict[app.DIK_## = lambda : self.__PressNumKey(2)
onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
onPressKeyDict[app.DIK_F5] = lambda : self.interface.ToggleFastMenuButton()
#onPressKeyDict[app.DIK_F6]= lambda : self.VectorsSwitchbot()
onPressKeyDict[app.DIK_F6] = lambda : self.recordac()
onPressKeyDict[app.DIK_F7] = lambda : self.loncasir#onPressKeyDict #onPressKeyDict[app.DIK_F7] = lambda : self.IsinlanmaTahtasi()
#onPressKeyDict[app.DIK_F8] = lambda : self.OpenLevelGuide()
onPressKeyDict[app.DIK_F8] = lambda : se#onPressKeyDict()
onPressKeyDict[app.DIK_F11] = lambda : self.#onPressKeyDict()
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
onPressKeyDict[app.DIK_F12] = lambda : self.OpenWhisperSystem()
onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
#ij¸¯ÅÍ À̵¿Å°
onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_L#ij¸¯ÅÍ lambda : self.MoveLeft()
onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_G] = self.__PressGKey
onPressKeyDict[app.DIK_Q] = self.__PressQKey
onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItemVector()
onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItemVector()
onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
#onPressKeyDict[app.DIK_X] = lambda state = "BONUS": self.interface.ToggleCharacterWindow(state)
onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow#onPressKeyDictessKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole() # "`" key
onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
self.onPressKeyDict = onPressKeyDict
onClickKeyDict = {}
onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
if background.GetCurrentMapName() == "metin2_map_t3":
onPressKeyDict[app.DIK_TAB] = lambda : self.LoncaIstatistikOpen()
if app.ENABLE_SUPPORT_SHAMAN:
onClickKeyDict[app.DIK_O] = lambda: self.OpenYardimciGui()
if app.ENABLE_NEW_PET_SYSTEM and sistemler.PET_SISTEMI:
onClickKeyDict[app.DIK_P] = lambda: self.OpenPetMainGui()
if app.UK_ENABLE_SPECIAL_STORAGE and sistemler.K_ENVANTERI:
onPressKeyDict[app.DIK_K] = lambda : self.PressExtendedInventory()
if sistemler.SIMYA_SISTEMI:
onPressKeyDict[app.DIK_U] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
if app.__ENABLE_NEW_OFFLINESHOP__:
onPressKeyDict[app.DIK_Y] = lambda : self.__PressYKey()
self.onClickKeyDict=onClickKeyDict
def __PressNumKey(self,num):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if num >= 1 and num <= 9:
if(chrmgr.IsPossibleEmoticon(-1)):
chrmgr.SetEmoticon(-1,int(num)-1)
net.SendEmoticon(int(num)-1)
else:
if num >= 1 and num <= 4:
self.pressNumber(num-1)
def __ClickBKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
return
else:
if constInfo.PVPMODE_ACCELKEY_ENABLE:
self.ChangePKMode()
def __PressJKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if player.IsMountingHorse():
net.SendChatPacket("/unmount")
else:
#net.SendChatPacket("/user_horse_ride")
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if not uiPrivateShopBuilder.IsBuildingPrivateShop() or not uiOfflineShopBuilder.IsBuilding#net.SendChatPacket( for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
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):
net.SendItemUsePacket(i)
break
else:
if not uiPrivateShopBuilder.IsBuildingPrivateShop():
for i in xrange(player.INVENTORY_PAGE_SIZE * 4):
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):
net.SendItemUsePacket(i)
break
def __PressHKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_ride")
else:
self.interface.OpenHelpWindow()
def __PressBKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_back")
else:
state = "EMOTICON"
self.interface.ToggleCharacterWindow(state)
def __PressFKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/user_horse_feed")
else:
app.ZoomCamera(app.CAMERA_TO_POSITIVE)
def __PressGKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
net.SendChatPacket("/ride")
else:
if self.ShowNameFlag:
self.interface.ToggleGuildWindow()
else:
app.PitchCamera(app.CAMERA_TO_POSITIVE)
def __ReleaseGKey(self):
app.PitchCamera(app.CAMERA_STOP)
def __PressQKey(self):
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
if 0==interfaceModule.IsQBHide:
interfaceModule.IsQBHide = 1
self.interface.HideAllQuestButton()
else:
interfaceModule.IsQBHide = 0
self.interface.ShowAllQuestButton()
else:
app.RotateCamera(app.CAMERA_TO_NEGATIVE)
def __SetQuickSlotMode(self):
self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
def __SetQuickPageMode(self):
self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
def __PressQuickSlot(self, localSlotIndex):
if localeInfo.IsARABIC():
if 0 <= localSlotIndex and localSlotIndex < 4:
player.RequestUseLocalQuickSlot(3-localSlotIndex)
else:
player.RequestUseLocalQuickSlot(11-localSlotIndex)
else:
player.RequestUseLocalQuickSlot(localSlotIndex)
def __SelectQuickPage(self, pageIndex):
self.quickSlotPageIndex = pageIndex
player.SetQuickPage(pageIndex)
def ToggleDebugInfo(self):
self.isShowDebugInfo = not self.isShowDebugInfo
if self.isShowDebugInfo:
self.PrintCoord.Show()
self.FrameRate.Show()
self.Pitch.Show()
self.Splat.Show()
self.TextureNum.Show()
self.ObjectNum.Show()
self.ViewDistance.Show()
self.PrintMousePos.Show()
else:
self.PrintCoord.Hide()
self.FrameRate.Hide()
self.Pitch.Hide()
self.Splat.Hide()
self.TextureNum.Hide()
self.ObjectNum.Hide()
self.ViewDistance.Hide()
self.PrintMousePos.Hide()
def __BuildDebugInfo(self):
## Character Position Coordinate
self.PrintCoord = ui.TextLine()
self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0##
## Frame Rate
self.FrameRate = ui.TextLine()
self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
## Camera ##tch
self.Pitch = ui.TextLine()
self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
## Splat
sel##Splat = ui.TextLine()
self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
##
self.Pri##MousePos = ui.TextLine()
self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
# Texture##m
self.TextureNum = ui.TextLine()
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
# ¿ÀºêÁ§Æ® ±×¸®´Â °³¼ö
self.ObjectNum = ui.TextLine()
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
# ½Ã¾ß°Å¸®
self.ViewDistance = ui.TextLine()
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
self.ViewDistance.SetPosition(0, 0)
def __NotifyError(self, msg):
chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
def ChangePKMode(self):
if not app.IsPressed(app.DIK_LCONTROL):
return
if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
self.__NotifyError(localeInf
PTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))return
curTime = app.GetTime()
if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
return
self.lastPKModeSendedTime = curTime
curPKMode = player.GetPKMode()
nextPKMode = curPKMode + 1
if nextPKMode == player.PK_MODE_PROTECT:
if 0 == player.GetGuildID():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInf
PTION_PVPMODE_CANNOT_SET_GUILD_MODE)nextPKMode = 0
else:
nextPKMode = player.PK_MODE_GUILD
elif nextPKMode == player.PK_MODE_MAX_NUM:
nextPKMode = 0
net.SendChatPacket("/PKMode " + str(nextPKMode))
print "/PKMode " + str(nextPKMode)
def OnChangePKMode(self):
self.interface.OnChangePKMode()
try:
self.__NotifyError(localeInf
PTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])except KeyError:
print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
if constInfo.PVPMODE_TEST_ENABLE:
curPKMode = player.GetPKMode()
alignment, grade = chr.testGetPKData()
self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
###############################################################################################
###############################################################################################
## ### Game Callback Functions ##
###############################################################################################
###############################################################################################
# Start
def Sta##Game(###f):
self.RefreshInventory()
self.RefreshEquipment()
self.RefreshCharacter### self.RefreshSkill()
# Refresh
def CheckGameButton(self):
if self.interface:
self.interface.CheckGameButton()
def RefreshAlignment(self):
self.interface.RefreshAlignment()
def RefreshStatus(self):
self.CheckGameButton()
if self.interface:
self.interface.RefreshStatus()
if self.playerGauge:
self.playerGauge.RefreshGauge()
def RefreshStamina(self):
self.interface.RefreshStamina()
def RefreshSkill(self):
self.CheckGameButton()
if self.interface:
self.interface.RefreshSkill()
def RefreshMessenger(self):
self.interface.RefreshMessenger()
def RefreshGuildInfoPage(self):
self.interface.RefreshGuildInfoPage()
def RefreshGuildBoardPage(self):
self.interface.RefreshGuildBoardPage()
def RefreshGuildMemberPage(self):
self.interface.RefreshGuildMemberPage()
def RefreshGuildMemberPageGradeComboBox(self):
self.interface.RefreshGuildMemberPageGradeComboBox()
def RefreshGuildSkillPage(self):
self.interface.RefreshGuildSkillPage()
def RefreshGuildGradePage(self):
self.interface.RefreshGuildGradePage()
def RefreshMobile(self):
if self.interface:
self.interface.RefreshMobile()
def OnMobileAuthority(self):
self.interface.OnMobileAuthority()
def OnBlockMode(self, mode):
self.interface.OnBlockMode(mode)
def OpenQuestWindow(self, skin, idx):
if constInfo.AkiraMenu[0]:
return
if constInfo.CApiSetHide == 1:
net.SendQuestInputStringPacket(str(constInfo.SendString))
constInfo.CApiSetHide = 0
return
if constInfo.INPUT_IGNORE == 1:
return
if gameInfo.INPUT == 1:
return
if uiItemShopInfo.INPUT == 1:
return
self.interface.OpenQuestWindow(skin, idx)
def HideAllQuestWindow(self):
self.interface.HideAllQuestWindow()
def AskGuildName(self):
guildNameBoard = uiCommon.InputDialog()
guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
guildNameBoard.Open()
self.guildNameBoard = guildNameBoard
def ConfirmGuildName(self):
guildName = self.guildNameBoard.GetText()
if not guildName:
return
if net.IsInsultIn(guildName):
self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
return
net.SendAnswerMakeGuildPacket(guildName)
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
def CancelGuildName(self):
self.guildNameBoard.Close()
self.guildNameBoard = None
return TRUE
## Refine
def PopupMessage(self, msg):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, typ##0):
self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
def AppendMaterialToRefineDialog(self, vnum, count):
self.interface.AppendMaterialToRefineDialog(vnum, count)
if app.ENABLE_REFINE_RENEWAL:
def CheckRefineDialog(self, isFail):
self.dlgRefineNew.CheckRefine(isFail)
def RunUseSkillEvent(self, slotIndex, coolTime):
self.interface.OnUseSkill(slotIndex, coolTime)
def ClearAffects(self):
self.affectShower.ClearAffects()
def SetAffect(self, affect):
self.affectShower.SetAffect(affect)
def ResetAffect(self, affect):
self.affectShower.ResetAffect(affect)
def BINARY_BLOOD_DUNGEON(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15):
self.blood_dungeon.GetBloodDungeon(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15)
# UNKNOWN_UPDATE
def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
self.BINARY_DragonSoulGiveQuilification()
def BINARY_NEW_RemoveAffect(self, type, pointIdx):
self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulDeactivate()
# END_OF_UNKNOWN_UPDATE
def ActivateSkillSlot(self, slotIndex):
if self.interface:
self.interface.OnActivateSkill(slotIndex)
def DeactivateSkillSlot(self, slotIndex):
if self.interface:
self.interface.OnDeactivateSkill(slotIndex)
def RefreshEquipment(self):
if self.interface:
self.interface.RefreshInventory()
def RefreshInventory(self):
if self.interface:
self.interface.RefreshInventory()
def RefreshCharacter(self):
if self.interface:
self.interface.RefreshCharacter()
def OnGameOver(self):
self.CloseTargetBoard()
self.OpenRestartDialog()
def OpenRestartDialog(self):
self.interface.OpenRestartDialog()
def ChangeCurrentSkill(self, skillSlotNumber):
self.interface.OnChangeCurrentSkill(skillSlotNumber)
#/* Player Target Hp Sistemi // PLAYERTARGETHPSYSTEM // 18.10.17 - 15:12 */
if app.ENABLE_TARGET_HP:
def SetPCTargetBoard(self, vid, name, hpPercentage, actualHP, maxHP, bElement):
self.targetBoard.Open(vid, name, hpPercentage, actualHP, maxHP)
if systemSetting.IsHideElementInfo():
self.targetBoard.SetElementImage(bElement)
if app.IsPressed(app.DIK_LCONTROL):
if not player.IsSameEmpire(vid):
return
if player.IsMainCharacterIndex(vid):
return
elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
return
self.interface.OpenWhisperDialog(name)
else:
def SetPCTargetBoard(self, vid, name):
self.targetBoard.Open(vid, name)
if app.IsPressed(app.DIK_LCONTROL):
if not player.IsSameEmpire(vid):
return
if player.IsMainCharacterIndex(vid):
return
elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
return
self.interface.OpenWhisperDialog(name)
def RefreshTargetBoardByVID(self, vid):
self.targetBoard.RefreshByVID(vid)
def RefreshTargetBoardByName(self, name):
self.targetBoard.RefreshByName(name)
def __RefreshTargetBoard(self):
self.targetBoard.Refresh()
#/* Player Target Hp Sistemi // PLAYERTARGETHPSYSTEM // 18.10.17 - 15:12 */
if app.ENABLE_TARGET_HP and app.ENABLE_VIEW_ELEMENT:
def SetHPTargetBoard(self, vid, hpPercentage, actualHP, maxHP, bElement):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage, actualHP, maxHP)
self.targetBoard.SetElementImage(bElement)
self.targetBoard.Show()
elif app.ENABLE_TARGET_HP and not app.ENABLE_VIEW_ELEMENT:
def SetHPTargetBoard(self, vid, hpPercentage, actualHP, maxHP):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage, actualHP, maxHP)
self.targetBoard.Show()
elif app.ENABLE_VIEW_ELEMENT and not app.ENABLE_TARGET_HP:
def SetHPTargetBoard(self, vid, hpPercentage, bElement):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage)
self.targetBoard.SetElementImage(bElement)
self.targetBoard.Show()
else:
def SetHPTargetBoard(self, vid, hpPercentage):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.ResetTargetBoard()
self.targetBoard.SetEnemyVID(vid)
self.targetBoard.SetHP(hpPercentage)
self.targetBoard.Show()
if app.ENABLE_TARGET_AFFECT:
def ClearTargetAffects(self):
self.targetBoard.ClearAffects()
def AddTargetBoardAffect(self, affect, duration):
self.targetBoard.AddAffect(affect, duration)
def RemoveTargetBoardAffect(self, affect):
self.targetBoard.RemoveAffect(affect)
def CloseTargetBoardIfDifferent(self, vid):
if vid != self.targetBoard.GetTargetVID():
self.targetBoard.Close()
def CloseTargetBoard(self):
self.targetBoard.Close()
## View Equipment
def OpenEquipmentDialog(self, vid):
self.interface.OpenEquipmentDialog(vid)
def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
self.interface.SetEquipmentDialogItem(vid, sl##Index, vnum, count)
def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
# SHOW_LOCAL_MAP_NAME
#/* MiniMap Map Ismi Gösterme // MINIMAPNAME // 14.10.17 - 23:03 */
if constInfo.MINIMAP_MAPNAME_ENABLE:
def ShowMapName(self, mapName, x, y):
if self.mapNameShower:
self.mapNameShower.ShowMapName(mapName, x, y)
if self.interface:
self.interface.SetMapName(mapName)
try:
mapNameT = localeInfo.MINIMAP_ZONE_NAME_DICT[mapName]
self.interface.wndMiniMap.UpdateMapName(mapNameT)
except:
self.interface.wndMiniMap.UpdateMapName("Bilinmeyen Harita")
else:
def ShowMapName(self, mapName, x, y):
if self.mapNameShower:
self.mapNameShower.ShowMapName(mapName, x, y)
if self.interface:
self.interface.SetMapName(mapName)
# END_OF_SHOW_LOCAL_MAP_NAME
def BINARY_OpenAtlasWindow(self):
self.interface.BINARY_OpenAtlasWindow()
## Chat
def OnRecvWhisper(self, mode, name, line):
if constInfo.ENABLE_SVSIDE_CAPTCHA:
if name.find("<svside>") != -1:
global svsidedia
if line[line.find(",")-4:line.find("##)].isdigit():
svsidedia.nm_updateimgoffline(line[line.find(", ")-4:line.find(", ")])
else:
svsidedia.Board.Hide()
return
if mode != chat.WHISPER_TYPE_GM:
if os.path.exists("ignore.cfg"):
ignored = open("ignore.cfg", "r")
ignoredList = ignored.read()
ignoredPlayer = ignoredList.split(",\n")
ignored.close()
for i in xrange(str(ignoredList).count(",\n")):
if str(ignoredPlayer) != name:
pass
else:
return
if mode == chat.WHISPER_TYPE_GM:
self.interface.RegisterGameMasterName(name)
line.replace(" : ", ": ")
if not self.interface.FindWhisperButton(name) and constInfo.WHISPER_MESSAGES.has_key(name) and not self.interface.whisperDialogDict.has_key(name):
self.interface.RecvWhisper(name, True)
else:
self.interface.RecvWhisper(name, False)
if not constInfo.WHISPER_MESSAGES.has_key(name):
constInfo.WHISPER_MESSAGES.update({name : [(mode, line)]})
else:
constInfo.WHISPER_MESSAGES[name].append((mode, line))
chat.AppendWhisper(mode, name, line)
def OnRecvWhisperSystemMessage(self, mode, name, line):
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
self.interface.RecvWhisper(name, False)
def OnRecvWhisperError(self, mode, name, line):
if localeInfo.WHISPER_ERROR.has_key(mode):
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
else:
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
self.interface.RecvWhisper(name, False)
def RecvWhisper(self, name):
self.interface.RecvWhisper(name, False)
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
def OnRecvWhisperAdminSystem(self, name, line, color):
def ExistCustomColor(val):
return (val > 0)
def GetColor(type):
WHISPER_COLOR_MESSAGE = {
0: "|cffffffff|H|h",
1: "|cffff796a|H|h",
2: "|cffb1ff80|H|h",
3: "|cff46deff|H|h"
}
return WHISPER_COLOR_MESSAGE[type]
def ResizeTextWithColor(color, text):
return str("%s%s|h|r" % (GetColor(color), text))
import datetime
now = datetime.datetime.now()
ret = line.replace("#", " ")
if ExistCustomColor(int(color)):
ret = ResizeTextWithColor(int(color), ret)
else:
ret = ResizeTextWithColor(0, ret)
text = localeInfo.WHISPER_ADMIN_MESSAGE % (ret)
self.interface.RegisterGameMasterName(name)
chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, text)
self.interface.RecvWhisper(name, False)
def BINARY_OnRecvBulkWhisper(self, content):
content = content.replace("$", " ")
self.interface.RegisterGameMasterName("[SISTEM]")
chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, "[SISTEM]", content)
self.interface.RecvWhisper("[SISTEM]", False)
def OnPickMoney(self, money):
self.interface.OnPickMoneyNew(money)
#/* Won Sistemi // WONSISTEM // 30.12.17 - 13:05 */
if app.ENABLE_CHEQUE_SYSTEM:
def OnPickCheque(self, cheque):
self.interface.OnPickChequeNew(cheque)
def OnPickExp(self, exp):
self.interface.OnPickExpNew(exp)
def OnShopError(self, type):
try:
self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
except KeyError:
self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
def OnSafeBoxError(self):
self.PopupMessage(localeInfo.SAFEBOX_ERROR)
def OnFishingSuccess(self, isFish, fishName):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
# ADD_FISHING_MESSAGE
def OnFishingNotifyUnknown(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
def OnFishingWrongPlace(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
# END_OF_ADD_FISHING_MESSAGE
def OnFishingNotify(self, isFish, fishName):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
def OnFishingFailure(self):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
def OnCannotPickItem(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
# MINING
def OnCannotMining(self):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
# END_OF_MINING
def OnCannotUseSkill(self, vid, type):
if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
def OnCannotShotError(self, vid, type):
textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
## PointReset
def StartPointReset(self):
self.interface.OpenPointResetDialog()
## Shop
def StartShop(self, vid):
self.interface.OpenShopDialog(vid)
def EndShop(self):
self.interface.Clos##hopDialog()
def RefreshShop(self):
self.interface.RefreshShopDialog()
def Se##hopSellingPrice(self, Price):
pass
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
def StartOfflineShop(self, vid):
self.interface.OpenOfflineShopDialog(vid)
def EndOfflineShop(self):
self.interface.CloseOfflineShopDialog()
def RefreshOfflineShop(self):
self.interface.RefreshOfflineShopDialog()
## Exchange
def StartExchange(self):
self.interface.StartExchange()
def EndExchange(self):
self.interface.EndExchange()
def RefreshExchange(self):
self.interface.RefreshExchange()
## Pa##y
def RecvPartyInviteQuestion(self, leaderVID, leaderName):
partyInviteQuestionDialog = uiCommon.QuestionDialog()
partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
pa##yInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
partyInviteQuestionDialog.Open()
partyInviteQuestionDialog.partyLeaderVID = leaderVID
self.partyInviteQuestionDialog = partyInviteQuestionDialog
def AnswerPartyInvite(self, answer):
if not self.partyInviteQuestionDialog:
return
partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
distance = player.GetCharacterDistance(partyLeaderVID)
if distance < 0.0 or distance > 5000:
answer = FALSE
net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
self.partyInviteQuestionDialog.Close()
self.partyInviteQuestionDialog = None
def AddPartyMember(self, pid, name):
self.interface.AddPartyMember(pid, name)
def UpdatePartyMemberInfo(self, pid):
self.interface.UpdatePartyMemberInfo(pid)
def RemovePartyMember(self, pid):
self.interface.RemovePartyMember(pid)
self.__RefreshTargetBoard()
def LinkPartyMember(self, pid, vid):
self.interface.LinkPartyMember(pid, vid)
def UnlinkPartyMember(self, pid):
self.interface.UnlinkPartyMember(pid)
def UnlinkAllPartyMember(self):
self.interface.UnlinkAllPartyMember()
def ExitParty(self):
self.interface.ExitParty()
self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
def ChangePartyParameter(self, distributionMode):
self.interface.ChangePartyParameter(distributionMode)
## Messenger
def OnMessengerAddFriendQuestion(self, name):
messengerAddFriendQuestion = uiCommon.QuestionDialog2()
messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))## messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
messengerAddFriendQuestion.Open()
messengerAddFriendQuestion.name = name
self.messengerAddFriendQuestion = messengerAddFriendQuestion
def OnAcceptAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth y " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE
def OnDenyAddFriend(self):
name = self.messengerAddFriendQuestion.name
net.SendChatPacket("/messenger_auth n " + name)
self.OnCloseAddFriendQuestionDialog()
return TRUE
def OnCloseAddFriendQuestionDialog(self):
self.messengerAddFriendQuestion.Close()
self.messengerAddFriendQuestion = None
return TRUE
## SafeBox
def OpenSafeboxWindow(self, size):
self.interface.OpenSafeboxWindow(size)
def RefreshSafebox(self):
self.interface.RefreshSafebox()
def RefreshSafeboxMoney(self):
self.interface.R##reshSafeboxMoney()
# ITEM_MALL
def OpenMallWindow(self, size):
self.interface.OpenMallWindow(size)
def RefreshMall(self):
self.interface.RefreshMall()
# END_OF_ITEM_MALL
## Guild
def RecvGuildInviteQuestion(self, guildID, guildName):
guildInviteQuestionDialog = uiCommon.QuestionDialog()
guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
guildI##iteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
guildInviteQuestionDialog.Open()
guildInviteQuestionDialog.guildID = guildID
self.guildInviteQuestionDialog = guildInviteQuestionDialog
def AnswerGuildInvite(self, answer):
if not self.guildInviteQuestionDialog:
return
guildLeaderVID = self.guildInviteQuestionDialog.guildID
net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
self.guildInviteQuestionDialog.Close()
self.guildInviteQuestionDialog = None
def DeleteGuild(self):
self.interface.DeleteGuild()
## Clock
def ShowClock(self, second):
self.interface.ShowClock(second)
def HideClock(self):
self.interface.HideClock()
## Emotion
def BINARY_ActEmotion(self, emotionIndex):
if self.inter##ce.wndCharacter:
self.interface.wndCharacter.ActEmotion(emotionIndex)
###############################################################################################
###############################################################################################
## Keyboard Functions
d###CheckFocus(self):
if FALSE == self.IsFocus():
if TRUE == self.interface.IsOpe###at():
self.interface.ToggleChat()
self.SetFocus()
def SaveScree##self):
print "save screen"
# SCREENSHOT_CWDSAVE
if SCREENSHOT_CWDSAVE:
if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
os.mkdir(os.getcwd()+os.sep+"screenshot")
(succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
elif SCREENSHOT_DIR:
(succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
else:
(succeeded, name) = grp.SaveScreenShot()
# END_OF_SCREENSHOT_CWDSAVE
if succeeded:
self.wndScreenDialog = screenshotdialog.ScreenshotSavingDialog(name)
self.wndScreenDialog.Show()
pass
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
def ShowConsole(self):
pass
def ShowName(self):
self.ShowNameFlag = TRUE
self.playerGauge.EnableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex+1)
if app.__ENABLE_NEW_OFFLINESHOP__:
offlineshop.ShowShopNames()
# ADD_ALWAYS_SHOW_NAME
def __IsShowName(self):
if systemSetting.IsAlwaysShowName() == 0:
return True
if self.ShowNameFlag:
return True
return False
def __IsShowNameItem(self):
if systemSetting.IsAlwaysShowName() == 1:
return True
return False
# END_OF_ADD_ALWAYS_SHOW_NAME
def HideName(self):
self.ShowNameFlag = FALSE
self.playerGauge.DisableShowAlways()
player.SetQuickPage(self.quickSlotPageIndex)
if app.__ENABLE_NEW_OFFLINESHOP__:
offlineshop.HideShopNames()
def ShowMouseImage(self):
self.interface.ShowMouseImage()
def HideMouseImage(self):
self.interface.HideMouseImage()
def StartAttack(self):
player.SetAttackKeyState(TRUE)
def EndAttack(self):
player.SetAttackKeyState(FALSE)
def MoveUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, TRUE)
def MoveDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, TRUE)
def MoveLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, TRUE)
def MoveRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, TRUE)
def StopUp(self):
player.SetSingleDIKKeyState(app.DIK_UP, FALSE)
def StopDown(self):
player.SetSingleDIKKeyState(app.DIK_DOWN, FALSE)
def StopLeft(self):
player.SetSingleDIKKeyState(app.DIK_LEFT, FALSE)
def StopRight(self):
player.SetSingleDIKKeyState(app.DIK_RIGHT, FALSE)
def PickUpItem(self):
player.PickCloseItem()
def PickUpItemVector(self):
player.PickCloseItemVector()
def PickUpMoney(self):
player.PickCloseMoney()
#/* Otomatik Yang ve İtem Toplama // OTOMATIKYANGITEMTOPLAMA // 12.04.18 - 16:42 */
if app.ENABLE_AUTO_YANG_AND_ITEM:
def PickUpMoney(self):
player.PickCloseMoney()
def PickUpNewItem(self):
player.PickCloseNewItem()
###############################################################################################
###############################################################################################
## Event Handler
def OnK###own(self, key):
if self.interface.wndWeb and self.interface.wndWeb.IsShow():
###urn
if self.interface.wndBrowser and self.interface.wndBrowser.IsShow() and app.CEF_BROWS##_ENABLE:
return
if key == app.DIK_ESC:
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
try:
self.onPressKeyDict[key]()
except KeyError:
pass
except:
raise
return TRUE
def OnKeyUp(self, key):
try:
self.onClickKeyDict[key]()
except KeyError:
pass
except:
raise
return TRUE
def OnMouseLeftButtonDown(self):
if self.interface.BUILD_OnMouseLeftButtonDown():
return
if mouseModule.mouseController.isAttached():
self.CheckFocus()
else:
hyperlink = ui.GetHyperlink()
if hyperlink:
return
else:
self.CheckFocus()
player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
return TRUE
def OnMouseLeftButtonUp(self):
if self.interface.BUILD_OnMouseLeftButtonUp():
return
if mouseModule.mouseController.isAttached():
attachedType = mouseModule.mouseController.GetAttachedType()
attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshopikarus.IsBuildingShop() and uiofflineshopikarus.IsSaleSlot(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos): #toupdate
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInf
FFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)return
## QuickSlot
if player.SLOT_TYPE_QUICK_SLOT == attache#toupdate player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
## Inventory
#elif player.SLOT_TYPE_INVENTORY == attachedT##e:
elif player.SLOT_TYPE_INVENTORY == attachedType:
if player.ITEM_MONEY == attachedItemIndex:
self.__PutMon##(attachedType, attached#elifount, self.PickingCharacterIndex)
else:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
## DragonSoul
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
##
if app.UK_ENABLE_SPECIAL_STORAGE:
if player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType or\
player.SLOT_TYPE_BOOK_INVENTORY == attachedType or\
player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
player.SLOT_TYPE_ATTR_INVENTORY == attachedType or\
player.SLOT_TYPE_FLOWER_INVENTORY == attachedType or\
player.SLOT_TYPE_BLEND_INVENTORY == attachedType:
self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
mouseModule.mouseController.DeattachObject()
else:
hyperlink = ui.GetHyperlink()
if hyperlink:
if app.IsPressed(app.DIK_LALT):
link = chat.GetLinkFromHyperlink(hyperlink)
ime.PasteString(link)
else:
self.interface.MakeHyperlinkTooltip(hyperlink)
return
else:
player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
#player.EndMouseWalking()
return TRUE
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
#if player.SLOT_TYPE_INVENTORY == attachedType:
if player.#player.EndMouseWalking(ttachedType or\
player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType or\
player.SLOT_TYPE_UPGRADE_INVENTO#if== attachedType or\
player.SLOT_TYPE_BOOK_INVENTORY == attachedType or\
player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
player.SLOT_TYPE_ATTR_INVENTORY == attachedType or\
player.SLOT_TYPE_FLOWER_INVENTORY == attachedType or\
player.SLOT_TYPE_BLEND_INVENTORY == attachedType:
attachedInvenType = player.SlotTypeToInvenType(attachedType)
if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
if player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
else:
if chr.IsNPC(dstChrID):
if app.ENABLE_REFINE_RENEWAL:
constInfo.AUTO_REFINE_TYPE = 2
constInfo.AUTO_REFINE_DATA["NPC"][0] = dstChrID
constInfo.AUTO_REFINE_DATA["NPC"][1] = attachedInvenType
constInfo.AUTO_REFINE_DATA["NPC"][2] = attachedItemSlotPos
constInfo.AUTO_REFINE_DATA["NPC"][3] = attachedItemCount
net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
else:
net.SendExchangeStartPacket(dstChrID)
net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
else:
self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
#self.interface.DeleteItem(attachedItemSlotPos, attachedInvenType)
def __PutMoney(self, attachedType, attachedMoney, dstChrID):
if TRUE == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
#self.interface.DeleteItem(attachedItemSlotPos
net.SendExchangeElkAddPacket(attachedMoney)
else:
self.__DropMoney(attachedType, attachedMoney)
def __DropMoney(self, attachedType, attachedMoney):
# PRIVATESHOP_DISABLE_ITEM_DROP - °³ÀλóÁ¡ ¿°í ÀÖ´Â µ¿¾È ¾ÆÀÌÅÛ ¹ö¸² ¹æÁö
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if attachedMoney>=1000:
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
return
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropCount = attachedMoney
itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
self.itemDropQuestionDialog = itemDropQuestionDialog
def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
# PRIVATESHOP_DISABLE_ITEM_DROP - °³ÀλóÁ¡ ¿°í ÀÖ´Â µ¿¾È ¾ÆÀÌÅÛ ¹ö¸² ¹æÁö
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
else:
if player.SLOT_TYPE_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
item##opQuestionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.Question##alog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_UPGRADE_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.UPGRADE_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDr##QuestionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDi##og()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_BOOK_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.BOOK_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDrop##estionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDial##()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_STONE_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.STONE_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQu##tionDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_ATTR_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.ATTR_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQues##onDialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog()##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_FLOWER_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.FLOWER_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuesti##Dialog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog()
##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_BLEND_INVENTORY == attachedType and app.UK_ENABLE_SPECIAL_STORAGE:
dropItemIndex = player.GetItemIndex(player.BLEND_INVENTORY,attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestion##alog = uiCommon.QuestionDialogItem()
else:
itemDropQuestionDialog = uiCommon.QuestionDialog()
##
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.DestroyItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
item.SelectItem(dropItemIndex)
dropItemName = item.GetItemName()
## Question Text
questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
## Dialog
itemDropQuestionDialog = uiCommon.QuestionDialog()
itemDropQuestionDialog.SetText(questionText)
itemDropQuestionDial##.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: s##f.RequestDropItem(arg))
itemDropQuestionDialog.Open()
itemDropQuestionDialog.dropType = attachedType
itemDropQuestionDialog.dropNumber = attachedItemSlotPos
itemDropQuestionDialog.dropCount = attachedItemCount
self.itemDropQuestionDialog = itemDropQuestionDialog
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
def RequestDropItem(self, answer):
if not self.itemDropQuestionDialog:
return
if answer:
dropType = self.itemDropQuestionDialog.dropType
dropCount = self.itemDropQuestionDialog.dropCount
dropNumber = self.itemDropQuestionDialog.dropNumber
if player.SLOT_TYPE_INVENTORY == dropType:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_UPGRADE_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.UPGRADE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BOOK_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.BOOK_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_STONE_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.STONE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_ATTR_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.ATTR_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_FLOWER_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.FLOWER_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BLEND_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
self.__SendDropItemPacket(dropNumber, dropCount, player.BLEND_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
def DestroyItem(self, answer):
if not self.itemDropQuestionDialog:
return
valuable = False
if answer:
dropType = self.itemDropQuestionDialog.dropType
dropCount = self.itemDropQuestionDialog.dropCount
dropNumber = self.itemDropQuestionDialog.dropNumber
if player.SLOT_TYPE_INVENTORY == dropType:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_UPGRADE_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.UPGRADE_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.UPGRADE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BOOK_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.BOOK_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.BOOK_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_STONE_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.STONE_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.STONE_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_ATTR_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.ATTR_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.ATTR_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_FLOWER_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.FLOWER_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.FLOWER_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_BLEND_INVENTORY == dropType and app.UK_ENABLE_SPECIAL_STORAGE:
if dropNumber == player.ITEM_MONEY:
net.SendGoldDropPacketNew(dropCount)
snd.PlaySound("sound/ui/money.wav")
else:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount, player.BLEND_INVENTORY))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount, player.BLEND_INVENTORY)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
# PRIVATESHOP_DISABLE_ITEM_DROP
valuable = self.Valuableitem(dropNumber)
if valuable:
self.itemDropQuestionDialog = uiCommon.QuestionDialog()
self.itemDropQuestionDialog.SetText(localeInfo.VALUABLE_ITEM_SURE)
self.itemDropQuestionDialog.SetAcceptEvent(lambda: self.__SendDestroyItemPacket(dropNumber, dropCount))
self.itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.DestroyItem(arg))
self.itemDropQuestionDialog.Open()
else:
self.__SendDestroyItemPacket(dropNumber, dropCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
if not valuable:
#chat.AppendChat(chat.CHAT_TYPE_INFO,"burasi 1")
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def Valuableitem(self, itemSlotPos):
if player.GetItemGrade(itemSlotPos) >= 5:
return True
#chat.AppendChat(chat.CHAT_TYPE_INFO, for i in xrange(5):
if player.GetItemAttribute(itemSlotPos, i) != (0, 0):
sockets+=1
if sockets >= 3:
return True
for i in xrange(player.METIN_SOCKET_MAX_NUM):
if player.GetItemMetinSocket(itemSlotPos, i ) not in (0, 1, constInfo.ERROR_METIN_STONE):
return True
return False
# PRIVATESHOP_DISABLE_ITEM_DROP
def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
#/* İtem Silme Sistem // ITEMSILMESISTEM // 09.11.2017 - 23:44 */
if app.ENABLE_ITEM_DESTROY:
def __SendDestroyItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
if uiPrivateShopBuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
return
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if (uiOfflineShopBuilder.IsBuildingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
if (uiOfflineShop.IsEditingOfflineShop()):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_OFFLINE_SHOP)
return
net.SendItemDestroyPacket(itemInvenType, itemVNum, itemCount)
if not self.itemDropQuestionDialog:
return
#chat.AppendChat(chat.CHAT_TYPE_INFO,"burasi 2")
self.itemDropQuestionDialog.Close()
self.itemDropQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def OnMouseRightButtonDown(self):
self.CheckFocus()
if TRUE == mouseModule.mouseCo#chat.AppendChat(chat.CHAT_TYPE_INFO,useModule.mouseController.DeattachObject()
else:
player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
return TRUE
def OnMouseRightButtonUp(self):
if TRUE == mouseModule.mouseController.isAttached():
return TRUE
player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
return TRUE
def OnMouseMiddleButtonDown(self):
player.SetMouseMiddleButtonState(player.MBS_PRESS)
def OnMouseMiddleButtonUp(self):
player.SetMouseMiddleButtonState(player.MBS_CLICK)
def OnUpdate(self):
app.UpdateGame()
self.IsBloodDungeonSystemWindow()
if self.mapNameShower.IsShow():
self.mapNameShower.Update()
if self.isShowDebugInfo:
self.UpdateDebugInfo()
if self.enableXMasBoom:
self.__XMasBoom_Update()
if systemSetting.IsEnablePremiumAffect():
self.affectShower.Show()
else:
self.affectShower.Hide()
if app.KASMIR_PAKET_SYSTEM:
if gameInfo.VERI_PAKETI1==1:
self.__PrivateShop_Kasmir_Open()
gameInfo.VERI_PAKETI1=0
self.interface.BUILD_OnUpdate()
self.PythonSpecialSystem()
#/* Random Title // RANDOMTITLE // 13.10.17 - 13:52 */
if constInfo.RANDOM_TITLE:
RandTitleTime = max(0, self.TitleTime - time.clock())
if 0 == RandTitleTime:
app.SetWindowTitle(ayarlar.TITLE_APPEND[app.GetRandom(0, len(ayarlar.TITLE_APPEND) - 1)])
curTime = time.clock()
self.TitleTime = curTime + 4
#/* MiniMap Saat Gösterme // MINIMAPSAAT // 14.10.17 - 23:21 */
if constInfo.MINIMAP_DATETIME_ENABLE:
if app.GetGlobalTimeStamp() > 0:
ServerTime = time.strftime("%d.%m.%Y %H:%M:%S", time.localtime(app.GetGlobalTimeStamp()))
self.interface.wndMiniMap.UpdateDateTime(ServerTime)
#/* Otomatik Yang ve İtem Toplama // OTOMATIKYANGITEMTOPLAMA // 12.04.18 - 16:42 */
if app.ENABLE_AUTO_YANG_AND_ITEM:
if systemSetting.IsAutoPickUpSlow():
self.PickUpItem()
if systemSetting.IsAutoPickUpFast():
self.PickUpItemVector()
def PythonSpecialSystem(self):
if gameInfo.SYSTEMS_PAKET0==1:
self.__Start_EquipWatch_Loop()
gameInfo.SYSTEMS_PAKET0=0
if gameInfo.SYSTEMS_PAKET1==1:
self.interface.PlayerLogButton()
gameInfo.SYSTEMS_PAKET1=0
if gameInfo.SYSTEMS_LOG1==1:
self.__pazar_log_ac()
gameInfo.SYSTEMS_LOG1=0
if gameInfo.SYSTEMS_LOG2==1:
self.__tic_gecmis_ac()
gameInfo.SYSTEMS_LOG2=0
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
if gameInfo.SYSTEMS_PAKET2==1:
self.interface.SetShowPn()
gameInfo.SYSTEMS_PAKET2=0
if gameInfo.SYSTEMS_PAKET6==1:
self.PriceCheckerOpen()
gameInfo.SYSTEMS_PAKET6=0
if gameInfo.SYSTEMS_PAKET4==1:
self.ClickEfektButton()
gameInfo.SYSTEMS_PAKET4=0
if gameInfo.SYSTEMS_PAKET5==1:
self.OpenMarbleShop()
gameInfo.SYSTEMS_PAKET5=0
if gameInfo.SYSTEMS_PAKET7==1:
if app.ENABLE_BOSS_TRACKING:
self.OpenBossTracking()
else:
self.BossTracking()
gameInfo.SYSTEMS_PAKET7=0
if gameInfo.SYSTEMS_PAKET8==1:
self.PressExtendedInventory()
gameInfo.SYSTEMS_PAKET8=0
if gameInfo.SYSTEMS_PAKET9==1:
if constInfo.DUNGEON_LIST_TIME:
self.interface.OpenTimerWindow()
else:
self.interface.ToggleDungeonInfoWindow()
gameInfo.SYSTEMS_PAKET9=0
if gameInfo.SYSTEMS_PAKET10==1:
self.OpenBiologWindow()
gameInfo.SYSTEMS_PAKET10=0
if gameInfo.SYSTEMS_PAKET11==1:
self.__PressYKey()
gameInfo.SYSTEMS_PAKET11=0
if gameInfo.DRAGON_SOUL_OPEN==1:
self.interface.ToggleDragonSoulWindow()
gameInfo.DRAGON_SOUL_OPEN=0
if gameInfo.FAST_SELLREMOVE==1:
self.interface.OpenOGSItemRemoveWindow()
gameInfo.FAST_SELLREMOVE=0
if 1== constInfo.CHEQUE_TO_GOLD_INFO_OPEN:
constInfo.CHEQUE_TO_GOLD_INFO_OPEN = 0
self.OpenGoldToChequeTicket()
if 1== constInfo.CHEQUE_TO_GOLD_INFO_OPEN_2:
constInfo.CHEQUE_TO_GOLD_INFO_OPEN_2 = 0
self.OpenChequeToGoldTicket()
if 1== constInfo.BOSS_TRACKING:
constInfo.BOSS_TRACKING = 0
if app.ENABLE_BOSS_TRACKING:
self.OpenBossTracking()
else:
self.BossTrackingSystemShow()
if 1== gameInfo.GUILD_RANKING_OPEN:
gameInfo.GUILD_RANKING_OPEN = 0
if app.GetTime() > self.GuildRankingTime:
self.guildrankingopen()
self.GuildRankingTime = app.GetTime() + 5
else:
NewGetTime2 = self.GuildRankingTime - app.GetTime()
chat.AppendChat(chat.CHAT_TYPE_INFO, "Tekrar açabilmek için %d saniye beklemelisin." % (NewGetTime2))
if app.ENABLE_AUTO_HUNT_SYSTEM:
if gameInfo.SYSTEMS_PAKET3==1:
self.interface.OpenAutohuntWindow()
gameInfo.SYSTEMS_PAKET3=0
else:
if gameInfo.SYSTEMS_PAKET3==1:
chat.AppendChat(5, "Otomatik Av yönetici tarafından devredışı bırakılmıştır.")
gameInfo.SYSTEMS_PAKET3=0
if constInfo.AUTO_HUNT_REBORN == 1 and constInfo.AUTO_HUNT_REBORN_IS_DEAD == 1:
if app.GetTime() > self.AutoHuntRebornT:
net.SendChatPacket("/restart_here")
self.AutoHuntRebornT = app.GetTime() + 10
if uiItemShopInfo.ITEMSHOP_OPEN == 1:
if uiItemShopInfo.ITEMSHOP_TIME < app.GetTime():
uiItemShopInfo.ITEMSHOP_OPEN = 0
uiItemShopInfo.ITEMSHOP_TIME = 0
if self.levelGuide.IsShow():
self.levelGuide.OnUpdate()
if (app.GetTime() > self.startGameTime + 5 and self.onQuest != 1):
self.onQuest = 1
self.interface.GoOnQuestRecv()
if background.GetCurrentMapName() == "theprnce_imp_arena" and constInfo.imp_savasi["guiekran"] == 0:
self.kill_gui_board.Show()
self.red_kill_count_text.SetText(translate.skor+str(constInfo.imp_savasi["kirmiziskor"]))
self.yellow_kill_count_text.SetText(translate.skor+str(constInfo.imp_savasi["sariskor"]))
self.blue_kill_count_text.SetText(translate.skor+str(constInfo.imp_savasi["maviskor"]))
self.red_kill_count_textt.SetText(translate.katilimci+str(constInfo.imp_savasi["kirmizikatilimci"]))
self.yellow_kill_count_textt.SetText(translate.katilimci+str(constInfo.imp_savasi["sarikatilimci"]))
self.blue_kill_count_textt.SetText(translate.katilimci+str(constInfo.imp_savasi["mavikatilimci"]))
else:
self.kill_gui_board.Hide()
def UpdateDebugInfo(self):
#
# ij¸¯ÅÍ ÁÂÇ¥ ¹× FPS Ãâ·Â
(x, y, z) = player.GetMainCharacterPosition()
nUpdateTime = app.GetUpdateTime()
nUpdateFPS = app.GetUpdateFPS()
nRenderFPS = app.GetRenderFPS()
nFaceCount = app.GetFaceCount()
fFaceSpeed = app.GetFaceSpeed()
nST=background.GetRenderShadowTime()
(fAveRT, nCurRT) = app.GetRenderTime()
(iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
(iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
if iPatch == 0:
iPatch = 1
#(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()
self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
xMouse, yMouse = wndMgr.GetMousePosition()
self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
if fAveRT>1.0:
self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
#self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
#self.TextureNum.SetText("TN : %s" % (sTextureNum))
#self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
def OnRender(sel#self.Pitch.SetText(erGame()
if self.console.Conso#self.TextureNum.SetText( background.RenderCollision()
#self.ObjectNum.SetText(on()
(x, y) = app.GetCursorPosition()
########################
# Picking
########################
textTail.UpdateAllTextTail()
if TRUE == wndMgr.IsPickedWindow(self.hWnd):
self.PickingCharacterIndex = chr.Pick()
if -1 != self.PickingCharacterIndex:
textTail.ShowCharacterTextTail(self.PickingCharacterInd###
if 0 != self.targetBoard.GetTargetV###):
textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
# ADD_ALWAYS_SHOW_NAME
if not self.__IsShowName():
self.PickingItemIndex = item.Pick()
if -1 != self.PickingItemIndex:
textTail.ShowItemTextTail(self.PickingItemIndex)
# END_OF_ADD_ALWAYS_SHOW_NAME
## Show all name in the range
# ADD_ALWAYS_SHOW_NAME
if self.__IsShowName():
textTail.ShowAllTextTail()
self.PickingItemIndex = textTail.Pick(x, y)
if self.__IsShowNameItem():
textTail.ShowJustItemTextTail()
self.PickingItemIndex = textTail.Pick(x, y)
##END_OF_ADD_ALWAYS_SHOW_NAME
if app.ENABLE_SHOPNAMES_RANGE:
if systemSetting.IsShowSalesText():
uiPrivateShopBuilder.UpdateADBoard()
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
uiOfflineShopBuilder.UpdateADBoard()
textTail.UpdateShowingTextTail()
textTail.ArrangeTextTail()
if -1 != self.PickingItemIndex:
textTail.SelectItemName(self.PickingItemIndex)
grp.PopState()
grp.SetInterfaceRenderState()
textTail.Render()
textTail.HideAllTextTail()
def OnPressEscapeKey(self):
if app.TARGET == app.GetCursor():
app.SetCursor(app.NORMAL)
elif TRUE == mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()
else:
self.interface.OpenSystemDialog()
return TRUE
def OnIMEReturn(self):
if app.IsPressed(app.DIK_LSHIFT):
self.interface.OpenWhisperDialogWithoutTarget()
else:
self.interface.ToggleChat()
return TRUE
def OnPressExitKey(self):
self.interface.ToggleSystemDialog()
return TRUE
## BINARY CALLBACK
######################################################################################
if app.ENABLE_SEND_TARGET_INFO:
def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
if not raceNum in constInfo.MONSTER_INFO_DATA:
constInfo.MONSTER_INFO_DATA.update##raceNum : {}})
### constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
isUpgradeable = False
isMetin = False
item.SelectItem(itemVnum)
if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
isUpgradeable = True
elif item.GetItemType() == item.ITEM_TYPE_METIN:
isMetin = True
for curItem in curList:
if isUpgradeable:
if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
if not (itemVnum in curItem["vnum_list"]):
curItem["vnum_list"].append(itemVnum)
return
elif isMetin:
if curItem.has_key("vnum_list"):
baseVnum = curItem["vnum_list"][0]
if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
if not (itemVnum in curItem["vnum_list"]):
curItem["vnum_list"].append(itemVnum)
return
else:
if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
return
if isUpgradeable or isMetin:
curList.append({"vnum_list":[itemVnum], "count":itemCount})
else:
curList.append({"vnum":itemVnum, "count":itemCount})
def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
self.targetBoard.RefreshMonsterInfoBoard()
# WEDDING
def BINARY_LoverInfo(self, name, lovePoint):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnAddLover(name, lovePoint)
if self.affectShower:
self.affectShower.SetLoverInfo(name, lovePoint)
def BINARY_UpdateLovePoint(self, lovePoint):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
if self.affectShower:
self.affectShower.OnUpdateLovePoint(lovePoint)
# END_OF_WEDDING
# QUEST_CONFIRM
def BINARY_OnQuestConfirm(self, msg, timeout, pid):
confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
confirmDialog.Open(msg, timeout)
confirmDialog.SetAcceptEvent(lambda answer=TRUE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
confirmDialog.SetCancelEvent(lambda answer=FALSE, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
self.confirmDialog = confirmDialog
# END_OF_QUEST_CONFIRM
# GIFT command
def Gift_Show(self):
if not app.ENABLE_NEW_PET_SYSTEM:
self.interface.ShowGift()
else:
if constInfo.PET_MAIN == 0:
self.petmain.Show()
constInfo.PET_MAIN =1
self.petmain.SetTop()
else:
self.petmain.Hide()
constInfo.PET_MAIN =0
# CUBE
def BINARY_Cube_Open(self, npcVNUM):
self.currentCubeNPC = npcVNUM
self.interface.OpenCubeWindow()
if npcVNUM not in self.cubeInformation:
net.SendChatPacket("/cube r_info")
else:
cubeInfoList = self.cubeInformation[npcVNUM]
i = 0
for cubeInfo in cubeInfoList:
self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
j = 0
for materialList in cubeInfo["materialList"]:
for materialInfo in materialList:
itemVnum, itemCount = materialInfo
self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
j = j + 1
i = i + 1
self.interface.wndCube.Refresh()
def BINARY_Reload_Cube(self):
self.cubeInformation.clear()
self.interface.wndCube.ClearOldSlots()
def BINARY_Cube_Close(self):
self.interface.CloseCubeWindow()
# Á¦ÀÛ¿¡ ÇÊ¿äÇÑ °ñµå, ¿¹»óµÇ´Â ¿Ï¼ºÇ°ÀÇ VNUM°ú °³¼ö Á¤º¸ update
def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
self.interface.UpdateCubeInfo(gold, itemVnum, count)
def BINARY_Cube_Succeed(self, itemVnum, count):
print "Å¥ºê Á¦ÀÛ ¼º°ø"
self.interface.SucceedCubeWork(itemVnum, count)
pass
def BINARY_Cube_Failed(self):
print "Å¥ºê Á¦ÀÛ ½ÇÆĞ"
self.interface.FailedCubeWork()
pass
def BINARY_Cube_ResultList(self, npcVNUM, listText):
# ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 ????? "/" ??? ??? ???? ?
#print listText
if npcVNUM == 0:
npcVNUM = self.currentCubeNPC
self.cubeInformation[npcVNUM] = []
try:
for eachInfoText in listText.split("/"):
eachInfo = eachInfoText.split(",")
itemVnum = int(eachInfo[0])
itemCount = int(eachInfo[1])
self.cubeInformation[npcV#printppend({"vnum": itemVnum, "count": itemCount})
self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
resultCount = len(self.cubeInformation[npcVNUM])
requestCount = 7
modCount = resultCount % requestCount
splitCount = resultCount / requestCount
for i in xrange(splitCount):
#print("/cube r_info %d %d" % (i * requestCount, requestCount))
net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
if 0 < modCount:
#print("/cube r_info %d %d" % (splitCount * requestCount, modCount))
net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
#print( RuntimeError, msg:
dbg.TraceError(msg)
return 0
pass
def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
# Material Text Format : 125,1#print(127,2|123,5&555,5&555,4/120000
try:
#print listText
if 3 > len(listText):
dbg.TraceError("Wrong Cube Material Infomation")
return 0
eachResultList = listText.split("@")
cubeInfo = self.cubeInformation[self.currentCubeNPC]
itemIndex = 0
for eachResultText in eachResultList:
#printbeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
materialList = cubeInfo[startIndex + itemIndex]["materialList"]
gold = 0
splitResult = eachResultText.split("/")
if 1 < len(splitResult):
gold = int(splitResult[1])
#print "splitResult : ", splitResult
eachMaterialList = splitResult[0].split("&")
i = 0
for eachMaterialText in eachMaterialList:
complicatedList = eachMaterialText.split("|")
if 0 < len(complicatedList):
for complicatedText in complicatedList:
#print (itemVnum, itemCount) = complicatedText.split(",")
itemVnum = int(itemVnum)
itemCount = int(itemCount)
self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
materialList.append((itemVnum, itemCount))
else:
itemVnum, itemCount = eachMaterialText.split(",")
itemVnum = int(itemVnum)
itemCount = int(itemCount)
self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
materialList.append((itemVnum, itemCount))
i = i + 1
itemIndex = itemIndex + 1
self.interface.wndCube.Refresh()
except RuntimeError, msg:
dbg.TraceError(msg)
return 0
pass
# END_OF_CUBE
# ¿ëÈ¥¼®
def BINARY_Highlight_Item(self, inven_type, inven_pos):
#/* Slot Effect Sistem // SLOTEFFECTSYSTEM // 11.11.17 - 22:05 */
if app.ENABLE_HIGHLIGHT_SYSTEM:
if self.interface:
self.interface.Highligt_Item(inven_type, inven_pos)
else:
self.interface.Highligt_Item(inven_type, inven_pos)
def BINARY_DragonSoulGiveQuilification(self):
self.interface.DragonSoulGiveQuilification()
def BINARY_DragonSoulRefineWindow_Open(self):
self.interface.OpenDragonSoulRefineWindow()
def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
# END of DRAGON SOUL REFINE WINDOW
def BINARY_SetBigMessage(self, message):
self.interface.bigBoard.SetTip(message)
def BINARY_SetTipMessage(self, message):
if constInfo.ENABLE_SVSIDE_CAPTCHA:
if message.find("#ebvs.svside:") != -1:
message2 = message[message.find("#ebvs.svside:")+13:]
global svsidedi_cp
if message.find("4A464946") != -1:
svsidedi_cp = str(app.GetRandom(55555, 99999999)) + ".jpg"
f = open('svside/' + svsidedi_cp, 'wb')
else:
f = open('svside/' + svsidedi_cp, 'ab')
f.write(binascii.unhexlify(message2))
f.close()
if len(message2) < 450:
svsidedia.nm_updateimgoffline2(svsidedi_cp)
if os.path.exists('svside/' + svsidedi_cp):
try:
os.remove('svside/' + svsidedi_cp)
except:
pass
return
if message.find("#ebvs:VerifyOK") != -1:
svsidedia.Board.Hide()
return
self.interface.tipBoard.SetTip(message)
def BINARY_AppendNotifyMessage(self, type):
if not type in localeInfo.NOTIFY_MESSAGE:
return
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NOTIFY_MESSAGE[type])
def BINARY_SetMissionMessage(self, message):
self.interface.missionBoard.SetMission(message)
def BINARY_SetSubMissionMessage(self, message):
self.interface.missionBoard.SetSubMission(message)
def BINARY_CleanMissionMessage(self):
self.interface.missionBoard.CleanMission()
def BINARY_Guild_EnterGuildArea(self, areaID):
self.interface.BULID_EnterGuildArea(areaID)
def BINARY_Guild_ExitGuildArea(self, areaID):
self.interface.BULID_ExitGuildArea(areaID)
def BINARY_GuildWar_OnSendDeclare(self, guildID):
pass
if app.IMPROVED_GUILD_WAR:
def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType, Score, User, Race):
mainCharacterName = player.GetMainCharacterName()
masterName = guild.GetGuildMasterName()
if mainCharacterName == masterName:
self.__GuildWar_OpenAskDialog(guildID, warType, Score, User, Race)
else:
def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
mainCharacterName = player.GetMainCharacterName()
masterName = guild.GetGuildMasterName()
if mainCharacterName == masterName:
self.__GuildWar_OpenAskDialog(guildID, warType)
def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
self.interface.OnStartGuildWar(guildSelf, guildOpp)
def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
self.interface.OnEndGuildWar(guildSelf, guildOpp)
def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
self.interface.BINARY_SetObserverMode(isEnable)
def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
self.interface.wndMiniMap.UpdateObserverCount(observerCount)
def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
guildID1 = int(guildID1)
guildID2 = int(guildID2)
memberCount1 = int(memberCount1)
memberCount2 = int(memberCount2)
observerCount = int(observerCount)
self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
self.interface.wndMiniMap.UpdateObserverCount(observerCount)
if app.IMPROVED_GUILD_WAR:
def __GuildWar_OpenAskDialog(self, guildID, warType, Score, User, Race):
guildName = guild.GetGuildName(guildID)
# REMOVED_GUILD_BUG_FIX
if "Noname" == guildName:
return
# END_OF_REMOVED_GUILD_BUG_FIX
import uiGuild
questionDialog = uiGuild.AcceptGuildWarDialog()
questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
questionDialog.Open(guildName, warType, Score, User, Race)
self.guildWarQuestionDialog = questionDialog
else:
def __GuildWar_OpenAskDialog(self, guildID, warType):
guildName = guild.GetGuildName(guildID)
# REMOVED_GUILD_BUG_FIX
if "Noname" == guildName:
return
# END_OF_REMOVED_GUILD_BUG_FIX
import uiGuild
questionDialog = uiGuild.AcceptGuildWarDialog()
questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
questionDialog.Open(guildName, warType)
self.guildWarQuestionDialog = questionDialog
def __GuildWar_CloseAskDialog(self):
self.guildWarQuestionDialog.Close()
self.guildWarQuestionDialog = None
def __GuildWar_OnAccept(self):
guildName = self.guildWarQuestionDialog.GetGuildName()
net.SendChatPacket("/war " + guildName)
net.SendChatPacket("/war_istatistik %s" % (guildName))
self.__GuildWar_CloseAskDialog()
return 1
def __GuildWar_OnDecline(self):
guildName = self.guildWarQuestionDialog.GetGuildName()
net.SendChatPacket("/nowar " + guildName)
self.__GuildWar_CloseAskDialog()
return 1
## BINARY CALLBACK
######################################################################################
def __ServerCommand_Build(self):
serverCommandList={
"ConsoleEnable" : self.__Console_Enable,
"DayMode" : self.__DayMode_Update,
"PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
"CloseRestartWi##ow" : self.__R###artDialog_Close,
"OpenPrivateShop" : self.__PrivateShop_Open,
"PartyHealReady" : self.PartyHealReady,
"ShowMeSafeboxPassword" : self.AskSafeboxPassword,
"CloseSafebox" : self.CommandCloseSafebox,
# ITEM_MALL
"CloseMall" : self.CommandCloseMall,
"ShowMeMallPassword" : self.AskMallPassword,
"item_mall" : self.__ItemMall_Open,
# END_OF_ITEM_MALL
"RefineSuceeded" : self.RefineSuceededMessage,
"RefineFailed" : self.RefineFailedMessage,
"xmas_snow" : self.__XMasSnow_Enable,
"xmas_boom" : self.__XMasBoom_Enable,
"xmas_song" : self.__XMasSong_Enable,
"xmas_tree" : self.__XMasTree_Enable,
"newyear_boom" : self.__XMasBoom_Enable,
"PartyRequest" : self.__PartyRequestQuestion,
"PartyRequestDenied" : self.__PartyRequestDenied,
"horse_state" : self.__Horse_UpdateState,
"hide_horse_state" : self.__Horse_HideState,
"WarUC" : self.__GuildWar_UpdateMemberCount,
"test_server" : self.__EnableTestServerFlag,
"mall" : self.__InGameShop_Show,
"browser" : self.__InGameBrowser_Show,
"hediye_button" : self.__hediye_button,
# WEDDING
"lover_login" : self.__LoginLover,
"lover_logout" : self.__LogoutLover,
"lover_near" : self.__LoverNear,
"lover_far" : self.__LoverFar,
"lover_divorce" : self.__LoverDivorce,
"PlayMusic" : self.__PlayMusic,
# END_OF_WEDDING
# PRIVATE_SHOP_PRICE_LIST
"MyShopPriceList" : self.__PrivateShop_PriceList,
# END_OF_PRIVATE_SHOP_PRICE_LIST
#/* Envanter Görüntüleme Onay Sistemi // ENVANTERGORUNTULEMEONAY // 20.10.17 - 00:46 */
#START
"ViewEquipRequest" : self.__ViewEquipRequest,
"ViewEquipRequestDenied" : self.__ViewEquipRequestDenied,
#END
#New ItemShop // NEWITEMSHOP
"PythonToLua" : self.__PythonToLua,
"PythonIslem" : self.__PythonIslem,
"LuaToPython" : self.__LuaToPython,
"pvpch#STARTe" : self.__PvPChallenge_Dialog,
"OtomatikAvWindow" : self.__otomatikavstart,
"KelimeEventGui" #ENDelf.WordGameWindowShow,
#New "getinputbegin" : self.__Inputget1,
"getinputend" : self.__Inputget2,
"getinput" : self.__Inputget3,
"GetInputStringStart" : self.GetInputStringStart,
"GetInputStringEnd" : self.GetInputStringEnd,
"gecmis_q" : self.lonca_gecmis_q,
"lonca_gecmis_ekle" : self.lonca_gecmis_ekle,
"gecmistemizle" : self.gecmistemizle,
"isim_ver" : self.isim_ver,
"lonca_lider_q" : self.lonca_lider_q,
"lider_ekle" : self.lider_ekle,
"lider_sifirla" : self.lider_sifirla,
"loncatoplantisi" : self.loncatoplantisi,
"loncaistatistik" : self.loncaistatistik,
"guildistatistik" : self.guildistatistik,
"imp_savasi_q" : self.imp_savasi_q,
"imp_savasi" : self.imp_savasi,
"imp_savasi_ekran" : self.imp_savasi_ekran,
"gmyimben" : self.gmyimben,
"imp_savasi_gui" : self.imp_savasi_gui,
"imp_savasi_gui_ac" : self.imp_savasi_gui_ac,
"imp_savasi_gui_kapa" : self.imp_savasi_gui_kapa,
"dragonlair_ranking_open" : self.OpenDragonLairRanking,
"dragonlair_rank" : self.AddDragonLairRanking,
"AkiraEventSys" : self.__AkiraEventDataAppend,
"set_watch" : self.__Start_EquipWatch_Loop,
"hesap_kilit" : self.hesap_kilit,
"Isinlanma_yuzuk" : self.Isinlanma_yuzuk,
"duyurupage" : self.Duyuru_Page_Show,
"eventpage" : self.Event_Page_Show,
"guvenlipcquestislem" : self.guvenlipcquestislem,
"guvenlipc" : self.guvenlipc,
"guvenlipc_button" : self.guvenlipc_button,
"guvenlipc_q" : self.guvenlipc_q,
"tic_id" : self.__tic_quest_id,
"tic_ac" : self.__tic_gecmis_ac,
"pazar_log_q" : self.__pazar_log_q,
"itemi_alan" : self.__itemi_alan,
"item_isim" : self.__item_isim,
"item_fiyat" : self.__item_fiyat,
"pazar_log_q_id" : self.__pazar_log_q_id,
"pazar_ac" : self.__pazar_log_ac,
"ogstudio_rank" : self.AddOGStudioRanking,
"ogstudio_rank2" : self.AddOGStudioRanking2,
"ogstudioquestislem" : self.ogstudioquestislem,
"bkekranac" : self.bkac,
"ruhtasiekranac" : self.ruhcac,
"biyologodul" : self.biyoodulac,
"biyologekrankapa" : self.biyologekrankapa,
"biyolog" : self.biyolog,
"loncasiralama" : self.__guildranking,
"uyariloncasira" : self.uyariloncasira,
"captcha" : self.captchaekran,
"item_kilit_q" : self.item_kilit_q,
"kilit" : self.kilit,
"bk_trade_sys" : self.__BKTradeSys,
"OpenSkillsGui" : self.get_skills,
"search_cofre_ids" : self.__Chest_Search,
"search_cofre_refresh" : self.__Chest_Search_Refresh,
"search_cofre_refresh_open" : self.__Chest_Search_Refresh_Open,
"EfsunBotuDurdur1" : self.efsunbotu_stop1,
"EfsunBotuDurdur2" : self.efsunbotu_stop2,
"itemkilitsifre" : self.checkitem,
"x019x1" : self.x019x1,
"sorgu_ticaret" : self.Uzaktan_ticaret_soru,
"ticarettype" : self.ticarettype,
"ticaretbilgi" : self.ticaretbilgi,
"MakeVisibleOX" : self.__SetAllPlayersVisible,
"RemoveTitleOX" : self.__ClearPlayersTitle,
"bonusgormekistiyor" : self.bonusgormekistiyor,
"bonuslarimigor" : self.bonuslarimigor,
"YansitmaBaslat" : self.interface.OpenYansitma,
"DiceDone" : self.__DiceHasDone,
"DungeonInfo" : self.DungeonInfo,
"CleanDungeonInfo" : self.CleanDungeonInfo,
"GetDungeonInfo" : self.GetDungeonInfo,
"UpdateDungeonInfo" : self.UpdateDungeonInfo,
"OpenWhisperTool" : self.OpenWhisperSystem,
"OpenChequeTicket" : self.__OpenChequeTicket,
"ChequeToGoldOpen" : self.OpenChequeToGoldTicket,
"GoldToChequeOpen" : self.OpenGoldToChequeTicket,
"DungeonBugBtnOpen" : self.DungeonBugBtnOpen,
"DungeonBugBtnHide" : self.DungeonBugBtnHide,
"OpenGaya1Ticket" : self.__OpenGaya1Ticket,
"OpenGaya2Ticket" : self.__OpenGaya2Ticket,
"RefreshCoins" : self.__RefreshCoins,
"OnNotificatonPopup" : self.__OnNotificatonPopup,
"lonca_istatistik" : self.__OpenGuildWarRank,
"lonca_savas_listesi_yenile": self.savas_list_yenile,
"lonca_savas_listesi" : self.savas_listtesi,
"GW_Kill_Update" : self.__GuildWar_ProcessKillInput,
"recordquest" : self.__recordscreen,
"recordwarning" : self.recordwarning,
"BotControlActive" : self.__BotControlActive,
"BotControlDeactive" : self.__BotControlDeactive,
"ShowCaptcha" : self.ShowCaptcha,
}
#/* Won Sistemi // WONSISTEM // 30.12.17 - 13:05 */
if app.ENABLE_CHEQUE_SYSTEM:
serverCommandList["MyShopPriceListNew"] = self.__PrivateShop_PriceListNew
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
serverCommandList.update({"OpenOfflineShop" : self.__OfflineShop_Open })
serverCommandList.update({"OpenOfflineShopGui" : self.__OfflineShop_OpenGui })
serverCommandList.update({"arayanbulur" : self.interface.arayanbulur })
serverCommandList.update({"listetopla" : self.interface.listetopla })
serverCommandList.update({"PCheck" : self.PCheckValue })
serverCommandList.update({"OpenDecoration" : self.__OpenDecoration })
serverCommandList["PiyasaKontrolUyarisi"] = self.PiyasaKontrolUyarisi
#/* Uzaktan Ticaret Sistemi // UZAKTANTICARET // 10.02.18 */
if app.ENABLE_REMOTE_TRADING:
serverCommandList["UzaktanTicaret"] = self.__UzaktanTicaret
serverCommandList["UzaktanTicaretDenied"] = self.__UzaktanTicaretDenied
#/* Lonca Geçmiş Sistemi // LONCAGECMIS // 11.02.18 - 10:06 */
if app.ENABLE_GUILD_HISTORY:
serverCommandList["AppendGuıldHıstory"] = self.__Append_Guild_History
#/* Ajan Duyuru Sistemi // AJANDUYURUSISTEMI // 18.02.18 - 11:13 */
if app.ENABLE_AJAN_NOTICE:
serverCommandList["WarPlayerCheckReq"] = self.__Check_War_Player
#/* Lonca Açık Lider Sistemi // LONCAACIKLIDER // 02.03.18 - 20:37 */
if app.ENABLE_GUILD_LEADER:
serverCommandList["AppendGuıldOpenLeader"] = self.__Append_Guild_Open_Leader
#/* Lonca Savaş listesi Sistemi // LONCASAVASLISTESI // 03.02.18 - 14:04 */
if app.ENABLE_GUILD_SKORE:
serverCommandList["AppendGuıldWarSkor"] = self.__Append_Guild_War_Skor
#/* Turnuvaya Katılan Listesi Çektirme // TOURNEYLIST // 30.03.18 - 18:29 */
if app.ENABLE_TOURNEY_LIST:
serverCommandList["OpenGuıldWarTourney"] = self.__Open_Guild_War_Tourney
serverCommandList["AppendGuıldWarTourney"] = self.__Append_Guild_War_Tourney
#/* Etkinlik Duyuru // ETKINLIKDUYURU // 31.03.18 - 16:35 */
if app.ENABLE_EVENT_NOTICE_PAGE:
serverCommandList["AppendEventNoticePage"] = self.__Append_Event_Notice_Page
#/* Kaşmir Paketi // KASMIRPAKET // 21.11.18 - 03:32 */
if app.KASMIR_PAKET_SYSTEM:
serverCommandList["OpenPrivateShopKasmir"] = self.Kasmir_Paketi_Open
#/* Müzik Sistem // MUZIKSISTEM // 01.04.18 - 23:11 */
serverCommandList["play"] = self.__play_Enable
if app.ENABLE_SUPPORT_SHAMAN:
serverCommandList["OGSAMANGuiAc"] = self.OpenYardimciGui
serverCommandList["OGSAMANSeviye"] = self.SetYardimciSeviye
serverCommandList["OGSAMANArkaplan"] = self.SetYardimciArkaplan
serverCommandList["OGSAMANZeka"] = self.SetYardimciZeka
serverCommandList["OGSAMANExp"] = self.SetYardimciExp
serverCommandList["OGSAMANIcon"] = self.SetYardimciIcon
serverCommandList["OGSAMANDerece"] = self.SetYardimciDerece
if app.ENABLE_NEW_PET_SYSTEM:
serverCommandList.update({"PetEvolution" : self.SetPetEvolution })
serverCommandList.update({"PetName" : self.SetPetName })
serverCommandList.update({"PetLevel" : self.SetPetLevel })
serverCommandList.update({"PetDuration" : self.SetPetDuration })
serverCommandList.update({"PetAgeDuration" : self.SetPetAgeDuration })
serverCommandList.update({"PetBonus" : self.SetPetBonus })
serverCommandList.update({"PetSkill" : self.SetPetskill })
serverCommandList.update({"PetIcon" : self.SetPetIcon })
serverCommandList.update({"PetExp" : self.SetPetExp })
serverCommandList.update({"PetUnsummon" : self.PetUnsummon })
serverCommandList.update({"OpenPetIncubator" : self.OpenPetIncubator })
if (app.ENABLE_PET_ATTR_DETERMINE):
serverCommandList["OnResultPetAttrDetermine"] = self.__OnResultPetAttrDetermine
serverCommandList["OnResultPetAttrChange"] = self.__OnResultPetAttrChange
if app.WJ_SECURITY_SYSTEM:
serverCommandList.update({"OpenSecurityCreate" : self.OpenSecurityCreate })
serverCommandList.update({"OpenSecurityDialog" : self.OpenSecurityDialog })
serverCommandList.update({"CloseSecurityCreate" : self.CloseSecurityCreate })
serverCommandList.update({"CloseSecurityDialog" : self.CloseSecurityDialog })
if app.ENABLE_TARGET_AFFECT:
serverCommandList.update({"AddTargetBoardAffect" : self.AddTargetBoardAffect })
serverCommandList.update({"RemoveTargetBoardAffect" : self.RemoveTargetBoardAffect })
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
serverCommandList["OnRecvWhisperAdminSystem"] = self.OnRecvWhisperAdminSystem
if not app.ENABLE_BOSS_TRACKING:
serverCommandList["BossTracking"] = self.GetBossTrackingInformation
serverCommandList["BossTrackingUpdatePacket"] = self.BossTrackingUpdate
if constInfo.DUNGEON_LIST_TIME:
serverCommandList.update({"SetQuestTimer" : self.SetQuestTimer,})
serverCommandList.update({"refreshDungeonStatus" : self.__RefreshDungStatus,})
if app.ENABLE_AURA_SYSTEM:
serverCommandList.update({"AuraPanelGelistir" : self.AuraPanelGelistirAc })
serverCommandList.update({"AuraPanelEmdir" : self.AuraPanelEmdirAc })
if app.__ENABLE_NEW_OFFLINESHOP__:
serverCommandList["OpenOfflineShopWindows"] = self.__PressYKey
if constInfo.ENABLE_DUNGEON_TIMER:
serverCommandList.update({"RefreshDungeonFloor" : self.RefreshDungeonFloor })
serverCommandList.update({"RefreshDungeonTimer" : self.RefreshDungeonTimer })
self.serverCommander=stringCommander.Analyzer()
for serverCommandItem in serverCommandList.items():
self.serverCommander.SAFE_RegisterCallBack(
serverCommandItem[0], serverCommandItem[1]
)
self.serverCommander.SAFE_RegisterCallBack("AkiraMenu", self.__AkiraMenu)
self.serverCommander.SAFE_RegisterCallBack("akira_log", self.__AkiraLog)
def BINARY_ServerCommand_Run(self, line):
#dbg.TraceError(line)
try:
#print " BINARY_ServerCommand_Run", line
return self.serverCommander.Run(line)
except RuntimeError, msg:
dbg.TraceError(msg)
return 0
def __ProcessPreservedServerCommand(self):
try:
command = net.GetPreservedServerCommand()
while command:
print " __ProcessPreservedServerCommand", comman#dbg.TraceError(linelf.serverCommander.Run(comm#print command = net.GetPreservedServerCommand()
except RuntimeError, msg:
dbg.TraceError(msg)
return 0
#/* Envanter Görüntüleme Onay Sistemi // ENVANTERGORUNTULEMEONAY // 20.10.17 - 00:46 */
#START
def __ViewEquipRequest(self, vid):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
vid = int(vid)
ViewEquipRequestQuestionDialog = uiCommon.QuestionDialog()
ViewEquipRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + ' giydiklerini görmek istiyor?')
ViewEquipRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
ViewEquipRequestQuestionD#STARTSetCancelText(localeInfo.UI_DENY)
ViewEquipRequestQuestionDialog.SetAcceptEvent(lambda arg = True: self.__AnswerViewEquipRequest(arg))
ViewEquipRequestQuestionDialog.SetCancelEvent(lambda arg = False: self.__AnswerViewEquipRequest(arg))
ViewEquipRequestQuestionDialog.Open()
ViewEquipRequestQuestionDialog.vid = vid
self.ViewEquipRequestQuestionDialog = ViewEquipRequestQuestionDialog
def __AnswerViewEquipRequest(self, answer):
if not self.ViewEquipRequestQuestionDialog:
return
else:
vid = self.ViewEquipRequestQuestionDialog.vid
if answer:
net.SendChatPacket('/view_equip_accept ' + str(vid))
else:
net.SendChatPacket('/view_equip_deny ' + str(vid))
self.ViewEquipRequestQuestionDialog.Close()
self.ViewEquipRequestQuestionDialog = None
def __ViewEquipRequestDenied(self):
self.PopupMessage('Envanter gösterme isteği reddedildi.')
#END
def PartyHealReady(self):
self.interface.PartyHealReady()
def AskSafeboxPassword(self):
self.interface.AskSafeboxPassword()
# ITEM_MALL
def AskMallPassword(self):
self.interface.AskMallPassword()
def __ItemMall_Open(self):
self.interface.OpenItemMall();
def CommandCloseMall(self):
self.interface.CommandCloseMall()
# END_OF_ITEM_MALL
def RefineSuceededM#ENDge(self):
#snd.PlaySound("sound/ui/make_soket.wav")
if app.ENABLE_REFINE_RENEWAL:
chat.AppendChat(chat.CHAT_TYPE_INFO, "|cFF00FF00|H|h[Eşya Geliştirme] : " + "|cFFFFCC00|H|h %s" % localeInfo.REFINE_SUCCESS)
self.interface.CheckRefineDialog(False)
else:
self.PopupMessage(localeInfo.REFINE_SUCCESS)
def RefineFailedMessage(self):
if app.ENABLE_REFINE_RENEWAL:
self.interf#snd.PlaySound(Dialog(True)
self.PopupMessage(localeInfo.REFINE_FAILURE)
else:
self.PopupMessage(localeInfo.REFINE_FAILURE)
def CommandCloseSafebox(self):
self.interface.CommandCloseSafebox()
def __otomatikavstart(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
constInfo.StartAutoHunt = 1
# PRIVATE_SHOP_PRICE_LIST
def __PrivateShop_PriceList(self, itemVNum, itemPrice):
uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
# END_OF_PRIVATE_SHOP_PRICE_LIST
#/* Won Sistemi // WONSISTEM // 30.12.17 - 13:05 */
if app.ENABLE_CHEQUE_SYSTEM:
def __PrivateShop_PriceListNew(self, itemVNum, itemPrice, itemCheque):
uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
uiPrivateShopBuilder.SetPrivateShopItemCheque(itemVNum, itemCheque)
def __Horse_HideState(self):
self.affectShower.SetHorseState(0, 0, 0)
def __Horse_UpdateState(self, level, health, battery):
self.affectShower.SetHorseState(int(level), int(health), int(battery))
def __IsXMasMap(self):
mapDict = ( "metin2_map_n_flame_01",
"metin2_map_n_desert_01",
"metin2_map_spiderdungeon",
"metin2_map_deviltower1", )
if background.GetCurrentMapName() in mapDict:
return FALSE
return TRUE
def __XMasSnow_Enable(self, mode):
self.__XMasSong_Enable(mode)
constInfo.SNOW_MODE_NOW = mode
if "1"==mode:
if not self.__IsXMasMap():
return
print "XMAS_SNOW ON"
background.EnableSnow(1)
else:
print "XMAS_SNOW OFF"
background.EnableSnow(0)
def __XMasBoom_Enable(self, mode):
if "1"==mode:
if not self.__IsXMasMap():
return
print "XMAS_BOOM ON"
self.__DayMode_Update("dark")
self.enableXMasBoom = TRUE
self.startTimeXMasBoom = app.GetTime()
else:
print "XMAS_BOOM OFF"
self.__DayMode_Update("light")
self.enableXMasBoom = FALSE
def __XMasTree_Enable(self, grade):
print "XMAS_TREE ", grade
background.SetXMasTree(int(grade))
def __XMasSong_Enable(self, mode):
if "1"==mode:
print "XMAS_SONG ON"
XMAS_BGM = "xmas.mp3"
if app.IsExistFile("BGM/" + XMAS_BGM)==1:
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic=XMAS_BGM
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
else:
print "XMAS_SONG OFF"
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic=musicInfo.METIN2THEMA
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
def __RestartDialog_Close(self):
self.interface.CloseRestartDialog()
def __Console_Enable(self):
constInfo.CONSOLE_ENABLE = TRUE
self.consoleEnable = TRUE
app.EnableSpecialCameraMode()
ui.EnablePaste(TRUE)
## PrivateShop
def __PrivateShop_Open(self):
self.interface.OpenPrivateShopInputNameDialog()
if app.KASMIR_PAKET_SYSTEM:
def BINARY_PrivateShop_Appear(self, vid, baslik, text):
self.interface.AppearPrivateShop(vid, baslik, text)
else:
def BINARY_PrivateShop_Appear(self, vid, text):
self.interface.AppearPrivateShop(vid, text)
def BINARY_PrivateShop_Disappear(self, vid):
## self.interface.DisappearPrivateShop(vid)
if app.KASMIR_PAKET_SYSTEM:
def __PrivateShop_Kasmir_Open(self):
self.interface.OpenPrivateShopKasmirInputNameDialog()
def Kasmir_Paketi_Open(self):
self.interface.OpenKasmirPaketiDialog()
## DayMode
def __PRESERVE_DayMode_Update(self, mode):
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
constInfo.DAY_MODE_NOW = mode
if "light"==mode:
background.SetEnvironmentData(0)
elif "dark"==mode:
if not self.__IsXMasMap():
return
background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
bac##round.SetEnvironmentData(1)
def __DayMode_Update(self, mode):
#/* Gece Gündüz Sistemi // GECEGUNDUZSISTEM // 06.11.17 - 23:08 */
constInfo.DAY_MODE_NOW = mode
if "light" == mode:
self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
elif "dark" == mode:
if not self.__IsXMasMap():
return
self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
def __DayMode_OnCompleteChangeToLight(self):
background.SetEnvironmentData(0)
self.curtain.FadeIn()
def __DayMode_OnCompleteChangeToDark(self):
background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
background.SetEnvironmentData(1)
self.curtain.FadeIn()
## XMasBoom
def __XMasBoom_Update(self):
self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
return
boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
if app.GetTime() - self.startTimeXMasBoom > boomTime:
self.indexXMasBoom += 1
for i##n xrange(boomCount):
self.__XMasBoom_Boom()
def __XMasBoom_Boom(self):
x, y, z = player.GetMainCharacterPosition()
randX = app.GetRandom(-150, 150)
randY = app.GetRandom(-150, 150)
snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
def __PartyRequestQuestion(self, vid):
vid = int(vid)
partyRequestQuestionDialog = uiCommon.QuestionDialog()
partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
partyRequestQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.__AnswerPartyRequest(arg))
partyRequestQuestionDialog.Open()
partyRequestQuestionDialog.vid = vid
self.partyRequestQuestionDialog = partyRequestQuestionDialog
def __AnswerPartyRequest(self, answer):
if not self.partyRequestQuestionDialog:
return
vid = self.partyRequestQuestionDialog.vid
if answer:
net.SendChatPacket("/party_request_accept " + str(vid))
else:
net.SendChatPacket("/party_request_deny " + str(vid))
self.partyRequestQuestionDialog.Close()
self.partyRequestQuestionDialog = None
def __PartyRequestDenied(self):
self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
def __EnableTestServerFlag(self):
app.EnableTestServerFlag()
def __InGameShop_Show(self, url):
if constInfo.IN_GAME_SHOP_ENABLE:
self.interface.OpenWebWindow(url)
else:
pass
def __InGameBrowser_Show(self, url):
if app.CEF_BROWSER_ENABLE:
self.interface.OpenBrowserWindow(url)
else:
pass
# WEDDING
def __LoginLover(self):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnLoginLover()
def __LogoutLover(self):
if self.interface.wndMessenger:
self.interface.wndMessenger.OnLogoutLover()
if self.affectShower:
self.affectShower.HideLoverState()
def __LoverNear(self):
if self.affectShower:
self.affectShower.ShowLoverState()
def __LoverFar(self):
if self.affectShower:
self.affectShower.HideLoverState()
def __LoverDivorce(self):
if self.interface.wndMessenger:
self.interface.wndMessenger.ClearLoverInfo()
if self.affectShower:
self.affectShower.ClearLoverState()
def __PlayMusic(self, flag, filename):
flag = int(flag)
if flag:
snd.FadeOutAllMusic()
musicInfo.SaveLastPlayFieldMusic()
snd.FadeInMusic("BGM/" + filename)
else:
snd.FadeOutAllMusic()
musicInfo.LoadLastPlayFieldMusic()
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
def __PvPChallenge_Dialog(self, Name, Level, VID, Race):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.PvPChallengeDialog = uipvprequest.PVPRequestDialog()
self.PvPChallengeDialog.LoadDialog()
self.PvPChallengeDialog.OpenDialog(Name, Level, VID, Race)
def __Start_EquipWatch_Loop(self):
constInfo.EQUIP_WATCH_HYPERLINK = 1
self.PopupMessage("%s'de ön izleme moduna geçtin" % (str(time.strftime("%H.%M.%S - %d.%m.%y"))))
self.EquipModeGui.OpenWindow()
def DungeonBugBtnOpen(self):
self.interface.ShowDungeonBtn()
def DungeonBugBtnHide(self):
self.interface.HideDungeonBtn()
if app.UK_ENABLE_SPECIAL_STORAGE:
def PressExtendedInventory(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.interface:
self.interface.ToggleSpecialStorageWindow()
if app.__ENABLE_NEW_OFFLINESHOP__:
def __PressYKey(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.Offlineshop:
if not self.Offlineshop.IsShow():
self.Offlineshop.Open()
else:
self.Offlineshop.Close()
def __OnNotificatonPopup(self, msg=None, name=None, itemvnum=1):
if name != player.GetName():
vid = chrmgr.GetVID(name)
if vid:
chr.SelectInstance(vid)
if msg == "esyasatildi":
kod = int(itemvnum)
item.SelectItem(kod)
item_isim = item.GetItemName()
self.Notificaton = _ui().PopupNotification("%s |cffffcc00|H|h%s|h|r aldı!" % (name, item_isim))
self.Notificaton.SetType(4)
def WordGameWindowShow(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.wordgame.Show()
def __Inputget1(self):
gameInfo.INPUT = 1
constInfo.INPUT_IGNORE = 1
def __Inputget2(self):
gameInfo.INPUT = 0
constInfo.INPUT_IGNORE = 0
def __Inputget3(self):
net.SendQuestInputStringPacket("1")
def GetInputStringStart(self):
constInfo.INPUT_IGNORE = 1
def GetInputStringEnd(self):
constInfo.INPUT_IGNORE = 0
def lonca_gecmis_q(self, id):
import constInfo
constInfo.lonca_gecmis_q = int(id)
def lonca_gecmis_ekle(self, isim):
import constInfo
constInfo.lonca_gecmis_list.append(isim)
def gecmistemizle(self):
import constInfo
constInfo.lonca_gecmis_list = []
def isim_ver(self):
import constInfo
net.SendQuestInputStringPacket(str(constInfo.lonca_gecmis_isim))
def lonca_lider_q(self,qid):
constInfo.lonca_lider_q = int(qid)
def lider_ekle(self, isim, lonca):
import constInfo
constInfo.lider_list.append("#"+isim+"#"+lonca)
def lider_sifirla(self):
import constInfo
constInfo.lider_list = []
def loncatoplantisi(self):
import uiCommon
import constInfo
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
questionDialogtoplanti=uiCommon.QuestionDialog()
questionDialogtoplanti.SetText("Lonca toplantı bölgesine ışınlan ?")
questionDialogtoplanti.SetAcceptEvent(lambda arg=TRUE: self.loncatoplantievet())
questionDialogtoplanti.SetCancelEvent(lambda arg=FALSE: self.loncatoplantihayir())
questionDialogtoplanti.Open()
self.questionDialogtoplanti=questionDialogtoplanti
return
def loncatoplantievet(self):
net.SendChatPacket("/loncatoplantievet")
self.questionDialogtoplanti.Close()
def loncatoplantihayir(self):
self.questionDialogtoplanti.Close()
def guildistatistik(self,arg,arg2,arg3,arg4,arg5,arg6):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiloncaistatistik
self.guildistatistik = uiloncaistatistik.LoncaIstatistik2()
self.guildistatistik.WarInfo(arg,arg2,arg3,arg4,arg5,arg6)
def LoncaIstatistikOpen(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.interface:
if constInfo.IsGuildWarStatShow:
self.interface.CloseGuildWarRankingList()
else:
net.SendChatPacket("/lonca_istatistik")
def __OpenGuildWarRank(self, tokenn):
token = tokenn.split("|")
if token[0] == "Open":
if self.interface:
self.interface.OpenGuildWarRankingList()
elif token[0] == "Close":
if self.interface:
self.interface.CloseGuildWarRankingList()
elif token[0] == "Append":
if self.interface:
self.interface.AppendGuildWarRankingList(str(token[1]), int(token[2]), int(token[3]), int(token[4]))
def loncaistatistik(self,isim,level,durum,oldurme,olum,member):
self.loncaistatistiktemizle(member)
if int(member) == 1:
constInfo.isim1 = "1 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme1 = str(oldurme)
constInfo.olum1 = str(olum)
if int(durum) == 0:
constInfo.durum1 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum1 = "|cffff0000|Hemp|hÖlü"
if int(member) == 2:
constInfo.isim2 = "2 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme2 = str(oldurme)
constInfo.olum2 = str(olum)
if int(durum) == 0:
constInfo.durum2 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum2 = "|cffff0000|Hemp|hÖlü"
if int(member) == 3:
constInfo.isim3 = "3 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme3 = str(oldurme)
constInfo.olum3 = str(olum)
if int(durum) == 0:
constInfo.durum3 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum3 = "|cffff0000|Hemp|hÖlü"
if int(member) == 4:
constInfo.isim4 = "4 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme4 = str(oldurme)
constInfo.olum4 = str(olum)
if int(durum) == 0:
constInfo.durum4 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum4 = "|cffff0000|Hemp|hÖlü"
if int(member) == 5:
constInfo.isim5 = "5 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme5 = str(oldurme)
constInfo.olum5 = str(olum)
if int(durum) == 0:
constInfo.durum5 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum5 = "|cffff0000|Hemp|hÖlü"
if int(member) == 6:
constInfo.isim6 = "6 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme6 = str(oldurme)
constInfo.olum6 = str(olum)
if int(durum) == 0:
constInfo.durum6 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum6 = "|cffff0000|Hemp|hÖlü"
if int(member) == 7:
constInfo.isim7 = "7 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme7 = str(oldurme)
constInfo.olum7 = str(olum)
if int(durum) == 0:
constInfo.durum7 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum7 = "|cffff0000|Hemp|hÖlü"
if int(member) == 8:
constInfo.isim8 = "8 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme8 = str(oldurme)
constInfo.olum8 = str(olum)
if int(durum) == 0:
constInfo.durum8 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum8 = "|cffff0000|Hemp|hÖlü"
if int(member) == 9:
constInfo.isim9 = "9 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme9 = str(oldurme)
constInfo.olum9 = str(olum)
if int(durum) == 0:
constInfo.durum9 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum9 = "|cffff0000|Hemp|hÖlü"
if int(member) == 10:
constInfo.isim10 = "10 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme10 = str(oldurme)
constInfo.olum10 = str(olum)
if int(durum) == 0:
constInfo.durum10 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum10 = "|cffff0000|Hemp|hÖlü"
if int(member) == 11:
constInfo.isim11 = "11 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme11 = str(oldurme)
constInfo.olum11 = str(olum)
if int(durum) == 0:
constInfo.durum11 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum11 = "|cffff0000|Hemp|hÖlü"
if int(member) == 12:
constInfo.isim12 = "12 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme12 = str(oldurme)
constInfo.olum12 = str(olum)
if int(durum) == 0:
constInfo.durum12 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum12 = "|cffff0000|Hemp|hÖlü"
if int(member) == 13:
constInfo.isim13 = "13 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme13 = str(oldurme)
constInfo.olum13 = str(olum)
if int(durum) == 0:
constInfo.durum13 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum13 = "|cffff0000|Hemp|hÖlü"
if int(member) == 14:
constInfo.isim14 = "14 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme14 = str(oldurme)
constInfo.olum14 = str(olum)
if int(durum) == 0:
constInfo.durum14 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum14 = "|cffff0000|Hemp|hÖlü"
if int(member) == 15:
constInfo.isim15 = "15 - "+str(isim)+"(|cff00ff00|H|hLv."+str(level)+"|h|r)"
constInfo.oldurme15 = str(oldurme)
constInfo.olum15 = str(olum)
if int(durum) == 0:
constInfo.durum15 = "|cff00ff00|H|hYaşıyor"
if int(durum) == 1:
constInfo.durum15 = "|cffff0000|Hemp|hÖlü"
def loncaistatistiktemizle(self,member):
if int(member) == 1:
constInfo.isim2 = ""
constInfo.durum2 = ""
constInfo.oldurme2 = ""
constInfo.olum2 = ""
constInfo.isim3 = ""
constInfo.durum3 = ""
constInfo.oldurme3 = ""
constInfo.olum3 = ""
constInfo.isim4 = ""
constInfo.durum4 = ""
constInfo.oldurme4 = ""
constInfo.olum4 = ""
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 2:
constInfo.isim3 = ""
constInfo.durum3 = ""
constInfo.oldurme3 = ""
constInfo.olum3 = ""
constInfo.isim4 = ""
constInfo.durum4 = ""
constInfo.oldurme4 = ""
constInfo.olum4 = ""
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 3:
constInfo.isim4 = ""
constInfo.durum4 = ""
constInfo.oldurme4 = ""
constInfo.olum4 = ""
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 4:
constInfo.isim5 = ""
constInfo.durum5 = ""
constInfo.oldurme5 = ""
constInfo.olum5 = ""
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 5:
constInfo.isim6 = ""
constInfo.durum6 = ""
constInfo.oldurme6 = ""
constInfo.olum6 = ""
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 6:
constInfo.isim7 = ""
constInfo.durum7 = ""
constInfo.oldurme7 = ""
constInfo.olum7 = ""
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 7:
constInfo.isim8 = ""
constInfo.durum8 = ""
constInfo.oldurme8 = ""
constInfo.olum8 = ""
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 8:
constInfo.isim9 = ""
constInfo.durum9 = ""
constInfo.oldurme9 = ""
constInfo.olum9 = ""
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 9:
constInfo.isim10 = ""
constInfo.durum10 = ""
constInfo.oldurme10 = ""
constInfo.olum10 = ""
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 10:
constInfo.isim11 = ""
constInfo.durum11 = ""
constInfo.oldurme11 = ""
constInfo.olum11 = ""
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 11:
constInfo.isim12 = ""
constInfo.durum12 = ""
constInfo.oldurme12 = ""
constInfo.olum12 = ""
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 12:
constInfo.isim13 = ""
constInfo.durum13 = ""
constInfo.oldurme13 = ""
constInfo.olum13 = ""
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 13:
constInfo.isim14 = ""
constInfo.durum14 = ""
constInfo.oldurme14 = ""
constInfo.olum14 = ""
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
if int(member) == 14:
constInfo.isim15 = ""
constInfo.durum15 = ""
constInfo.oldurme15 = ""
constInfo.olum15 = ""
def imp_savasi_q(self,qid):
constInfo.imp_savasi["index"] = int(qid)
def imp_savasi(self):
import constInfo
net.SendQuestInputStringPacket(str(constInfo.imp_savasi["CMD"]))
def imp_savasi_ekran(self):
self.impekran.Show()
def gmyimben(self, durum):
constInfo.imp_savasi["gmyim"] = int(durum)
def imp_savasi_gui(self, kirmizikatilimci, kirmiziskor, sarikatilimci, sariskor, mavikatilimci, maviskor, durum):
constInfo.imp_savasi["kirmizikatilimci"] = int(kirmizikatilimci)
constInfo.imp_savasi["kirmiziskor"] = int(kirmiziskor)
constInfo.imp_savasi["sarikatilimci"] = int(sarikatilimci)
constInfo.imp_savasi["sariskor"] = int(sariskor)
constInfo.imp_savasi["mavikatilimci"] = int(mavikatilimci)
constInfo.imp_savasi["maviskor"] = int(maviskor)
constInfo.imp_savasi["durum"] = int(durum)
def imp_savasi_gui_ac(self):
self.kill_gui = 1
self.kill_gui_board.Show()
def imp_savasi_gui_kapa(self):
self.kill_gui = 0
self.kill_gui_board.Hide()
def OpenDragonLairRanking(self):
if self.interface:
self.interface.OpenDragonLairRanking()
def AddDragonLairRanking(self, data):
if self.interface:
line = int(data.split("#")[1])
name = str(data.split("#")[2])
empire = int(data.split("#")[3])
killcount = int(data.split("#")[4])
self.interface.AddDragonLairRanking(line, name, empire, killcount)
if app.ENABLE_OKEY_EVENT:
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):
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)
def BINARY_Cards_FieldUpdateInfo(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
self.interface.UpdateCardsFieldInfo(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
def BINARY_Cards_PutReward(self, hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points):
self.interface.CardsPutReward(hand_1, hand_1_v, hand_2, hand_2_v, hand_3, hand_3_v, points)
def BINARY_Cards_Open(self, safemode):
self.interface.OpenCardsWindow(safemode)
def __AkiraEventDataAppend(self,event_data):
self.akiraEventButton.Open(event_data)
def __AkiraMenu(self, token):
token = token.split("|")
if token[0] == "inputbegin":
constInfo.AkiraMenu[0] = 1
elif token[0] == "inputend":
constInfo.AkiraMenu[0] = 0
elif token[0] == "ButtonIndex":
net.SendQuestInputStringPacket(str(constInfo.AkiraMenu[2]))
elif token[0] == "AkiraMenu":
constInfo.AkiraMenu[1] = int(token[1])
def __AkiraLog(self, token):
token = token.split("|")
if token[0] == "Open":
if token[1] == "Exchange":
self.akiraLog.Open(1)
elif token[1] == "Shop":
self.akiraLog.Open(2)
elif token[0] == "Add":
self.akiraLog.AkiraLogDataAppend(token)
if app.WJ_SHOW_ALL_CHANNEL:
def BINARY_OnChannelPacket(self, channelID):
import serverInfo
net.SetServerInfo(localeInfo.TEXT_CHANNEL % (serverInfo.REGION_DICT[0][1]["name"], channelID))
self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo())
# END_OF_WEDDING
#/* Hesap kilit Butonu // HESAPKILITBUTON // 22.12.17 - 18:10 */
def hesap_kilit(self, qid):
constInfo.kilitqin = int(qid)
#/* Işınlanma Yüzüğü Butonu // ISINLANMAYUZUKBUTON // 24.12.2017 - 16:45 */
def Isinlanma_yuzuk(self, quest_id):
constInfo.YuzukQid = int(quest_id)
#/* Uzaktan Ticaret Sistemi // UZAKTANTICARET // 10.02.18 */
if app.ENABLE_REMOTE_TRADING:
def __UzaktanTicaret(self, name, level):
#level = int(level)
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
UzaktanTicaretRequestQuestionDialog = uiCommon.QuestionDialog()
UzaktanTicaretRequestQuestionDialog.SetText('%s (Lv.%d) uzaktan ticaret yapmak istiyor?' % (str(name), int(level)))
UzaktanTicaretRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
UzaktanTicaretRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
UzaktanTicaretRequest#levelonDialog.SetAcceptEvent(lambda arg = True: self.__UzaktanTicaretRequest(arg))
UzaktanTicaretRequestQuestionDialog.SetCancelEvent(lambda arg = False: self.__UzaktanTicaretRequest(arg))
UzaktanTicaretRequestQuestionDialog.Open()
UzaktanTicaretRequestQuestionDialog.name = (name)
self.UzaktanTicaretRequestQuestionDialog = UzaktanTicaretRequestQuestionDialog
constInfo.UzaktanTicaretName = str(name)
def __UzaktanTicaretRequest(self, answer):
if not self.UzaktanTicaretRequestQuestionDialog:
return
else:
name = self.UzaktanTicaretRequestQuestionDialog.name
if answer:
net.SendChatPacket('/uzaktan_ticaret_accept ' + str(name))
else:
net.SendChatPacket('/uzaktan_ticaret_deny ' + str(name))
self.UzaktanTicaretRequestQuestionDialog.Close()
self.UzaktanTicaretRequestQuestionDialog = None
def __UzaktanTicaretDenied(self):
self.PopupMessage('Uzaktan ticaret isteği reddedildi.')
#/* Lonca Geçmiş Sistemi // LONCAGECMIS // 11.02.18 - 10:06 */
if app.ENABLE_GUILD_HISTORY:
def __Append_Guild_History(self, guildName, joinDate):
constInfo.GuildHistoryList.append([str(guildName), str(joinDate)])
#/* Ajan Duyuru Sistemi // AJANDUYURUSISTEMI // 18.02.18 - 11:13 */
if app.ENABLE_AJAN_NOTICE:
def __Check_War_Player(self, targetName, killCount, deadCount):
warPlayerCheckQuestionDialog = uiCommon.QuestionDialog3()
warPlayerCheckQuestionDialog.SetText1("%s isimli oyuncu ajan olabilir." % (targetName))
warPlayerCheckQuestionDialog.SetText2("Ölüm: %d Öldürme: %d" % (int(deadCount), int(killCount)))
warPlayerCheckQuestionDialog.SetText3("Savastan atılsın mı?")
warPlayerCheckQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
warPlayerCheckQuestionDialog.SetCancelText(localeInfo.UI_DENY)
warPlayerCheckQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerWarCheckRequest(arg))
warPlayerCheckQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerWarCheckRequest(arg))
warPlayerCheckQuestionDialog.Open()
warPlayerCheckQuestionDialog.name = targetName
self.warPlayerCheckQuestionDialog = warPlayerCheckQuestionDialog
def __AnswerWarCheckRequest(self, answer):
if not self.warPlayerCheckQuestionDialog:
return
targetName = self.warPlayerCheckQuestionDialog.name
if answer:
net.SendChatPacket("/ajan_kov %s" % (str(targetName)))
self.warPlayerCheckQuestionDialog.Close()
self.warPlayerCheckQuestionDialog = None
#/* Lonca Açık Lider Sistemi // LONCAACIKLIDER // 02.03.18 - 20:37 */
if app.ENABLE_GUILD_LEADER:
def __Append_Guild_Open_Leader(self, guildName, playerName, guildMember):
constInfo.GuildOpenLeaderList.append([str(guildName), str(playerName), int(guildMember)])
#/* Lonca Savaş listesi Sistemi // LONCASAVASLISTESI // 03.02.18 - 14:04 */
if app.ENABLE_GUILD_SKORE:
def __Append_Guild_War_Skor(self, playerName, Dead, Kill):
constInfo.GuildWarScoreList.append([str(playerName), str(Dead), str(Kill)])
def OpenWarScore(self):
if str(player.GetMainCharacterName()) == str(guild.GetGuildMasterName()):
import net
net.SendChatPacket("/loncaistatistik")
import uiloncaistatistik
self.loncaistatistik = uiloncaistatistik.LoncaIstatistik()
self.loncaistatistik.Show()
#/* Turnuvaya Katılan Listesi Çektirme // TOURNEYLIST // 30.03.18 - 18:29 */
if app.ENABLE_TOURNEY_LIST:
def __Open_Guild_War_Tourney(self):
if str(player.GetMainCharacterName()) == str(guild.GetGuildMasterName()):
import uiGuildTournement
WarTourneyDialog = uiGuildTournement.GuildTourneySelectDialog()
WarTourneyDialog.Open()
self.WarTourneyDialog = WarTourneyDialog
def __Append_Guild_War_Tourney(self, playerName, guildName, member):
constInfo.GuildWarTourneyList.append([str(playerName), str(guildName), str(member)])
#/* Etkinlik Duyuru // ETKINLIKDUYURU // 31.03.18 - 16:35 */
if app.ENABLE_EVENT_NOTICE_PAGE:
def __Append_Event_Notice_Page(self, day, event, start_date, end_date):
constInfo.EventNoticePageList.append([str(day), str(event), str(start_date), str(end_date)])
#/* Yeni Duyuru Sayfaları // DUYURUPAGE // 30.10.17 - 22:55 */
#START
def Duyuru_Page_Show(self, url):
import uinoticepage
self.wndnoticepage = uinoticepage.WebWindow()
self.wndnoticepage.LoadWindow()
self.wndnoticepage.Hide()
self.wndnoticepage.Open(url)
def Event_Page_Show(self, url):
import uieventpage
self.wndeventpage = uieventpage.WebWindow()
self.wndeventpage.LoadWindow()
self.wndeventpage.Hide()
self.wndeventpage.Open(url)
#END
#/* Müzik Sistem // MUZIKSISTEM // 01.04.18 -#START */
def __play_Enable(self, mode):
if "0" == mode:
print "play OFF"
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic=""
#musicInfo.fieldMusic=musicInfo.METIN2THEMA
snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
#snd.SetMusicVolume(0.0)
elif "0" != mode:
print "play ON"
#END Muzik_BGM = "play_"+mode+".mp3"
if app.IsExistFile("BGM/" + Muzik_BGM) == 1:
if musicInfo.fieldMusic != "":
snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
musicInfo.fieldMusic = Muzik_BGM
snd.FadeInMusic("BGM/" + musicI#musicInfo.fieldMusic=musicInfo.METIN2THEMAcVolume(1.0)
#snd.SetMusicVolume(net.GetFieldMusicVolume#snd.SetMusicVolume(0.0hop // NEWITEMSHOP
def __PythonToLua(self, id):
uiItemShopInfo.PYTHONTOLUA = int(id)
def __PythonIslem(self, PythonIslem):
if PythonIslem == "PYTHONISLEM":
net.SendQuestInputStringPacket(uiItemShopInfo.PYTHONISLEM)
elif PythonIslem == "PLAYER_VID":
net.SendQuestInputStringPacket(str(uiItemShopInfo.PLAYER_VID))
def __LuaToPython(self, LuaToPython):
if LuaToPython.find("#quest_input#") != #snd.SetMusicVolume(net.GetFieldMusicVolume( elif Lu#Newython.find("#quest_inputbitir#") != -1:
uiItemShopInfo.INPUT = 0
elif LuaToPython.find("itemshop_itemler") != -1:
bol = LuaToPython.split("#")
bol2 = LuaToPython.split("|")
bol3 = LuaToPython.split("!")
if LuaToPython.find("bedavamenu") != -1: uiItemShopInfo.ITEMSHOP_BEDAVAITEMLER[str(bol3[1])]["item_"+str(bol[1])] = bol2[2]
elif LuaToPython.find("normalmenu") != -1: uiItemShopInfo.ITEMSHOP_NORMALITEMLER[str(bol3[1])]["item_"+str(bol[1])] = bol2[2]
elif LuaToPython.find("satinaldiklarim") != -1: uiItemShopInfo.ITEMSHOP_SATINALDIKLARIM["item_"+str(bol[1])] = bol2[2]
elif LuaToPython.find("yang") != -1:
uiItemShopInfo.ITEMSHOP_EP = int(bol2[2])
elif LuaToPython.find("yeterliepyok") != -1:
self.parayok = uiCommon.PopupDialog()
self.parayok.SetText("Yeterli ep yok.")
self.parayok.Open()
elif LuaToPython.find("yeterlilevelyok") != -1:
self.parayok = uiCommon.PopupDialog()
self.parayok.SetText("70. Seviye altı kullanamaz.")
self.parayok.Open()
elif LuaToPython.find("yeterliyeryok") != -1:
self.parayok = uiCommon.PopupDialog()
self.parayok.SetText("İtemi satin almak envanterde yeterli boşluk yok.")
self.parayok.Open()
if app.ENABLE_SUPPORT_SHAMAN:
def OpenYardimciGui(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.YARDIMCIGUI == 0:
self.OGSaman.Show()
self.OGSaman.SetTop()
constInfo.YARDIMCIGUI = 1
else:
self.OGSaman.Close()
constInfo.YARDIMCIGUI = 0
def SetYardimciSeviye(self, level):
self.OGSaman.SetSeviye(level)
constInfo.YARDIMCILEVEL = int(level)
def SetYardimciArkaplan(self):
self.OGSaman.ArkaplanBilgi()
self.OGSaman.Close()
def SetYardimciZeka(self , ints):
self.OGSaman.ZekaOrani(ints)
def SetYardimciExp(self, exp, exptot):
if int(exptot) > 0:
self.OGSaman.SetDeneyim(exp, exptot)
self.OGSaman.SetDeneyim(exp, exptot)
def SetYardimciIcon(self, vnum):
if int(vnum) > 0:
self.OGSaman.SetYuzukIcon(vnum)
self.OGSaman.SetYuzukIcon(vnum)
def SetYardimciDerece(self,tasvirderece):
self.OGSaman.SetDerece(tasvirderece)
if app.ENABLE_ITEM_COMBINATION_SYSTEM:
def BINARY_Item_Combination_Open(self, npcVNUM):
self.interface.OpenItemCombinationWindow()
def BINARY_Item_Combination_Succeed(self):
self.interface.SucceedItemCombinationWork()
pass
def BINARY_Skill_Book_Combination_Open(self, npcVNUM):
self.interface.OpenSkillBookCombinationWindow()
def BINARY_Skill_Book_Combination_Succeed(self):
self.interface.SucceedSkillBookCombinationWork()
pass
def BINARY_Combination_Close(self):
self.interface.CloseCombinationWindow()
if app.ENABLE_SHOW_CHEST_DROP:
def BINARY_AddChestDropInfo(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
if self.interface:
self.interface.AddChestDropInfo(chestVnum, pageIndex, slotIndex, itemVnum, itemCount)
def BINARY_RefreshChestDropInfo(self, chestVnum):
if self.interface:
self.interface.RefreshChestDropInfo(chestVnum)
if app.ENABLE_NEW_PET_SYSTEM:
def SetPetEvolution(self, evo):
petname = ["Genc", "Vahsi", "Cesur", "Kahraman"]
self.petmain.SetEvolveName(petname[int(evo)])
def SetPetName(self, name):
if len(name) > 1 and name != "":
self.petmini.Show()
self.petmain.SetName(name)
def SetPetLevel(self, level):
self.petmain.SetLevel(level)
def SetPetDuration(self, dur, durt):
if int(durt) > 0:
self.petmini.SetDuration(dur, durt)
self.petmain.SetDuration(dur, durt)
def SetPetAgeDuration(self, age):
if (int(age)) > 0:
self.petmain.SetAgeDuration(age)
def SetPetBonus(self, hp, dif, sp):
self.petmain.SetHp(hp)
self.petmain.SetDef(dif)
self.petmain.SetSp(sp)
def SetPetskill(self, slot, idx, lv):
if int(lv) > 0:
self.petmini.SetSkill(slot, idx, lv)
self.petmain.SetSkill(slot, idx, lv)
self.affectShower.BINARY_NEW_AddAffect(5400+int(idx),int(constInfo.LASTAFFECT_POINT)+1,int(constInfo.LASTAFFECT_VALUE)+1, 0)
if int(slot)==0:
constInfo.SKILL_PET1=5400+int(idx)
if int(slot)==1:
constInfo.SKILL_PET2=5400+int(idx)
if int(slot)==2:
constInfo.SKILL_PET3=5400+int(idx)
def SetPetIcon(self, vnum):
if int(vnum) > 0:
self.petmini.SetImageSlot(vnum)
self.petmain.SetImageSlot(vnum)
#chat.AppendChat(chat.CHAT_TYPE_INFO, vnum)
def SetPetExp(self, exp, expi, exptot):
if int(exptot) > 0:
self.petmini.SetExperience(exp, expi, exptot)
self.petmain.SetExperience(exp, expi, exptot)
def PetUnsummon(self):
self.petmini.SetDefaultInfo()
self.petmini.Close()
self.petmain.SetDefaultInfo()
self.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET1),0)
self.affectShower.BINARY_NEW_RemoveAffect(int(co#chat.AppendChat(chat.CHAT_TYPE_INFOelf.affectShower.BINARY_NEW_RemoveAffect(int(constInfo.SKILL_PET3),0)
constInfo.SKILL_PET1 = 0
constInfo.SKILL_PET2 = 0
constInfo.SKILL_PET3 = 0
def OpenPetMainGui(self):
if self.petmain.IsShow() == True:
self.petmain.Close()
else:
self.petmain.Show()
self.petmain.SetTop()
def OpenPetIncubator(self, pet_new = 0):
import uipetincubatrice
self.petinc = uipetincubatrice.PetSystemIncubator(pet_new)
self.petinc.Show()
self.petinc.SetTop()
def OpenPetMini(self):
self.petmini.Show()
self.petmini.SetTop()
def OpenPetFeed(self):
import uipetfeed
self.feedwind = uipetfeed.PetFeedWindow()
self.feedwind.Show()
self.feedwind.SetTop()
if (app.ENABLE_PET_ATTR_DETERMINE):
def __OnResultPetAttrDetermine(self, pet_type):
self.petmain.OnResultPetAttrDetermine(int(pet_type))
def __OnResultPetAttrChange(self, pet_type):
self.petmain.OnResultPetAttrChange(int(pet_type))
if app.WJ_SECURITY_SYSTEM:
def OpenSecurityCreate(self):
if self.interface:
self.interface.OpenSecurityCreate()
def OpenSecurityDialog(self):
if self.interface:
self.interface.OpenSecurityDialog()
def CloseSecurityCreate(self):
if self.interface:
self.interface.CloseSecurityCreate()
def CloseSecurityDialog(self):
if self.interface:
self.interface.CloseSecurityDialog()
if app.ENABLE_SASH_SYSTEM:
def ActSash(self, iAct, bWindow):
if self.interface:
self.interface.ActSash(iAct, bWindow)
def AlertSash(self, bWindow):
snd.PlaySound("sound/ui/make_soket.wav")
if bWindow:
self.PopupMessage(localeInfo.SASH_DEL_SERVEITEM)
else:
self.PopupMessage(localeInfo.SASH_DEL_ABSORDITEM)
if app.ENABLE_WHISPER_ADMIN_SYSTEM:
def OpenWhisperSystem(self):
if not chr.IsGameMaster(player.GetMainCharacterIndex()):
return
if self.adminWhisperManager.IsShow():
self.adminWhisperManager.Hide()
else:
self.adminWhisperManager.Show()
if constInfo.DUNGEON_LIST_TIME:
def OpenTimerWindow(self):
self.interface.OpenTimerWindow()
def SetQuestTimer(self, index, time):
self.interface.SetQuestTimer(int(index), int(time))
def __RefreshDungStatus(self):
self.interface.refreshDungeonStatus()
def GameMasterPanel(self):
import uigamemasterpanel
if chr.IsGameMaster(player.GetMainCharacterIndex()):
self.GMPaneL = uigamemasterpanel.GMPaneL()
self.GMPaneL.Show()
def __OpenChequeTicket(self, itemPos):
self.interface.OpenChequeTicket(int(itemPos))
def OpenChequeToGoldTicket(self):
self.interface.OpenChequeToGoldTicket()
def OpenGoldToChequeTicket(self):
self.interface.OpenGoldToChequeTicket()
def __OpenGaya1Ticket(self, itemPos):
self.interface.OpenGaya1Ticket(int(itemPos))
def __OpenGaya2Ticket(self, itemPos):
self.interface.OpenGaya2Ticket(int(itemPos))
def guvenlipcquestislem(self):
net.SendQuestInputStringPacket(str(constInfo.guvenlipcislem))
def guvenlipc_q(self, qid):
constInfo.guvenlipc_q = int(qid)
def guvenlipc_button(self,qid):
constInfo.LOAD_GUVENLI_PC_BUTTON = int(qid)
def guvenlipc(self):
net.SendQuestInputStringPacket(str(player.GetMacAddress()))
def OpenTicaretLog(self):
self.Board = ui.BoardWithTitleBar()
self.Board.SetSize(241+30+215, 271+40+40-17-17)
self.Board.SetCenterPosition()
self.Board.AddFlag('movable')
self.Board.AddFlag('float')
self.Board.SetTitleName('Ticaret Kayitlarin')
self.Board.SetCloseEvent(self.Kapat)
self.Board.Show()
self.Bekle3 = app.GetTime()
self.TekliflerText = ui.TextLine_Alisveris()
self.TekliflerText.SetParent(self.Board)
self.TekliflerText.SetPosition(0, 30)
self.TekliflerText.SetText(str(player.GetName()))
self.TekliflerText.SetWindowHorizontalAlignCenter()
self.TekliflerText.SetHorizontalAlignCenter()
self.TekliflerText.Show()
self.ThinBoard = ui.ThinBoard()
self.ThinBoard.SetParent(self.Board)
self.ThinBoard.SetSize(241-18+26+215, 250)
self.ThinBoard.SetPosition(10+9-5-3, 48)
self.ThinBoard.Show()
self.ListBox=ui.ListBox_Scroll()
self.ListBox.SetParent(self.Board)
self.ListBox.SetPosition(10+9, 50)
self.ListBox.SetSize(241-18+26-8+215, 250)
self.ListBox.Show()
self.ListBox.ClearItem()
pos = 0
if os.path.exists(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg"):
ac = open(str(systemInfo.CLIENT_YOL)+"ticaret_"+str(player.GetName())+".cfg", "r").readlines()
for i in ac:
bol = i.split("#")
self.ListBox.InsertItem(pos, str(bol[1]) + " adli oyuncu ile (" + str(bol[2]) + ") tarihinde ticaret gerceklesti.")
pos += 1
else:
self.ListBox.InsertItem(0, "Yapilan hic ticaret kaydi yok.")
def Kapat(self):
self.Board.Hide()
self.TekliflerText.Hide()
self.ThinBoard.Hide()
self.ListBox.Hide()
self.Ticaret = 0
def __pazar_log_ac(self):
if self.interface:
self.interface.PlayerLogButton()
self.interface.OpenOGStudioRanking2("Pazar Geçmişi")
constInfo.ogstudioislem = "pazarac"
event.QuestButtonClick(constInfo.pazar_log_q_id)
def __pazar_log_q_id(self, id):
constInfo.pazar_log_q_id = int(id)
def __pazar_log_q(self, id):
constInfo.pazar_log_q = int(id)
def __item_fiyat(self):
fiyat = constInfo.item_fiyat
net.SendQuestInputStringPacket(fiyat)
def __item_isim(self):
isim = constInfo.item_isim
net.SendQuestInputStringPacket(isim)
def __itemi_alan(self):
alanname = constInfo.itemi_alan
net.SendQuestInputStringPacket(alanname)
def __tic_quest_id(self, id):
constInfo.tic_gecmis = int(id)
def __tic_gecmis_ac(self):
if self.interface:
self.interface.PlayerLogButton()
self.interface.OpenOGStudioRanking("Ticaret Geçmişi")
constInfo.ogstudioislem = "ticaretac"
event.QuestButtonClick(constInfo.tic_gecmis)
def AddOGStudioRanking(self, data):
if self.interface:
line = int(data.split("#")[1])
name = str(data.split("#")[2])
othername = str(data.split("#")[3])
dates = str(data.split("#")[4])
self.interface.AddOGStudioRanking(line, name, othername, dates)
def AddOGStudioRanking2(self, data):
if self.interface:
no = int(data.split("#")[1])
alanname = str(data.split("#")[2])
vnum = int(data.split("#")[3])
fiyat = int(data.split("#")[4])
won = int(data.split("#")[5])
tarih = str(data.split("#")[6])
self.interface.AddOGStudioRanking2(no, alanname, vnum, fiyat, won, tarih)
def ogstudioquestislem(self):
net.SendQuestInputStringPacket(str(constInfo.ogstudioislem))
def bkac(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.ITEM_REMOVE_WINDOW_STATUS == 1:
return
self.bkoku.Show()
def ruhcac(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.ITEM_REMOVE_WINDOW_STATUS == 1:
return
self.ruhtasi.Show()
def biyoodulac(self, gorev, af1, afv1, af2, afv2, af3, afv3):
self.biyoekran.Show()
self.biyoekran.SetBaslik(str(gorev))
self.biyoekran.SetOdul(af1,afv1,af2,afv2,af3,afv3)
def biyologekrankapa(self):
self.biyoekran.Close()
def OpenBiologWindow(self):
self.biowindow.Show()
def biyolog(self, bioitem, verilen, toplam, kalansure):
self.interface.SetBiyolog(bioitem, verilen, toplam, kalansure)
def guildrankingopen(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.guildranking.Open()
def __guildranking(self, info):
CMD = info.split("/")
if CMD[0]=="index":
constInfo.guildranking["index"] = int(CMD[1])
elif CMD[0]=="input":
net.SendQuestInputStringPacket(str(constInfo.guildranking["CMD"]))
elif CMD[0]=="yeniliste":
constInfo.guildranking["Liste"] = []
elif CMD[0]=="liste":
constInfo.guildranking["Liste"].append(CMD[1].split("|"))
elif CMD[0]=="blok":
self.guildranking.LoadPage(CMD[1])
elif CMD[0]=="sayfa":
self.guildranking.Setsayfa(CMD[1])
def uyariloncasira(self, msg):
if msg == "bilgiyok":
self.PopupMessage("Henüz bilgi girilmemis!")
elif msg == "loncayok":
self.PopupMessage("Lonca bulunamadi!")
elif msg == "oyuncuyok":
self.PopupMessage("Oyuncu bulunamadi!")
elif msg == "kapaliyiz":
self.PopupMessage("Sistem şuan bakımdadır!")
def BossTracking(self):
import constInfo
constInfo.BOSS_TRACKING = 1
if app.ENABLE_BOSS_TRACKING:
def OpenBossTracking(self):
self.bosstracking.Open()
def CloseBossTracking(self):
self.bosstracking.__OnClose()
def BINARY_BOSS_TRACKING(self, kill_time, start_time, channel, mob_vnum, map_index):
self.bosstracking.SetData(kill_time, start_time, channel, mob_vnum, map_index)
else:
def GetBossTrackingInformation(self, btcadi1, btcadi2, btcadi3, btcadi4, btcadi5, btcadi6, btalevkral1, btalevkral2, btalevkral3, btalevkral4, btalevkral5, btalevkral6, btkorumcek1, btkorumcek2, btkorumcek3, btkorumcek4, btkorumcek5, btkorumcek6, btsarikaplan1, btsarikaplan2, btsarikaplan3, btsarikaplan4, btsarikaplan5, btsarikaplan6, btbuzkralice1, btbuzkralice2, btbuzkralice3, btbuzkralice4, btbuzkralice5, btbuzkralice6, btdokuzk1, btdokuzk2, btdokuzk3, btdokuzk4, btdokuzk5, btdokuzk6, btcolejder1, btcolejder2, btcolejder3, btcolejder4, btcolejder5, btcolejder6, btagac1, btagac2, btagac3, btagac4, btagac5, btagac6, btkomutan1, btkomutan2, btkomutan3, btkomutan4, btkomutan5, btkomutan6, btkaranlik1, btkaranlik2, btkaranlik3, btkaranlik4, btkaranlik5, btkaranlik6):
self.bosstracking.GetMobInformation(btcadi1, btcadi2, btcadi3, btcadi4, btcadi5, btcadi6, btalevkral1, btalevkral2, btalevkral3, btalevkral4, btalevkral5, btalevkral6, btkorumcek1, btkorumcek2, btkorumcek3, btkorumcek4, btkorumcek5, btkorumcek6, btsarikaplan1, btsarikaplan2, btsarikaplan3, btsarikaplan4, btsarikaplan5, btsarikaplan6, btbuzkralice1, btbuzkralice2, btbuzkralice3, btbuzkralice4, btbuzkralice5, btbuzkralice6, btdokuzk1, btdokuzk2, btdokuzk3, btdokuzk4, btdokuzk5, btdokuzk6, btcolejder1, btcolejder2, btcolejder3, btcolejder4, btcolejder5, btcolejder6, btagac1, btagac2, btagac3, btagac4, btagac5, btagac6, btkomutan1, btkomutan2, btkomutan3, btkomutan4, btkomutan5, btkomutan6, btkaranlik1, btkaranlik2, btkaranlik3, btkaranlik4, btkaranlik5, btkaranlik6)
def BossTrackingUpdate(self):
net.SendChatPacket("/bosstrackingtest")
def BossTrackingSystemShow(self):
self.bosstracking.Show()
net.SendChatPacket("/bosstrackingtest")
if app.ENABLE_AURA_SYSTEM:
def AuraPanelGelistirAc(self):
self.interface.AuraGelistir()
def AuraPanelEmdirAc(self):
self.interface.AuraEmdir()
if constInfo.ENABLE_DUNGEON_TIMER:
def RefreshDungeonTimer(self, Floor,Time):
if self.interface:
if self.interface.wndMiniMap:
self.interface.wndMiniMap.Hide()
if self.interface.wndDungeonTimer:
self.interface.wndDungeonTimer.RefreshDungeonTimer(Time, Floor)
def RefreshDungeonFloor(self, Floor2):
if self.interface:
if self.interface.wndMiniMap:
self.interface.wndMiniMap.Hide()
if self.interface.wndDungeonTimer:
self.interface.wndDungeonTimer.RefreshDungeonFloor(Floor2)
def captchaekran(self, sayi1, sayi2, sayi3, sayi4, sayi5):
captchatest = uiCommon.CaptchaEkran()
captchatest.SetText1("|cffffff00Bot Engel Sistemi")
captchatest.SetText3("Oyuna devam edebilmek için üstteki kodu aşağıya yaz.")
captchatest.SetTimeOverMsg("Soruyu zamanında cevaplamadığın için oyundan atılıyorsun.")
captchatest.SetTimeOverEvent(self.captchacevap, "kapat")
captchatest.SetAcceptEvent(lambda arg=True: self.captchacevap(arg))
captchatest.SetCancelEvent(lambda arg=False: self.captchacevap(arg))
captchatest.Open(15, sayi1, sayi2, sayi3, sayi4, sayi5)
self.captchatest = captchatest
def captchacevap(self, answer):
if not self.captchatest:
return
text = self.captchatest.GetInput()
capchtext = 0
if text and text.isdigit():
try:
capchtext = int(text)
except ValueError:
capchtext = 5
if answer == False:
self.captchatest.Temizle()
elif answer == True:
net.SendChatPacket("/captcha " + str(capchtext))
self.captchatest.Close()
self.captchatest = None
else:
net.SendChatPacket("/captcha 0")
self.captchatest.Close()
self.captchatest = None
def kilit(self):
item_sil_idd = str(constInfo.kilit_id)
net.SendQuestInputStringPacket(item_sil_idd)
def item_kilit_q(self, qid):
constInfo.ITEM_KILIT = int(qid)
def __Chest_Search(self,vnums,counts):
self.interface.ItemsChest(vnums,counts)
def __Chest_Search_Refresh(self):
self.interface.ItemsChestRefresh()
def __Chest_Search_Refresh_Open(self):
self.interface.ItemsChestRefreshOpen()
def __ChestShow(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.CofresShow()
def __SearchShop(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uisearchshop
self.shopsearch = uisearchshop.SearchWindow()
self.shopsearch.Open()
def __AutoHuntShow(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.OpenAutohuntWindow()
def ClickEfektButton(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiefekt
self.efektsystemxd = uiefekt.Efekt()
self.efektsystemxd.Show()
def IsinlanmaTahtasi(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiisinlanma
self.isinlanmaxdd = uiisinlanma.Isinlanma()
self.isinlanmaxdd.Show()
def OpenMarbleShop(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if self.wndMarbleShop.IsShow():
self.wndMarbleShop.Hide()
else:
self.wndMarbleShop.Show()
if app.ENABLE_OFFLINE_SHOP_SYSTEM:
def __OfflineShop_Open(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.OpenOfflineShopInputNameDialog()
def __OfflineShop_OpenGui(self):
if sistemler.IKARUS_AKTIF:
gameInfo.SYSTEMS_PAKET11=1
else:
self.interface.ToggleOfflineShopAdminPanelWindow()
def BINARY_OfflineShop_Appear(self, vid, text):
if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC):
self.interface.AppearOfflineShop(vid, text)
def BINARY_OfflineShop_Disappear(self, vid):
if (chr.GetInstanceType(vid) == chr.INSTANCE_TYPE_NPC):
self.interface.DisappearOfflineShop(vid)
def PriceCheckerOpen(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
if constInfo.PRICE_CHECKER == 0:
self.average_price.Show()
constInfo.PRICE_CHECKER = 1
else:
self.average_price.Close()
constInfo.PRICE_CHECKER = 0
def PCheckValue(self, value1, value2):
self.average_price.SetData(value1,value2)
def PiyasaKontrolUyarisi(self, esyaadi, esyafiyati):
esyaadiNew = str(esyaadi).replace("_", " ")
self.PopupMessage("%s eşyasını en az %s karşılığında satabilirsiniz." % (esyaadiNew, str(localeInfo.NumberToGoldString(esyafiyati))))
def __OpenDecoration(self):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
self.interface.OpenOfflineShopDecoration()
def StartDice(self):
self.interface.StartDice()
def EndDice(self):
self.interface.EndDice()
def RefreshDice(self):
self.interface.RefreshDice()
def __DiceHasDone(self, myNumber, targetNumber):
self.interface.AddDiceNumber(myNumber, targetNumber)
def efsunbotu_stop1(self):
constInfo.botstop_ef1 = 1
def efsunbotu_stop2(self):
constInfo.botstop_ef2 = 1
def checkitem(self, it):
translate.checkitem = int(it)
def x019x1(self, pin):
chat.AppendChat(1, "%d" % (int(pin)))
def Uzaktan_ticaret_soru(self, isim, level):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
uzaktan_sorusu = uiCommon.QuestionDialog()
uzaktan_sorusu.SetText("|cffFDD017|H|h" + str(isim)+ "|cff00ccff" + "(Lv."+str(level)+")"+ "|h|r" + " Seninle uzaktan ticaret yapmak istiyor.")
uzaktan_sorusu.SetAcceptEvent(lambda arg=TRUE: self.ticaret_kabul(isim))
uzaktan_sorusu.SetCancelEvent(lambda arg=FALSE: self.ticaret_hayir(isim))
uzaktan_sorusu.Open()
self.uzaktan_sorusu = uzaktan_sorusu
return
def ticaret_kabul(self, isim):
net.SendChatPacket("/uzaktan_ticaret_kabul " + str(isim))
self.uzaktan_sorusu.Close()
def ticaret_hayir(self, isim):
net.SendChatPacket("/uzaktan_ticaret_hayir " + str(isim))
self.uzaktan_sorusu.Close()
def ticaretbilgi(self,karsiname,karsilevel,karsitarafrace):
import constInfo
constInfo.tictitle = karsiname
constInfo.ticlevel = int(karsilevel)
constInfo.ticsinif = int(karsitarafrace)
def ticarettype(self,yazitext):
import constInfo
constInfo.ticaretbaslik = str(yazitext)
def __BKTradeSys(self, arg1, arg2):
if str(arg1) == "qid":
constInfo.BK_TRADE_SYSTEM["qid"] = arg2
if str(arg1) == "get":
net.SendQuestInputStringPacket(str(constInfo.BK_TRADE_SYSTEM["ItemList"]))
if str(arg1) == "open":
self.BKTradeSys.OpenWindow()
if str(arg1) == "block":
constInfo.INPUT_IGNORE = 1
if str(arg1) == "break":
constInfo.INPUT_IGNORE = 0
def get_skills(self,job):
if constInfo.SKILL_SELECT_POINTER == 1:
return
import select_warriorskills
import select_assassinskills
import select_suraskills
import select_shamanskills
self.black = None
if int(job) == 0 or int(job) == 4:
self.black = select_warriorskills.MainWindow()
self.black.OpenWindow()
elif int(job) == 1 or int(job) == 5:
self.black = select_assassinskills.MainWindow()
self.black.OpenWindow()
elif int(job) == 2 or int(job) == 6:
self.black = select_suraskills.MainWindow()
self.black.OpenWindow()
elif int(job) == 3 or int(job) == 7:
self.black = select_shamanskills.MainWindow()
self.black.OpenWindow()
def CloseSkill(self):
self.skillQuestionDialog.Hide()
self.skillQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def RequestJob(self, answer):
if not self.skillQuestionDialog:
return
if answer:
net.SendChatPacket("/skill_select 1")
else:
net.SendChatPacket("/skill_select 2")
chat.AppendChat(chat.CHAT_TYPE_INFO, "Skill grubu secildi.")
self.skillQuestionDialog.Close()
self.skillQuestionDialog = None
constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
def __SetAllPlayersVisible(self):
chrmgr.ShowAllPlayers()
def __ClearPlayersTitle(self):
chrmgr.RemoveAllPlayersTitle()
def bonusgormekistiyor(self,isim,level):
if app.WJ_SECURITY_SYSTEM and player.IsSecurityActivate():
return
import uiCommon
import constInfo
questionDialogbonus=uiCommon.QuestionDialog()
questionDialogbonus.SetText(str(isim)+"(Lv."+str(level)+")"+" bonuslarini gormek istiyor. Izin veriyor musun?")
questionDialogbonus.SetAcceptEvent(lambda arg=TRUE: self.bonusgormeevet(isim))
questionDialogbonus.SetCancelEvent(lambda arg=FALSE: self.bonusgormehayir(isim))
questionDialogbonus.Open()
self.questionDialogbonus=questionDialogbonus
return
def bonusgormeevet(self,isim):
net.SendChatPacket("/bonusumu_gorebilirsin " + str(isim))
self.questionDialogbonus.Close()
def bonusgormehayir(self,isim):
net.SendChatPacket("/bonusumu_goremezsin " + str(isim))
self.questionDialogbonus.Close()
def bonuslarimigor(self,name,deliciefsun,kritikefsun,yariinsanefsun,kilicsavunmasiefsun,ciftelsavunmasiefsun,bicaksavunmasiefsun,yelpazesavunmasiefsun,cansavunmasiefsun,oksavunmasiefsun,buyusavunmasiefsun):
import chat
import constInfo
constInfo.efsungorname = "Bonuslar"
constInfo.kritik = 0
constInfo.delici = 0
constInfo.yariinsan = 0
constInfo.kilic = 0
constInfo.ciftel = 0
constInfo.bicak = 0
constInfo.ok = 0
constInfo.yelpaze = 0
constInfo.can = 0
constInfo.buyu = 0
constInfo.efsungorname = str(name)
constInfo.kritik = int(kritikefsun)
constInfo.delici = int(deliciefsun)
constInfo.yariinsan = int(yariinsanefsun)
constInfo.kilic = int(kilicsavunmasiefsun)
constInfo.ciftel = int(ciftelsavunmasiefsun)
constInfo.bicak = int(bicaksavunmasiefsun)
constInfo.ok = int(oksavunmasiefsun)
constInfo.yelpaze = int(yelpazesavunmasiefsun)
constInfo.can = int(cansavunmasiefsun)
constInfo.buyu = int(buyusavunmasiefsun)
import uiefsungor
self.efsungor = uiefsungor.EfsunGor()
self.efsungor.Show()
def DungeonInfo(self, questindex):
constInfo.dungeonData["quest_index"] = questindex
def CleanDungeonInfo(self):
constInfo.dungeonInfo = []
def GetDungeonInfo(self, cmd):
cmd = cmd.split("#")
if cmd[0] == "INPUT":
constInfo.INPUT_IGNORE = int(cmd[1])
elif cmd[0] == "CMD":
net.SendQuestInputStringPacket(constInfo.dungeonData["quest_cmd"])
constInfo.dungeonData["quest_cmd"] = ""
else:
pass
def UpdateDungeonInfo(self, type, organization, levelLimit, levelLimitMax, partyMembers, mapName, mapIndex, mapCoordX, mapCoordY, cooldown, duration, entranceMapName, strengthBonusName, itemVnum, npcVnum, repTime):
type = int(type)
organization = int(organization)
levelLimit = int(levelLimit)
levelLimitMax = int(levelLimitMax)
partyMembers = int(partyMembers)
mapName = str(mapName).replace("_", " ")
mapIndex = int(mapIndex)
mapCoordX = int(mapCoordX)
mapCoordY = int(mapCoordY)
cooldown = int(cooldown)
duration = int(duration)
entranceMapName = str(entranceMapName).replace("_", " ")
strengthBonusName = str(strengthBonusName).replace("_", " ")
itemVnum = int(itemVnum)
npcVnum = int(npcVnum)
repTime = int(repTime)
constInfo.dungeonInfo.append(\
{
"type" : type,\
"organization" : organization,\
"level_limit" : levelLimit,\
"max_level" : levelLimitMax,\
"party_members" : partyMembers,\
"map" : mapName,\
"map_index" : mapIndex,\
"map_coord_x" : mapCoordX,\
"map_coord_y" : mapCoordY,\
"cooldown" : cooldown,\
"duration" : duration,\
"entrance_map" : entranceMapName,\
"strength_bonus" : strengthBonusName,\
"item_vnum" : itemVnum,\
"npc_vnum" : npcVnum,
"rep_time" : repTime,
},
)
def IsBloodDungeonSystemWindow(self):
if str(background.GetCurrentMapName()) == "zency_ronark" and not self.blood_dungeon.IsShow():
self.blood_dungeon.Show()
def QuestClickByName(self, qname):
event.QuestClickByName(qname)
def __RefreshCoins(self):
self.interface.RefreshCoins()
def __ItemSatVEYASil(self):
self.interface.OpenOGSItemRemoveWindow()
def savas_list_yenile(self):
constInfo.savas_list = []
def savas_listtesi(self, loncam, rakip, tarih, id):
constInfo.savas_list.append("#"+loncam+"#"+rakip+"#"+tarih+"#"+id)
def __GuildWar_ProcessKillInput(self, killerName, killerRace, victimName, victimRace):
self.guildScoreCounter.OnMessage(killerName, killerRace, victimName, victimRace)
def recordac(self):
self.recordscreen.Open()
def __recordscreen(self, info):
CMD = info.split("/")
if CMD[0]=="index":
constInfo.record["index"] = int(CMD[1])
elif CMD[0]=="input":
net.SendQuestInputStringPacket(str(constInfo.record["CMD"]))
elif CMD[0]=="yeniliste":
constInfo.record["Liste"] = []
elif CMD[0]=="liste":
constInfo.record["Liste"].append(CMD[1].split("|"))
elif CMD[0]=="blok":
self.recordscreen.LoadPage(CMD[1])
elif CMD[0]=="sayfa":
self.recordscreen.Setsayfa(CMD[1])
def recordwarning(self, msg):
if msg == "bilgiyok":
self.PopupMessage("Bilgi yok!")
elif msg == "oyuncuyok":
self.PopupMessage("Oyuncu bulunamadi")
def __BotControlActive(self, a):
constInfo.BOT_PIN_X = int(a)
botControl.OpenWindow()
def __BotControlDeactive(self):
constInfo.BOT_PIN_X = 0
botControl.Board.Hide()
def ShowCaptcha(self, timeLeft):
self.interface.ShowCaptcha(int(timeLeft))
def OpenLevelGuide(self):
karakter_seviyesi = player.GetStatus(player.LEVEL)
if 0 <= karakter_seviyesi and karakter_seviyesi <= 119:
import uilevelguide
self.levelGuide.Hide()
self.levelGuide = uilevelguide.Window()
self.levelGuide.Show()
elif 120 <= karakter_seviyesi:
import uilevelguide
self.levelGuide.Hide()
self.levelGuide = uilevelguide.Window()
#MR TaskbarButon
def __hediye_button(self, hediye):
constInfo.LOAD_QUEST_HEDIYE_BUTTON = int(hediye)
#MR TaskbarButon
def VectorsSwitchbot(self):
if self.switchbot.Vectors_bot_shown == 1:
self.switchbot.Hide()
else:
self.switchbot.Show()
[/CODE]#MR#MR
