Jump to content

Recommended Posts

Hi, can some on help me create antiexp button on 40k files ? 
i try it with Old Quest communication but dont work

 

## in game.py 
------------------------------------------------------------------------------------------
def __ServerCommand_Build(self):
------------------------------------------------------------------------------------------
"anti_exp"				: self.__antiexp,
------------------------------------------------------------------------------------------  
  # System Anti Exp - Start
	def __antiexp(self, questindex):
		constInfo.QUESTNAMEINDEX = questindex
	# System Anti Exp - End
------------------------------------------------------------------------------------------
 # constinfo.py

anti_exp = 0

## uiinventory.py


self.VegaS_button_Exp = self.GetChild2("VegaS_button_Exp")
------------------------------------------------------------------------------------------
if self.VegaS_button_Exp:
			self.VegaS_button_Exp.SetEvent(ui.__mem_func__(self.ClickVegaS_button_Exp))
------------------------------------------------------------------------------------------
	def ClickVegaS_button_Exp(self):
		import event
		import constInfo
		event.QuestButtonClick(int(constInfo.anti_exp))
------------------------------------------------------------------------------------------
    
quest antiexp begin
    state start begin
        when login begin
			cmdchat("anti_exp "..q.getcurrentquestindex())		
		end
        when 31091.use or button or info begin
            if pc.getqf("antiexp") == 0 then
                pc.block_exp()
                pc.setqf("antiexp", 1)
                chat("Anti exp - Aktivní ")
            elseif pc.getqf("antiexp") == 1 then
                pc.unblock_exp()
                pc.setqf("antiexp", 0)
                chat("Anti exp - Neaktivní")
            end
        end
    end
end

 

Edited by DomeSs
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.