il incerc si revin cu edit.
Cod: Selectaţi tot
quest daily_mision_1 begin
state start begin
function get_win()
return ({
{27992, 2},
{27993, 2},
{27994, 2},
{82800, 2},
{82801, 2},
{82802, 2},
{82803, 2},
{82804, 2},
{82805, 2},
{82806, 2},
{82807, 2},
{82808, 2},
{82809, 2},
{82810, 2},
{82811, 2},
{82812, 2},
{82813, 2},
{82814, 2},
{82815, 10},
{82816, 2},
{82817, 2},
{82818, 2},
{82819, 2},
{82820, 2},
{82821, 2},
{82822, 2},
{82823, 2},
{82824, 2},
{82825, 2},
{82826, 2},
{82827, 2},
{82828, 2},
{82829, 2},
{99990, 2},
{99991, 2},
{99992, 2},
{99993, 2},
{99994, 2},
{99995, 2}
})
end
when login begin
if get_time() > pc.getqf("duration") then
send_letter("Misiune Zilnica")
end
end
when button or info with get_time() > pc.getqf("duration") begin
data = {
-- Collect
{
{"5 Dinti Orc", 30006, 5},
{"5 Indrumator de esoterica", 30008, 5},
{"5 Indrumator de esoterica+", 30078, 5},
{"5 Medicament necunoscut", 30009, 5},
{"5 Medicament necunoscut+", 30083, 5},
{"5 Blana de Yeti", 30014, 5},
{"5 Blana de Yeti+", 30089, 5},
{"5 Bile de gheata", 30050, 5},
{"5 Bile de gheata+", 30090, 5},
{"5 Suvenir de demoni", 30015, 5},
{"5 Suvenir de demoni+", 30086, 5},
{"5 Demon pietre pretioase", 30016, 5},
{"5 Bijuterie de demon+", 30087, 5},
{"5 Cozi de sarpe", 30022, 5},
{"5 Bucata de sesut", 30039, 5},
{"5 Talismane necunoscute+", 30079, 5},
{"5 Limbi de broasca", 30060, 5},
{"5 Simboluri Razboinic", 30091, 5},
{"5 Foarfeca Scorpion", 30055, 5},
},
-- Hunt
{
{"250 Caini salbatici", 101, 250},
{"100 Devoti salbatici", 502, 100},
{"100 Infanteristi salbatici", 501, 100},
{"5 Capitanii brutali", 591, 5},
{"75 Orcii negri", 636, 75},
{"200 Arcas Demon", 1002, 200},
{"200 Demon Sulitas", 1003, 200},
{"75 Golemuri de gheata", 1107, 75},
{"75 Soldat Brotac", 1301, 75},
{"75 General Brotac", 1302, 75},
{"5 Miria-Luptator", 1403, 5},
{"30 Talhar de desert", 2108, 30},
{"30 Luptator de foc", 2205, 30},
{"50 Copac Fantoma", 2301, 50},
{"50 Salcie Fantoma", 2304, 50},
{"50 Driada Rosie", 2313, 50},
{"10 Metin Pung-Ma", 8024, 10},
{"10 Metin Ma-An", 8025, 10},
{"10 Metin Tu-Young", 8026, 10},
{"10 Metin Jeon-Un", 8027, 10},
}
}
local rnd1 = math.random(1, table.getn(data))
local rnd2 = math.random(1, table.getn(data[rnd1]))
say_title("Misiune Zilnica")
if rnd1 == 1 then
say("Sarcina ta de astazi este o sarcina colectiva")
say()
say("Colectarea "..data[rnd1][rnd2][1])
say("Le poti duce in map 1 la "..mob_name(20354))
say()
say("Vrei sa-ti asumi aceasta sarcina?")
say()
if select("Da","Nu") == 2 then
pc.setqf("duration", get_time() + 60*60*24)
return
else
pc.setqf("vnum", data[rnd1][rnd2][2])
pc.setqf("count", data[rnd1][rnd2][3])
set_state(collect)
end
else
say("Meseria ta astazi este o misiune de vânatoare")
say()
say("Vânatoare "..data[rnd1][rnd2][1])
say()
say("Vrei sa-ti asumi aceasta sarcina?")
say()
if select("Da","Nu") == 2 then
pc.setqf("duration", get_time() + 60*60*24)
return
else
pc.setqf("vnum", data[rnd1][rnd2][2])
pc.setqf("count", data[rnd1][rnd2][3])
set_state(kill)
end
end
end
end
state collect begin
when 20354.chat."Sarcina colectiva" begin
say_title("Sarcina colectiva")
say("Trebuie sa colectati urmatoarele:")
say_reward(pc.getqf("count").." "..item_name(pc.getqf("vnum")))
say()
if pc.count_item(pc.getqf("vnum")) < 1 then
return
end
say("Doriti sa predati articole?")
say()
if select("Da","Nu") == 2 then return end
local c = pc.count_item(pc.getqf("vnum"))
pc.remove_item(pc.getqf("vnum"), c)
pc.setqf("done", pc.getqf("done") + c)
if pc.getqf("done") >= 25 then
recompensa = daily.get_win()
local win = math.random(1, table.getn(recompensa))
say("Mi-ai adus toate articolele")
say("Deine recompensa:")
say_reward(recompensa[win][2].." "..item_name(recompensa[win][1]))
say()
pc.give_item2(recompensa[win][1], recompensa[win][2])
pc.setqf("duration", get_time() + 60*60*24)
set_state(start)
else
say_title("Sarcina colectiva")
say("Bringe mir noch ".. (25 - pc.getqf("done")) .." Items")
return
end
--[[
say_title("Sarcina colectiva")
if item.get_vnum() == pc.getqf("vnum") then
local c = item.get_count()
if c > pc.getqf("count") then
c = pc.getqf("count")
end
pc.setqf("countt", pc.getqf("countt") + c)
if pc.getqf("countt") >= pc.getqf("count") then
recompensa = daily.get_win()
local win = math.random(1, table.getn(recompensa))
say("Mi-ai adus toate articolele")
say("Recompensa ta:")
say_reward(recompensa[win][2].." "..item_name(recompensa[win][1]))
say()
pc.give_item2(recompensa[win][1], recompensa[win][2])
pc.setqf("duration", get_time() + 60*60*24)
set_state(start)
else
say("Adu-mi ".. (pc.getqf("count")- pc.getqf("countt")) .." Items")
say()
end
else
say("Acest item nu este bun")
say("Adu-mi "..item_name(pc.getqf("vnum")).." Trimite")
say()
return
end]]
end
end
state kill begin
when kill begin
if npc.get_race() == pc.getqf("vnum") then
pc.setqf("c", pc.getqf("c") + 1)
if pc.getqf("c") == pc.getqf("count") then
recompensa = daily.get_win()
local win = math.random(1, table.getn(recompensa))
say_title("Misiunea de vânatoare")
say("Ai ucis toti monstrii")
say("Recompensa ta:")
say_reward(recompensa[win][2].." "..item_name(recompensa[win][1]))
say()
pc.give_item2(recompensa[win][1], recompensa[win][2])
pc.setqf("duration", get_time() + 60*60*24)
set_state(start)
end
end
end
end
end