henry900326

Untitled

Oct 26th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1.  
  2. Function GetValue(uuid:text, n:text, sql:text) :: text:
  3. set {_result} to mysql result of query "SELECT * FROM %{_sql}% WHERE `uuid` = '%{_uuid}%'"
  4. set {_result::*} to mysql string "%{_n}%" in {_result}
  5. return "%{_result::*}%"
  6. Function UpdateValue(uuid:text, n1:text, n2:text, sql:text) :: text:
  7. mysql update "UPDATE %{_sql}% SET %{_n1}% = '%{_n2}%' WHERE `uuid` = '%{_uuid}%'"
  8.  
  9. import:
  10. java.sql.*
  11.  
  12. import:
  13. java.lang.System
  14. java.lang.String as JavaString
  15. java.lang.Math
  16. org.bukkit.Location
  17.  
  18. command /reflectiontest:
  19. trigger:
  20. System.out!.println("Hello from Skript!")
  21. sender.sendMessage("Reflection message!")
  22. message JavaString.format("welcome %%010d %%06x", 16, 356)
  23. message "%Math.max(Math.PI!, Math.E!)%"
  24. message "%new Location(a random world of all worlds, 0, 69, 1337, 90, 270)%"
  25.  
  26.  
  27. command /dddd:
  28. trigger:
  29. set {_uuid} to uuid of player
  30. send GetValue({_uuid},"ch1ID","chnumber")
  31. send GetValue({_uuid},"ch2ID","chnumber")
  32. send GetValue({_uuid},"ch3ID","chnumber")
  33. send GetValue({_uuid},"ch4ID","chnumber")
  34. send GetValue({_uuid},"uuid","chnumber")
  35.  
  36. command /ssss:
  37. trigger:
  38. # set {_uuid} to uuid of player
  39. # UpdateValue({_uuid},"ch1ID","已創建","chnumber")
  40. on join:
  41. set {_uuid} to uuid of player
  42. send "%{_uuid}%"
  43. send GetValue({_uuid},"uuid","chnumber")
  44. set {_data} to GetValue({_uuid},"uuid","chnumber")
  45. if "%{_data}%" is "<none>":
  46. send "1"
  47. if GetValue({_uuid},"uuid","chnumber") is "<none>":
  48. send "2"
  49. mysql update "INSERT INTO chnumber (`uuid`) VALUES ('%{_uuid}%')"
Advertisement
Add Comment
Please, Sign In to add comment