Jump to content
  • 0

kill GUI system


flygun

Question

  • Former Staff

hello guys i got a system which count the numbers of the mobs and the characters i kill  in game

i know how to make quest to open it but i want to delete the quest and make the system

show with the (Y) bottom 

 

i think i must make something like this

        onPressKeyDict[app.DIK_Y]    = lambda : self.__showkillgui()

but only show it

i want the (Y) show and hide the system

 

i think this is the part that i must work on but i don't know python XD

    def __hidekillgui(self):
        self.KillGuiBg.Hide()
        self.KillBlauReich.Hide()
        self.KillGelbReich.Hide()
        self.KillRotReich.Hide()
        self.KillMob.Hide()
        
    def __showkillgui(self):
        self.KillGuiBg.Show()
        self.KillBlauReich.Show()
        self.KillGelbReich.Show()
        self.KillRotReich.Show()
        self.KillMob.Show()   

thanks in advance

Link to comment

12 answers to this question

Recommended Posts

  • 0

It Will be something like this:

  def __showkillgui(self):
	if KillGuiBg.IsShow():
		self.KillGuiBg.Hide()
        self.KillBlauReich.Hide()
        self.KillGelbReich.Hide()
        self.KillRotReich.Hide()
        self.KillMob.Hide()
	else:
        self.KillGuiBg.Show()
        self.KillBlauReich.Show()
        self.KillGelbReich.Show()
        self.KillRotReich.Show()
        self.KillMob.Show() 
  • Love 1
Link to comment
  • 0
  • Former Staff

after loading... the skills appears and the minimap but the loading screen still there

0720 15:23:25704 ::   File "networkModule.py", line 233, in SetGamePhase

0720 15:23:25704 ::   File "game.py", line 122, in __init__

0720 15:23:25704 ::   File "game.py", line 1684, in __ServerCommand_Build

0720 15:23:25704 :: AttributeError
0720 15:23:25704 :: :
0720 15:23:25704 :: 'GameWindow' object has no attribute '_GameWindow__hidekillgui'
0720 15:23:25704 ::

 

Link to comment
  • 0
  • Former Staff

this is the quest if it's help with anything 

quest killgui begin 
    state start begin 
        when kill begin 
            if npc.is_pc() then 
                local new_point = pc.getqf("empire"..npc.get_empire())+1 
                pc.setqf("empire"..npc.get_empire(), new_point) 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
            else 
                local new_point = pc.getqf("mob")+1 
                pc.setqf("mob", new_point) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            end 
        end 
        when login begin 
            if pc.getqf("showkillgui") == 1 then 
                cmdchat("ShowKillGui") 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            else 
                cmdchat("HideKillGui") 
            end 
        end 
        when letter begin 
            send_letter(" نظام عداد القتل ") 
        end 
        when info or button begin 
            say_title(" نظام عداد القتل ") 
            say(" هل تريد تفعيل هذا النظام الان ؟ ") 
            local janein = select(" نعم ", " لا ") 
            if janein == 2 then 
                pc.setqf("showkillgui", 0) 
                cmdchat("HideKillGui") 
            else 
                pc.setqf("showkillgui", 1) 
                cmdchat("ShowKillGui") 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            end 
        end 
    end 
end 
Link to comment
  • 0
  • Former Staff

 

this is the quest if it's help with anything 

quest killgui begin 
    state start begin 
        when kill begin 
            if npc.is_pc() then 
                local new_point = pc.getqf("empire"..npc.get_empire())+1 
                pc.setqf("empire"..npc.get_empire(), new_point) 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
            else 
                local new_point = pc.getqf("mob")+1 
                pc.setqf("mob", new_point) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            end 
        end 
        when login begin 
            if pc.getqf("showkillgui") == 1 then 
                cmdchat("ShowKillGui") 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            else 
                cmdchat("HideKillGui") 
            end 
        end 
        when letter begin 
            send_letter(" نظام عداد القتل ") 
        end 
        when info or button begin 
            say_title(" نظام عداد القتل ") 
            say(" هل تريد تفعيل هذا النظام الان ؟ ") 
            local janein = select(" نعم ", " لا ") 
            if janein == 2 then 
                pc.setqf("showkillgui", 0) 
                cmdchat("HideKillGui") 
            else 
                pc.setqf("showkillgui", 1) 
                cmdchat("ShowKillGui") 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            end 
        end 
    end 
end 

the quest is already posted

Link to comment
  • 0
  • Former Staff

syserr

0720 16:07:31989 :: Traceback (most recent call last):

0720 16:07:31989 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:31989 ::   File "game.py", line 416, in <lambda>

0720 16:07:31989 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:31989 :: NameError
0720 16:07:31989 :: :
0720 16:07:31989 :: global name 'KillGuiBg' is not defined
0720 16:07:31989 ::

0720 16:07:31989 :: Traceback (most recent call last):

0720 16:07:31989 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:31989 ::   File "game.py", line 416, in <lambda>

0720 16:07:31989 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:31989 :: NameError
0720 16:07:31989 :: :
0720 16:07:31989 :: global name 'KillGuiBg' is not defined
0720 16:07:31989 ::

0720 16:07:32469 :: Traceback (most recent call last):

0720 16:07:32469 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:32469 ::   File "game.py", line 416, in <lambda>

0720 16:07:32469 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:32469 :: NameError
0720 16:07:32469 :: :
0720 16:07:32469 :: global name 'KillGuiBg' is not defined
0720 16:07:32469 ::

0720 16:07:32470 :: Traceback (most recent call last):

0720 16:07:32470 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:32470 ::   File "game.py", line 416, in <lambda>

0720 16:07:32470 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:32470 :: NameError
0720 16:07:32470 :: :
0720 16:07:32470 :: global name 'KillGuiBg' is not defined
0720 16:07:32470 ::

0720 16:07:32722 :: Traceback (most recent call last):

0720 16:07:32722 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:32722 ::   File "game.py", line 416, in <lambda>

0720 16:07:32722 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:32722 :: NameError
0720 16:07:32722 :: :
0720 16:07:32722 :: global name 'KillGuiBg' is not defined
0720 16:07:32722 ::

0720 16:07:32722 :: Traceback (most recent call last):

0720 16:07:32722 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:32722 ::   File "game.py", line 416, in <lambda>

0720 16:07:32722 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:32722 :: NameError
0720 16:07:32723 :: :
0720 16:07:32723 :: global name 'KillGuiBg' is not defined
0720 16:07:32723 ::

0720 16:07:32975 :: Traceback (most recent call last):

0720 16:07:32976 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:32976 ::   File "game.py", line 416, in <lambda>

0720 16:07:32976 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:32976 :: NameError
0720 16:07:32976 :: :
0720 16:07:32976 :: global name 'KillGuiBg' is not defined
0720 16:07:32976 ::

0720 16:07:32976 :: Traceback (most recent call last):

0720 16:07:32976 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:32976 ::   File "game.py", line 416, in <lambda>

0720 16:07:32976 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:32976 :: NameError
0720 16:07:32976 :: :
0720 16:07:32976 :: global name 'KillGuiBg' is not defined
0720 16:07:32976 ::

0720 16:07:33847 :: Traceback (most recent call last):

0720 16:07:33847 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:33847 ::   File "game.py", line 416, in <lambda>

0720 16:07:33847 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:33847 :: NameError
0720 16:07:33847 :: :
0720 16:07:33847 :: global name 'KillGuiBg' is not defined
0720 16:07:33847 ::

0720 16:07:33847 :: Traceback (most recent call last):

0720 16:07:33847 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:33848 ::   File "game.py", line 416, in <lambda>

0720 16:07:33848 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:33848 :: NameError
0720 16:07:33848 :: :
0720 16:07:33848 :: global name 'KillGuiBg' is not defined
0720 16:07:33848 ::

0720 16:07:34210 :: Traceback (most recent call last):

0720 16:07:34210 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:34210 ::   File "game.py", line 416, in <lambda>

0720 16:07:34210 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:34210 :: NameError
0720 16:07:34210 :: :
0720 16:07:34210 :: global name 'KillGuiBg' is not defined
0720 16:07:34210 ::

0720 16:07:34211 :: Traceback (most recent call last):

0720 16:07:34211 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:34211 ::   File "game.py", line 416, in <lambda>

0720 16:07:34211 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:34211 :: NameError
0720 16:07:34211 :: :
0720 16:07:34211 :: global name 'KillGuiBg' is not defined
0720 16:07:34211 ::

0720 16:07:34746 :: Traceback (most recent call last):

0720 16:07:34746 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:34746 ::   File "game.py", line 416, in <lambda>

0720 16:07:34746 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:34746 :: NameError
0720 16:07:34746 :: :
0720 16:07:34746 :: global name 'KillGuiBg' is not defined
0720 16:07:34746 ::

0720 16:07:34747 :: Traceback (most recent call last):

0720 16:07:34747 ::   File "game.py", line 1219, in OnKeyDown

0720 16:07:34747 ::   File "game.py", line 416, in <lambda>

0720 16:07:34747 ::   File "game.py", line 2160, in __showkillgui

0720 16:07:34747 :: NameError
0720 16:07:34747 :: :
0720 16:07:34747 :: global name 'KillGuiBg' is not defined
0720 16:07:34747 ::

0720 16:08:35365 :: Traceback (most recent call last):

0720 16:08:35365 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:35365 ::   File "game.py", line 416, in <lambda>

0720 16:08:35365 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:35365 :: NameError
0720 16:08:35365 :: :
0720 16:08:35365 :: global name 'KillGuiBg' is not defined
0720 16:08:35365 ::

0720 16:08:35365 :: Traceback (most recent call last):

0720 16:08:35365 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:35365 ::   File "game.py", line 416, in <lambda>

0720 16:08:35365 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:35365 :: NameError
0720 16:08:35365 :: :
0720 16:08:35365 :: global name 'KillGuiBg' is not defined
0720 16:08:35365 ::

0720 16:08:35706 :: Traceback (most recent call last):

0720 16:08:35706 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:35706 ::   File "game.py", line 416, in <lambda>

0720 16:08:35706 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:35706 :: NameError
0720 16:08:35706 :: :
0720 16:08:35706 :: global name 'KillGuiBg' is not defined
0720 16:08:35707 ::

0720 16:08:35707 :: Traceback (most recent call last):

0720 16:08:35707 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:35707 ::   File "game.py", line 416, in <lambda>

0720 16:08:35707 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:35707 :: NameError
0720 16:08:35707 :: :
0720 16:08:35707 :: global name 'KillGuiBg' is not defined
0720 16:08:35707 ::

0720 16:08:37033 :: Traceback (most recent call last):

0720 16:08:37033 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:37033 ::   File "game.py", line 416, in <lambda>

0720 16:08:37033 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:37033 :: NameError
0720 16:08:37033 :: :
0720 16:08:37033 :: global name 'KillGuiBg' is not defined
0720 16:08:37033 ::

0720 16:08:37033 :: Traceback (most recent call last):

0720 16:08:37034 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:37034 ::   File "game.py", line 416, in <lambda>

0720 16:08:37034 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:37034 :: NameError
0720 16:08:37034 :: :
0720 16:08:37034 :: global name 'KillGuiBg' is not defined
0720 16:08:37034 ::

0720 16:08:37259 :: Traceback (most recent call last):

0720 16:08:37259 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:37259 ::   File "game.py", line 416, in <lambda>

0720 16:08:37259 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:37259 :: NameError
0720 16:08:37259 :: :
0720 16:08:37259 :: global name 'KillGuiBg' is not defined
0720 16:08:37259 ::

0720 16:08:37259 :: Traceback (most recent call last):

0720 16:08:37259 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:37259 ::   File "game.py", line 416, in <lambda>

0720 16:08:37259 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:37259 :: NameError
0720 16:08:37259 :: :
0720 16:08:37259 :: global name 'KillGuiBg' is not defined
0720 16:08:37259 ::

0720 16:08:37519 :: Traceback (most recent call last):

0720 16:08:37519 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:37519 ::   File "game.py", line 416, in <lambda>

0720 16:08:37520 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:37520 :: NameError
0720 16:08:37520 :: :
0720 16:08:37520 :: global name 'KillGuiBg' is not defined
0720 16:08:37520 ::

0720 16:08:37520 :: Traceback (most recent call last):

0720 16:08:37520 ::   File "game.py", line 1219, in OnKeyDown

0720 16:08:37520 ::   File "game.py", line 416, in <lambda>

0720 16:08:37520 ::   File "game.py", line 2160, in __showkillgui

0720 16:08:37520 :: NameError
0720 16:08:37520 :: :
0720 16:08:37520 :: global name 'KillGuiBg' is not defined
0720 16:08:37520 ::

Link to comment
  • 0

Here is it test it now:

quest killgui begin 
    state start begin 
        when kill begin 
            if npc.is_pc() then 
                local new_point = pc.getqf("empire"..npc.get_empire())+1 
                pc.setqf("empire"..npc.get_empire(), new_point) 
                cmdchat("KillRotReich "..pc.getqf("empire1")) 
                cmdchat("KillGelbReich "..pc.getqf("empire2")) 
                cmdchat("KillBlauReich "..pc.getqf("empire3")) 
            else 
                local new_point = pc.getqf("mob")+1 
                pc.setqf("mob", new_point) 
                cmdchat("KillMob "..pc.getqf("mob")) 
            end 
        end 
        when login begin 
            cmdchat("ShowKillGui") 
            cmdchat("KillRotReich "..pc.getqf("empire1")) 
            cmdchat("KillGelbReich "..pc.getqf("empire2")) 
            cmdchat("KillBlauReich "..pc.getqf("empire3")) 
            cmdchat("KillMob "..pc.getqf("mob")) 
        end 
    end 
end
Link to comment

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.