Fethi Polat 1
Fethi Polat
Mt2Hizmet 1
Mt2Hizmet
Scarlet 1
Scarlet
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Hikaye Ekle
Kaynak ikonu

Taha AKKALIN | ByMogart - Yan Panel Hp-Sp (Açıp Kapamalı) 1

indirmek için izniniz yok
Merhaba Arkadaşlar,
Ben Taha AKKALIN. Sizlere bir arkadaşımızın benden alıp paylaştığı ve eksik olduğunun farkında bile olmadığı bir sistemi paylaşacağım. Sistem anlaşıldığı üzere Yan Panel'dir. Piyasadakilerden tek farkı açık kapamalı olması ve alt kısmında ki saat ve tarih bölümünün sorunsuz çalışmasıdır.

Kodlar MarkMt2 unpack'inden çekilmiştir. Fakat MarkMt2'den çekilmiş halinde Saat ve Tarih kısmı çalışmıyordu. Büyük bir ihtimal MarkMt2'nin kendi özel kodlamasından kaynaklanıyordu. Saat ve Tarih kısmını kendim düzenledim.

Anlatıma Geçelim....


Root - Game.py Açılır.

Kod:
import uitaskbar
import translate

İmportların arasına eklenir.

Kod:
self.interface.ShowDefaultWindows()

Aratılır.

Kod:
CharBar = uitaskbar.CharBar()
        CharBar.LoadWindow()
        self.CharBar = CharBar
        if translate.acik == 1:
            self.CharBar.Show()


Altına eklenir.

Kod:
self.ClearDictionary()

Aratılır.

Kod:
self.CharBar.Destroy()

Altına eklenir.

Kod:
def OnMouseMiddleButtonUp(self):
        player.SetMouseMiddleButtonState(player.MBS_CLICK)

ALTINDA

Kod:
def OnUpdate(self):

Bulunur.

Kod:
if player.IsPartyMember(player.GetMainCharacterIndex()):
            self.CharBar.pozisyon(123, 16)
        else:
            self.CharBar.pozisyon(13, 16)

        cbmrace = net.GetMainActorRace()
        if cbmrace == 0:        
            self.CharBar.SetFoto("sidebar/icon_mwarrior.tga")
        elif cbmrace == 1:        
            self.CharBar.SetFoto("sidebar/icon_wninja.tga")
        elif cbmrace == 2:        
            self.CharBar.SetFoto("sidebar/icon_msura.tga")
        elif cbmrace == 3:        
            self.CharBar.SetFoto("sidebar/icon_wshaman.tga")
        elif cbmrace == 4:        
            self.CharBar.SetFoto("sidebar/icon_wwarrior.tga")
        elif cbmrace == 5:        
            self.CharBar.SetFoto("sidebar/icon_mninja.tga")
        elif cbmrace == 6:        
            self.CharBar.SetFoto("sidebar/icon_wsura.tga")
        elif cbmrace == 7:        
            self.CharBar.SetFoto("sidebar/icon_mshaman.tga")
        else:
            self.CharBar.Hide()

        if translate.acik == 0:
            self.CharBar.Hide()
        elif translate.acik == 1:
            self.CharBar.Show()
            
        curHP = player.GetStatus(player.HP)
        maxHP = player.GetStatus(player.MAX_HP)
        recoveryHP = player.GetStatus(player.HP_RECOVERY)
        curPointHP = min(curHP, maxHP)
        curSP = player.GetStatus(player.SP)
        maxSP = player.GetStatus(player.MAX_SP)
        recoverySP = player.GetStatus(player.SP_RECOVERY)
        curPointSP = min(curSP, maxSP)
        curST = player.GetStatus(player.STAMINA)
        maxST = player.GetStatus(player.MAX_STAMINA)
        curPointST = min(curST, maxST)

        self.CharBar.hpyenile(curPointHP, maxHP)
        self.CharBar.spyenile(curPointSP, maxSP)
        self.CharBar.sethp(str(player.GetStatus(player.HP)) + ' / ' + str(player.GetStatus(player.MAX_HP)))
        self.CharBar.setsp(str(player.GetStatus(player.SP)) + ' / ' + str(player.GetStatus(player.MAX_SP)))
        self.CharBar.setisim(player.GetName())
        self.CharBar.setlevel(str(player.GetStatus(player.LEVEL)))

İçine eklenir.

Root - uisystemoption.py açılır.

Kod:
self.tilingModeButtonList = []

Aratılır.

Kod:
self.charpanellist = []

Altına eklenir.

Kod:
self.tilingApplyButton=GetObject("tiling_apply")

Aratılır.

Kod:
self.charpanellist.append(GetObject("ac"))
            self.charpanellist.append(GetObject("kapa"))

Altına eklenir.

Kod:
self.tilingModeButtonList[1].SAFE_SetEvent(self.__OnClickTilingModeGPUButton)

Aratılır.

Kod:
self.charpanellist[0].SAFE_SetEvent(self.__ac)
        self.charpanellist[1].SAFE_SetEvent(self.__kapa)

Altına eklenir.

Kod:
def __SetTilingMode(self, index):

Aratılır.

Kod:
def __ac(self):
        translate.acik = 1
        self.charpanellist[0].Down()
        self.charpanellist[1].SetUp()

    def __kapa(self):    
        translate.acik = 0
        self.charpanellist[1].Down()
        self.charpanellist[0].SetUp()

Kod bloğunun ÜSTÜNE eklenir.


Root - uitaskbar.py açılır.

Kod:
class GiftBox(ui.ScriptWindow):

Aratılır.

Kod:
class CharBar(ui.ScriptWindow):
    class TextToolTip(ui.Window):
        def __init__(self):
            ui.Window.__init__(self, "TOP_MOST")

            textLine = ui.TextLine()
            textLine.SetParent(self)
            textLine.SetHorizontalAlignCenter()
            textLine.SetOutline()
            textLine.Show()
            self.textLine = textLine

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

        def SetText(self, text):
            self.textLine.SetText(text)

        def OnRender(self):
            (mouseX, mouseY) = wndMgr.GetMousePosition()
            self.textLine.SetPosition(mouseX, mouseY - 15)
            
    def __init__(self):
        #print "NEW TASKBAR  ----------------------------------------------------------------------------"
        ui.ScriptWindow.__init__(self)
        self.tooltipBAR = self.TextToolTip()
        self.tooltipBAR.Hide()

    def __del__(self):
        #print "---------------------------------------------------------------------------- DELETE TASKBAR"
        ui.ScriptWindow.__del__(self)
        
    def LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "charbox.py")
        except:
            import exception
            exception.Abort("GiftBox.LoadWindow.LoadObject")        

        self.charBoxPanel = self.GetChild("CharBar_Board")
        self.yuva = self.GetChild("Yuva")
        self.foto = self.GetChild("Face_Image")
        self.lvbox = self.GetChild("Level_Header")
        self.lvtext = self.GetChild("Level_Value")
        self.namebox = self.GetChild("TitleName")
        self.nametext = self.GetChild("NameText")
        self.HPtext = self.GetChild("HPtext")
        self.SPtext = self.GetChild("SPtext")
        self.hp_bar = self.GetChild("hp_bar")
        self.sp_bar = self.GetChild("sp_bar")
        self.bilgi_head = self.GetChild("bilgi_head")
        self.time = self.GetChild("time")
        
    def setlevel(self, level):
        self.GetChild("Level_Value").SetText(level)
        
    def setsp(self,text):
        self.GetChild("SPtext").SetText(text)

    def pozisyon(self, pos1, pos2):
        self.charBoxPanel.SetPosition(pos1, pos2)
        
    def sethp(self,text):
        self.GetChild("HPtext").SetText(text)

    def hpyenile(self,hp,maxhp):
        self.hp_bar.SetPercentage(hp, maxhp)

    def spyenile(self,sp,maxsp):
        self.sp_bar.SetPercentage(sp, maxsp)

    def setisim(self, isim):
        self.GetChild("NameText").SetText(isim)

    def OnUpdate(self):
        import time
        gc=time.strftime("%d")
        aycek=time.strftime("%B")
        yilx=time.strftime("%Y")
        gun=time.strftime("%A")
        st=time.strftime("%H:%M:%S")
        b= " "
        aylar={"January":"Ocak","February":"?ubat","March":"Mart","April":"Nisan","May":"Mayıs","June":"Haziran","July":"Temmuz","August":"A?ustos","September":"Eylul","October":"Ekim","November":"Kasım","December":"Aralık"}    
        ayx=aylar[aycek]
        gunler={"Monday":"Pazartesi","Tuesday":"Salı","Wednesday":"Car?amba","Thursday":"Per?embe","Friday":"Cuma","Saturday":"Cumartesi","Sunday":"Pazar"}
        g=gunler[gun]
        bagla=b+gc+b+ayx+b+yilx+b+g+b+st
        self.time.SetText(bagla)
        #self.time.show()

    def SetFoto(self, fotoln):
        try:
            self.foto.LoadImage(fotoln)
            # self.foto.Hide()
        except:
            print "CharacterWindow.RefreshCharacter(race=, faceImageName=%s)" % (fotoln)
            self.foto.Hide()

    def Destroy(self):        
        self.charBoxPanel = 0
        self.yuva = 0
        self.foto = 0
        self.lvbox = 0
        self.lvtext = 0 
        self.namebox = 0
        self.nametext = 0 
        self.HPtext =0
        self.SPtext = 0
        self.hp_bar = 0
        self.sp_bar = 0    
        self.time = 0
        self.__del__()

ÜSTÜNE EKLENİR.

Root - Translate.py açılır. (YOKSA OLUŞTURUN.)

Kod:
acik = 1
chpanel = "Yan Panel"
acbut = "Göster"
kapbut = "Gizle"

İçine eklenir.

Uiscript - systemoptiondialog.py açılır.

Kod:
import translate

İmport olarak en başa eklenir.

Kod:
{
                    "name" : "CharPanel",
                    "type" : "text",

                    "x" : 30,
                    "y" : 235+2,

                    "text" : translate.chpanel,
                },
                {
                    "name" : "ac",
                    "type" : "radio_button",

                    "x" : 90,
                    "y" : 235,

                    "text" : translate.acbut,

                    "default_image" : ROOT_PATH + "Middle_Button_01.sub",
                    "over_image" : ROOT_PATH + "Middle_Button_02.sub",
                    "down_image" : ROOT_PATH + "Middle_Button_03.sub",
                },
                
                {
                    "name" : "kapa",
                    "type" : "radio_button",

                    "x" : 90+70,
                    "y" : 235,

                    "text" : translate.kapbut,

                    "default_image" : ROOT_PATH + "Middle_Button_01.sub",
                    "over_image" : ROOT_PATH + "Middle_Button_02.sub",
                    "down_image" : ROOT_PATH + "Middle_Button_03.sub",
                },

İstediğiniz bir yere ekleyin.

Bir kaç dosya daha var arkadaşlar. Altta vereceğim linkten dosyaları indirip root içine atınız. Detaylı anlatım dosyanın içerisinde bulunuyor.

Kanıtlar:
o30XJo.jpg


VaP9jq.jpg


v5X63O.jpg


nMjQ41.jpg



15.03.2016 00:02 Tarih ve Saatinde Eksik Dosyalar Giderildi. Link Yenilendi.

İndirme Link:
Taha AKKALIN | ByMogart - Yan Panel (Dosyaupload.com)

Virüs Total:

Taha AKKALIN | ByMogart - Yan Panel (Virustotal.com)


Bu Paylaşım Bazı Arkadaşların Zoruna Gidebilir. Sevgilerimi ve Saygılarımı iletiyorum.

Burdan @KurucuPegasus; 'a selam olsun. Paylaşım öyle değil böyle yapılır. Örnek al.


@TILKI OGUZ; Sen for istersinde ben vermemi :wink:
Yazar
Bekir.CANPOLAT
Kaynak İndirilme
8
Görüntüleme
288
İlk yayınlama
Son Güncelleme

Ratings

0.00 yıldız(lar) 0 rating

Bekir.CANPOLAT - Kaynakları

Geri
Üst