Advertisement
Keridos

Untitled

Jan 17th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.98 KB | None | 0 0
  1. function savetable(a,b,c,d,e,f,g)
  2.     postable = {}
  3.     postable.a = a
  4.     postable.b = b
  5.     postable.c = c
  6.     postable.d = d
  7.     postable.e = e
  8.     postable.f = f
  9.     postable.g = g
  10.     postablestring = (textutils.serialize(postable))
  11.     f = fs.open("lastpos","w")
  12.     f.writeLine(postablestring)
  13.     f.close()
  14. end
  15.  
  16.  
  17. function readtable()
  18.     f = fs.open("lastpos","r")
  19.     postablestring = f.readLine()
  20.     f.close()
  21.     postable = textutils.unserialize(postablestring)
  22.     status_a = postable.a
  23.     status_b = postable.b
  24.     status_c = postable.c
  25.     status_d = postable.d
  26.     status_e = postable.e
  27.     status_f = postable.f
  28.     status_g = postable.g
  29. end
  30.  
  31.  
  32. readtable()
  33. if ((status_f==1)and(status_g==1))then
  34.     for a=status_a,10 do
  35.         for b=status_b,10 do
  36.             shell.run("Cycle")
  37.             for c=status_c,15 do
  38.                 status_c=c+1
  39.                 savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  40.                 shell.run("QuarryX-")
  41.             end
  42.             status_c=1
  43.             status_b=b+1
  44.             savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  45.         end
  46.         for d=status_d,15 do
  47.             status_d=d+1
  48.             savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  49.             shell.run("QuarryZ+")
  50.         end
  51.         for e=status_e,150 do
  52.             status_e=e+1
  53.             savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  54.             shell.run("QuarryX+")
  55.         end
  56.             status_e=1
  57.         status_d=1
  58.         status_b=1
  59.         status_a=a+1
  60.         savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  61.     end
  62. end
  63. for f=status_f,15 do
  64.     status_f=f+1
  65.     savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  66.     shell.run("QuarryZ+")
  67. end
  68. savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  69. for g=status_g,150 do
  70.     status_g=g+1
  71.     savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
  72.     shell.run("QuarryX+")
  73. end
  74. status_g = 1
  75. status_f=1
  76. status_a=1
  77. savetable(status_a,status_b,status_c,status_d,status_e,status_f,status_g)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement