Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: Lua | Size: 0.58 KB | Hits: 43 | Expires: Never
Copy text to clipboard
  1. function Physic_Standart_Crafting_Table(Map_ID, X, Y, Z)
  2.         Player_Number = Map_Block_Get_Player_Last(Map_ID, X, Y, Z)
  3.        
  4.         Table = {}
  5.        
  6.         for ix = 0, 2 do
  7.                 for iy = 0, 2 do
  8.                         Table[1 + ix + iy*3] = Map_Block_Get_Type(Map_ID, X+ix-1, Y+iy+1, Z)
  9.                 end
  10.         end
  11.        
  12.         Change = 0
  13.        
  14.         if unpack(Table) == 4,4,4,4,0,4,4,4,4 then
  15.                 Material = 1
  16.                 Change = 1
  17.         end
  18.         if Change == 1 then
  19.                 Map_Block_Change_Fast(-1, Map_ID, X, Y, Z+1, Material, 5, 1, 1, 1)
  20.                 for ix = 0, 2 do
  21.                         for iy = 0, 2 do
  22.                                 Map_Block_Change_Fast(-1, Map_ID, X+ix-1, Y+iy+1, Z, 0, 5, 1, 1, 1)
  23.                         end
  24.                 end
  25.         end
  26. end