Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

DomeSs

Question

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 (see edit history)
Link to post

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.