Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.45 KB | None | 0 0
  1. function Payout(amount)
  2.     if (DEBUGMODE) then print('Going to payout '..amount[1]..'plat and '..amount[2]..'cc.') end
  3.     wait(200)
  4.     if not(amount[2] == 0) then
  5.         if (itemcount(MONEYIDS[2],getuseroption('ccbp')) % 100 ~= 0) then
  6.             extra = itemcount(MONEYIDS[2],getuseroption('ccbp')) % 100
  7.             if (amount[2] > extra) then
  8.                 toPay2 = amount[2] - extra;
  9.                 moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),extra)
  10.                 wait(300)
  11.                 while itemcount(MONEYIDS[2],getuseroption('tempbp')) > extra do
  12.                     moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
  13.                     wait(300)
  14.                     moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),extra)
  15.                     wait(300)
  16.                 end
  17.                 moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),extra)
  18.                 wait(300)
  19.                 moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),toPay2)
  20.                 wait(300)
  21.                 while itemcount(MONEYIDS[2],getuseroption('tempbp')) > toPay2 do
  22.                     moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
  23.                     wait(300)
  24.                     moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),toPay2)
  25.                     wait(300)
  26.                 end
  27.                 moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),toPay2)
  28.                 wait(300)      
  29.             else
  30.                 moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
  31.                 wait(300)
  32.                 while itemcount(MONEYIDS[2],getuseroption('tempbp')) > amount[2] do
  33.                     moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
  34.                     wait(300)
  35.                     moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
  36.                     wait(300)
  37.                 end
  38.                 moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[2])
  39.                 wait(300)
  40.             end
  41.         else
  42.             moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
  43.             wait(300)
  44.             while itemcount(MONEYIDS[2],getuseroption('tempbp')) > amount[2] do
  45.                 moveitems(MONEYIDS[2],getuseroption('ccbp'),getuseroption('tempbp'))
  46.                 wait(300)
  47.                 moveitems(MONEYIDS[2],getuseroption('tempbp'),getuseroption('ccbp'),amount[2])
  48.                 wait(300)
  49.             end
  50.             moveitems(MONEYIDS[2],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[2])
  51.             wait(300)
  52.         end
  53.     end
  54.     if not(amount[1] == 0) then
  55.         if (itemcount(MONEYIDS[1],getuseroption('platbp')) % 100 ~= 0) then
  56.             extra = itemcount(MONEYIDS[1],getuseroption('platbp')) % 100
  57.             if (amount[1] > extra) then
  58.                 toPay2 = amount[1] - extra;
  59.                 moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),extra)
  60.                 wait(300)
  61.                 moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),extra)
  62.                 wait(300)
  63.                 moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),toPay2)
  64.                 wait(300)
  65.                 moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),toPay2)
  66.                 wait(300)
  67.             else
  68.                 moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),amount[1])
  69.                 wait(300)
  70.                 moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[1])
  71.                 wait(300)
  72.             end
  73.         else
  74.             moveitems(MONEYIDS[1],getuseroption('tempbp'),getuseroption('platbp'),amount[1])
  75.             wait(300)
  76.             moveitems(MONEYIDS[1],ground(data[1][5][1],data[1][5][2],data[1][5][3]),getuseroption('tempbp'),amount[1])
  77.             wait(300)
  78.         end
  79.     end
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement