
Deschide costInfo.py din root şi la inceput adaugă :
Cod: Selectaţi tot
OPPONENTS_HP = [0, 0]Intrăm in game.py şi căutăm :
Cod: Selectaţi tot
def OnRecvWhisper(self, mode, name, line):Acum inlocuim toată funcţia să arate aşa :
Cod: Selectaţi tot
## Chat
def OnRecvWhisper(self, mode, name, line):
global kisi
global oyunagirdi
if mode == chat.WHISPER_TYPE_GM:
self.interface.RegisterGameMasterName(name)
import net
if line.find("CODE_MESSAGE_OPPONENTS_HP_29305|") != -1:
vid = line.split("|")[1]
if str(chr.GetNameByVID(int(vid)))!="None":
net.SendWhisperPacket(name, "CODE_MESSAGE_OPPONENTS_HP_29306|" + str(player.GetStatus(player.HP)) + "|" + str(player.GetStatus(player.MAX_HP)))
return
if line.find("CODE_MESSAGE_OPPONENTS_HP_29306|") != -1:
line = line.split("|")
constInfo.OPPONENTS_HP = [int(line[1]), int(line[2])]
return
Acum intrăm în uitarget.py din root şi căutăm :
Cod: Selectaţi tot
def __init__(self):Acum inlocuim cu :
Cod: Selectaţi tot
def __init__(self):
ui.ThinBoard.__init__(self)
self.SaveSecond = 0
self.healthBoard = uiHealth.HealthBoard()
Tot în uiTarget.py căutam :
Cod: Selectaţi tot
def OnUpdate(self):Cod: Selectaţi tot
Şi modificăm funcţia cu :Cod: Selectaţi tot
def OnUpdate(self):
if player.IsPVPInstance(self.vid):
if self.vid != 0:
if app.GetTime() > self.SaveSecond:
self.SaveSecond = app.GetTime()+1.0
if str(chr.GetNameByVID(self.vid))!="None":
net.SendWhisperPacket(str(self.name.GetText()), "CODE_MESSAGE_OPPONENTS_HP_29305|"+str(player.GetMainCharacterIndex()))
if constInfo.OPPONENTS_HP[1]!=0:
if constInfo.OPPONENTS_HP[0]<=0:
self.SetHP(0)
else:
self.SetHP(((float(constInfo.OPPONENTS_HP[0])/float(constInfo.OPPONENTS_HP[1]))*100))
Baftă 


