Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest sklep_marmurkow begin
- state start begin
- when login begin
- cmdchat("sklep_marmury "..q.getcurrentquestindex())
- end
- when button or info begin
- local jakie = {
- [1] = {"Dziki Pies", 1000000, "1.000.000 yang", 101},
- [2] = {"Dziki Sługa", 2000000, "2.000.000 yang", 502},
- [3] = {"Młody Pająk", 3000000, "3.000.000 yang", 2001},
- [4] = {"Tygrys", 4000000, "4.000.000 yang", 114},
- [5] = {"Ezot. Fanatyk", 5000000, "5.000.000 yang", 701},
- [6] = {"Czarny Ork", 10000000, "10.000.000 yang", 636},
- }
- local button = tonumber(getinput("getinput"))
- if button == 1 then
- if pc.get_gold() >= jakie[1][2] then
- pc.give_item2(70104, 1)
- pc.change_money(-jakie[1][2])
- for d = 0, 300 do
- if item.select_cell(d) then
- if item.get_vnum() == 70104 then
- if item.get_socket(0) == 0 then
- item.set_socket(0, jakie[1][4])
- syschat("|cFFFFFF30|h["..jakie[1][1].."]|h|r Otrzymałeś marmur Dziki Pies!")
- end
- end
- end
- end
- else
- syschat("|cFFFFFF30|h["..jakie[1][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[1][3].."|h|r!")
- end
- elseif button == 2 then
- if pc.get_gold() >= jakie[2][2] then
- pc.give_item2(70104, 1)
- pc.change_money(-jakie[2][2])
- for d = 0, 300 do
- if item.select_cell(d) then
- if item.get_vnum() == 70104 then
- if item.get_socket(0) == 0 then
- item.set_socket(0, jakie[2][4])
- syschat("|cFFFFFF30|h["..jakie[2][1].."]|h|r Otrzymałeś marmur Dziki Sługa!")
- end
- end
- end
- end
- else
- syschat("|cFFFFFF30|h["..jakie[2][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[2][3].."|h|r!")
- end
- elseif button == 3 then
- if pc.get_gold() >= jakie[3][2] then
- pc.give_item2(70104, 1)
- pc.change_money(-jakie[3][2])
- for d = 0, 300 do
- if item.select_cell(d) then
- if item.get_vnum() == 70104 then
- if item.get_socket(0) == 0 then
- item.set_socket(0, jakie[3][4])
- syschat("|cFFFFFF30|h["..jakie[3][1].."]|h|r Otrzymałeś marmur Młody Pająk!")
- end
- end
- end
- end
- else
- syschat("|cFFFFFF30|h["..jakie[3][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[3][3].."|h|r!")
- end
- elseif button == 4 then
- if pc.get_gold() >= jakie[4][2] then
- pc.give_item2(70104, 1)
- pc.change_money(-jakie[4][2])
- for d = 0, 300 do
- if item.select_cell(d) then
- if item.get_vnum() == 70104 then
- if item.get_socket(0) == 0 then
- item.set_socket(0, jakie[4][4])
- syschat("|cFFFFFF30|h["..jakie[4][1].."]|h|r Otrzymałeś marmur Tygrys!")
- end
- end
- end
- end
- else
- syschat("|cFFFFFF30|h["..jakie[4][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[4][3].."|h|r!")
- end
- elseif button == 5 then
- if pc.get_gold() >= jakie[5][2] then
- pc.give_item2(70104, 1)
- pc.change_money(-jakie[5][2])
- for d = 0, 300 do
- if item.select_cell(d) then
- if item.get_vnum() == 70104 then
- if item.get_socket(0) == 0 then
- item.set_socket(0, jakie[5][4])
- syschat("|cFFFFFF30|h["..jakie[5][1].."]|h|r Otrzymałeś marmur Ezot. Fanatyk!")
- end
- end
- end
- end
- else
- syschat("|cFFFFFF30|h["..jakie[5][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[5][3].."|h|r!")
- end
- elseif button == 6 then
- if pc.get_gold() >= jakie[6][2] then
- pc.give_item2(70104, 1)
- pc.change_money(-jakie[6][2])
- for d = 0, 300 do
- if item.select_cell(d) then
- if item.get_vnum() == 70104 then
- if item.get_socket(0) == 0 then
- item.set_socket(0, jakie[6][4])
- syschat("|cFFFFFF30|h["..jakie[6][1].."]|h|r Otrzymałeś marmur Czarny ork!")
- end
- end
- end
- end
- else
- syschat("|cFFFFFF30|h["..jakie[6][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[6][3].."|h|r!")
- end
- elseif button == 7 then
- if pc.get_gold() >= 1 then
- if not pc.can_warp() then
- syschat("Nie można kontynuować. Musisz odczekać 10 sekund od zakończenia handlu.")
- return
- end
- if !pc.is_polymorphed() then
- syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Nie jesteś przemieniony!")
- return
- end
- if pc.get_map_index() == 113 then
- syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Nie możesz odmienić się na oxie!")
- return
- end
- syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Usunięto przemiane!")
- pc.change_money(-1)
- pc.remove_polymorph()
- else
- syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Nie posiadasz 1 yang!")
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement