Problemă Taskbar
Dacă șterg ”import uiAcce” nu mai pornește clientul deloc iar syserr e gol, am încercat asta înainte să postez aici.[Tupeu] scrie:Sterge import uiAcceluv12345 scrie:Salutare, am instalat taskbar illumina by KoYGeR și după ce dau login, mii se închide clientul și primesc asta în syserr:
EDIT: Pardon, mă connectează, iar după ce selectez caracterul, mă scoate din client cu erroarea ”????????” și cu syserr gol.luv12345 scrie:Dacă șterg ”import uiAcce” nu mai pornește clientul deloc iar syserr e gol, am încercat asta înainte să postez aici.[Tupeu] scrie:Sterge import uiAcceluv12345 scrie:Salutare, am instalat taskbar illumina by KoYGeR și după ce dau login, mii se închide clientul și primesc asta în syserr:
Incearca asta:luv12345 scrie:EDIT: Pardon, mă connectează, iar după ce selectez caracterul, mă scoate din client cu erroarea ”????????” și cu syserr gol.luv12345 scrie:Dacă șterg ”import uiAcce” nu mai pornește clientul deloc iar syserr e gol, am încercat asta înainte să postez aici.[Tupeu] scrie: Sterge import uiAcce
http://just4metin.ro/mape-interfete/ill ... 60272.html
Pune si fix ce l-am lasat acolo.
Am încercat tutorialul tău, acum se întâmplă asta:[Tupeu] scrie:Incearca asta:luv12345 scrie:EDIT: Pardon, mă connectează, iar după ce selectez caracterul, mă scoate din client cu erroarea ”????????” și cu syserr gol.luv12345 scrie: Dacă șterg ”import uiAcce” nu mai pornește clientul deloc iar syserr e gol, am încercat asta înainte să postez aici.
http://just4metin.ro/mape-interfete/ill ... 60272.html
Pune si fix ce l-am lasat acolo.
Syserr:
Inlocuieste ce ai in uitaskbar cu asta:
import ui
import net
import item
import skill
import localeInfo
import wndMgr
import player
import constInfo
import mouseModule
import uiScriptLocale
import app
import ime
import grp
import snd
from ui import Window
from ui import ExpandedImageBox, ImageBox, Button
import interfaceModule
import miniMap
import uiminimap
MOUSE_SETTINGS = [0, 0]
def InitMouseButtonSettings(left, right):
global MOUSE_SETTINGS
MOUSE_SETTINGS = [left, right]
def SetMouseButtonSetting(dir, event):
global MOUSE_SETTINGS
MOUSE_SETTINGS[dir] = event
def GetMouseButtonSettings():
global MOUSE_SETTINGS
return MOUSE_SETTINGS
def SaveMouseButtonSettings():
global MOUSE_SETTINGS
open("Mysz.cfg", "w").write("%s\t%s" % tuple(MOUSE_SETTINGS))
def LoadMouseButtonSettings():
global MOUSE_SETTINGS
tokens = open("Mysz.cfg", "r").read().split()
if len(tokens) != 2:
raise RuntimeError, "MOUSE_SETTINGS_FILE_ERROR"
MOUSE_SETTINGS[0] = int(tokens[0])
MOUSE_SETTINGS[1] = int(tokens[1])
def unsigned32(n):
return n & 0xFFFFFFFFL
def CustomIsIn(x, y, part):
x_, y_ = part.GetGlobalPosition()
x_max = part.GetWidth() + x_
y_max = part.GetHeight() + y_
if((x >= x_) and (x <= x_max) and (y >= y_) and (y <= y_max)):
return True
else:
return False
class MapTextToolTip(ui.Window):
def __init__(self):
ui.Window.__init__(self)
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetHorizontalAlignCenter()
textLine.SetOutline()
textLine.SetHorizontalAlignRight()
textLine.Show()
self.textLine = textLine
def __del__(self):
ui.Window.__del__(self)
def SetText(self, text):
self.textLine.SetText(text)
def SetTooltipPosition(self, PosX, PosY):
if localeInfo.IsARABIC():
w, h = self.textLine.GetTextSize()
self.textLine.SetPosition(PosX - w - 5, PosY)
else:
self.textLine.SetPosition(PosX - 5, PosY)
def SetTextColor(self, TextColor):
self.textLine.SetPackedFontColor(TextColor)
def GetTextSize(self):
return self.textLine.GetTextSize()
class AtlasWindow(ui.ScriptWindow):
class AtlasRenderer(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.AddFlag("not_pick")
def OnUpdate(self):
miniMap.UpdateAtlas()
def OnRender(self):
(x, y) = self.GetGlobalPosition()
fx = float(x)
fy = float(y)
miniMap.RenderAtlas(fx, fy)
def HideAtlas(self):
miniMap.HideAtlas()
def ShowAtlas(self):
miniMap.ShowAtlas()
def __init__(self):
self.tooltipInfo = MapTextToolTip()
self.tooltipInfo.Hide()
self.infoGuildMark = ui.MarkBox()
self.infoGuildMark.Hide()
self.AtlasMainWindow = None
self.mapName = ""
self.board = 0
ui.ScriptWindow.__init__(self)
def __del__(self):
ui.ScriptWindow.__del__(self)
def SetMapName(self, mapName):
if 949==app.GetDefaultCodePage():
try:
self.board.SetTitleName(localeInfo.MINIMAP_ZONE_NAME_DICT[mapName])
except:
pass
def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "UIScript/AtlasWindow.py")
except:
import exception
exception.Abort("AtlasWindow.LoadWindow.LoadScript")
try:
self.board = self.GetChild("board")
except:
import exception
exception.Abort("AtlasWindow.LoadWindow.BindObject")
self.AtlasMainWindow = self.AtlasRenderer()
self.board.SetCloseEvent(self.Hide)
self.AtlasMainWindow.SetParent(self.board)
self.AtlasMainWindow.SetPosition(7, 30)
self.tooltipInfo.SetParent(self.board)
self.infoGuildMark.SetParent(self.board)
self.SetPosition(wndMgr.GetScreenWidth() - 136 - 256 - 10, 0)
self.Hide()
miniMap.RegisterAtlasWindow(self)
def Destroy(self):
miniMap.UnregisterAtlasWindow()
self.ClearDictionary()
self.AtlasMainWindow = None
self.tooltipAtlasClose = 0
self.tooltipInfo = None
self.infoGuildMark = None
self.board = None
def OnUpdate(self):
if not self.tooltipInfo:
return
if not self.infoGuildMark:
return
self.infoGuildMark.Hide()
self.tooltipInfo.Hide()
if False == self.board.IsIn():
return
(mouseX, mouseY) = wndMgr.GetMousePosition()
(bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID) = miniMap.GetAtlasInfo(mouseX, mouseY)
if False == bFind:
return
if "empty_guild_area" == sName:
sName = localeInfo.GUILD_EMPTY_AREA
if localeInfo.IsARABIC() and sName[-1].isalnum():
self.tooltipInfo.SetText("(%s)%d, %d" % (sName, iPosX, iPosY))
else:
self.tooltipInfo.SetText("%s(%d, %d)" % (sName, iPosX, iPosY))
(x, y) = self.GetGlobalPosition()
self.tooltipInfo.SetTooltipPosition(mouseX - x, mouseY - y)
self.tooltipInfo.SetTextColor(dwTextColor)
self.tooltipInfo.Show()
self.tooltipInfo.SetTop()
if 0 != dwGuildID:
textWidth, textHeight = self.tooltipInfo.GetTextSize()
self.infoGuildMark.SetIndex(dwGuildID)
self.infoGuildMark.SetPosition(mouseX - x - textWidth - 18 - 5, mouseY - y)
self.infoGuildMark.Show()
def Hide(self):
if self.AtlasMainWindow:
self.AtlasMainWindow.HideAtlas()
self.AtlasMainWindow.Hide()
ui.ScriptWindow.Hide(self)
def Show(self):
if self.AtlasMainWindow:
(bGet, iSizeX, iSizeY) = miniMap.GetAtlasSize()
if bGet:
self.SetSize(iSizeX + 15, iSizeY + 38)
if localeInfo.IsARABIC():
self.board.SetPosition(iSizeX+15, 0)
self.board.SetSize(iSizeX + 15, iSizeY + 38)
#self.AtlasMainWindow.SetSize(iSizeX, iSizeY)
self.AtlasMainWindow.ShowAtlas()
self.AtlasMainWindow.Show()
ui.ScriptWindow.Show(self)
def SetCenterPositionAdjust(self, x, y):
self.SetPosition((wndMgr.GetScreenWidth() - self.GetWidth()) / 2 + x, (wndMgr.GetScreenHeight() - self.GetHeight()) / 2 + y)
def OnPressEscapeKey(self):
self.Hide()
return True
class TaskBarRightSide(ui.ScriptWindow):
Ekwipunek = 0
Przyjaciele = 0
OpcjeSystemowe = 0
class MiniMap(Window):
class MapTextToolTip(Window):
def __init__(self):
ui.Window.__init__(self)
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetHorizontalAlignCenter()
textLine.SetOutline()
textLine.SetHorizontalAlignRight()
textLine.Show()
self.textLine = textLine
def __del__(self):
ui.Window.__del__(self)
def SetText(self, text):
self.textLine.SetText(text)
def SetTooltipPosition(self, PosX, PosY):
self.textLine.SetPosition(PosX - 5, PosY)
def SetTextColor(self, TextColor):
self.textLine.SetPackedFontColor(TextColor)
def GetTextSize(self):
return self.textLine.GetTextSize()
def __init__(self):
ui.Window.__init__(self)
self.AddFlag("not_pick")
self.tooltipInfo = None
self.btnAtlas = None
self.Show()
def OnUpdate(self):
miniMap.UpdateAtlas()
self.UpdateMiniMapToolTip()
def UpdateMiniMapToolTip(self):
(mouseX, mouseY) = wndMgr.GetMousePosition()
if self.tooltipInfo:
if True == CustomIsIn(mouseX, mouseY, self):
(bFind, sName, iPosX, iPosY, dwTextColor) = miniMap.GetInfo(mouseX, mouseY)
if bFind == 0:
self.tooltipInfo.Hide()
elif not self.CanSeeInfo:
self.tooltipInfo.SetText("%s(%s)" % (sName, "Nieznana pozycja"))
self.tooltipInfo.SetTooltipPosition(mouseX - 5, mouseY)
self.tooltipInfo.SetTextColor(dwTextColor)
self.tooltipInfo.Show()
else:
self.tooltipInfo.SetText("%s(%d, %d)" % (sName, iPosX, iPosY))
self.tooltipInfo.SetTooltipPosition(mouseX - 5, mouseY)
self.tooltipInfo.SetTextColor(dwTextColor)
self.tooltipInfo.Show()
else:
self.tooltipInfo.Hide()
def AddToolTip(self, parent):
self.tooltipInfo = self.MapTextToolTip()
self.tooltipInfo.SetParent(parent)
self.tooltipInfo.Hide()
def OnRender(self):
(x, y) = self.GetGlobalPosition()
fx = float(x)
fy = float(y)
miniMap.Render(fx, fy)
def HideAtlas(self):
miniMap.HideAtlas()
def ShowAtlas(self):
miniMap.ShowAtlas()
def CanSeeInfo(self):
return True
def GetMapsUnallowed(self):
return {
"metin2_map_monkeydungeon" : FALSE,
"metin2_map_monkeydungeon_02" : FALSE,
"metin2_map_monkeydungeon_03" : FALSE,
"metin2_map_devilsCatacomb" : FALSE,
}
def __init__(self):
ui.ScriptWindow.__init__(self, "TOP_MOST")
self.BuildWindow()
self.AtlasWindow = AtlasWindow()
self.AtlasWindow.LoadWindow()
self.AtlasWindow.Hide()
def __del__(self):
ui.ScriptWindow.__del__(self)
def BuildWindow(self):
self.path = "locale/pl/ui/taskbar/"
self.width = max(1280, wndMgr.GetScreenWidth())
minimapa = self.MiniMap()
self.minimapa = minimapa
self.minimapa.SetParent(self)
self.minimapa.SetPosition(95, 20)
self.minimapa.Show()
self.SetSize(378,158)
self.SetPosition(self.width/2+220, wndMgr.GetScreenHeight()-158)
self.Show()
self.base = ui.ExpandedImageBox()
self.base.SetParent(self)
self.base.SetPosition(0,0)
self.base.LoadImage(self.path+"bar_right.tga")
self.base.Show()
self.btnAtlas = Button()
self.btnAtlas.SetParent(self)
self.btnAtlas.SetUpVisual(self.path+"btn_atlas_01_normal.tga")
self.btnAtlas.SetOverVisual(self.path+"btn_atlas_02_hover.tga")
self.btnAtlas.SetDownVisual(self.path+"btn_atlas_03_active.tga")
self.btnAtlas.SetToolTipText("Pokaz/Schowaj Mape", 0, -25)
self.btnAtlas.SetEvent(self.PokazMape)
self.btnAtlas.SetPosition(191, 19)
self.btnAtlas.Show()
self.MinusButton = Button()
self.MinusButton.SetParent(self)
self.MinusButton.SetUpVisual(self.path+"btn_zoomout_01_normal.tga")
self.MinusButton.SetOverVisual(self.path+"btn_zoomout_02_hover.tga")
self.MinusButton.SetDownVisual(self.path+"btn_zoomout_03_active.tga")
self.MinusButton.SetToolTipText("Oddal", 0, -25)
self.MinusButton.SetEvent(self.OddalMape)
self.MinusButton.SetPosition(205, 105)
self.MinusButton.Show()
self.PlusButton = Button()
self.PlusButton.SetParent(self)
self.PlusButton.SetUpVisual(self.path+"btn_zoomin_01_normal.tga")
self.PlusButton.SetOverVisual(self.path+"btn_zoomin_02_hover.tga")
self.PlusButton.SetDownVisual(self.path+"btn_zoomin_03_active.tga")
self.PlusButton.SetToolTipText("Przybliz", 0, -25)
self.PlusButton.SetEvent(self.PrzyblizMape)
self.PlusButton.SetPosition(189, 124)
self.PlusButton.Show()
self.InventoryBtn = Button()
self.InventoryBtn.SetParent(self)
self.InventoryBtn.SetUpVisual(self.path+"btn_inventory_01_normal.tga")
self.InventoryBtn.SetOverVisual(self.path+"btn_inventory_02_hover.tga")
self.InventoryBtn.SetDownVisual(self.path+"btn_inventory_03_active.tga")
self.InventoryBtn.SetToolTipText("Ekwipunek ", 0, -25)
self.InventoryBtn.SetPosition(74, 77)
self.InventoryBtn.Show()
self.FriendList = Button()
self.FriendList.SetParent(self)
self.FriendList.SetUpVisual(self.path+"btn_friends_01_normal.tga")
self.FriendList.SetOverVisual(self.path+"btn_friends_02_hover.tga")
self.FriendList.SetDownVisual(self.path+"btn_friends_03_active.tga")
self.FriendList.SetToolTipText("Przyjaciele [Alt+M]", 0, -25)
self.FriendList.SetPosition(82, 100)
self.FriendList.Show()
self.SystemBtn = Button()
self.SystemBtn.SetParent(self)
self.SystemBtn.SetUpVisual(self.path+"btn_options_01_normal.tga")
self.SystemBtn.SetOverVisual(self.path+"btn_options_02_hover.tga")
self.SystemBtn.SetDownVisual(self.path+"btn_options_03_active.tga")
self.SystemBtn.SetToolTipText("Opcje [ESC]", 0, -25)
self.SystemBtn.SetPosition(266, 132)
self.SystemBtn.Show()
JebanePrzyciski = {}
JebanePrzyciski[TaskBarRightSide.Ekwipunek]= self.InventoryBtn
JebanePrzyciski[TaskBarRightSide.Przyjaciele]= self.FriendList
JebanePrzyciski[TaskBarRightSide.OpcjeSystemowe]= self.SystemBtn
self.JebanePrzyciski = JebanePrzyciski
def PrzyblizMape(self):
miniMap.ScaleUp()
def OddalMape(self):
miniMap.ScaleDown()
def PokazMape(self):
if not miniMap.IsAtlas():
return
if self.AtlasWindow.IsShow():
self.AtlasWindow.Hide()
else:
self.AtlasWindow.Show()
def SetToggleButtonEvent(self, eButton, kEventFunc):
self.JebanePrzyciski[eButton].SetEvent(kEventFunc)
class TaskBarLeftSide(ui.ScriptWindow):
PrzyciskPostaci = 0
def __init__(self):
ui.ScriptWindow.__init__(self, "TOP_MOST")
self.BuildWindow()
def __del__(self):
ui.ScriptWindow.__del__(self)
def BuildWindow(self):
self.path = "locale/pl/ui/taskbar/"
self.width = max(1280, wndMgr.GetScreenWidth())
self.SetSize(378,124)
self.SetPosition(self.width/2-598, wndMgr.GetScreenHeight()-124)
self.Show()
self.EmptyHp = ui.ExpandedImageBox()
self.EmptyHp.SetParent(self)
self.EmptyHp.SetPosition(23+114,7)
self.EmptyHp.LoadImage(self.path+"gauge_hp/gauge_hp_empty.tga")
self.EmptyHp.Show()
self.HpRefresh = []
for i in xrange(0,6):
part = ui.ExpandedImageBox()
part.AddFlag("not_pick")
part.LoadImage(self.path+"gauge_hp/gauge_hp_fill_0"+ str(i+1)+".tga")
part.SetAlpha(0.3)
part.SetParent(self.EmptyHp)
part.SetPosition(0,0)
part.Show()
self.HpRefresh.append(part)
part = ui.ExpandedImageBox()
part.AddFlag("not_pick")
part.LoadImage(self.path+"gauge_hp/gauge_hp_transition.tga")
part.SetAlpha(0.3)
part.SetParent(self.EmptyHp)
part.SetPosition(0,0)
part.Show()
self.HpRefresh.append(part)
self.HpFull = []
for i in xrange(0,6):
part = ui.ExpandedImageBox()
part.AddFlag("not_pick")
part.LoadImage(self.path+"gauge_hp/gauge_hp_fill_0"+ str(i+1)+".tga")
part.SetParent(self.EmptyHp)
part.SetPosition(0,0)
part.Show()
self.HpFull.append(part)
part = ui.ExpandedImageBox()
part.AddFlag("not_pick")
part.LoadImage(self.path+"gauge_hp/gauge_hp_transition.tga")
part.SetParent(self.EmptyHp)
part.SetPosition(0,0)
part.Show()
self.HpFull.append(part)
self.EmptyPe = ui.ExpandedImageBox()
self.EmptyPe.SetParent(self)
self.EmptyPe.SetPosition(23+114,7)
self.EmptyPe.LoadImage(self.path+"gauge_mp/gauge_mp_empty.tga")
self.EmptyPe.Show()
self.MpRefresh = []
for i in xrange(0,77):
part = ui.ExpandedImageBox()
part.AddFlag("not_pick")
s = str(i)
if(i < 10):
s = "0"+s
part.LoadImage(self.path+"gauge_mp/gauge_mp_fill_"+ s+".tga")
part.SetParent(self.EmptyPe)
part.SetPosition(52, 52)
part.SetAlpha(0.3)
part.Hide()
self.MpRefresh.append(part)
self.MpFull = []
for i in xrange(0,77):
part = ui.ExpandedImageBox()
part.AddFlag("not_pick")
s = str(i)
if(i < 10):
s = "0"+s
part.LoadImage(self.path+"gauge_mp/gauge_mp_fill_"+ s+".tga")
part.SetParent(self.EmptyPe)
part.SetPosition(52, 52)
part.Show()
self.MpFull.append(part)
self.SetMp(20, 60, 100)
self.SetHp(10,60,100)
self.base = ui.ExpandedImageBox()
self.base.SetParent(self)
self.base.SetPosition(0,0)
self.base.LoadImage(self.path+"bar_left.tga")
self.base.Show()
self.WartoscHP = ui.TextLine()
self.WartoscHP.SetParent(self.base)
self.WartoscHP.SetPackedFontColor(0x77cb0000)
self.WartoscHP.SetPosition(134+114,45)
self.WartoscHP.Show()
self.WartoscPE = ui.TextLine()
self.WartoscPE.SetParent(self.base)
self.WartoscPE.SetPackedFontColor(0x772562a6)
self.WartoscPE.SetPosition(134+114,62)
self.WartoscPE.Show()
self.IkonaPostaci = ui.ExpandedImageBox()
self.IkonaPostaci.SetParent(self)
self.IkonaPostaci.SetPosition(41+114,5)
self.IkonaPostaci.LoadImage(self.path+"face/icon_mwarrior.tga")
self.IkonaPostaci.SetScale(0.9,0.9)
self.IkonaPostaci.Show()
self.KulkaExpa = ui.ExpandedImageBox()
self.KulkaExpa.SetParent(self)
self.KulkaExpa.SetPosition(127+114, 90)
self.KulkaExpa.LoadImage(self.path+"progress_exp_full.tga")
self.KulkaExpa.Show()
self.CharacterWindowButton = ui.Button()
self.CharacterWindowButton.SetParent(self)
self.CharacterWindowButton.SetPosition(7+114,31)
self.CharacterWindowButton.SetUpVisual(self.path+"btn_characterinfo_01_normal.tga")
self.CharacterWindowButton.SetOverVisual(self.path+"btn_characterinfo_02_hover.tga")
self.CharacterWindowButton.SetDownVisual(self.path+"btn_characterinfo_03_active.tga")
self.CharacterWindowButton.Show()
JebanyPrzycisk = {}
JebanyPrzycisk[TaskBarLeftSide.PrzyciskPostaci]=self.CharacterWindowButton
self.JebanyPrzycisk = JebanyPrzycisk
def SetHp(self, _actual,_recovery, _max):
_max = max(1, _max)
trans_actual = 270 * (1.0-(int(_actual) / float(_max)))
trans_recovery = 270 * (1.0-(int(_recovery) / int(_max)))
for i in xrange(0,7):
i2 =i
if(i == 6):
i2 = 0
max_transition = 270.0 - float(i2)*45.0
trans = -min(max_transition, trans_actual)
trans_rec = -min(max_transition, trans_recovery)
self.HpFull.SetRotation(trans)
self.HpRefresh.SetRotation(trans_rec)
def SetMp(self, _actual, _recovery, _max):
max_show = 76 -int(76.0 * float(_actual)/ float(_max))
max_rec = 76 -int(76.0 * float(_recovery)/ float(_max))
for i in xrange(0,77):
self.MpFull.Hide()
self.MpRefresh.Hide()
self.MpRefresh[max_rec].Show()
self.MpFull[max_show].Show()
def OnUpdate(self):
import player
curHP = player.GetStatus(player.HP)
maxHP = player.GetStatus(player.MAX_HP)
curSP = player.GetStatus(player.SP)
maxSP = player.GetStatus(player.MAX_SP)
recoveryHP = player.GetStatus(player.HP_RECOVERY)
recoverySP = player.GetStatus(player.SP_RECOVERY)
self.SetHp(curHP, recoveryHP, maxHP)
self.SetMp(curSP, recoverySP, maxSP)
PlayerEXP = unsigned32(player.GetStatus(player.EXP))
NeedEXP = unsigned32(player.GetStatus(player.NEXT_EXP))
PercentageEXP = -1 + float(PlayerEXP)/float(NeedEXP)
self.KulkaExpa.SetRenderingRect(0.0, PercentageEXP, 0.0, 0.0)
self.WartoscHP.SetText(str(curHP))
self.WartoscPE.SetText(str(curSP))
def SetToggleButtonEvent(self, eButton, kEventFunc):
self.JebanyPrzycisk[eButton].SetEvent(kEventFunc)
class GiftBox(ui.ScriptWindow):
class TextToolTip(ui.Window):
def __init__(self):
ui.Window.__init__(self, "TOP_MOST")
self.SetWindowName("GiftBox")
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetHorizontalAlignCenter()
textLine.SetOutline()
textLine.Show()
self.textLine = textLine
def __del__(self):
ui.Window.__del__(self)
def SetText(self, text):
self.textLine.SetText(text)
def OnRender(self):
(mouseX, mouseY) = wndMgr.GetMousePosition()
self.textLine.SetPosition(mouseX, mouseY - 15)
def __init__(self):
ui.ScriptWindow.__init__(self)
self.tooltipGift = self.TextToolTip()
self.tooltipGift.Show()
def __del__(self):
ui.ScriptWindow.__del__(self)
def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "giftbox.py")
except:
import exception
exception.Abort("GiftBox.LoadWindow.LoadObject")
self.giftBoxIcon = self.GetChild("GiftBox_Icon")
self.giftBoxToolTip = self.GetChild("GiftBox_ToolTip")
def Destroy(self):
self.giftBoxIcon = 0
self.giftBoxToolTip = 0
class ExpandedTaskBar(ui.ScriptWindow):
BUTTON_DRAGON_SOUL = 0
def __init__(self):
ui.Window.__init__(self)
self.SetWindowName("ExpandedTaskBar")
self.LoadWindow()
def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "ExpandedTaskBar.py")
except:
import exception
exception.Abort("ExpandedTaskBar.LoadWindow.LoadObject")
self.expandedTaskBarBoard = self.GetChild("ExpanedTaskBar_Board")
self.toggleButtonDict = {}
self.toggleButtonDict[ExpandedTaskBar.BUTTON_DRAGON_SOUL] = self.GetChild("DragonSoulButton")
self.toggleButtonDict[ExpandedTaskBar.BUTTON_DRAGON_SOUL].SetParent(self)
def SetTop(self):
super(ExpandedTaskBar, self).SetTop()
for button in self.toggleButtonDict.values():
button.SetTop()
def Show(self):
ui.ScriptWindow.Show(self)
def Close(self):
self.Hide()
def SetToolTipText(self, eButton, text):
self.toggleButtonDict[eButton].SetToolTipText(text)
def SetToggleButtonEvent(self, eButton, kEventFunc):
self.toggleButtonDict[eButton].SetEvent(kEventFunc)
def OnPressEscapeKey(self):
self.Close()
return TRUE
class TaskBar(ui.ScriptWindow):
BUTTON_CHARACTER = 0
BUTTON_INVENTORY = 1
BUTTON_MESSENGER = 2
BUTTON_SYSTEM = 3
BUTTON_CHAT = 4
BUTTON_EXPAND = 4
IS_EXPANDED = FALSE
MOUSE_BUTTON_LEFT = 0
MOUSE_BUTTON_RIGHT = 1
NONE = 255
EVENT_MOVE = 0
EVENT_ATTACK = 1
EVENT_MOVE_AND_ATTACK = 2
EVENT_CAMERA = 3
EVENT_SKILL = 4
EVENT_AUTO = 5
GAUGE_WIDTH = 95
GAUGE_HEIGHT = 13
QUICKPAGE_NUMBER_FILENAME = [
"d:/ymir work/ui/game/taskbar/1.sub",
"d:/ymir work/ui/game/taskbar/2.sub",
"d:/ymir work/ui/game/taskbar/3.sub",
"d:/ymir work/ui/game/taskbar/4.sub",
]
def ShowGift(self):
self.wndGiftBox.Show()
def HideGift(self):
self.wndGiftBox.Hide()
class TextToolTip(ui.Window):
def __init__(self):
ui.Window.__init__(self, "TOP_MOST")
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetHorizontalAlignCenter()
textLine.SetOutline()
textLine.Show()
self.textLine = textLine
def __del__(self):
ui.Window.__del__(self)
def SetText(self, text):
self.textLine.SetText(text)
def OnRender(self):
(mouseX, mouseY) = wndMgr.GetMousePosition()
self.textLine.SetPosition(mouseX, mouseY - 15)
class SkillButton(ui.SlotWindow):
def __init__(self):
ui.SlotWindow.__init__(self)
self.event = 0
self.arg = 0
self.slotIndex = 0
self.skillIndex = 0
slotIndex = 0
wndMgr.SetSlotBaseImage(self.hWnd, "d:/ymir work/ui/public/slot_base.sub", 1.0, 1.0, 1.0, 1.0)
wndMgr.AppendSlot(self.hWnd, slotIndex, 0, 0, 32, 32)
self.SetCoverButton(slotIndex, "d:/ymir work/ui/public/slot_cover_button_01.sub",\
"d:/ymir work/ui/public/slot_cover_button_02.sub",\
"d:/ymir work/ui/public/slot_cover_button_03.sub",\
"d:/ymir work/ui/public/slot_cover_button_04.sub", TRUE, FALSE)
self.SetSize(32, 32)
def __del__(self):
ui.SlotWindow.__del__(self)
def Destroy(self):
if 0 != self.tooltipSkill:
self.tooltipSkill.HideToolTip()
def RefreshSkill(self):
if 0 != self.slotIndex:
self.SetSkill(self.slotIndex)
def SetSkillToolTip(self, tooltip):
self.tooltipSkill = tooltip
def SetSkill(self, skillSlotNumber):
slotNumber = 0
skillIndex = player.GetSkillIndex(skillSlotNumber)
skillGrade = player.GetSkillGrade(skillSlotNumber)
skillLevel = player.GetSkillLevel(skillSlotNumber)
skillType = skill.GetSkillType(skillIndex)
self.skillIndex = skillIndex
if 0 == self.skillIndex:
self.ClearSlot(slotNumber)
return
self.slotIndex = skillSlotNumber
self.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel)
self.SetSlotCountNew(slotNumber, skillGrade, skillLevel)
if player.IsSkillCoolTime(skillSlotNumber):
(coolTime, elapsedTime) = player.GetSkillCoolTime(skillSlotNumber)
self.SetSlotCoolTime(slotNumber, coolTime, elapsedTime)
if player.IsSkillActive(skillSlotNumber):
self.ActivateSlot(slotNumber)
def SetSkillEvent(self, event, arg=0):
self.event = event
self.arg = arg
def GetSkillIndex(self):
return self.skillIndex
def GetSlotIndex(self):
return self.slotIndex
def Activate(self, coolTime):
self.SetSlotCoolTime(0, coolTime)
if skill.IsToggleSkill(self.skillIndex):
self.ActivateSlot(0)
def Deactivate(self):
if skill.IsToggleSkill(self.skillIndex):
self.DeactivateSlot(0)
def OnOverInItem(self, dummy):
self.tooltipSkill.SetSkill(self.skillIndex)
def OnOverOutItem(self):
self.tooltipSkill.HideToolTip()
def OnSelectItemSlot(self, dummy):
if 0 != self.event:
if 0 != self.arg:
self.event(self.arg)
else:
self.event()
def __init__(self):
ui.ScriptWindow.__init__(self, "TOP_MOST")
self.quickPageNumImageBox = None
self.tooltipItem = 0
self.tooltipSkill = 0
self.mouseModeButtonList = [ ui.ScriptWindow("TOP_MOST"), ui.ScriptWindow("TOP_MOST") ]
self.skillCategoryNameList = [ "ACTIVE_1", "ACTIVE_2", "ACTIVE_3" ]
self.skillPageStartSlotIndexDict = {
"ACTIVE_1" : 1,
"ACTIVE_2" : 21,
"ACTIVE_3" : 41,
}
self.path = "illumina/controls/special/taskbar/"
self.width = max(1280, wndMgr.GetScreenWidth())
self.height = 158
self.repeat = 220
self.BuildBar()
self.SetPosition( (wndMgr.GetScreenWidth() - self.width )/2,wndMgr.GetScreenHeight()-53)
self.SetSize(self.width, self.height)
self.Show()
## ILLUMINA ##
self.selectSkillButtonList = []
self.lastUpdateQuickSlot = 0
self.SetWindowName("TaskBar")
def __del__(self):
ui.ScriptWindow.__del__(self)
def LoadWindow(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "UIScript/TaskBar.py")
pyScrLoader.LoadScriptFile(self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT], "UIScript/MouseButtonWindow.py")
pyScrLoader.LoadScriptFile(self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT], "UIScript/RightMouseButtonWindow.py")
except:
import exception
exception.Abort("TaskBar.LoadWindow.LoadObject")
self.quickslot = []
self.quickslot.append(self.GetChild("quick_slot_1"))
self.quickslot.append(self.GetChild("quick_slot_2"))
for slot in self.quickslot:
slot.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
slot.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptyQuickSlot))
slot.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemQuickSlot))
slot.SetUnselectItemSlotEvent(ui.__mem_func__(self.UnselectItemQuickSlot))
slot.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
slot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
toggleButtonDict = {}
toggleButtonDict[TaskBar.BUTTON_CHARACTER]=self.GetChild("CharacterButton")
toggleButtonDict[TaskBar.BUTTON_INVENTORY]=self.GetChild("InventoryButton")
toggleButtonDict[TaskBar.BUTTON_MESSENGER]=self.GetChild("MessengerButton")
toggleButtonDict[TaskBar.BUTTON_SYSTEM]=self.GetChild("SystemButton")
try:
toggleButtonDict[TaskBar.BUTTON_CHAT]=self.GetChild("ChatButton")
except:
toggleButtonDict[TaskBar.BUTTON_EXPAND]=self.GetChild("ExpandButton")
TaskBar.IS_EXPANDED = TRUE
self.quickPageNumImageBox=self.GetChild("QuickPageNumber")
self.GetChild("QuickPageUpButton").SetEvent(ui.__mem_func__(self.__OnClickQuickPageUpButton))
self.GetChild("QuickPageDownButton").SetEvent(ui.__mem_func__(self.__OnClickQuickPageDownButton))
mouseLeftButtonModeButton = self.GetChild("LeftMouseButton")
mouseRightButtonModeButton = self.GetChild("RightMouseButton")
mouseLeftButtonModeButton.SetEvent(ui.__mem_func__(self.ToggleLeftMouseButtonModeWindow))
mouseRightButtonModeButton.SetEvent(ui.__mem_func__(self.ToggleRightMouseButtonModeWindow))
self.curMouseModeButton = [ mouseLeftButtonModeButton, mouseRightButtonModeButton ]
(xLocalRight, yLocalRight) = mouseRightButtonModeButton.GetLocalPosition()
self.curSkillButton = self.SkillButton()
self.curSkillButton.SetParent(self)
self.curSkillButton.SetPosition(xLocalRight, 3)
self.curSkillButton.SetSkillEvent(ui.__mem_func__(self.ToggleRightMouseButtonModeWindow))
self.curSkillButton.Hide()
(xLeft, yLeft) = mouseLeftButtonModeButton.GetGlobalPosition()
(xRight, yRight) = mouseRightButtonModeButton.GetGlobalPosition()
leftModeButtonList = self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT]
leftModeButtonList.SetPosition(xLeft, yLeft - leftModeButtonList.GetHeight()-5)
rightModeButtonList = self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT]
rightModeButtonList.SetPosition(xRight - rightModeButtonList.GetWidth() + 32, yRight - rightModeButtonList.GetHeight()-5)
rightModeButtonList.GetChild("button_skill").SetEvent(lambda adir=self.MOUSE_BUTTON_RIGHT, aevent=self.EVENT_SKILL: self.SelectMouseButtonEvent(adir, aevent))
rightModeButtonList.GetChild("button_skill").Hide()
mouseImage = ui.ImageBox("TOP_MOST")
mouseImage.AddFlag("float")
mouseImage.LoadImage("d:/ymir work/ui/game/taskbar/mouse_button_camera_01.sub")
mouseImage.SetPosition(xRight, wndMgr.GetScreenHeight() - 34)
mouseImage.Hide()
self.mouseImage = mouseImage
dir = self.MOUSE_BUTTON_LEFT
wnd = self.mouseModeButtonList[dir]
wnd.GetChild("button_move_and_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_MOVE_AND_ATTACK: self.SelectMouseButtonEvent(adir, aevent))
wnd.GetChild("button_auto_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_AUTO: self.SelectMouseButtonEvent(adir, aevent))
wnd.GetChild("button_camera").SetEvent(lambda adir=dir, aevent=self.EVENT_CAMERA: self.SelectMouseButtonEvent(adir, aevent))
dir = self.MOUSE_BUTTON_RIGHT
wnd = self.mouseModeButtonList[dir]
wnd.GetChild("button_move_and_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_MOVE_AND_ATTACK: self.SelectMouseButtonEvent(adir, aevent))
wnd.GetChild("button_camera").SetEvent(lambda adir=dir, aevent=self.EVENT_CAMERA: self.SelectMouseButtonEvent(adir, aevent))
self.toggleButtonDict = toggleButtonDict
wndGiftBox = GiftBox()
wndGiftBox.LoadWindow()
self.wndGiftBox = wndGiftBox
self.__LoadMouseSettings()
self.RefreshStatus()
self.RefreshQuickSlot()
def OnUpdate(self):
import player
if self.Face:
self.Face.LoadImage(GetFaceIconByRace(player.GetRace()))
def BuildFace(self):
part = ExpandedImageBox()
part.AddFlag("not_pick")
part.SetParent(self)
part.SetPosition(150, 30)
part.Show()
self.Face = part
def BuildBar(self):
self.TaskBar = []
CzescGlowna = ExpandedImageBox()
CzescGlowna.AddFlag("not_pick")
CzescGlowna.LoadImage("illumina/controls/special/taskbar/bar_middle.tga")
CzescGlowna.SetParent(self)
CzescGlowna.Show()
self.TaskBar.append(CzescGlowna)
self.TaskBar[0].SetPosition(0, 0)
def BuildHpMp(self):
self.hpmp = self.HpMPBar(self)
def BuildExpBar(self):
self.exp_Bar = self.ExpBar()
self.exp_Bar.SetParent(self.bar[1])
def BuildButtons(self):
self.Atlas.BuildButtons(self.bar[3])
def __Press_space_button(self):
if constInfo.auto_spacja == 1:
constInfo.auto_spacja = 0
else:
constInfo.auto_spacja = 1
def __LoadMouseSettings(self):
try:
LoadMouseButtonSettings()
(mouseLeftButtonEvent, mouseRightButtonEvent) = GetMouseButtonSettings()
if not self.__IsInSafeMouseButtonSettingRange(mouseLeftButtonEvent) or not self.__IsInSafeMouseButtonSettingRange(mouseRightButtonEvent):
raise RuntimeError, "INVALID_MOUSE_BUTTON_SETTINGS"
except:
InitMouseButtonSettings(self.EVENT_MOVE_AND_ATTACK, self.EVENT_CAMERA)
(mouseLeftButtonEvent, mouseRightButtonEvent) = GetMouseButtonSettings()
try:
self.SelectMouseButtonEvent(self.MOUSE_BUTTON_LEFT, mouseLeftButtonEvent)
self.SelectMouseButtonEvent(self.MOUSE_BUTTON_RIGHT, mouseRightButtonEvent)
except:
InitMouseButtonSettings(self.EVENT_MOVE_AND_ATTACK, self.EVENT_CAMERA)
(mouseLeftButtonEvent, mouseRightButtonEvent) = GetMouseButtonSettings()
self.SelectMouseButtonEvent(self.MOUSE_BUTTON_LEFT, mouseLeftButtonEvent)
self.SelectMouseButtonEvent(self.MOUSE_BUTTON_RIGHT, mouseRightButtonEvent)
def __IsInSafeMouseButtonSettingRange(self, arg):
return arg >= self.EVENT_MOVE and arg <= self.EVENT_AUTO
def Destroy(self):
SaveMouseButtonSettings()
self.ClearDictionary()
self.mouseModeButtonList[0].ClearDictionary()
self.mouseModeButtonList[1].ClearDictionary()
self.mouseModeButtonList = 0
self.curMouseModeButton = 0
self.curSkillButton = 0
self.selectSkillButtonList = 0
self.tooltipItem = 0
self.tooltipSkill = 0
self.quickslot = 0
self.toggleButtonDict = 0
self.mouseImage = None
def __OnClickQuickPageUpButton(self):
player.SetQuickPage(player.GetQuickPage()-1)
def __OnClickQuickPageDownButton(self):
player.SetQuickPage(player.GetQuickPage()+1)
def SetToggleButtonEvent(self, eButton, kEventFunc):
self.toggleButtonDict[eButton].SetEvent(kEventFunc)
def SetItemToolTip(self, tooltipItem):
self.tooltipItem = tooltipItem
def SetSkillToolTip(self, tooltipSkill):
self.tooltipSkill = tooltipSkill
self.curSkillButton.SetSkillToolTip(self.tooltipSkill)
def ShowMouseImage(self):
self.mouseImage.SetTop()
self.mouseImage.Show()
def HideMouseImage(self):
player.SetQuickCameraMode(FALSE)
self.mouseImage.Hide()
def RefreshStatus(self):
pass
def RefreshSkill(self):
self.curSkillButton.RefreshSkill()
for button in self.selectSkillButtonList:
button.RefreshSkill()
def RefreshQuickSlot(self):
pageNum = player.GetQuickPage()
try:
self.quickPageNumImageBox.LoadImage(TaskBar.QUICKPAGE_NUMBER_FILENAME[pageNum])
except:
pass
startNumber = 0
for slot in self.quickslot:
for i in xrange(4):
slotNumber = i+startNumber
(Type, Position) = player.GetLocalQuickSlot(slotNumber)
if player.SLOT_TYPE_NONE == Type:
slot.ClearSlot(slotNumber)
continue
if player.SLOT_TYPE_INVENTORY == Type:
itemIndex = player.GetItemIndex(Position)
itemCount = player.GetItemCount(Position)
if itemCount <= 1:
itemCount = 0
if constInfo.IS_AUTO_POTION(itemIndex):
metinSocket = [player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
if 0 != int(metinSocket[0]):
slot.ActivateSlot(slotNumber)
else:
slot.DeactivateSlot(slotNumber)
slot.SetItemSlot(slotNumber, itemIndex, itemCount)
elif player.SLOT_TYPE_SKILL == Type:
skillIndex = player.GetSkillIndex(Position)
if 0 == skillIndex:
slot.ClearSlot(slotNumber)
continue
skillType = skill.GetSkillType(skillIndex)
if skill.SKILL_TYPE_GUILD == skillType:
import guild
skillGrade = 0
skillLevel = guild.GetSkillLevel(Position)
else:
skillGrade = player.GetSkillGrade(Position)
skillLevel = player.GetSkillLevel(Position)
slot.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel)
slot.SetSlotCountNew(slotNumber, skillGrade, skillLevel)
slot.SetCoverButton(slotNumber)
if player.IsSkillCoolTime(Position):
(coolTime, elapsedTime) = player.GetSkillCoolTime(Position)
slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime)
if player.IsSkillActive(Position):
slot.ActivateSlot(slotNumber)
elif player.SLOT_TYPE_EMOTION == Type:
emotionIndex = Position
slot.SetEmotionSlot(slotNumber, emotionIndex)
slot.SetCoverButton(slotNumber)
slot.SetSlotCount(slotNumber, 0)
slot.RefreshSlot()
startNumber += 4
def canAddQuickSlot(self, Type, slotNumber):
if player.SLOT_TYPE_INVENTORY == Type:
itemIndex = player.GetItemIndex(slotNumber)
return item.CanAddToQuickSlotItem(itemIndex)
return TRUE
def AddQuickSlot(self, localSlotIndex):
AttachedSlotType = mouseModule.mouseController.GetAttachedType()
AttachedSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
AttachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
if player.SLOT_TYPE_QUICK_SLOT == AttachedSlotType:
player.RequestMoveGlobalQuickSlotToLocalQuickSlot(AttachedSlotNumber, localSlotIndex)
elif player.SLOT_TYPE_EMOTION == AttachedSlotType:
player.RequestAddLocalQuickSlot(localSlotIndex, AttachedSlotType, AttachedItemIndex)
elif TRUE == self.canAddQuickSlot(AttachedSlotType, AttachedSlotNumber):
player.RequestAddLocalQuickSlot(localSlotIndex, AttachedSlotType, AttachedSlotNumber)
mouseModule.mouseController.DeattachObject()
self.RefreshQuickSlot()
def SelectEmptyQuickSlot(self, slotIndex):
if TRUE == mouseModule.mouseController.isAttached():
self.AddQuickSlot(slotIndex)
def SelectItemQuickSlot(self, localQuickSlotIndex):
if TRUE == mouseModule.mouseController.isAttached():
self.AddQuickSlot(localQuickSlotIndex)
else:
globalQuickSlotIndex=player.LocalQuickSlotIndexToGlobalQuickSlotIndex(localQuickSlotIndex)
mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_QUICK_SLOT, globalQuickSlotIndex, globalQuickSlotIndex)
def UnselectItemQuickSlot(self, localSlotIndex):
if FALSE == mouseModule.mouseController.isAttached():
player.RequestUseLocalQuickSlot(localSlotIndex)
return
elif mouseModule.mouseController.isAttached():
mouseModule.mouseController.DeattachObject()
return
def OnUseSkill(self, usedSlotIndex, coolTime):
QUICK_SLOT_SLOT_COUNT = 4
slotIndex = 0
if usedSlotIndex == self.curSkillButton.GetSlotIndex():
self.curSkillButton.Activate(coolTime)
for slotWindow in self.quickslot:
for i in xrange(QUICK_SLOT_SLOT_COUNT):
(Type, Position) = player.GetLocalQuickSlot(slotIndex)
if Type == player.SLOT_TYPE_SKILL:
if usedSlotIndex == Position:
slotWindow.SetSlotCoolTime(slotIndex, coolTime)
return
slotIndex += 1
def OnActivateSkill(self, usedSlotIndex):
slotIndex = 0
if usedSlotIndex == self.curSkillButton.GetSlotIndex():
self.curSkillButton.Deactivate()
for slotWindow in self.quickslot:
for i in xrange(4):
(Type, Position) = player.GetLocalQuickSlot(slotIndex)
if Type == player.SLOT_TYPE_SKILL:
if usedSlotIndex == Position:
slotWindow.ActivateSlot(slotIndex)
return
slotIndex += 1
def OnDeactivateSkill(self, usedSlotIndex):
slotIndex = 0
if usedSlotIndex == self.curSkillButton.GetSlotIndex():
self.curSkillButton.Deactivate()
for slotWindow in self.quickslot:
for i in xrange(4):
(Type, Position) = player.GetLocalQuickSlot(slotIndex)
if Type == player.SLOT_TYPE_SKILL:
if usedSlotIndex == Position:
slotWindow.DeactivateSlot(slotIndex)
return
slotIndex += 1
def OverInItem(self, slotNumber):
if mouseModule.mouseController.isAttached():
return
(Type, Position) = player.GetLocalQuickSlot(slotNumber)
if player.SLOT_TYPE_INVENTORY == Type:
self.tooltipItem.SetInventoryItem(Position)
self.tooltipSkill.HideToolTip()
elif player.SLOT_TYPE_SKILL == Type:
skillIndex = player.GetSkillIndex(Position)
skillType = skill.GetSkillType(skillIndex)
if skill.SKILL_TYPE_GUILD == skillType:
import guild
skillGrade = 0
skillLevel = guild.GetSkillLevel(Position)
else:
skillGrade = player.GetSkillGrade(Position)
skillLevel = player.GetSkillLevel(Position)
self.tooltipSkill.SetSkill(Position, skillIndex, skillGrade, skillLevel)
self.tooltipItem.HideToolTip()
def OverOutItem(self):
if 0 != self.tooltipItem:
self.tooltipItem.HideToolTip()
if 0 != self.tooltipSkill:
self.tooltipSkill.HideToolTip()
def OnUpdate(self):
if app.GetGlobalTime() - self.lastUpdateQuickSlot > 500:
self.lastUpdateQuickSlot = app.GetGlobalTime()
self.RefreshQuickSlot()
def ToggleLeftMouseButtonModeWindow(self):
wndMouseButtonMode = self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT]
if TRUE == wndMouseButtonMode.IsShow():
wndMouseButtonMode.Hide()
else:
wndMouseButtonMode.Show()
def ToggleRightMouseButtonModeWindow(self):
wndMouseButtonMode = self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT]
if TRUE == wndMouseButtonMode.IsShow():
wndMouseButtonMode.Hide()
self.CloseSelectSkill()
else:
wndMouseButtonMode.Show()
self.OpenSelectSkill()
def OpenSelectSkill(self):
PAGE_SLOT_COUNT = 6
(xSkillButton, y) = self.curSkillButton.GetGlobalPosition()
y -= (37 + 32 + 1)
for key in self.skillCategoryNameList:
appendCount = 0
startNumber = self.skillPageStartSlotIndexDict[key]
x = xSkillButton
getSkillIndex=player.GetSkillIndex
getSkillLevel=player.GetSkillLevel
for i in xrange(PAGE_SLOT_COUNT):
skillIndex = getSkillIndex(startNumber+i)
skillLevel = getSkillLevel(startNumber+i)
if 0 == skillIndex:
continue
if 0 == skillLevel:
continue
if skill.IsStandingSkill(skillIndex):
continue
skillButton = self.SkillButton()
skillButton.SetSkill(startNumber+i)
skillButton.SetPosition(x, y)
skillButton.SetSkillEvent(ui.__mem_func__(self.CloseSelectSkill), startNumber+i+1)
skillButton.SetSkillToolTip(self.tooltipSkill)
skillButton.SetTop()
skillButton.Show()
self.selectSkillButtonList.append(skillButton)
appendCount += 1
x -= 32
if appendCount > 0:
y -= 32
def CloseSelectSkill(self, slotIndex=-1):
self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT].Hide()
for button in self.selectSkillButtonList:
button.Destroy()
self.selectSkillButtonList = []
if -1 != slotIndex:
self.curSkillButton.Show()
self.curMouseModeButton[self.MOUSE_BUTTON_RIGHT].Hide()
player.SetMouseFunc(player.MBT_RIGHT, player.MBF_SKILL)
player.ChangeCurrentSkillNumberOnly(slotIndex-1)
else:
self.curSkillButton.Hide()
self.curMouseModeButton[self.MOUSE_BUTTON_RIGHT].Show()
def SelectMouseButtonEvent(self, dir, event):
SetMouseButtonSetting(dir, event)
self.CloseSelectSkill()
self.mouseModeButtonList[dir].Hide()
btn = 0
type = self.NONE
func = self.NONE
tooltip_text = ""
if self.MOUSE_BUTTON_LEFT == dir:
type = player.MBT_LEFT
elif self.MOUSE_BUTTON_RIGHT == dir:
type = player.MBT_RIGHT
if self.EVENT_MOVE == event:
btn = self.mouseModeButtonList[dir].GetChild("button_move")
func = player.MBF_MOVE
tooltip_text = localeInfo.TASKBAR_MOVE
elif self.EVENT_ATTACK == event:
btn = self.mouseModeButtonList[dir].GetChild("button_attack")
func = player.MBF_ATTACK
tooltip_text = localeInfo.TASKBAR_ATTACK
elif self.EVENT_AUTO == event:
btn = self.mouseModeButtonList[dir].GetChild("button_auto_attack")
func = player.MBF_AUTO
tooltip_text = localeInfo.TASKBAR_AUTO
elif self.EVENT_MOVE_AND_ATTACK == event:
btn = self.mouseModeButtonList[dir].GetChild("button_move_and_attack")
func = player.MBF_SMART
tooltip_text = localeInfo.TASKBAR_ATTACK
elif self.EVENT_CAMERA == event:
btn = self.mouseModeButtonList[dir].GetChild("button_camera")
func = player.MBF_CAMERA
tooltip_text = localeInfo.TASKBAR_CAMERA
elif self.EVENT_SKILL == event:
btn = self.mouseModeButtonList[dir].GetChild("button_skill")
func = player.MBF_SKILL
tooltip_text = localeInfo.TASKBAR_SKILL
if 0 != btn:
self.curMouseModeButton[dir].SetToolTipText(tooltip_text, 0, -18)
self.curMouseModeButton[dir].SetUpVisual(btn.GetUpVisualFileName())
self.curMouseModeButton[dir].SetOverVisual(btn.GetOverVisualFileName())
self.curMouseModeButton[dir].SetDownVisual(btn.GetDownVisualFileName())
self.curMouseModeButton[dir].Show()
player.SetMouseFunc(type, func)
def OnChangeCurrentSkill(self, skillSlotNumber):
self.curSkillButton.SetSkill(skillSlotNumber)
self.curSkillButton.Show()
self.curMouseModeButton[self.MOUSE_BUTTON_RIGHT].Hide()Sterge iar import uiAcceluv12345 scrie:Am încercat tutorialul tău, acum se întâmplă asta:[Tupeu] scrie:Incearca asta:luv12345 scrie: EDIT: Pardon, mă connectează, iar după ce selectez caracterul, mă scoate din client cu erroarea ”????????” și cu syserr gol.
http://just4metin.ro/mape-interfete/ill ... 60272.html
Pune si fix ce l-am lasat acolo.
Syserr:
import uiAcce este șters, m-am uitat puțin prin interfacemodule.py și am observat că este o parte acolo unde are nevoie de ”uiAcce”[Tupeu] scrie:Sterge iar import uiAcceluv12345 scrie:Am încercat tutorialul tău, acum se întâmplă asta:[Tupeu] scrie: Incearca asta:
http://just4metin.ro/mape-interfete/ill ... 60272.html
Pune si fix ce l-am lasat acolo.
Syserr:
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 2 vizitatori


daca te-am ajutat

de