Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!
[CODE lang="c" title="oto_pelerin.quest" highlight="3,4,33"]
define PELERIN_TIME 10
quest oto_pelerin begin
state start begin
when 30156.use begin -- item vnum
if pc.getqf("durum") == 0 then
notice(string.format("%d saniye arayla tüm canavarları kızdıran bir dalga yayılacak! ", PELERIN_TIME))
pc.setqf("durum", 1)
-- pc.aggregate_monster()
loop_timer("angry_monster", PELERIN_TIME)
else
notice("Otomatik pelerin kapatıldı. Artık güvendesiniz! ")
pc.setqf("durum", 0)
cleartimer("angry_monster")
end
end
when logout with pc.getqf("durum") == 1 begin
local map_index = pc.get_map_index()
pc.setqf("durum", map_index)
end
when login with pc.getqf("durum") > 0 begin
if pc.get_map_index() == pc.getqf("durum") then
pc.setqf("durum", 1)
cleartimer("angry_monster")
loop_timer("angry_monster", PELERIN_TIME)
else
notice("Otomatik pelerin güvenliğiniz için devre dışı bırakıldı. ")
pc.setqf("durum", 0)
cleartimer("angry_monster")
end
end
when angry_monster.timer begin
-- local can = math.floor(pc.getmaxhp() / 2.5)
local can = math.ceil(pc.getmaxhp() / 2.5)
if pc.count_item(30156) == 0 then -- item vnum
notice("Canavarları kızdıran dalga, üzerinizdeki eşyanın süresi bittiği için yok oldu! ")
pc.setqf("durum", 0)
cleartimer("angry_monster")
elseif pc.gethp() >= can then
pc.aggregate_monster()
end
end
end
end[/CODE]
define PELERIN_TIME 10
quest oto_pelerin begin
state start begin
when 30156.use begin -- item vnum
if pc.getqf("durum") == 0 then
notice(string.format("%d saniye arayla tüm canavarları kızdıran bir dalga yayılacak! ", PELERIN_TIME))
pc.setqf("durum", 1)
-- pc.aggregate_monster()
loop_timer("angry_monster", PELERIN_TIME)
else
notice("Otomatik pelerin kapatıldı. Artık güvendesiniz! ")
pc.setqf("durum", 0)
cleartimer("angry_monster")
end
end
when logout with pc.getqf("durum") == 1 begin
local map_index = pc.get_map_index()
pc.setqf("durum", map_index)
end
when login with pc.getqf("durum") > 0 begin
if pc.get_map_index() == pc.getqf("durum") then
pc.setqf("durum", 1)
cleartimer("angry_monster")
loop_timer("angry_monster", PELERIN_TIME)
else
notice("Otomatik pelerin güvenliğiniz için devre dışı bırakıldı. ")
pc.setqf("durum", 0)
cleartimer("angry_monster")
end
end
when angry_monster.timer begin
-- local can = math.floor(pc.getmaxhp() / 2.5)
local can = math.ceil(pc.getmaxhp() / 2.5)
if pc.count_item(30156) == 0 then -- item vnum
notice("Canavarları kızdıran dalga, üzerinizdeki eşyanın süresi bittiği için yok oldu! ")
pc.setqf("durum", 0)
cleartimer("angry_monster")
elseif pc.gethp() >= can then
pc.aggregate_monster()
end
end
end
end[/CODE]
Son düzenleme:
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 2
- Görüntüleme
- 118