Experimentat
Experimentat
Mesaje: 72
Membru din: Sâm Ian 31, 2026 4:11 pm
Server: metin2avange.mt2.xyz
Rasă: Ninja
Regat: Chunjo
  • Has thanked: 1 time
  • Cod: Selectaţi tot

    quest clean_inventory_npc begin
    	state start begin
    		function cfg()
    			local c = {}
    			c.NPC_VNUM = 20084
    			c.ITEMS_TO_REMOVE = {71084, 27002, 27003} -- schimba vnum-urile
    			return c
    		end
    
    		when cfg().NPC_VNUM.chat."Curata inventarul" begin
    			if select("Da, sterge", "Nu") == 2 then
    				return
    			end
    
    			for i = 1, table.getn(cfg().ITEMS_TO_REMOVE) do
    				local v = cfg().ITEMS_TO_REMOVE[i]
    				local cnt = pc.count_item(v)
    				if cnt > 0 then
    					pc.remove_item(v, cnt)
    				end
    			end
    
    			say("Inventar curatat (iteme selectate).")
    		end
    	end
    end