Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Database Configuration
- script options:
- $ init com.mysql.jdbc.Driver
- $ db url jdbc:mysql://localhost:3306/database
- $ db username user
- $ db password pass
- options:
- # Intialization Configuration
- PerKill_Elo_Min:12
- PerKill_Elo_Max:23
- PerDeath_Elo_Min:24
- PerDeath_Elo_Max:32
- FirstJoin_Elo:100
- # Message Configuration
- Admin-Set_Elo_Message:&b&l[BattleElo]&f You have set %arg-3%'s elo to %arg-2%
- Admin-Reset_Elo_Message:&b&l[BattleElo]&f You have reset %arg-3%'s elo
- command /eloadmin [<text>] [<integer>] [<offline player>]:
- permission: elo.admin
- trigger:
- if arg-1 is "set":
- if arg-2 is set:
- set {elo.%arg-3%} to arg-2
- update "UPDATE battleelo SET elo = (""%{elo.%arg-3%}%"") WHERE name = ""%arg-3%""
- send "{@Admin-Set_Elo_Message}"
- stop
- if arg-1 is "reset":
- if arg-2 is "player":
- delete {elo.%arg-3%}
- update "UPDATE battleelo SET elo = (""0"") WHERE name = ""%arg-3%""
- send "{@Admin-Reset_Elo_Message}"
- stop
- command /elo:
- trigger:
- set {_elo} to the first element out of objects in column "elo" from result of query "SELECT `elo` FROM `battleelo` WHERE `uuid` = ""%uuid of player%""" and close
- send "&b&lBattleElo - &f&l%{_elo}%"
- stop
- on load:
- send "&e&l[BattleElo] &fPlugins Enabled. Thanks for using the plugins develop by Oskang09" to console
- update "create table IF NOT EXISTS battleelo (ID int NOT NULL AUTO_INCREMENT,uuid varchar(70),name varchar(70),elo varchar(20));"
- on first join:
- set {elo.%player%} to {@FirstJoin_Elo}
- update "INSERT INTO `battleelo` (`uuid`, `name`, `elo`) VALUES (""%uuid.of player%"", ""%player%"", ""%{elo.%player%}%"");"
- on death of a player:
- if attacker is player:
- add random integer from {@PerKill_Elo_Min} to {@PerKill_Elo_Max} to {elo.%attacker%}
- remove random integer from {@PerDeath_Elo_Min} to {@PerDeath_Elo_Max} from {elo.%victim%}
- update "UPDATE battleelo SET elo = (""%{elo.%attacker%}%"") WHERE name = ""%attacker%""
- update "UPDATE battleelo SET elo = (""%{elo.%victim%}%"") WHERE name = ""%victim%""
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement