romegames 1
romegames
Krutzo 1
Krutzo
shrpnl 1
shrpnl
Best Studio 1
Best Studio
D 1
delimuratt
Aliyldrim 1
Aliyldrim
Mt2Hizmet 1
Mt2Hizmet
noisiv 1
noisiv
Manwe Work 1
Manwe Work
melankolıa18 1
melankolıa18
Agora Metin2 1
Agora Metin2
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com

New Loading TIP Info System without Source by: Grzyb [2024]

  • Konuyu başlatan Konuyu başlatan muchomor1337
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 502

muchomor1337

Level 2
Üye
Katılım
24 May 2018
Konular
35
Mesajlar
64
Online süresi
16d 13h
Reaksiyon Skoru
89
Altın Konu
0
TM Yaşı
8 Yıl 12 Gün
Başarım Puanı
97
Yaş
34
MmoLira
8,533
DevLira
75
Ticaret - 0%
0   0   0

ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!

I did a job for someone once, and when I saw Mali's code from 2020, I was stunned by how many unnecessary packets and lines of code it sends.

Birine bir kere iş yaptım ve Mali'nin 2020'den kalma kodunu gördüğümde, ne kadar gereksiz paket ve kod satırı gönderdiğini görünce şaşkına döndüm.

board.png

Code:
Kod:
locale_game.txt

NEW_KOMUNIKAT1    Testowy Komunikat Jeden
NEW_KOMUNIKAT2    Testowy Komunikat Dwa
NEW_KOMUNIKAT3    Testowy Komunikat Trzy
NEW_KOMUNIKAT4    Testowy Komunikat Cztery
NEW_KOMUNIKAT5    Testowy Komunikat Piec
NEW_KOMUNIKAT6    Testowy Komunikat Szesc

ui.py

class MiddleBoard(Window):
    CORNER_WIDTH = 16
    CORNER_HEIGHT = 16
    LINE_WIDTH = 16
    LINE_HEIGHT = 16

    LT = 0
    LB = 1
    RT = 2
    RB = 3
    L = 0
    R = 1
    T = 2
    B = 3

    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)

        CornerFileNames = [ "d:/ymir work/ui/pattern/ThinBoard_Corner_"+dir+".tga" for dir in ["LeftTop","LeftBottom","RightTop","RightBottom"] ]
        LineFileNames = [ "d:/ymir work/ui/pattern/ThinBoard_Line_"+dir+".tga" for dir in ["Left","Right","Top","Bottom"] ]

        Base = ExpandedImageBox()
        Base.AddFlag("not_pick")
        Base.LoadImage("d:/ymir work/ui/cien.png")
        Base.SetParent(self)
        Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
        Base.Show()
        self.Base = Base

        self.Corners = []
        for fileName in CornerFileNames:
            Corner = ExpandedImageBox()
            Corner.AddFlag("attach")
            Corner.AddFlag("not_pick")
            Corner.LoadImage(fileName)
            Corner.SetParent(self)
            Corner.SetPosition(0, 0)
            Corner.Show()
            self.Corners.append(Corner)

        self.Lines = []
        for fileName in LineFileNames:
            Line = ExpandedImageBox()
            Line.AddFlag("attach")
            Line.AddFlag("not_pick")
            Line.LoadImage(fileName)
            Line.SetParent(self)
            Line.SetPosition(0, 0)
            Line.Show()
            self.Lines.append(Line)

        self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT)
        self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0)

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

    def SetSize(self, width, height):

        width = max(self.CORNER_WIDTH*2, width)
        height = max(self.CORNER_HEIGHT*2, height)
        Window.SetSize(self, width, height)

        self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT)
        self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0)
        self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT)
        self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT)
        self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT)

        verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
        horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH

        self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
        self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
        self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
        self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)

        if self.Base:
            self.Base.SetRenderingRect(0, 0, (float(width)-32)/float(self.Base.GetWidth()) - 1.0, (float(height)-32)/float(self.Base.GetHeight()) - 1.0)

    def ShowInternal(self):
        self.Base.Show()
        for wnd in self.Lines:
            wnd.Show()
        for wnd in self.Corners:
            wnd.Show()

    def HideInternal(self):
        self.Base.Hide()
        for wnd in self.Lines:
            wnd.Hide()
        for wnd in self.Corners:
            wnd.Hide()


and

            elif Type == "middleboard":
                parent.Children[Index] = MiddleBoard()
                parent.Children[Index].SetParent(parent)
                self.LoadElementThinBoard(parent.Children[Index], ElementValue, parent)

introloading.py

add import:
import background
import random

Find:
self.loadingGage=self.GetChild("FullGage")

add after:
self.loadingTip2=self.GetChild("LoadingTip")

Find:
    def LoadData(self, playerX, playerY):

and add:

    def LoadData(self, playerX, playerY):
        grzybovh = [
            localeInfo.NEW_KOMUNIKAT1,
            localeInfo.NEW_KOMUNIKAT2,
        ]

        grzybovh2 = [
            localeInfo.NEW_KOMUNIKAT3,
            localeInfo.NEW_KOMUNIKAT4,
        ]

        grzybovh3 = [
            localeInfo.NEW_KOMUNIKAT5,
            localeInfo.NEW_KOMUNIKAT6,
        ]

    #Here you can add any maps, names from atlasinfo
        if background.GetCurrentMapName() == "metin2_map_a1":
            self.loadingTip2.SetText(random.choice(grzybovh))
        elif background.GetCurrentMapName() == "metin2_map_c1":
            self.loadingTip2.SetText(random.choice(grzybovh2))
        else:
            self.loadingTip2.SetText(random.choice(grzybovh3))


uiscript/introloading.py

        {
            "name": "TipBackground",
            "type": "middleboard",
            "x": float(SCREEN_WIDTH) / 2 - (SCREEN_WIDTH / 4),
            "y": float(SCREEN_HEIGHT) * 500 / 600.0 - 50,
            "width": SCREEN_WIDTH / 2,
            "height": 50,
            "children": [
                {
                    "name": "LoadingTip",
                    "type": "text",
                    "x": float(SCREEN_WIDTH) / 4,
                    "y": 16,
                    "text": " ",
                    "text_horizontal_align": "center",
                    "fontsize": "LARGE",
                },
            ],
        },
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst