Guest User

Untitled

a guest
Jul 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. @name MultiFloor elevator for Bion by iNvalid
  2. @inputs F1A F1B F2A F2B F3A F3B Hyd
  3. @outputs H
  4. @persist H1 H2 H3 Height
  5. @trigger
  6.  
  7. if(first())
  8. {
  9. H = 0
  10. H1 = 0
  11. H2 = 100
  12. H3 = 200
  13. hint("made by iNvalid",5)
  14. print("commands to change height of floors")
  15. print("!f1 [height]")
  16. print("!f2 [height]")
  17. print("!f3 [height]")
  18. }
  19.  
  20.  
  21. S = owner():lastSaid():explode(" ")
  22. if(S[1,string] == "!f1")
  23. {
  24. H1 = S[2,string]:toNumber()
  25. }
  26.  
  27. if(S[1,string] == "!f2")
  28. {
  29. H2 = S[2,string]:toNumber()
  30. }
  31.  
  32. if(S[1,string] == "!f3")
  33. {
  34. H3 = S[2,string]:toNumber()
  35. }
  36.  
  37.  
  38. if(F1A || F1B)
  39. {
  40. Height = H1
  41. }
  42. if(F2A || F2B)
  43. {
  44. Height = H2
  45. }
  46.  
  47. if(F3A || F3B)
  48. {
  49. Height = H3
  50. }
  51. timer("go",10)
  52.  
  53. if(clk("go"))
  54. {
  55. if(Hyd>Height)
  56. {
  57. H = H - 1
  58. }
  59. if(Hyd<Height)
  60. {
  61. H = H - 1
  62. }
  63.  
  64. }
Add Comment
Please, Sign In to add comment