Cod: Selectaţi tot
quest event_christmas begin
state start begin
when kill with game.get_event_flag("event_christmas") == 1 and pc.getqf("event_christmas_drop") == 1 begin
if npc.is_pc() then
-- FIX DROP BUG WHEN KILL PLAYER
else
s = math.random(1,200)
if s == 1 then
game.drop_item_with_ownership(50010, 1)
end
end
end
when 20126.chat."Craciun Fericit!" with game.get_event_flag("event_christmas") == 1 begin
if 43200 > get_global_time() - pc.getqf("event_christmas_time") then
say_title("Mos Craciun:")
say("Ho Ho Ho")
say("Cred ca vrei sa stii de ce sunt aici")
say("Stai linistit micutule,am sa-ti explic:")
say("")
say("Te duci intr-o mapa cu moobi")
say("apropiati de nivelul tau.")
say("Omori cat de multi poti,")
say("strangi sosete si le atarni in Pom.")
say("Eu drept rasplata te voi recompensa")
say("cu premii pe masura")
say("cadouri,..iteme in general.")
say("")
say("Sper ca am fost destul de clar.")
say_title("Echipa Metin2Constanta iti ureaza Craciun Fericit!")
else
say_title("Mos Craciun:")
say("Ho Ho Ho")
say("Cred ca vrei sa stii de ce sunt aici")
say("Stai linistit micutule,am sa-ti explic:")
say("")
say("Te duci intr-o mapa cu moobi")
say("apropiati de nivelul tau.")
say("Omori cat de multi poti,")
say("strangi sosete si le atarni in Pom.")
say("Eu drept rasplata te voi recompensa")
say("cu premii pe masura")
say("cadouri,..iteme in general.")
say("")
say("Sper ca am fost destul de clar.")
say_title("Echipa Metin2Constanta iti ureaza Craciun Fericit!")
local s = select("Vreau sa iau parte!", "Poate alta data...")
if s == 1 then
say_title("Mos Craciun:")
say("Ma bucur ca ai fost de acord!")
say_reward(string.format("Ai primit %s.", item.get_name(53031)))
say_reward(string.format("Ai primit %d unitati de %s.", 5, item.get_name(50216)))
pc.give_item2(53031)
pc.give_item2(50216,5)
pc.setqf("event_christmas_time", get_global_time())
end
end
end
when 20384.take with item.get_vnum() == 50010 begin
pc.remove_item(50010)
s = math.random(1,5)
if s == 1 then
say_title("Mos Craciun:")
say("Din pacate, soseta este prea uzata.[ENTER]Adica, pute ca dracu.")
else
say_title("Mos Craciun:")
say("Multumesc pentru soseta.[ENTER]Uite cum o pun in brad!")
local count = pc.getqf("event_christmas_socks_succes") + 1
pc.setqf("event_christmas_socks_succes", count)
end
end
when 20384.chat."Craciun Fericit!" with game.get_event_flag("event_christmas") == 1 begin
say_title("Mos Craciun:")
if pc.getqf("event_christmas_socks_succes") > 0 then
say(""..pc.get_name()..", hmm...[ENTER]Vrei sa-ti alegi un cadou?")
local s1 = select ("Da" , "O sa mai adun sosete")
if s1 == 1 then
say_title("Mos Craciun:")
say("Alege rasplata:")
local awards_code = {
--code,count,price
{71135,1,30},
{71136,1,50},
{71143,1,40},
{71144,1,200},
{71145,1,200},
{71131,1,150},
{71132,1,150},
{71133,1,1600},
{71134,1,160},
{30179,1,50},
{71123,1,150},
{71129,1,200},
{50134,1,150}
}
local awards_list = select("Inel Semiluna","Acadea","Inelul Bucuriei","Cadou Craciun","Amuleta Dragostei Eterne","Sigiliu Predator Polar","Sigiliu Panda Blindat","Sigiliu Unicorn Rosu","Sigiliu Unicorn Albastru","Cheie Rasucita","Balanta Dragonului","Gheara Dragonului","Cufar Special Costume","Inchide")
if awards_list != 13 then
if pc.getqf("event_christmas_socks_succes") < awards_code[awards_list][3] then
say_title("Mos Craciun:")
say("Nu ai adus destule sosete pentru a[ENTER]putea primi acest cadou.[ENTER]Mai ai nevoie de "..awards_code[awards_list][3]-pc.getqf("event_christmas_socks_succes").." Sosete.")
say("")
return
end
pc.give_item2(awards_code[awards_list][1],awards_code[awards_list][2])
local count = pc.getqf("event_christmas_socks_succes") - awards_code[awards_list][3]
pc.setqf("event_christmas_socks_succes", count)
end
end
else
say(""..pc.get_name()..", pentru a capata puncte[ENTER]pune o soseta pe brad. Dupa ce ai[ENTER]atarnat destule sosete in brad[ENTER]poti sa-ti alegi un cadou de[ENTER]Craciun.")
end
end
when 53031.use begin
if 21600 > get_global_time() - pc.getqf("event_christmas_time") then
pc.setqf("event_christmas_drop", 1)
else
chat("[Event]Nu vei mai primi drop la sosete.")
pc.setqf("event_christmas_drop", 0)
end
end
end
end





