Jump to content

uirefine and itemVnum


Recommended Posts

Hello, i would like to change this part of the uirefine.py that if you use the scroll vnum 71032 you will see +10% in the probability success

I tried something like this, but when i try to use the scroll it doesn't work and in the syserr i have this

 

	def Open(self, targetItemPos, nextGradeItemVnum, cost, prob, type, itemVnum):

		if False == self.isLoaded:
			self.__LoadScript()

		self.__Initialize()

		self.targetItemPos = targetItemPos
		self.vnum = nextGradeItemVnum
		self.cost = cost
		self.percentage = prob
		self.percentage2 = prob + 10
		self.type = type
		
		if itemVnum == 71032:
			self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage2))
		else:
			self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage))
0220 13:34:53671 :: Traceback (most recent call last):

0220 13:34:53671 ::   File "game.py", line 809, in OpenRefineDialog

0220 13:34:53671 ::   File "interfaceModule.py", line 975, in OpenRefineDialog

0220 13:34:53671 :: TypeError
0220 13:34:53671 :: : 
0220 13:34:53671 :: Open() takes exactly 7 arguments (6 given)
0220 13:34:53671 :: 

0220 13:34:53672 :: Traceback (most recent call last):

0220 13:34:53672 ::   File "game.py", line 812, in AppendMaterialToRefineDialog

0220 13:34:53672 ::   File "interfaceModule.py", line 978, in AppendMaterialToRefineDialog

0220 13:34:53672 ::   File "uiRefine.py", line 375, in AppendMaterial

0220 13:34:53672 ::   File "uiRefine.py", line 378, in UpdateDialog

0220 13:34:53672 :: AttributeError
0220 13:34:53672 :: : 
0220 13:34:53672 :: 'RefineDialogNew' object has no attribute 'toolTip'
0220 13:34:53672 :: 

0220 13:34:53672 :: Traceback (most recent call last):

0220 13:34:53672 ::   File "game.py", line 812, in AppendMaterialToRefineDialog

0220 13:34:53672 ::   File "interfaceModule.py", line 978, in AppendMaterialToRefineDialog

0220 13:34:53672 ::   File "uiRefine.py", line 375, in AppendMaterial

0220 13:34:53672 ::   File "uiRefine.py", line 378, in UpdateDialog

0220 13:34:53672 :: AttributeError
0220 13:34:53672 :: : 
0220 13:34:53672 :: 'RefineDialogNew' object has no attribute 'toolTip'
0220 13:34:53672 :: 

 

Do you know if there is an easy way to do this? Thank you

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Ok I fixed all the syserr and now it is empty, but when i use the item 71032 it doesnt show this:

self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage2))

 

 

Maybe it is not correct using this here for what I need?

		if itemVnum == 71032:
			self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage2))
		else:
			self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage))
Link to comment
Share on other sites

  • Developer
7 hours ago, Cripplez said:

Ok I fixed all the syserr and now it is empty, but when i use the item 71032 it doesnt show this:

self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage2))

 

 

Maybe it is not correct using this here for what I need?


		if itemVnum == 71032:
			self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage2))
		else:
			self.probText.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (self.percentage))

Maybe I'm wrong but I think you should make use of 'type' instead of itemVnum. You can get a list of all refine types from source.

r

Link to comment
Share on other sites

  • Premium

If you do that so, you will only see the percentage when you want to upgrade the item defined which is impossible because you cannot refine a blessing scroll. You need to do it in a different way. Try to replace the itemVnum with a vnum of a weapon and then try to upgrade it you will see what i am talking about. 
What you have done there will show the percentage of the given item (defined in uirefine.py) not when you use the item on another item to upgrade.

 

Let's take the example of def GetRefineSuccessPercentage:

				if item.ITEM_TYPE_METIN == itemType:

					if curGrade >= len(self.upgradeStoneSuccessPercentage):
						return 0
					return self.upgradeStoneSuccessPercentage[curGrade]

This is showing the percentage of the certain type in the uirefine. The only difference is that the item type is used instead of the itemVnum. 

I think (not the expert here) you will need to do checks in the uiInventory.py too so the script will know you are using blessing scroll on the items.

Edited by Anix
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 60

      Inbuild GR2 Animation

    2. 2

      wait() function bug

    3. 0

      Remove Party Role Bonuses

    4. 1

      Fix CBar3D

    5. 2

      set_quest_state not working

    6. 1

      Fix CBar3D

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.