Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 10:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PYTHON] TIME FORMAT (PLAY TIME) SELECT CHARACTER

Discussion on [PYTHON] TIME FORMAT (PLAY TIME) SELECT CHARACTER within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
Exygo's Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 31
Received Thanks: 32
[PYTHON] TIME FORMAT (PLAY TIME) SELECT CHARACTER

Preview:




Cod:

Code:
	#Exygo's function
	def timp_frumos(self, minute):
		#import math # modulul math se presupune a fi deja importat sus
		self.ore = minute / 60
		if minute  <= 60:
			return uiScriptLocale.EXYGO_TIME_FORMAT_MINUTE % (minute)
		else:
			if self.ore <= 24:
				return uiScriptLocale.EXYGO_TIME_FORMAT_HOURS_AND_MINUTES % (self.ore, minute - 60 * self.ore) # Ingeniozitate maa!
			else:
				self.zile = self.ore / 24
				return uiScriptLocale.EXYGO_TIME_FORMAT_DAYS_AND_HOURS % (self.zile, self.ore - 24 * self.zile) # Ingeniozitate maa!
Code:
self.PlayTime.SetText(self.timp_frumos(playTime))
And the part for locale_xx/locale_interface.txt

Code:
EXYGO_TIME_FORMAT_MINUTE	%s minute(s)
EXYGO_TIME_FORMAT_HOURS_AND_MINUTES	%s hour(s) and %s minute(s)
EXYGO_TIME_FORMAT_DAYS_AND_HOURS	%s day(s) and %s hour(s)
Install this youself! No guide for noobs yet!

Hint: introselect.py

* This little part of code was wrote by Exygo(me)
Exygo is offline  
Thanks
6 Users
Old 01/24/2016, 23:59   #2
 
Noa_'s Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 605
Received Thanks: 580
is that the same?
PHP Code:
self.PlayTime.SetText(self.SecondToDHM(playTime*60)) 
Noa_ is offline  
Old 01/25/2016, 12:39   #3
 
elite*gold: 0
Join Date: Dec 2015
Posts: 121
Received Thanks: 18
Wo muss das alles hin? xDDDDDD
.UNLTD. is offline  
Old 01/25/2016, 20:45   #4
 
Noa_'s Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 605
Received Thanks: 580
SecondToDHM work only with seconds, so convert minutes to seconds multiplied by 60
Noa_ is offline  
Old 01/26/2016, 09:32   #5
 
.Various's Avatar
 
elite*gold: 35
Join Date: Aug 2014
Posts: 336
Received Thanks: 267
Well, thanks, but the calculations goes much easier.
e.g use divmod(x, y). This method returns a tuple (a // b, a % b)

Code:
        s, m = divmod(m, 60)
        d, s = divmod(s, 24)
        print("%dDays %02dHours %02dMinutes" % (d, s, m))
Best regards, .Various
.Various is offline  
Reply


Similar Threads Similar Threads
[Trading] Steam Items for Wow play time/account w/ play time
11/08/2015 - World of Warcraft Trading - 3 Replies
Have around $400 worth of items on steam, looking to trade for wow playtime, if you sell an account it must have a good amount of play time already on it.
[Help]Time format
03/31/2015 - Flyff Private Server - 2 Replies
how to convert time 20150331031428 to normal datetime with php code sir. :handsdown::handsdown:
Big Character spawns all the time.
02/14/2014 - CO2 Private Server - 12 Replies
http://gyazo.com/6085c6e325973803b79db9f4469acfd4. png http://gyazo.com/9bd6d17023a9811787540b3ab745e0fd .gif Debug.log spams the following: ”ļASSERT(m_idArmor) in 844 line of D:\CQ2ClientRelease-11.17.3\RoleView\3DRole.cpp”ļ -- Thu Feb 13 12:49:19 2014 ”ļASSERT(nLook > 0 && nLook < 1000) in 472 line of D:\CQ2ClientRelease-11.17.3\RoleView\3DRole.cpp”ļ -- Thu Feb 13 12:53:28 2014 ”ļASSERT(m_idArmor) in 844 line of D:\CQ2ClientRelease-11.17.3\RoleView\3DRole.cpp”ļ -- Thu Feb 13 12:53:28...
how i can at the same time work to dance multiple character
11/25/2012 - Metin2 Private Server - 0 Replies
how i can at the same time work to dance multiple character :) need hot key key presser or python software need help :)
[HELp] Two Character Same, Login at the same time
08/02/2011 - CO2 Private Server - 3 Replies
someone help me fix this bug?



All times are GMT +1. The time now is 10:23.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.