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 daily_kill_one_boss begin
    	state start begin
    		function cfg()
    			local c = {}
    			c.BOSS_VNUM = 2493
    			c.REWARD_VNUM = 80017
    			c.REWARD_COUNT = 1
    			return c
    		end
    
    		function today()
    			return math.floor(get_time() / 86400)
    		end
    
    		when login begin
    			local t = daily_kill_one_boss.today()
    			if pc.getqf("dkb_day") != t then
    				pc.setqf("dkb_day", t)
    				pc.setqf("dkb_done", 0)
    			end
    		end
    
    		when kill begin
    			local c = daily_kill_one_boss.cfg()
    			if npc.get_race() != c.BOSS_VNUM then
    				return
    			end
    
    			if pc.getqf("dkb_done") == 1 then
    				return
    			end
    
    			pc.give_item2(c.REWARD_VNUM, c.REWARD_COUNT)
    			pc.setqf("dkb_done", 1)
    			syschat("[Daily] Ai omorat bossul zilnic si ai primit reward!")
    		end
    	end
    end