WebShok scrie:Salut, questul doar activeaza/dezactiveaza dropul, dar cum setezi rata % dropului ?
quest cor_drop begin
state start begin
when kill begin
local m_ind = pc.get_map_index()
if npc.is_pc() then
else
if m_ind == 1 or m_ind == 3 or m_ind == 21 or m_ind == 23 or m_ind == 41 or m_ind == 43 and pc.get_level() <= 100 then
if game.get_event_flag("event_cor") == 1 then
local chance = number(1, 100)
local chance_max = game.get_event_flag("cor_drop_chance")
if chance <= chance_max then
game.drop_item_with_ownership(50252, 3)
else
end
else
end
elseif m_ind == 63 or m_ind == 64 and pc.get_level() <= 100 then
if game.get_event_flag("event_cor") == 1 then
local chance = number(1, 100)
local chance_max = game.get_event_flag("cor_drop_chance")
if chance <= chance_max then
game.drop_item_with_ownership(50252, 3)
else
end
else
end
elseif m_ind == 65 or m_ind == 61 or m_ind == 104 and pc.get_level() <= 100 then
if game.get_event_flag("event_cor") == 1 then
local chance = number(1, 100)
local chance_max = game.get_event_flag("cor_drop_chance")
if chance <= chance_max then
game.drop_item_with_ownership(50252, 3)
else
end
else
end
elseif m_ind == 62 or m_ind == 71 or m_ind == 67 and pc.get_level() <= 100 then
if game.get_event_flag("event_cor") == 1 then
local chance = number(1, 100)
local chance_max = game.get_event_flag("cor_drop_chance")
if chance <= chance_max then
game.drop_item_with_ownership(50252, 3)
else
end
else
end
elseif m_ind == 68 or m_ind == 72 or m_ind == 73 or m_ind == 66 and pc.get_level() <= 100 then
if game.get_event_flag("event_cor") == 1 then
local chance = number(1, 100)
local chance_max = game.get_event_flag("cor_drop_chance")
if chance <= chance_max then
game.drop_item_with_ownership(50252, 3)
else
end
else
end
elseif m_ind == 103 or m_ind == 70 or m_imd == 69 and pc.get_level() <= 100 then
if game.get_event_flag("event_cor") == 1 then
local chance = number(1, 100)
local chance_max = game.get_event_flag("cor_drop_chance")
if chance <= chance_max then
game.drop_item_with_ownership(50252, 3)
else
end
else
end
end
end
end
when 9004.chat."<GM> Eveniment cor" with pc.is_gm() begin
if game.get_event_flag("event_cor") == 1 then
say_title("Administrare Eveniment:")
say("")
say("[Eveniment]COR: Activ")
say("")
say_reward("Opresti")
local s=select("Da", "Nu")
if s==1 then
say_title("Administrare Eveniment:")
say("")
say("Evenimentul a luat sfarsit .")
say("~ Pe data viitoare !")
game.set_event_flag("event_cor", 0)
char_log(0, "event_cor_end from" ..pc.get_name())
elseif s==2 then
say_title("Administrare Eveniment:")
say("")
say("~ Pe curand !")
end
else
say_title("Administrare Eveniment:")
say("")
say("COR: ~ Inchis ")
say("")
say_reward("Pornesti?")
local s=select("Da", "Nu")
if s==1 then
say_title("Administrare Eveniment:")
say("")
game.set_event_flag("event_cor", 1)
char_log(0, "event_cor_start from" ..pc.get_name())
elseif s==2 then
say_title("Administrare Eveniment:")
say("")
say("~ Pe curand !")
end
end
end
when 9004.chat."<i> Drop cor" with pc.is_gm() begin
if pc.get_name() == "NUMELE TĂU" then
say_title("Administrare Eveniment:")
say("")
say("Cat de mult sa fie dropul acestora ?")
say("")
say_reward("Intre 1-100")
say("")
local new_chance = tonumber(input())
if new_chance < 0 or new_chance > 100 then
say_title("Administrare Eveniment:")
say("")
say("Introducere incorecta ~")
else
char_log(0, "event_cor_chance from" ..pc.get_name().. " to " ..new_chance.. "%")
game.set_event_flag("cor_drop_chance", new_chance)
say_title("Administrare Eveniment:")
say("")
say("Dropul actual " ..new_chance.. " setat.")
say("~ Pe curand !")
end
else
say_title("Administrare Eveniment:")
say("")
say("Nu ai dreptul pentru a executa evenimentul .")
end
end
end
end