Advertisement
Guest User

marakadalna

a guest
Aug 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. quest ingot_manage begin
  2.     state start begin
  3.         when 80005.use or 80006.use or 80007.use or 80008.use begin
  4.             local MAX_GOLD = 1000000000000000
  5.             local nugget = 100000000
  6.             local amount = item.get_value(0)
  7.             if pc.is_trading() then
  8.                 syschat("|cffffc700|H|h<Informacja>:|h|r |cffff3333|H|hNie możesz użyć przedmiotu podczas handlu.|h|r")
  9.                 return
  10.             end
  11.            
  12.             if item.get_vnum() == 80005 or item.get_vnum() == 80006 or item.get_vnum() == 80007 then
  13.                
  14.                 if item.remove(nugget/amount) then
  15.                     pc.give_item2(80008)
  16.                 elseif item.remove(10) then
  17.                     if pc.get_money() + amount*10 > MAX_GOLD then
  18.                         syschat("|cffffc700|H|h<Informacja>:|h|r |cffff3333|H|hPosiadasz za dużo Yang.|h|r")
  19.                     else
  20.                         pc.change_gold(amount*10)
  21.                     end
  22.                 elseif item.remove() then
  23.                     if pc.get_money() + amount > MAX_GOLD then
  24.                         syschat("|cffffc700|H|h<Informacja>:|h|r |cffff3333|H|hPosiadasz za dużo Yang.|h|r")
  25.                     else
  26.                         pc.change_gold(amount)
  27.                     end
  28.                 end
  29.                
  30.             elseif item.get_vnum() == 80008 then
  31.                 if item.remove() then
  32.                     if pc.get_money() + amount > MAX_GOLD then
  33.                         syschat("|cffffc700|H|h<Informacja>:|h|r |cffff3333|H|hPosiadasz za dużo Yang.|h|r")
  34.                     else
  35.                         pc.change_gold(amount)
  36.                     end
  37.                 end
  38.             end    
  39.         end
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement