Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function GetValue(uuid:text, n:text, sql:text) :: text:
- set {_result} to mysql result of query "SELECT * FROM %{_sql}% WHERE `uuid` = '%{_uuid}%'"
- set {_result::*} to mysql string "%{_n}%" in {_result}
- return "%{_result::*}%"
- Function UpdateValue(uuid:text, n1:text, n2:text, sql:text) :: text:
- mysql update "UPDATE %{_sql}% SET %{_n1}% = '%{_n2}%' WHERE `uuid` = '%{_uuid}%'"
- on join:
- set {_uuid} to uuid of player
- if GetValue({_uuid},"uuid","chnumber") is "<none>":
- set {_ch} to convert text "未創建" to unicode
- replace all "\" with "." in {_ch}
- 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