Advertisement
deadx2

Untitled

Aug 10th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.57 KB | None | 0 0
  1. quest sklep_marmurkow begin
  2.     state start begin
  3.         when login begin
  4.             cmdchat("sklep_marmury "..q.getcurrentquestindex())
  5.         end
  6.         when button or info begin
  7.             local jakie = {
  8.                 [1] = {"Dziki Pies",    1000000,  "1.000.000 yang", 101},
  9.                 [2] = {"Dziki Sługa",   2000000,  "2.000.000 yang", 502},
  10.                 [3] = {"Młody Pająk",   3000000,  "3.000.000 yang", 2001},
  11.                 [4] = {"Tygrys",        4000000,  "4.000.000 yang", 114},
  12.                 [5] = {"Ezot. Fanatyk", 5000000,  "5.000.000 yang", 701},
  13.                 [6] = {"Czarny Ork",    10000000, "10.000.000 yang", 636},
  14.                 }
  15.             local button = tonumber(getinput("getinput"))
  16.             if button == 1 then
  17.                 if pc.get_gold() >= jakie[1][2] then
  18.                     pc.give_item2(70104, 1)
  19.                     pc.change_money(-jakie[1][2])
  20.                     for d = 0, 300 do
  21.                         if item.select_cell(d) then
  22.                             if item.get_vnum() == 70104 then
  23.                                 if item.get_socket(0) == 0 then
  24.                                     item.set_socket(0, jakie[1][4])
  25.                                     syschat("|cFFFFFF30|h["..jakie[1][1].."]|h|r Otrzymałeś marmur Dziki Pies!")
  26.                                 end
  27.                             end
  28.                         end
  29.                     end
  30.                 else
  31.                         syschat("|cFFFFFF30|h["..jakie[1][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[1][3].."|h|r!")
  32.                 end
  33.             elseif button == 2 then
  34.                 if pc.get_gold() >= jakie[2][2] then
  35.                     pc.give_item2(70104, 1)
  36.                     pc.change_money(-jakie[2][2])
  37.                     for d = 0, 300 do
  38.                         if item.select_cell(d) then
  39.                             if item.get_vnum() == 70104 then
  40.                                 if item.get_socket(0) == 0 then
  41.                                     item.set_socket(0, jakie[2][4])
  42.                                     syschat("|cFFFFFF30|h["..jakie[2][1].."]|h|r Otrzymałeś marmur Dziki Sługa!")
  43.                                 end
  44.                             end
  45.                         end
  46.                     end
  47.                 else
  48.                     syschat("|cFFFFFF30|h["..jakie[2][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[2][3].."|h|r!")
  49.                 end
  50.             elseif button == 3 then
  51.                 if pc.get_gold() >= jakie[3][2] then
  52.                     pc.give_item2(70104, 1)
  53.                     pc.change_money(-jakie[3][2])
  54.                     for d = 0, 300 do
  55.                         if item.select_cell(d) then
  56.                             if item.get_vnum() == 70104 then
  57.                                 if item.get_socket(0) == 0 then
  58.                                     item.set_socket(0, jakie[3][4])
  59.                                     syschat("|cFFFFFF30|h["..jakie[3][1].."]|h|r Otrzymałeś marmur Młody Pająk!")
  60.                                 end
  61.                             end
  62.                         end
  63.                     end
  64.                 else
  65.                     syschat("|cFFFFFF30|h["..jakie[3][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[3][3].."|h|r!")
  66.                 end
  67.             elseif button == 4 then
  68.                 if pc.get_gold() >= jakie[4][2] then
  69.                     pc.give_item2(70104, 1)
  70.                     pc.change_money(-jakie[4][2])
  71.                     for d = 0, 300 do
  72.                         if item.select_cell(d) then
  73.                             if item.get_vnum() == 70104 then
  74.                                 if item.get_socket(0) == 0 then
  75.                                     item.set_socket(0, jakie[4][4])
  76.                                     syschat("|cFFFFFF30|h["..jakie[4][1].."]|h|r Otrzymałeś marmur Tygrys!")
  77.                                 end
  78.                             end
  79.                         end
  80.                     end
  81.                 else
  82.                     syschat("|cFFFFFF30|h["..jakie[4][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[4][3].."|h|r!")
  83.                 end
  84.             elseif button == 5 then
  85.                 if pc.get_gold() >= jakie[5][2] then
  86.                     pc.give_item2(70104, 1)
  87.                     pc.change_money(-jakie[5][2])
  88.                     for d = 0, 300 do
  89.                         if item.select_cell(d) then
  90.                         if item.get_vnum() == 70104 then
  91.                                 if item.get_socket(0) == 0 then
  92.                                     item.set_socket(0, jakie[5][4])
  93.                                     syschat("|cFFFFFF30|h["..jakie[5][1].."]|h|r Otrzymałeś marmur Ezot. Fanatyk!")
  94.                                 end
  95.                             end
  96.                         end
  97.                     end
  98.                 else
  99.                 syschat("|cFFFFFF30|h["..jakie[5][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[5][3].."|h|r!")
  100.                 end
  101.             elseif button == 6 then
  102.                 if pc.get_gold() >= jakie[6][2] then
  103.                     pc.give_item2(70104, 1)
  104.                     pc.change_money(-jakie[6][2])
  105.                     for d = 0, 300 do
  106.                         if item.select_cell(d) then
  107.                             if item.get_vnum() == 70104 then
  108.                                 if item.get_socket(0) == 0 then
  109.                                     item.set_socket(0, jakie[6][4])
  110.                                     syschat("|cFFFFFF30|h["..jakie[6][1].."]|h|r Otrzymałeś marmur Czarny ork!")
  111.                                 end
  112.                             end
  113.                         end
  114.                     end
  115.                 else
  116.                     syschat("|cFFFFFF30|h["..jakie[6][1].."]|h|r Nie posiadasz |cFFFF0000|h"..jakie[6][3].."|h|r!")
  117.                 end
  118.             elseif button == 7 then
  119.                 if pc.get_gold() >= 1 then
  120.                     if not pc.can_warp() then
  121.                         syschat("Nie można kontynuować. Musisz odczekać 10 sekund od zakończenia handlu.")
  122.                         return
  123.                     end
  124.                     if !pc.is_polymorphed() then
  125.                         syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Nie jesteś przemieniony!")
  126.                         return
  127.                     end
  128.                     if pc.get_map_index() == 113 then
  129.                         syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Nie możesz odmienić się na oxie!")
  130.                         return
  131.                     end
  132.                     syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Usunięto przemiane!")
  133.                     pc.change_money(-1)
  134.                     pc.remove_polymorph()
  135.                 else
  136.                     syschat("|cFFFFFF30|h[Sklep Marmurków]|h|r Nie posiadasz 1 yang!")
  137.                 end
  138.             end
  139.         end
  140.     end
  141. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement