Apr
16
17
1
When they interact with an NPC with NPC ID 20084, players will be introduced to the daily quest and asked to kill 20 monsters. Once the mission is completed, the player will receive one of +50 HP, +5 DEF or +5 ATT as a reward.
Add whatever monster you want: local monster_id = 2101
Python:
Add whatever monster you want: local monster_id = 2101
Python:
Code:
quest daily_quest begin
state start begin
when login or levelup with pc.level >= 10 begin
set_state(daily_quest)
end
end
state daily_quest begin
-- Canavarın ID'si ve öldürülmesi gereken sayı
local monster_id = 2101
local required_kill_count = 20
-- Görevi başlatma
when 20084.chat."Günlük Görev Al" begin
if pc.getqf("daily_quest_done") == 1 then
say("Bugünkü görevini zaten tamamladın. Yarın tekrar gel!")
else
say("Merhaba! Bugünkü görevin, "..required_kill_count.." adet Orman Yaratığı'nı öldürmek.")
set_state(kill_monsters)
pc.setqf("kill_count", 0) -- Oyuncunun öldürdüğü canavar sayısını sıfırla
end
end
-- Görevi tamamlama
when 20084.chat."Görevi Tamamla" and pc.getqf("kill_count") >= required_kill_count begin
if pc.getqf("daily_quest_done") == 1 then
say("Bugünkü görevini zaten tamamladın. Yarın tekrar gel!")
else
say("Tebrikler! Görevi tamamladın. İşte ödülün:")
pc.setqf("daily_quest_done", 1) -- Oyuncu görevi tamamladı
-- Ödül olarak 50 HP, 5 DEF ve 5 ATT arttırma
pc.set_hp(pc.get_max_hp() + 50) -- Oyuncunun maksimum HP'sini 50 artır
pc.set_def(pc.get_def() + 5) -- Oyuncunun DEF'ini 5 artır
pc.set_att_b(pc.get_att_b() + 5) -- Oyuncunun ATT'sini 5 artır
end
end
end
state kill_monsters begin
-- Canavar öldürme
when 2101.kill begin
local current_kill_count = pc.getqf("kill_count")
if current_kill_count < required_kill_count then
pc.setqf("kill_count", current_kill_count + 1)
end
end
end
end

