Advertisement
jojoa1997

Untitled

Sep 28th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.53 KB | None | 0 0
  1. function mc_inv()
  2.     for a=9,17 do
  3.         local forma = "list[current_player;main;"
  4.         local formb = ";1,1;"
  5.         local num = a - 9
  6.         local mod = (1/17) * num
  7.         local x1 = mod + num
  8.         local y1 = 4.5
  9.         lista = forma..x1..","..y1..formb..a.."]"
  10.         for aa=1,1 do
  11.             local b = a + 9
  12.             local y2 = y1  + (18/17)
  13.             listb = forma..x1..","..y2..formb..b.."]"
  14.             for aa=1,1 do
  15.                 local c = a + 18
  16.                 local y3 = y2 + (18/17)
  17.                 listc = forma..x1..","..y3..formb..c.."]"
  18.                 for aa=1,1 do
  19.                     local d = a + 27
  20.                     local y4 = y3 + (22/17)
  21.                     listd = forma..x1..","..y4..formb..d.."]"
  22.                     list = lista..listb..listc..listd..".."
  23.                 end
  24.             end
  25.         end
  26.     end
  27. end
  28. function inventory.survival_inv(player)
  29. local name = player:get_player_name()
  30.     SURVIVAL_FORMSPEC = "invsize[9,9.5;]"..
  31.         --"background[-0.4,-0.45;9.8,9.825;inventory_survival_inventory_bg.png]"..
  32.         "list[detached:"..name.."_armor;armor;0,0;1,1;0]"..
  33.         "list[detached:"..name.."_armor;armor;0,1;1,1;1]"..
  34.         "list[detached:"..name.."_armor;armor;0,2;1,1;2]"..
  35.         "list[detached:"..name.."_armor;armor;0,3;1,1;3]"..
  36.         "image[1.6,0.25;2,4;player.png]"..
  37.         "list[current_player;main;0,4.5;9,3;9]"..
  38.         mc_inv()    -- <<< I want list from above to go there
  39.         "list[current_player;craft;4,2;2,1;3]"..
  40.         "list[current_player;craftpreview;7,1.5;1,1;]"
  41.         player:get_inventory():set_width("craft", 3)
  42.         player:get_inventory():set_size("craft", 9)
  43.         player:get_inventory():set_width("main", 9)
  44.         player:get_inventory():set_size("main", 36)
  45.     player:set_inventory_formspec(SURVIVAL_FORMSPEC)
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement