henry900326

Untitled

Oct 27th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 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.  
  10.  
  11. on join:
  12. set {_uuid} to uuid of player
  13. if GetValue({_uuid},"uuid","chnumber") is "<none>":
  14. set {_ch} to convert text "未創建" to unicode
  15. replace all "\" with "." in {_ch}
  16. mysql update "INSERT INTO chnumber (`uuid`,`ch1ID`,`ch2ID`,`ch3ID`,`ch4ID`) VALUES ('%{_uuid}%','%{_ch}%','%{_ch}%','%{_ch}%','%{_ch}%')"
Advertisement
Add Comment
Please, Sign In to add comment