Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------
- -- Questowy sklep
- -- Autor: Svope (http://facebook.com/Svope)
- -- Dla: ---
- -- Copyright ©2013.
- -- Zakaz publikacji i sprzedaży
- ---------------------------------------------
- quest new_shop begin
- state start begin
- when 71088.use begin
- local Shop = {}
- local Buy = {}
- local Items = {
- [1] = {
- [0] = {"Mikstury"},
- -- [n] = |ID_ID, ILOŚĆ_W_STACKU, WYMAGANE_MIEJSCE, KOSZT| --
- [1] = {27003, 200, 1, 64000},
- [2] = {27003, 200, 5, 320000},
- [3] = {27006, 200, 1, 192000},
- [4] = {27006, 200, 5, 960000},
- [5] = {27105, 50, 1, 500000},
- [6] = {27112, 50, 1, 500000},
- },
- [2] = {
- [0] = {"Trening Umiejętności"},
- -- [n] = |ID_ID, ILOŚĆ_W_STACKU, WYMAGANE_MIEJSCE, KOSZT| --
- [1] = {50513, 1, 1, 250000},
- [2] = {71002, 1, 1, 100000},
- [3] = {71001, 25, 1, 1000000},
- [4] = {71094, 25, 1, 1000000},
- },
- [3] = {
- [0] = {"Exp"},
- -- [n] = |ID_ID, ILOŚĆ_W_STACKU, WYMAGANE_MIEJSCE, KOSZT| --
- [1] = {70038, 200, 1, 100000},
- [2] = {70038, 200, 5, 500000},
- },
- }
- for i=1, table.getn(Items) do
- table.insert(Shop, Items[i][0][1])
- end
- table.insert(Shop, "Zamknij")
- local w_sh = select_table(Shop)
- if w_sh == table.getn(Items)+1 then
- return
- else
- for j=1, table.getn(Items[w_sh]) do
- table.insert(Buy, item_name(Items[w_sh][j][1]).." x"..(Items[w_sh][j][2]*Items[w_sh][j][3]))
- end
- table.insert(Buy, "Zamknij")
- local w_b = select_table(Buy)
- if w_b == table.getn(Items[w_sh])+1 then
- return
- else
- if pc.money < Items[w_sh][w_b][4] then
- syschat("Nie masz wystarczającej ilości yang.")
- elseif pc.get_empty_inventory_count() < Items[w_sh][w_b][3] then
- syschat("Nie masz wystarczającej ilości miejsca w ekwipunku, aby zakupić ten przedmiot.")
- else
- for k=1, Items[w_sh][w_b][3] do
- pc.give_item2(Items[w_sh][w_b][1], Items[w_sh][w_b][2])
- break
- end
- pc.change_money(-Items[w_sh][w_b][4])
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment