Jump to content

Duel Kill System


Recommended Posts

  • 1 year later...
  • 9 months later...

Here is much better for load on command from game.py:

	"command_multikills"				: self.ShowMultiKills,

	def ShowMultiKills(self, arg):
		x = { 
				1	:	"(racha)",
				2	:	"(racha2)",
				3	:	"(racha3)",
				4	:	"(racha4)",
				5	:	"(racha5)"
			}
			
		if x.has_key(arg):
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Succes argument: %s" % x[arg])	
			net.SendChatPacket(x[arg])

Example to use in quest with arg:

	if pc.getqf("estado") == 3 then
		cmdchat("command_multikills 3")

 

Protect in chat, when someone try to use command (fris), (double) etc and he show him emoticon

	def __SendTalkingChatPacket(self, text):
		arg_command = ["(racha)", "(racha2)", "(racha3)", "(racha4)", "(racha5)"]
		
		for x in xrange(len(arg_command)):
			if(text.find(arg_command[x]) != -1):
				chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x])
				return

 

Edited by VegaS
asdf
Link to comment
Share on other sites

 

Why kill python

3 hours ago, VegaS said:

Protect in chat, when someone try to use command (fris), (double) etc and he show him emoticon


	def __SendTalkingChatPacket(self, text):
		arg_command = ["(racha)", "(racha2)", "(racha3)", "(racha4)", "(racha5)"]
		
		for x in xrange(len(arg_command)):
			if(text.find(arg_command[x]) != -1):
				chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % text)
				return

 

 

    def __SendTalkingChatPacket(self, text):
        arg_command = ["(racha)", "(racha2)", "(racha3)", "(racha4)", "(racha5)"]
        
        if text in arg_command:
            chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x])
            return

Link to comment
Share on other sites

45 minutes ago, Denis said:

 

    def __SendTalkingChatPacket(self, text):
        arg_command = ["(racha)", "(racha2)", "(racha3)", "(racha4)", "(racha5)"]
        
        if text in arg_command:
            chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x])
            return

Where is declared [x] ? :wub:

 

        for x in xrange(len(arg_command)):
            if text == arg_command[x]:
                chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x])
                return

Also you can make like that.

 

I know i can make like this haha ^^, but with text.find is much funny, he check you all inputvalue, with text in table he check you only first word, if u write like this with this:

(command)other_text

Will be working and can send command with text in table.

 

But with my version of text.find like not work, he find you all text in inputvalue and return.

Link to comment
Share on other sites

  • 6 months later...
On 2014. 06. 30. at 9:21 AM, luzzo said:

That is the horriblest way to do the duel system i ever seen.

1) You are setting:


pc.setqf("asesinatos", pc.getqf("asesinatos")+1)

Is it usefull for something? Do you use any check on it?

 

2) After the Ultrakill the system count return 0 and start again.. If you are doing a long series of kill you ll do multiple pentakill wtf?

 

3) There isn't any delay to check the time between kills.In this way i can collect my pentakill in for example 20 day..

 

4)Quest didn't check if the player is killed during his killing spree.

 

5)No sounds or any control for the killed player.

 

 

Finally i want belive that you describe it as duel kill like to the video one..

Example ....
 

Spoiler

quest gyilkolasok begin
    state start begin

------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------

        when gyilkolas.timer with pc.getqf("gyilkolasok")==1 begin
            pc.setqf("gyilkolasok", 0)
        end    -when

        when gyilkolas.timer with pc.getqf("gyilkolasok")==2 begin
            pc.setqf("gyilkolasok", 0)
        end    -when

        when gyilkolas.timer with pc.getqf("gyilkolasok")==3 begin
            pc.setqf("gyilkolasok", 0)
        end    -when

        when gyilkolas.timer with pc.getqf("gyilkolasok")==4 begin
            pc.setqf("gyilkolasok", 0)
        end    -when

        when gyilkolas.timer with pc.getqf("gyilkolasok")==5 begin
            pc.setqf("gyilkolasok", 0)
        end    -when

        when kettos_gyilkossagi_ido1.timer with pc.getqf("kettos_gyilkossag")==1 begin
            pc.setqf("kettos_gyilkossag", 0)
            cmdchat("kettos_gyilkossag")
        end    -when

        when kettos_gyilkossagi_ido.timer with pc.getqf("kettos_gyilkossag")==05 begin
            pc.setqf("kettos_gyilkossag", 0)
        end    -when

------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------

        when kill with npc.is_pc() begin
            pc.setqf("gyilkolasok", pc.getqf("gyilkolasok")+1)

            if pc.getqf("gyilkolasok") == 1 then
                pc.setqf("olesek", pc.getqf("olesek")+1)
                chat("Megszerezted az *első gyilkolást*!")
                cmdchat("elso")
                timer("gyilkolas", 30)

            elseif pc.getqf("gyilkolasok") == 2 then
                pc.setqf("olesek", pc.getqf("olesek")+2)
                chat("Megszerezted a *második gyilkolást*!")
                cmdchat("masodik")
                timer("gyilkolas", 25)

            elseif pc.getqf("gyilkolasok") == 3 then
                pc.setqf("olesek", pc.getqf("olesek")+4)
                chat("Megszerezted a *harmadik gyilkolást*!")
                cmdchat("harmadik")
                timer("gyilkolas", 20)

            elseif pc.getqf("gyilkolasok") == 4 then
                pc.setqf("olesek", pc.getqf("olesek")+7)
                chat("Megszerezted a *negyedik gyilkolást*!")
                cmdchat("negyedik")
                timer("gyilkolas", 15)

            elseif pc.getqf("gyilkolasok") == 5 then
                pc.setqf("olesek", pc.getqf("olesek")+15)
                chat("Megszerezted az *ötödik gyilkolást*!")
                cmdchat("otodik")
                timer("gyilkolas", 10)

            end    --if/else
        end    --when
------------------------------------------------------------------------------------------------------------------------
        when kill with npc.is_pc() with pc.getqf("kettos_gyilkossag")==0 begin
            timer("kettos_gyilkossagi_ido", 8)
            pc.setqf("kettos_gyilkossag", 05)
        end    --when

        when kill with npc.is_pc() with pc.getqf("kettos_gyilkossag")==05 begin
            timer("kettos_gyilkossagi_ido1", 8)
            pc.setqf("kettos_gyilkossag", 1)
        end    --when

    end    --state
end    --quest

here delayed quest

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

  • 6 years later...

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.