Image error :
Please Help me !
My quest is not working... ;c
Please improvement.
My english .. Very bad ;d
My quest :
Please Help me !
My quest is not working... ;c
Please improvement.
My english .. Very bad ;d
My quest :
Quote:
quest archive_system begin
state start begin
-- // Sklep
when 20091.chat."Sklep z Osiagnieciami !" begin
local points = pc.getqf("achieve")
local category = {"Wszystkie Ulepszacze", "Wierzchowce", "Pety"}
local list = {
-- Kategoria 1
{
-- Nazwa ID Punkty
{"Zielona Perla x1", 2761, 45},
{"Czerwony Piasek x1", 2165, 65},
{"Zolta Perla x1", 2765, 55},
{"Lodowy Krzystal x1", 2760, 45},
},
-- Kategoria 2
{
{"Pieczec Raptora", 2741, 120},
{"Pieczec Czarnego Jaszczura", 2745, 120},
{"Pieczec Bialego Konia", 2747, 100},
{"Pieczec Martwego Konia", 2748, 100},
},
-- Kategoria 3
{
{"Maly Dzik", 53008, 350},
{"Maly Lew", 53007, 450},
},
}
local s = select3(category)
local menu = {}
for i = 1, table.getn(list[s]) do
table.insert(menu, list[s][i][1])
end
say_title("Sklep Osiagniec")
say_arbuz("Nasza Oferta:")
say()
local t = select3(menu)
local reward_item = list[s][t][2]
local reward_count = list[s][t][3]
say_title("Sklep Osiagniec")
say_reward("Twoje Punkty: "..points)
say()
say_limonka("Pomyslny zakup przedmiotu: "..item_name(reward_item))
say_reward(string.format("Pozostalo %d Punktow Osiagniec.", reward_count))
say()
if points < reward_count then
return say_arbuz("Masz za malo punktow !")
end
if select("Zakup!","Anuluj!") == 2 then return end
pc.setqf("achieve", points - reward_count)
pc.give_item2(reward_item)
end
-- // get points
when login begin
mob_data = {
-- ID Punkty qf cmdchat
{691, 2, "691", "Nowe Osiagniecie ".. mob_name(691) .."zakonczone!#".. pc.getqf("691") + 1 .."%".. pc.getqf("achieve") + 2},
{791, 2, "791", "Nowe Osiagniecie ".. mob_name(791) .."zakonczone!#".. pc.getqf("791") + 1 .."%".. pc.getqf("achieve") + 2},
{792, 2, "792", "Nowe Osiagniecie ".. mob_name(792) .."zakonczone!#".. pc.getqf("792") + 1 .."%".. pc.getqf("achieve") + 2},
{1191, 3, "1191", "Nowe Osiagniecie ".. mob_name(1191) .."zakonczone!#".. pc.getqf("1191") + 1 .."%".. pc.getqf("achieve") + 3},
{1193, 3, "1193", "Nowe Osiagniecie ".. mob_name(1193) .."zakonczone!#".. pc.getqf("1193") + 1 .."%".. pc.getqf("achieve") + 3},
{1094, 3, "1094", "Nowe Osiagniecie ".. mob_name(1094) .."zakonczone!#".. pc.getqf("1094") + 1 .."%".. pc.getqf("achieve") + 3},
{1095, 4, "1095", "Nowe Osiagniecie ".. mob_name(1095) .."zakonczone!#".. pc.getqf("1095") + 1 .."%".. pc.getqf("achieve") + 4},
{1304, 3, "1304", "Nowe Osiagniecie ".. mob_name(1304) .."zakonczone!#".. pc.getqf("1304") + 1 .."%".. pc.getqf("achieve") + 3},
{2697, 5, "2697", "Nowe Osiagniecie ".. mob_name(2697) .."zakonczone!#".. pc.getqf("2697") + 1 .."%".. pc.getqf("achieve") + 4},
{2597, 6, "2597", "Nowe Osiagniecie ".. mob_name(2597) .."zakonczone!#".. pc.getqf("2597") + 1 .."%".. pc.getqf("achieve") + 6},
{16061, 5, "16061", "Nowe Osiagniecie ".. mob_name(16061) .."zakonczone!#".. pc.getqf("16061") + 1 .."%".. pc.getqf("achieve") + 5},
{2599, 5, "2599", "Nowe Osiagniecie ".. mob_name(2599) .."zakonczone!#".. pc.getqf("2599") + 1 .."%".. pc.getqf("achieve") + 5},
{2997, 5, "2997", "Nowe Osiagniecie ".. mob_name(2997) .."zakonczone!#".. pc.getqf("2997") + 1 .."%".. pc.getqf("achieve") + 5},
{2599, 5, "2599", "Nowe Osiagniecie ".. mob_name(2599) .."zakonczone!#".. pc.getqf("2599") + 1 .."%".. pc.getqf("achieve") + 5},
}
item_data = {
{44000, 3, "44000", "Nowe Osiagniecie Szmaragdowe Ubranie+0%".. pc.getqf("achieve") + 3},
{42000, 3, "42000", "Nowe Osiagniecie Szmaragdowa Zbroja+0%".. pc.getqf("achieve") + 3},
{46000, 3, "46000", "Nowe Osiagniecie Szmaragdowy Pancerz+0%".. pc.getqf("achieve") + 3},
{48000, 3, "48000", "Nowe Osiagniecie Szmaragdowa Szata+0%".. pc.getqf("achieve") + 3},
}
level_data = {
-- Level points qf cmdchat
{80, 3, "level80", "Nowe Osiagniecie Level_80_erreicht%".. pc.getqf("achieve") + 3},
{90, 3, "level90", "Nowe Osiagniecie Level_90_erreicht%".. pc.getqf("achieve") + 3},
{99, 3, "level99", "Nowe Osiagniecie Level_99_erreicht%".. pc.getqf("achieve") + 3},
}
end
when kill with not npc.is_pc() begin
local vid = npc.get_vid()
local function in_table(arg)
for i = 1, table.getn(mob_data) do
if mob_data[i][1] == arg then
return i
end
end
return false
end
local d = in_table(vid)
if d ~= false then
pc.setqf(mob_data[d][3], pc.getqf(mob_data[d][3]) + tonumber(mob_data[d][2]))
cmdchat(mob_data[d][4])
end
end
when use begin
local vnum = item.get_vnum()
local function in_table(arg)
for i = 1, table.getn(mob_data) do
if mob_data[i][1] == arg then
return i
end
end
return false
end
local d = in_table(vnum)
if d ~= false and pc.getqf(tostring(item_data[d][3]) == 0 then
pc.setqf(item_data[d][3], 1)
pc.setqf(item_data[d][3], pc.getqf(item_data[d][3]) + tonumber(item_data[d][2]))
cmdchat(item_data[d][4])
end
end
when levelup begin
local lvl = pc.get_level()
local function in_table(arg)
for i = 1, table.getn(mob_data) do
if mob_data[i][1] == arg then
return i
end
end
return false
end
local d = in_table(lvl)
if d ~= false and pc.getqf(tostring(level_data[d][3]) == 0 then
pc.setqf(level_data[d][3], 1)
pc.setqf(level_data[d][3], pc.getqf(level_data[d][3]) + tonumber(level_data[d][2]))
cmdchat(level_data[d][4])
end
end
end
end






