Jump to content

[ Dead Download Link ] [RELEASE] Shop with the new currency [ We Need You ]


Recommended Posts

  • Premium

Here it is:

	def OpenQuestWindow(self, skin, idx):
		if constInfo.INPUT_IGNORE == 0:
			wnds = ()
			q = uiQuest.QuestDialog(skin, idx)
			q.SetWindowName("QuestWindow" + str(idx))
			q.Show()
			if skin:
				q.Lock()
				wnds = self.__HideWindows()
				q.SetOnDoneEvent(lambda tmp_self, args=wnds: self.__ShowWindows(args))
			if skin:
				q.AddOnCloseEvent(q.Unlock)
			q.AddOnCloseEvent(lambda s = self, qw = q: s.__dict__.__getitem__("wndQuestWindow").remove(qw))
			self.wndQuestWindow.append(q)
		else:
			pass
  • Love 1
Link to comment
Share on other sites

  • Premium

That happen because it's always replacing the current value in the client.
 
Replace this function:

    def __setAchievementPoints(self, points):
 
        constInfo.ACHIEVEMENT_POINTS = int(points)
 
        self.interface.wndInventory.UpdatePremiumInSlot()

With this:

    def __setAchievementPoints(self, points):
 
        constInfo.ACHIEVEMENT_POINTS += int(points)
 
        self.interface.wndInventory.UpdatePremiumInSlot()

But I don't recommend you to do this, because it's always running at login. Make a new function and call that from Quest only when you want to add money to the player.

  • Love 1
Link to comment
Share on other sites

1 more question, i made it so when you open the scrolls it gives you cmdchat("setPP 10"), if i open x2 it stays at 10.

How do i make the DP increase every time a scroll is used?

quest test begin
  state start begin
     when ITEMVNUME.use begin ---- Change "ITEMVNUME" on id item
      cmdchat("setPP +70 ")
     end
  end
end
  • Love 1
Link to comment
Share on other sites

  • Bronze

 

You have to store the TR on server-side and always resend to the player at login.

 

pls example

 

You must send to the player amount TR. You can use this quest for example (I assume You're using a quest from the author topic.):

quest updateTR begin
	state start begin
		when login begin
			cmdchat("setPP "..pc.getf("achievement", "achievement_points"))
		end
	end
end
Link to comment
Share on other sites

 

 

You have to store the TR on server-side and always resend to the player at login.

 

pls example

 

You must send to the player amount TR. You can use this quest for example (I assume You're using a quest from the author topic.):

quest updateTR begin
	state start begin
		when login begin
			cmdchat("setPP "..pc.getf("achievement", "achievement_points"))
		end
	end
end

This doesnt work, relog and its gone

Link to comment
Share on other sites

hy!

 

this problem:

0329 00:00:23455 :: Traceback (most recent call last):

0329 00:00:23455 ::   File "ui.py", line 1130, in OnToggleDown

0329 00:00:23456 ::   File "ui.py", line 87, in __call__

0329 00:00:23457 ::   File "ui.py", line 69, in __call__

0329 00:00:23457 ::   File "uiShop.py", line 179, in OnBuy

0329 00:00:23458 :: AttributeError
0329 00:00:23458 :: :
0329 00:00:23458 :: 'module' object has no attribute 'SHOP_BUY_INFO'
0329 00:00:23458 ::

 

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



×
×
  • 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.