Advertisement
RLPGhost

Lua Selector

Mar 15th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local ListeMob= {"Mouton", "Enderman", "Blaze", "Blize", "Wither","Replicator"}
  2. local ListeBin= {1,2,4,8,16,32,64,128}
  3. local iOn = false
  4.  
  5. while true do
  6. term.clear()
  7. term.setCursorPos(1, 1)
  8. if iOn then
  9. print("Extraction des Safari Net ? (Y/N)")
  10. print(" ")
  11. result = read()
  12.     if (result=="Y") then
  13.     --/envois signal off
  14.     redstone.setBundledOutput("back",32768)
  15.     sleep(3)
  16.     redstone.setBundledOutput("back",0)
  17.     iOn = false
  18.     redstone.setOutput("bottom", iOn )
  19.     elseif(result=="N") then
  20.     print("")
  21.     else
  22.     print("Vous devez ecrire Y ou N :")
  23.     result = read()
  24. end
  25. else
  26. print("Choix du Mob:")
  27. print(" ")
  28.     for key,value in pairs( ListeMob) do
  29.        print(tostring(key)..": "..tostring(value))
  30.     end
  31. print(" ")
  32. choix = tonumber(read())
  33. redstone.setBundledOutput("back", ListeBin[choix])
  34. sleep(3)
  35. redstone.setBundledOutput("back",0)
  36. iOn = true
  37. redstone.setOutput("bottom", iOn )
  38. end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement