Jump to content

Recommended Posts

Hi, I have problem to set progressbar for pet system:

Python Code:
self.petlifeg.SetPercentage(50, 100)

Result:

rTgGetI3TG2TWWZ-fBafCg.png

In the oficial code is:
SetPercentageScale

Someone know what I can do to fix the progressbar?

Thank you so much.

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/16682-help-python-progressbar/
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Premium
33 minutes ago, Seryov said:

I'm using that, but dont work success, 
self.petlifeg.SetPercentage(50, 100)

The progress bar it's set to 50% but show +/- 10%...


 

Yes i mean can you paste here the snippet for that def?
So we can understand if the two parameters are correctly processed by python.

Unfortunately i don`t have the code with me so if you could provide here it would be great.

 

If you can provide even the petlifeg would be even better

Link to comment
https://metin2.dev/topic/16682-help-python-progressbar/#findComment-92180
Share on other sites

39 minutes ago, Fleon said:

Yes i mean can you paste here the snippet for that def?
So we can understand if the two parameters are correctly processed by python.

Unfortunately i don`t have the code with me so if you could provide here it would be great.

 

If you can provide even the petlifeg would be even better

it's here

 

	def SetPercentage(self, curValue, maxValue):
		if maxValue:
			self.SetRenderingRect(0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0)
		else:
			self.SetRenderingRect(0.0, 0.0, 0.0, 0.0)

 

Link to comment
https://metin2.dev/topic/16682-help-python-progressbar/#findComment-92185
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.