henry900326

Untitled

Oct 28th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. Function GetValue(uuid:text, n:text, sql:text) :: text:
  2. set {_result} to mysql result of query "SELECT * FROM %{_sql}% WHERE `uuid` = '%{_uuid}%'"
  3. set {_result::*} to mysql string "%{_n}%" in {_result}
  4. return "%{_result::*}%"
  5. Function UpdateValue(uuid:text, n1:text, n2:text, sql:text) :: text:
  6. mysql update "UPDATE %{_sql}% SET %{_n1}% = '%{_n2}%' WHERE `uuid` = '%{_uuid}%'"
  7. Function text2Loc(location: text, world: world) :: location:
  8. set {_loc::*} to {_location} parsed as "x: %num%, y: %num%, z: %num%"
  9. return location({_loc::1}, {_loc::2}, {_loc::3}, {_world})
  10.  
  11.  
  12. on load:
  13. loop 30 times:
  14. set {Room::%loop-number%} to false
  15. set {Room_Loc::1} to "x: -16, y: 29, z: -21"
  16. set {Room_Loc::2} to "x: -67, y: 29, z: -21"
  17. set {Room_Loc::3} to "x: -118, y: 29, z: -21"
  18. set {Room_Loc::4} to "x: -169, y: 29, z: -21"
  19. set {Room_Loc::5} to "x: -220, y: 29, z: -21"
  20. set {Room_Loc::6} to "x: -271, y: 29, z: -21"
  21. set {Room_Loc::7} to "x: -322, y: 29, z: -21"
  22. set {Room_Loc::8} to "x: -373, y: 29, z: -21"
  23. set {Room_Loc::9} to "x: -424, y: 29, z: -21"
  24. set {Room_Loc::10} to "x: -475, y: 29, z: -21"
  25.  
  26.  
  27. set {Room_Loc::11} to "x: -16, y: 29, z: -76"
  28. set {Room_Loc::12} to "x: -67, y: 29, z: -76"
  29. set {Room_Loc::13} to "x: -118, y: 29, z: -76"
  30. set {Room_Loc::14} to "x: -169, y: 29, z: -76"
  31. set {Room_Loc::15} to "x: -220, y: 29, z: -76"
  32. set {Room_Loc::16} to "x: -271, y: 29, z: -76"
  33. set {Room_Loc::17} to "x: -322, y: 29, z: -76"
  34. set {Room_Loc::18} to "x: -373, y: 29, z: -76"
  35. set {Room_Loc::19} to "x: -424, y: 29, z: -76"
  36. set {Room_Loc::21} to "x: -475, y: 29, z: -76"
  37.  
  38.  
  39. set {Room_Loc::21} to "x: -16, y: 29, z: -131"
  40. set {Room_Loc::22} to "x: -67, y: 29, z: -131"
  41. set {Room_Loc::23} to "x: -118, y: 29, z: -131"
  42. set {Room_Loc::24} to "x: -169, y: 29, z: -131"
  43. set {Room_Loc::25} to "x: -220, y: 29, z: -131"
  44. set {Room_Loc::26} to "x: -271, y: 29, z: -131"
  45. set {Room_Loc::27} to "x: -322, y: 29, z: -131"
  46. set {Room_Loc::28} to "x: -373, y: 29, z: -131"
  47. set {Room_Loc::29} to "x: -424, y: 29, z: -131"
  48. set {Room_Loc::30} to "x: -475, y: 29, z: -131"
  49. on stop:
  50. delete {Room::*}
  51. delete {Room_Loc::*}
  52.  
  53.  
  54.  
  55.  
  56. on join:
  57. set {_uuid} to uuid of player
  58. if GetValue({_uuid},"uuid","chnumber") is "<none>":
  59. set {_ch} to convert text "未創建" to unicode
  60. replace all "\" with "_" in {_ch}
  61. mysql update "INSERT INTO chnumber (`uuid`,`ch1ID`,`ch2ID`,`ch3ID`,`ch4ID`) VALUES ('%{_uuid}%','%{_ch}%','%{_ch}%','%{_ch}%','%{_ch}%')"
  62. set {_sp} to location at -2, 26, 9 of the world "chroom"
  63. teleport player to {_sp}
  64. add player to {排隊::*}
  65. every 1 second:
  66. loop {Room::*}:
  67. if {Room::%loop-index-1%} is false:
  68. loop {排隊::*}:
  69. remove loop-value-2 from {排隊::*}
  70. set {Room::%loop-index-1%} to loop-value-2
  71. set {_loc} to text2Loc("%{Room_Loc::%loop-index-1%}%",chroom)
  72. teleport loop-value-2 to {_loc}
Advertisement
Add Comment
Please, Sign In to add comment