Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {_variable} = 0
- script options:
- $ init com.mysql.jdbc.Driver
- $ db url jdbc:mysql://0.0.0.0:3306/buildbattle
- $ db username root
- $ db password xxxxxxx
- command /punti add <player> <number>:
- trigger:
- update "INSERT INTO punteggi (playername, punti) SELECT * FROM (SELECT '%arg-1%', '1') AS tmp WHERE NOT EXISTS ( SELECT playername FROM punteggi WHERE playername = '%arg-1%' ) LIMIT 1;"
- set {punti} to the first element out of objects in column "punti" from result of query "SELECT `punti` FROM `punteggi` WHERE playername = '%arg-1%'" and close
- update "UPDATE punteggi SET punti = '%{punti}%' + %arg-2% WHERE playername = '%arg-1%';"
- options:
- Sound1: NOTE_PLING
- SoundVolume: 100.0
- command /punteggio <player=%player%>:
- trigger:
- set {_player} to arg-player
- set {_variable} to the first element out of objects in column "punti" from result of query "SELECT punti FROM punteggi WHERE playername='%{_player}%'"
- set action bar of player to "&2Hai %{_variable}% punti!"
- play "{@Sound1}" to player at volume {@SoundVolume}
- send player title "%{_player}%" with subtitle "Punteggio: &2%{_variable}%" for 4 seconds
- wait 5 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement