MagmaLP

dd

Nov 10th, 2023
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. --This Computer will stay at Trading Townspawn
  2. --x:-7864 y:68 z:13718
  3. --MInecraft(1.4.7) Tekkit Lite Modepack
  4. --ServerIP: server.lycodon.com
  5.  
  6. os.loadAPI("ocs/apis/sensor")
  7. mon = peripheral.wrap("back")
  8. term.setBackgroundColor(32768)
  9. term.setCursorPos(1,1)
  10. term.clear()
  11.  
  12. function calc_color(color)
  13. return math.pow(2, color - 1)
  14. end
  15.  
  16. function msg(gap, line, color, groundb, text)
  17. mon.setBackgroundColor(calc_color(groundb))
  18. mon.setCursorPos(gap,line)
  19. mon.setTextColor(calc_color(color))
  20. text = mon.write(text)
  21. end
  22.  
  23. function clear()
  24. for yPos = 3,30 do
  25. msg(1,yPos,16,16," ")
  26. end
  27. end
  28.  
  29. while true do
  30. sen = sensor.wrap("bottom")
  31. for targetName,targetInfo in pairs(s.getTargets()) do --detect targets
  32. if targetInfo.Name == "Player" then --detect if target is a player
  33. if fs.exists("AEs/" ..name) == false then --create user
  34. file = fs.open("AEs/" ..name.. "/", "w")
  35. file.write(0.0)
  36. file.close()
  37. file = fs.open("HVs/" ..name.. "/", "w")
  38. file.write(0.0)
  39. file.close()
  40. file = fs.open("Tungsten/" ..name.. "/", "w")
  41. file.write(0.0)
  42. file.close()
  43. file = fs.open("Azure/" ..name.. "/", "w")
  44. file.write(0.0)
  45. file.close()
  46. file = fs.open("Amaranthine/" ..name.. "/", "w")
  47. file.write(0.0)
  48. file.close()
  49. file = fs.open("Iridescent/" ..name.. "/", "w")
  50. file.write(0.0)
  51. file.close()
  52. end
  53.  
  54. file = fs.open("local-name", "w") --name local speichern
  55. file.write(name)
  56. file.close()
  57.  
  58. msg(01,01,06,16,"< Welcome "..name.." >") --überschrift
  59. msg(01,02,04,16,"+-------------------------------------------------+")
  60.  
  61. clear()
  62. msg(06,07,01,15," ") msg(30,07,01,15," ")
  63. msg(06,08,01,15," deposit items ") msg(30,08,01,15," withdraw items ")
  64. msg(06,09,01,15," ") msg(30,09,01,15," ")
  65.  
  66. msg(02,13,09,16,"Trading-City Bank")
  67. msg(02,15,09,16,"After 1 year offline, your account will be")
  68. msg(02,16,09,16,"deleted, along with all your things!")
  69. msg(02,17,09,16,"Save your valuable items here so you can")
  70. msg(02,18,09,16,"get them back even after a player reset.")
  71.  
  72. local event, button, X, Y = os.pullEvent("mouse_click")
  73. if X >= 06 and X <= 23 and Y >= 07 and Y <= 09 then --deposit money
  74. for a = 3,20 do
  75. for b = 1,50 do
  76. msg(b,a,16,16," ")
  77. end
  78. end
  79. sleep(0.5)
  80. msg(02,06,01,15," ")
  81. msg(02,07,01,15," click here to see a list of all sellable items ")
  82. msg(02,08,01,15," ")
  83.  
  84. msg(02,12,09,16,"Throw in all items on the left and confirm with")
  85. msg(02,13,09,16,"the button below. The money is stored permanently ")
  86. msg(02,14,09,16,"until you buy something with it.")
  87.  
  88. msg(40,16,01,15," ")
  89. msg(40,17,01,15," confirm ") msg(32,17,01,16,"----->")
  90. msg(40,18,01,15," ")
  91.  
  92. msg(01,19,16,01,"back")
  93. end
  94. end
  95. end
  96. sleep(0.5)
  97. end
Add Comment
Please, Sign In to add comment