Jump to content

ZenkoKXO.

Inactive Member
  • Posts

    32
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ZenkoKXO.

  1. Hello guys :),

    Description of the problem :

    It's a really weird problem, when I kill a metin (only and all metins) the monsters and the effect stay on the screen. I tried with all existing metins and concluded that they all have the same problem.

    Destroyed metins and it's monsters can stay indefinitely until I reboot or use the command /purge.

    Screenshot of the problem :

    085455e538ccb639354976987c55ae7e70d9ba.png

     

    Syserr (client, files)/error :

    None

    Hope that someone can help me :),

    Kindly

  2. quest blokada5 begin
    	state start begin
    		when kill with not npc.is_pc() and pc.get_map_index() == 273 and pc.get_level() >= 95 begin
    			if pc.get_exp() >= 1 then 
    				pc.give_exp2(-pc.get_exp())
    			end
    			chat("|cFF00ff33[Informacja]|h|cFFFFFFFF|h Masz za duży poziom aby zdobywać tu doświadczenie! ")
    		end
    		
    		when login with pc.get_map_index() == 273 and pc.get_level() >= 95 begin
    			chat("Ustawiłem QF na wartość: "..pc.get_exp())
    			chat("|cFF00ff33[Informacja]|h|cFFFFFFFF|h Masz za duży poziom aby zdobywać tu doświadczenie! ")
    		end
    	end
    end

     

  3. Give us your constinfo.py and game.py

    Did you add this:

    constinfo.py

    NEWITEMS = []

    game.py (at the end of the file)

    def OnNewItem(self, cell):
        if not cell in constInfo.NEWITEMS:
            constInfo.NEWITEMS.append(cell)

    Here one example for you on how to add it in game.py: screenshot

  4. Do you mean the player gets two times the same item or two differents?

    In the case 'he gets two differents' : you should change your quest to this one:

    quest costume begin
    	state start begin
    		when login begin
    			if pc.get_sex() == 0 then
    				if pc.get_empire() == 2 then
    					pc.give_item2(41023,1)
    				else
    					pc.give_item2(41024,1)
    				end
    			elseif pc.get_sex() == 1 then
    				if pc.get_empire() == 1 then
    					pc.give_item2(41001,1)
    				else
    					pc.give_item2(41002,1)
    				end
    			end
    			set_state(shautia)
    		end
    	end
    	state shautia begin
    	end
    end

     

    In the case 'he gets two times the same' : you have to edit your sources, precisely the 'when login' trigger. Are you using sources?

  5. @Weix

    1. Go to /var/db/mysql (on winscp)
    2. Delete all "ib_logfile" files
    3. Delete the .err file (there is only one)
    4. Delete the log folder
    5. Do this on putty: service mysql-server restart

    If you didn't understand, here is a screen of what you need to delete: https://metin2.download/picture/bUHG6amSJVMHEgCB2hZ0De4NeIaodmP6/.png

    • Metin2 Dev 2
    • Love 3
    • Love 1
  6. That's because 'when login' (or) 'when kill' triggers are counted twice instead of once, problem is coming from sources. There's a thread here to solve it, when I have some time (if you didn't find it) i'll find it for you.

    Before that, you can try:

    quest costume begin
    	state start begin
    		when login begin
    			timer("give_costume", 3)
    		end
    		when give_costume.timer begin
    			if pc.get_sex() == 0 and pc.get_empire() == 2 then
    				pc.give_item2(41023,1)
    			else
    				pc.give_item2(41024,1)
    			end
    			if pc.get_sex() == 1 and pc.get_empire() == 1 then
    				pc.give_item2(41001,1)
    			else
    				pc.give_item2(41002,1)
    			end
    			set_state(shautia)
    		end
    	end
    	state shautia begin
    	end
    end

     

  7. Then you should use it like that:

    quest event begin
    	state start begin
    		when ID_NPC.chat."Enable Drop event" with pc.getqf("drop_event") == 0 begin -- if drop event is disabled
    			say_npc()
    			say("Do you want to enable the event?")
    			if select(locale.yes, locale.no) ~=1 then return end
    			syschat("Drop event enabled!")
    			pc.setqf("drop_event", 1) -- we enable the drop event
    			return
    		end
    		when ID_NPC.chat."Disable Drop event" with pc.getqf("drop_event") !=0 begin -- if drop event is enabled
    			say_npc()
    			say("Do you want to disable the event?")
    			if select(locale.yes, locale.no) ~=1 then return end
    			syschat("Drop event disabled!")
    			pc.setqf("drop_event", 0) -- we disable the drop event
    			return
    		end
    	end
    end

    'drop_event' is just an example for you; also, don't forget to change 'ID_NPC'

    When you'll open your event, you must use this before your code to check if the player enabled it or not:

    pc.getqf("drop_event")

    Here one example to make the event working only for the people who enabled it:

    quest event begin
    	state start begin
    		when login with pc.getqf("drop_event") !=0 begin
    			say("You enabled the drop event so you can play it!")
    		end
    	end
    end

     

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