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 weekend_exp_bonus begin
    	state start begin
    		function is_weekend()
    			-- 0=Joi? depinde de epoch, dar weekend-ul il prindem cu mod 7 (safe enough)
    			local day = math.floor(get_time() / 86400) % 7
    			-- de obicei 5/6 sunt weekend; daca pe baza ta pica altfel, iti ajustez
    			return (day == 5 or day == 6)
    		end
    
    		when login begin
    			if weekend_exp_bonus.is_weekend() and pc.getqf("web_exp") != 1 then
    				pc.setqf("web_exp", 1)
    				affect.add(apply.EXP_DOUBLE_BONUS, 20, 60*60*24) -- +20% exp 24h
    				syschat("[Weekend] Bonus EXP activ (+20%)!")
    			end
    		end
    	end
    end