Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 06:10

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

Advertisement



[RELEASE]Marquee style for notice(/n text)

Discussion on [RELEASE]Marquee style for notice(/n text) within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
STREL's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 44
Received Thanks: 100
Red face [RELEASE]Marquee style for notice(/n text)

This is a modification of the notice metin2 client, notice is(/n and my text here) i modified to show text right to left, if you know python, is possible change invert the script, no more words, have fun.

Only Show 1 notice
And please qualify my english. X/10
Video GIF:




Same code in pastebin:
Code:
Code:
##Mr.Toll, Zeler-* Strel

##Espero te sirva de mucho
class TipBoard(ui.Bar):

    SCROLL_WAIT_TIME = 1.0#3.0
    TIP_DURATION = 1.0#5.0
    STEP_HEIGHT = 17

    def __init__(self):
        ui.Bar.__init__(self)
        self.ceh=0
        self.AddFlag("not_pick")
        self.tipList = []
        self.curPos = 0
        self.dstPos = 0
        self.nextScrollTime = 0
        self.lastclock = time.clock()
        self.width = wndMgr.GetScreenWidth()    


        self.SetPosition(0, 70)
        self.SetSize(wndMgr.GetScreenWidth(), 20)
        self.SetColor(grp.GenerateColor(0.0, 1.0, 0.0, 0.1))
        # self.SetWindowHorizontalAlignLeft()

        self.__CreateTextBar()

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

    def __CreateTextBar(self):

        x, y = self.GetGlobalPosition()

        self.textBar = TextBar(wndMgr.GetScreenWidth(), 300)
        self.textBar.SetParent(self)
        self.textBar.SetPosition(wndMgr.GetScreenWidth(), 5)        
        self.textBar.SetClipRect(0, y, wndMgr.GetScreenWidth(), y+18)
        self.textBar.Show()

    def __CleanOldTip(self):
        leaveList = []
        for tip in self.tipList:
            madeTime = tip[0]
            if app.GetTime() - madeTime > self.TIP_DURATION:
                pass
            else:
                leaveList.append(tip)

        self.tipList = leaveList

        if not leaveList:
            self.textBar.ClearBar()
            self.Hide()
            return

        # self.__RefreshBoard()

    # def __RefreshBoard(self):

        # self.textBar.ClearBar()

        # index = 0
        # dt = time.clock() - self.lastclock
        # for tip in self.tipList:
            # text = tip[1]
            
            # self.textBar.TextOut(int(self.textBar.GetGlobalPosition()[1]+dt*200), index*self.STEP_HEIGHT, text)
            # index += 1

    def SetTip(self, text):

        if not app.IsVisibleNotice():
            return

        curTime = app.GetTime()
        self.tipList.append((curTime, text))
        # self.__RefreshBoard()

        self.nextScrollTime = app.GetTime() + 1.0

        if not self.IsShow():
            self.curPos = -self.STEP_HEIGHT
            self.dstPos = -self.STEP_HEIGHT
            self.textBar.SetPosition(wndMgr.GetScreenWidth(),0)
            self.Show()
        return
    def Refresca(self):
        dt = time.clock() - self.lastclock
        ca=int(wndMgr.GetScreenWidth()-dt*15)
        cas=0.0
        if int(ca)==int(cas):
            self.Hide()
            self.__CleanOldTip()
    def OnUpdate(self):        
        if self.ceh==0:
            self.Refresca()
            self.ceh=1
        elif self.ceh==1:
            self.Refresca()
            self.ceh=0
            self.Refresca()
        self.textBar.ClearBar()
    
        index = 0
        dt = time.clock() - self.lastclock
        for tip in self.tipList:
            text = tip[1]
            
            self.textBar.TextOut(int(wndMgr.GetScreenWidth()-dt*20), index*self.STEP_HEIGHT, text)
            index += 1
        if not self.tipList:
            self.Hide()
            return
    
        self.dstPos = 18
        
            

        if self.dstPos > self.curPos:
            self.curPos += 1
            self.textBar.SetPosition(3 , 6)
STREL is offline  
Thanks
8 Users
Old 05/30/2015, 01:38   #2
 
OoKaMi_'s Avatar
 
elite*gold: 0
Join Date: Jun 2014
Posts: 269
Received Thanks: 96
uichat.py ?
OoKaMi_ is offline  
Old 05/30/2015, 15:09   #3
 
elite*gold: 0
Join Date: Feb 2014
Posts: 93
Received Thanks: 0
Code:
0530 15:09:25837 :: NameError
0530 15:09:25837 :: : 
0530 15:09:25837 :: global name 'time' is not defined
0530 15:09:25837 ::
Agorin is offline  
Old 05/30/2015, 21:56   #4
 
OoKaMi_'s Avatar
 
elite*gold: 0
Join Date: Jun 2014
Posts: 269
Received Thanks: 96
Quote:
In uiTip.py die komplette Class ersetzen.
Ok Danke
OoKaMi_ is offline  
Old 05/31/2015, 13:04   #5
 
elite*gold: 0
Join Date: Apr 2015
Posts: 234
Received Thanks: 54
Wie kann man das schneller einstellen?
#.TwoFace.# is offline  
Old 05/31/2015, 13:20   #6
 
elite*gold: 0
Join Date: Jan 2014
Posts: 17
Received Thanks: 0
Thanks but It has an error after error occurs only once after not appear

It appears only once
marius9612 is offline  
Old 06/01/2015, 08:42   #7
 
fannan10's Avatar
 
elite*gold: 0
Join Date: Apr 2013
Posts: 130
Received Thanks: 16
Quote:
Originally Posted by marius9612 View Post
Thanks but It has an error after error occurs only once after not appear

It appears only once
same here
fannan10 is offline  
Old 06/01/2015, 16:08   #8
 
naosou's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 396
Received Thanks: 92
If i write /n again the notice wont show up.
naosou is offline  
Old 03/01/2017, 10:00   #9
 
AutozasxD's Avatar
 
elite*gold: 0
Join Date: May 2016
Posts: 15
Received Thanks: 0
Quote:
Originally Posted by Agorin View Post
Code:
0530 15:09:25837 :: NameError
0530 15:09:25837 :: : 
0530 15:09:25837 :: global name 'time' is not defined
0530 15:09:25837 ::


import time and ready to go

problem is
def SetTip(self, text):

if not app.IsVisibleNotice():
return

curTime = app.GetTime()
self.tipList.append((curTime, text))
#self.__RefreshBoard() change to self.__RefreshBoard()
AutozasxD is offline  
Reply

Tags
free, marquee, metin2, public, script


Similar Threads Similar Threads
[Release] Auto Plus Notice
03/29/2015 - SRO Hacks, Bots, Cheats & Exploits - 0 Replies
#closed
[Release] Metin2 Original Text Style PSD - Metin2 Render Pack (27)
04/10/2014 - Metin2 PServer Guides & Strategies - 9 Replies
http://fc03.deviantart.net/fs71/f/2014/087/8/e/met in2_original_text_style_by_fl3me-d7c0hjo.jpg Download; Download Link; Here http://fc08.deviantart.net/fs70/f/2014/088/d/6/me tin2_render_pack_v2_by_fl3me-d7c28wm.jpg Download; Download Link; Here
[Review/Poll]Kpop - Gangnam Style - Interesse? Wall of text!
09/16/2012 - Off Topic - 10 Replies
Eyo, da das Video Gangnam Style von Psy ziemlich bekannt unter Internet Usern geworden ist (YT Video mit den meisten Likes überhaupt, 168 Mio.+ Klicks) und ich koreanische Musik schon seit langem verfolge, dachte ich es könnte einigen von euch interessieren wie die Musik dieses Landes ist, weshalb es interessant ist usw. Kpop - Was ist das? Ganz simpel formuliert, das K steht für Korea und pop ist genauso wie das PoP wie auch bei der westlichen internationalen Musik. Diese Musik verbindet...
[String's] Text Style ändern? Möglich?
01/11/2012 - S4 League - 9 Replies
Hey ne frage. Hatte grad die idee, wenn man die strings bzw den string herraussuchen könnte man die doch theoretisch ändern in eine andre Schrift, oder? Auch wenns ClientSide wär,wär es doch nice? :D
*Notice*Warning Password stealing site*Notice*
12/28/2009 - World of Warcraft - 0 Replies
Notice is as follows, do not enter this site, if you get a notice in your email like this for gawd sakes dont give anyone your password Subject:World of Warcraft Account Trade Dispute Notice When we carry out a routine check when the account, we have evidence to show that your account has been involved in the disputed transactions. So we have to inform you visit our website(worldofwarcraft*com]fill out some information to facilitate our investigation. If you can not tie in with our soon...



All times are GMT +1. The time now is 06:12.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.