R 1
Roksam
[DEV]AB 1
[DEV]AB
noisiv 1
noisiv
Manwe Work 1
Manwe Work
mavzermete 1
mavzermete
Hikaye Ekle

Mobların Exp ve Canını Görme[PYTHON]

  • Konuyu başlatan Konuyu başlatan blackdragonx61
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 34
  • Görüntüleme Görüntüleme 7K
TEŞEKKÜRLER PELİN :)
p9Ngvz.png
 
Editleyeceğimiz tek yer uitarget ayrıca mobların canını % olarak göstermeyi de birlikte vereceğim.

uitarget.py aratılır:
Kod:
def __init__(self):
Kodlar Aşağıdaki gibi değiştirilir;
Kod:
hpGauge = ui.Gauge() hpGauge.SetParent(self)
Kod:
[COLOR=#BB0000][FONT=Verdana]hpGauge.SetPosition(175, 17)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpGauge.MakeGauge(130, "red")[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpGauge.SetWindowHorizontalAlignRight()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpGauge.Hide()[/FONT][/COLOR]

[COLOR=#BB0000][FONT=Verdana]hpPercenttxt = ui.TextLine()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpPercenttxt.SetParent(self)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpPercenttxt.SetPosition(160, 13)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpPercenttxt.SetText("")[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpPercenttxt.Hide()[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]hpText = ui.TextLine()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpText.SetPosition(0, -17)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpText.SetWindowHorizontalAlignCenter()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpText.SetHorizontalAlignCenter()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpText.Hide()[/FONT][/COLOR]

Aratılır:
Kod:
[COLOR=#333333]self.name = name[/COLOR]
Kodlar değiştirilir;
Kod:
self.hpGauge = hpGauge self.hpPercenttxt = hpPercenttxt
Kod:
[COLOR=#BB0000][FONT=Verdana]self.hpText = hpText[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]hpText.SetParent(hpGauge)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.closeButton = closeButton[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.nameString = 0[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.nameLength = 0[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.vid = 0[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.eventWhisper = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.isShowButton = FALSE[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]self.__Initialize()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.ResetTargetBoard()[/FONT][/COLOR]

Aratılır:
Kod:
def Destroy(self):
Kodlar değiştirilir;
Kod:
def Destroy(self): self.hpText = None
Kod:
[COLOR=#BB0000][FONT=Verdana]self.hpPercenttxt = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.eventWhisper = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.closeButton = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.showingButtonList = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.buttonDict = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.name = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpGauge = None[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.__Initialize()[/FONT][/COLOR]

Aratılır:
Kod:
[COLOR=#333333]def ResetTargetBoard(self):[/COLOR]
Kodlar değiştirilir;
Kod:
def ResetTargetBoard(self):
Kod:
[COLOR=#BB0000][FONT=Verdana]for btn in self.buttonDict.values():[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]btn.Hide()[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]self.__Initialize()[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]self.name.SetPosition(0, 13)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.name.SetHorizontalAlignCenter()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.name.SetWindowHorizontalAlignCenter()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpGauge.Hide()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpText.Hide()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpPercenttxt.Hide()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.SetSize(250, 40)[/FONT][/COLOR]

Aratılır:
Kod:
def SetHP(self, hpPercentage):
Kodlar Değiştirilir:
Kod:
def SetHP(self, hpPercentage):
Kod:
[COLOR=#BB0000][FONT=Verdana]if not self.hpGauge.IsShow():[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.SetSize(200 + 7*self.nameLength, self.GetHeight())[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.name.SetPosition(23, 13)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.name.SetWindowHorizontalAlignLeft()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.name.SetHorizontalAlignLeft()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpGauge.Show()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpText.Show()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.UpdatePosition()[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpPercenttxt.SetPosition(200 + 7*self.nameLength-205, 13)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpPercenttxt.Show()[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]self.hpGauge.SetPercentage(hpPercentage, 100)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpPercenttxt.SetText("%d%%" % (hpPercentage))[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]self.hpText.SetText(str(int(float(hpPercentage)/100.00*float(nonplayer.GetMonsterMaxHp(self.vid))) ) + "/" + str(nonplayer.GetMonsterMaxHp(self.vid)) )[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]chr.SelectInstance(self.vid)[/FONT][/COLOR]
Aratılır:
Kod:
def SetEnemyVID(self, vid):
Kodlar Değiştirilir;
Kod:
def SetEnemyVID(self, vid): self.SetTargetVID(vid)
Kod:
[COLOR=#BB0000][FONT=Verdana]name = chr.GetNameByVID(vid)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]level = nonplayer.GetLevelByVID(vid)[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]grade = nonplayer.GetGradeByVID(vid)[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]nameFront = ""[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]EXP = ""[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]if -1 != level:[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]nameFront += "Lv." + str(level) + " "[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]EXP += " " + "EXP:" + str(nonplayer.GetMonsterEXP(self.vid))[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]if self.GRADE_NAME.has_key(grade):[/FONT][/COLOR]
[COLOR=#BB0000][FONT=Verdana]nameFront += "(" + self.GRADE_NAME[grade] + ") "[/FONT][/COLOR]



[COLOR=#BB0000][FONT=Verdana]self.SetTargetName(nameFront + name + EXP)[/FONT][/COLOR]

Kanıt:
6oQkjDf.jpg



Merhaba

Hepsi yapıldı fakat slotlara sağ tıklanmıyor?
 

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

Geri
Üst