Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This Computer will stay at Trading Townspawn
- --x:-7864 y:68 z:13718
- --MInecraft(1.4.7) Tekkit Lite Modepack
- --ServerIP: server.lycodon.com
- fs.delete("local-name")
- os.loadAPI("ocs/apis/sensor")
- mon = peripheral.wrap("back")
- term.setBackgroundColor(32768)
- term.setCursorPos(1,1)
- term.clear()
- ------------------------------------------------------------
- term.setTextColor(colors.yellow)
- print("Trading-City Bank")
- print("~~~~~~~~~~~~~~~~~")
- print(" ")
- term.setTextColor(colors.red)
- print(" ")
- print("please come closer !!!")
- print("please come closer !!!")
- print("please come closer !!!")
- print(" ")
- print("Always stand inside the white circle")
- print("on the floor, that goes around the Computer.")
- print(" ")
- print(" ")
- print(" ")
- print(" ")
- term.setTextColor(colors.lightGray)
- print("System programmed by MagmaLP")
- print("01.12.2023")
- print("In case of errors please report to MagmaLP")
- ------------------------------------------------------------
- function calc_color(color)
- return math.pow(2, color - 1)
- end
- function msg(gap, line, color, groundb, text)
- term.setBackgroundColor(calc_color(groundb))
- term.setCursorPos(gap,line)
- term.setTextColor(calc_color(color))
- text = term.write(text)
- end
- function clear()
- for yPos = 1,20 do
- msg(1,yPos,16,16," ")
- end
- end
- function getS()
- for v, k in pairs(s) do
- if k.Name == "ME Wireless Access Point" then
- target = v
- end
- end
- sleep(0.5)
- return target
- end
- Adjustable_Emitter_Amount = 0
- while true do
- sen = sensor.wrap("back")
- for targetName,targetInfo in pairs(sen.getTargets()) do --detect targets
- name = targetName
- if targetInfo.Name == "Player" then --detect if target is a player
- if fs.exists("Users/" ..name) == false then --create user
- file = fs.open("Users/" .. name, "w")
- file.write("Adjustable Emitter= 0\n")
- file.write("Shiny Ingot= 0\n")
- file.write("Tungsten Ore= 0")
- file.close()
- end
- file = fs.open("local-name", "w") --name local speichern
- file.write(name)
- file.close()
- clear()
- msg(01,01,02,16," Account: "..name) --überschrift
- msg(01,02,08,16,"---------------------------------------------------")
- msg(06,07,01,15," ") msg(30,07,01,15," ")
- msg(06,08,01,15," deposit items ") msg(30,08,01,15," withdraw items ")
- msg(06,09,01,15," ") msg(30,09,01,15," ")
- msg(14,04,06,16,"$$$ $$$")
- msg(18,04,05,16,"Trading-City Bank")
- msg(18,05,01,16,"~~~~~~~~~~~~~~~~~")
- msg(02,13,09,16,"After 1 year offline, your account will be")
- msg(02,14,09,16,"deleted, along with all your things!")
- msg(02,15,09,16,"Save your valuable items here so you can")
- msg(02,16,09,16,"get them back even after a player reset.")
- msg(01,18,08,16,"---------------------------------------------------")
- local event, button, X, Y = os.pullEvent("mouse_click")
- if X >= 06 and X <= 23 and Y >= 07 and Y <= 09 then --deposit items
- clear()
- msg(01,01,02,16," Account: "..name) --überschrift
- msg(01,02,08,16,"---------------------------------------------------")
- msg(14,04,06,16,"$$$ $$$")
- msg(18,04,05,16,"Trading-City Bank")
- msg(18,05,01,16,"~~~~~~~~~~~~~~~~~")
- msg(02,07,01,16,"Insertable Items:")
- msg(02,08,01,16,"~~~~~~~~~~~~~~~~~")
- msg(24,07,09,16,"-> Adjustable Emitters")
- msg(24,08,09,16,"-> Tungste Ore")
- msg(24,09,09,16,"-> Shiny Ingot")
- msg(02,13,09,16,"Insert all items on the left and then")
- msg(02,14,09,16,"confirm here with the red button.")
- msg(02,15,09,16,"Your items will remain saved until")
- msg(02,16,09,16,"you retrieve them.")
- msg(40,13,01,15," ")
- msg(40,14,01,15," confirm ")
- msg(40,15,01,15," ")
- msg(01,18,08,16,"---------------------------------------------------")
- msg(47,19,16,01," back")
- local event, button, X, Y = os.pullEvent("mouse_click")
- if X >= 40 and X <= 49 and Y >= 13 and Y <= 15 then --confirm button
- shell.run("Addieren")
- elseif X >= 47 and X <= 52 and Y == 19 then --back button
- os.reboot()
- else
- --nix
- end
- elseif X >= 30 and X <= 45 and Y >= 07 and Y <= 09 then --withdraw items
- shell.run("Subtrahieren")
- else
- os.reboot()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement