quest hunting begin
state start begin
function main()
return {
['level'] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115},
['row'] = {
[5] = {
['mob_id'] = 104,
['mob_count'] = 20,
['exp_percent'] = 25,
['gold'] = 100000,
['item'] = false;
--},
},
[10] = {
['mob_id'] = 106,
['mob_count'] = 20,
['exp_percent'] = 25,
['gold'] = 300000,
['item'] = false;
},
[15] = {
['mob_id'] = 301,
['mob_count'] = 20,
['exp_percent'] = 25,
['gold'] = 300000,
['item'] = {
{50034, 1},
},
},
[20] = {
['mob_id'] = 502,
['mob_count'] = 30,
['exp_percent'] = 25,
['gold'] = 300000,
['item'] = {
{55001, 1},
{72002, 1},
},
},
[25] = {
['mob_id'] = 532,
['mob_count'] = 3,
['exp_percent'] = 25,
['gold'] = 400000,
['item'] = {
{11237+200*pc.job, 1},
},
},
[30] = {
['mob_id'] = 493,
['mob_count'] = 1,
['exp_percent'] = 20,
['gold'] = 300000,
['item'] = {
{72703, 1},
},
},
[35] = {
['mob_id'] = 5161,
['mob_count'] = 1,
['exp_percent'] = 20,
['gold'] = 400000,
['item'] = {
{55003, 1},
{71001, 1},
},
},
[40] = {
['mob_id'] = 5161,
['mob_count'] = 3,
['exp_percent'] = 20,
['gold'] = 1000000,
['item'] = {
{55002, 1},
{25041, 1}
},
},
[45] = {
['mob_id'] = 691,
['mob_count'] = 1,
['exp_percent'] = 20,
['gold'] = 1000000,
['item'] = {
{55003, 1},
{25041, 1},
{72002, 1},
},
},
[50] = {
['mob_id'] = 5163,
['mob_count'] = 1,
['exp_percent'] = 20,
['gold'] = 1000000,
['item'] = {
{50513, 1},
{25041, 1},
{71001, 1},
},
},
[55] = {
['mob_id'] = 5163,
['mob_count'] = 1,
['exp_percent'] = 20,
['gold'] = 1000000,
['item'] = {
{50513, 1},
{25041, 1},
{71001, 1},
},
},
[60] = {
['mob_id'] = 1091,
['mob_count'] = 1,
['exp_percent'] = 15,
['gold'] = 0,
['item'] = {
{55003, 1},
{27987, 1},
},
},
[65] = {
['mob_id'] = 1091,
['mob_count'] = 3,
['exp_percent'] = 15,
['gold'] = 0,
['item'] = {
{math.random(28430, 28443), 1},
},
},
[70] = {
['mob_id'] = 2191,
['mob_count'] = 3,
['exp_percent'] = 15,
['gold'] = 0,
['item'] = {
{71001, 1},
{30191, 3},
},
},
[75] = {
['mob_id'] = 1403,
['mob_count'] = 5,
['exp_percent'] = 15,
['gold'] = 5000000,
['item'] = {
{72002, 1},
{76002, 3},
},
},
[80] = {
['mob_id'] = 2191,
['mob_count'] = 50,
['exp_percent'] = 15,
['gold'] = 0,
['item'] = {
{71001, 1},
{27992, 1},
},
},
[85] = {
['mob_id'] = 2191,
['mob_count'] = 50,
['exp_percent'] = 15,
['gold'] = 0,
['item'] = {
{71001, 1},
{27992, 1},
},
},
[90] = {
['mob_id'] = 2598,
['mob_count'] = 1,
['exp_percent'] = 10,
['gold'] = 0,
['item'] = {
{124400, 1},
{154400, 1},
},
},
[95] = {
['mob_id'] = 2492,
['mob_count'] = 3,
['exp_percent'] = 10,
['gold'] = 10000000,
['item'] = {
{71001, 2},
{30188, 1},
},
},
[100] = {
['mob_id'] = 3290,
['mob_count'] = 3,
['exp_percent'] = 10,
['gold'] = 0,
['item'] = {
{25041, 2},
{math.random(27992, 27994), 1},
{math.random(27992, 27994), 1},
},
},
[105] = {
['mob_id'] = 3502,
['mob_count'] = 100,
['exp_percent'] = 10,
['gold'] = 0,
['item'] = {
{124400, 1},
{25041, 1},
},
},
[110] = {
['mob_id'] = 3291,
['mob_count'] = 100,
['exp_percent'] = 100,
['gold'] = 0,
['item'] = {
{114400, 1},
{72002, 1},
},
},
[115] = {
['mob_id'] = 3690,
['mob_count'] = 3,
['exp_percent'] = 10,
['gold'] = 0,
['item'] = {
{71129, 1},
{71123, 1},
{25041, 1},
},
},
},
}
end
function title()
return "Myślistwo - #"..pc.getqf("level")
end
when login or levelup or letter or enter begin
local main = hunting.main()
if pc.level >= main.level[pc.getqf("main")+1] then
pc.setqf("level", main.level[pc.getqf("main")+1])
set_state(talk)
end
end
end
state talk begin
when letter begin
local main = hunting.main()
target.vid("__TARGET__", find_npc_by_vnum(20019), "Yang-Shin")
send_letter(hunting.title())
end
when button or info begin
say_title(hunting.title())
say()
say("Udaj się do Yang-Shina.")
say("Potrzebuje on Twojej pomocy")
say("w walce z potworami.")
say()
end
when __TARGET__.target.click or 20019.chat."Myślistwo" begin
target.delete("__TARGET__")
local main = hunting.main()
local row = main.row[pc.getqf("level")]
say_title(mob_name(npc.get_race())..":")
say()
say("Ostatnimi czasy zrobiło sytuacja")
say("zrobiła się wręcz tragiczna.")
say("Ściągnięto mnie tutaj specjalnie")
say("z drugiej wioski, abym pomogł Kapitanowi")
say("oraz reszcie w walce z potworami oblężającymi")
say("krainy. Wezwałem Cię, ponieważ potrzebuje pomocy.")
say()
wait()
say_title(mob_name(npc.get_race())..":")
say()
say("Proszę, zabij dla mnie na początek")
say_reward(row['mob_count'].."x "..mob_name(row['mob_id']))
say()
pc.setqf("count", 0)
clear_letter()
set_state(zabij)
end
end
state zabij begin
when letter begin
local main = hunting.main()
local row = main.row[pc.getqf("level")]
send_letter(hunting.title())
q.set_counter("Pozostało:", row['mob_count']-pc.getqf("count"))
end
when button or info begin
say_title(hunting.title())
say()
say("Yang-Shin wysłał mnie, abym zabił ")
say_reward(row['mob_count'].."x "..mob_name(row['mob_id']))
say()
say_reward("Pozostało do zabicia: "..row['mob_count']-pc.getqf("count")..".")
say()
end
when kill with !npc.is_pc() begin
local main = hunting.main()
local row = main.row[pc.getqf("level")]
if npc.race == row['mob_id'] then
pc.setqf("count", pc.getqf("count")+1)
if pc.getqf("count") < row['mob_count'] then
q.set_counter("Pozostało:", row['mob_count']-pc.getqf("count"))
else
q.set_counter("Pozostało:", 0)
chat("Pora wrócić do wioski i odwiedzić Yang-Shina!")
clear_letter()
set_state(nagroda)
end
end
end
end
state nagroda begin
when letter begin
send_letter(hunting.title())
target.vid("__TARGET__", find_npc_by_vnum(20019), "Yang-Shin")
end
when button or info begin
say_title(hunting.title())
say()
say("Tyle powinno już wystarczyć,")
say("pora wrócić do wioski i odwiedzić Yang-Shina.")
say()
end
when __TARGET__.target.click or 20019.chat."Nagroda" begin
local main = hunting.main()
local row = main.row[pc.getqf("level")]
target.delete("__TARGET__")
say_title(mob_name(npc.get_race())..":")
say()
say("Teraz sytuacja powinna się trochę uspokoić,")
say("przynajmniej będziemy mieli chwile wytchnienia,")
say("w nagrode dostaniesz ode mnie coś, co może ")
say("przydać Ci się w dalszych zmaganiach. ")
say("Idź już, kiedy będe potrzebował ")
say("Twojej pomocy, wezwe Cie.")
say()
wait()
say_reward("Otrzymałeś:")
if row['exp_percent'] > 0 then
say_title(">"..row['exp_percent'].."% doświadczenia")
pc.give_percent_exp_of_level(pc.level, row['exp_percent'])
end
if row['gold'] > 0 then
say_title(">"..row['gold'].." Yang")
pc.change_gold(row['gold'])
end
if row['item'] != false then
for i = 1, table.getn(row['item']) do
say_title(">"..item_name(row['item'][i][1]).." x"..row['item'][i][2])
pc.give_item2(row['item'][i][1], row['item'][i][2])
end
end
pc.setqf("main", pc.getqf("main")+1)
clear_letter()
set_state(start)
end
end
end