Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- if folder "plugins/Topkills" doesn't exists:
- create folder "plugins/Topkills"
- on join:
- if file "plugins/Topkills/%player%.txt" doesn't exists:
- create file "plugins/Topkills/%player%.txt"
- write "Deaths: 0" at line 1 to file "plugins/Topkills/%player%.txt"
- write "Kills: 0" at line 2 to file "plugins/Topkills/%player%.txt"
- on death of player:
- if attacker is a player:
- if file "plugins/Topkills/%attacker%.txt" doesn't exists:
- create file "plugins/Topkills/%attacker%.txt"
- write "Deaths: 0" at line 1 to file "plugins/Topkills/%attacker%.txt"
- write "Kills: 1" at line 2 to file "plugins/Topkills/%attacker%.txt"
- else:
- set {temp} to line 2 in file "plugins/Topkills/%attacker%.txt"
- broadcast "%{temp}%"
- replace all "Kills: " with "" in {temp}
- set {temp} to {temp}
- set {temp} to {temp} + 1
- set line 2 in file "plugins/Topkills/%attacker%.txt" to "Kills: %{temp}%"
- delete {temp}
- if file "plugins/TopKills/%victim%.txt" doesn't exists:
- create file "plugins/Topkills/%victim%.txt"
- write "Deaths: 1" at line 1 to file "plugins/Topkills/%victim%.txt"
- write "Kills: 0" at line 2 to file "plugins/Topkills/%victim%.txt"
- else:
- set {temp} to line 1 in file "plugins/Topkills/%victim%.txt"
- replace all "Deaths: " with "" in {temp}
- set {temp} to {temp}
- set {temp} to {temp} + 1
- broadcast "%{temp}%"
- set line 1 in file "plugins/Topkills/%victim%.txt" to "Deaths: %{temp}%"
- delete {temp}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement