Jump to content

ѕeмa™

Member
  • Posts

    340
  • Joined

  • Last visited

  • Days Won

    10
  • Feedback

    0%

Posts posted by ѕeмa™

  1.  

    En 9/9/2018 a las 20:34, Tryn dijo:

    Hello together,

    because im not that good with Python im gonna ask you guys if somebody can help me to archive this: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif
    It's a nice simpel improvment for the gauge in my opinion.

    If you agree with me let me knew about it and maybe help me out.

    Thanks in advance

    Tryn

    U mean this right?

    https://metin2.download/picture/yNIj3Wv5U09p00seMD8h5xRuS6BqRb4A/.gif

     

    Well i did this:

    Onupdate:

    		if self.max_hp > self.actual_hp:
    			if app.GetTime() > self.time:
    				self.max_hp -= 1
    				dbg.TraceError(str(self.actual_hp)+"_"+str(self.max_hp))
    				self.hpGauge.SetPercentage(self.max_hp, 100)
    				self.time = app.GetTime() + 0.005

    def sethp
     

    	def SetHP(self, hpPercentage):
    		if not self.hpGauge.IsShow():
    		
    			self.SetSize(200 + 7*self.nameLength, self.GetHeight())
    			self.name.SetHorizontalAlignCenter()
    			self.name.SetWindowHorizontalAlignCenter()
    			self.name.SetPosition(0, 8)
    			self.hpGauge.SetWindowHorizontalAlignCenter()
    			self.hpGauge.SetPosition(0, 23)
    			self.hpGauge.Show()
    			self.percent.Show()
    			self.UpdatePosition()
    			self.max_hp = hpPercentage
    	
    		self.hpGauge.SetPercentage(hpPercentage, 100)
    		self.actual_hp = hpPercentage

     

    def init

    		self.actual_hp = 0
    		self.max_hp = 100
    		self.time = 0

    I did this fast, if it's bugged i dont know but if u find a bug, tell me.

     

    You can play with this code, example: if the difference is too high u can make the hp goes faster and if the difference is not too much goes slower.

    Good luck

    • Metin2 Dev 1
    • Love 3
  2. hace 36 minutos, Jfirewall dijo:
    
    import subprocess,app,threading,os,time
     
    Evil_ProcessList = ["notepad++.exe"]
    Evil_FileNameList = [".pyc",".py",".bat",".mix",".flt",".fls",".m3d"]
     
    class SuperUnsecureAndNotEnoughProtectionOfferingScript(object):
    	def __init__(self):
    		self.LoadSuperUnsecureSystem()
    
    	def __del__(self):
    		pass
    
    	def LoadSuperUnsecureSystem(self):
    		while 1:
    			self.CheckForEvilFiles()
    			self.CheckForEvilProcesses()
    
    	def KillProcess(self, processname):
    		try:
    			os.system("taskkill /f /im %s" % processname)
    		except:
    			app.Exit()
    
    	def DeleteFile(self, filename):
    		try:
    			os.remove(filename)
    		except IOError:
    			app.Exit()
    
    	def CheckForEvilFiles(self):
    		for file in os.listdir(os.getcwd()):
    			for filename in Evil_FileNameList:
    				if file.endswith(filename):
    					self.DeleteFile(file)     
    
    	def CheckForEvilProcesses(self):
    		for evil in Evil_ProcessList:
    			if evil in subprocess.Popen("tasklist", stdout=subprocess.PIPE, shell=False).communicate()[0]:
    				self.KillProcess(evil)
    
    if __name__ == '__main__':
    	threading.Thread(target=SuperUnsecureAndNotEnoughProtectionOfferingScript, args=()).start()

     

    extremefacepalm.png

    megafp2.png

    latest?cb=20120922153750

    main-qimg-7c6148068e8b37e4818dbbb90c8163

     

    • Confused 1
    • Love 3
  3. Ok, lets try again.

    efab0683e404beae9ece1bb403861de3.png

    1º Executed db_d normally, when i saw the error, i pressed retry.

    2º Then i openned with visual studio in admin mode and i saw the screen above.

    3º Execute db_d from solution and check the error in "Resultados" but i can see where is the mistake in the code .

    I dont know if im doing this right or not fuuuuck xD

  4. hace 5 minutos, enzi dijo:

    Hi.. I tried today add something from pet system to locale_string but i have big problem :/

    I change in cmd_general.cpp this:

    
    ch->ChatPacket(CHAT_TYPE_INFO, "You can't evolve your pet.");

    to

    
    ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't evolve your pet."));

    I add lines to locale_string.txt:

    
    "You can't evolve your pet.";
    "Test Message.";

    but in chat is still

    
    You can't evolve your pet.

    I found some error in sysser:

    
    SYSERR: May  9 04:18:56 :: locale_find: LOCALE_ERROR: "You can't evolve your pet.";

     

    Someone know how to fix it to show right message in chat? Ty :) 

    try without simbols like ' in the first line

  5. hace 11 minutos, Fleon dijo:

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx

     

     

    WSAECONNRESET
    10054

     

    Connection reset by peer.

    An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

    thanks, i will search how to fix it, i tried disconnecting windows firewall, and some others stuff but still without fix it.

    I read that maybe a program is blocking the conexion or something like that the server refused the connect right?

  6. Hi, I have a problem with 

    	if (m_lpCharacter)
    	{
    		m_lpCharacter->Disconnect("DESC::~DESC");
    		m_lpCharacter = NULL;
    	}

    When my character log in automatically is disconnect

    My server is working in Windows (Game and DB is in release) (This only happen in release, in debug works perfectly)

    Game.exe image

     

    392a319bc831e8ad65ce174882d1972f.png

    DB.exe image

     

    aae5617788620811ca626dd5437f2397.png

    Game.exe (AUTH) image

     

    392a319bc831e8ad65ce174882d1972f.png

    I hope someone can help me to find the error.

    If you need more information, please leave it in the comments.

    Thanks.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.