Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. on load:
  2. if folder "plugins/Topkills" doesn't exists:
  3. create folder "plugins/Topkills"
  4.  
  5.  
  6. on join:
  7. if file "plugins/Topkills/%player%.txt" doesn't exists:
  8. create file "plugins/Topkills/%player%.txt"
  9. write "Deaths: 0" at line 1 to file "plugins/Topkills/%player%.txt"
  10. write "Kills: 0" at line 2 to file "plugins/Topkills/%player%.txt"
  11.  
  12.  
  13. on death of player:
  14. if attacker is a player:
  15. if file "plugins/Topkills/%attacker%.txt" doesn't exists:
  16. create file "plugins/Topkills/%attacker%.txt"
  17. write "Deaths: 0" at line 1 to file "plugins/Topkills/%attacker%.txt"
  18. write "Kills: 1" at line 2 to file "plugins/Topkills/%attacker%.txt"
  19. else:
  20. set {temp} to line 2 in file "plugins/Topkills/%attacker%.txt"
  21. broadcast "%{temp}%"
  22. replace all "Kills: " with "" in {temp}
  23. set {temp} to {temp}
  24. set {temp} to {temp} + 1
  25. set line 2 in file "plugins/Topkills/%attacker%.txt" to "Kills: %{temp}%"
  26. delete {temp}
  27. if file "plugins/TopKills/%victim%.txt" doesn't exists:
  28. create file "plugins/Topkills/%victim%.txt"
  29. write "Deaths: 1" at line 1 to file "plugins/Topkills/%victim%.txt"
  30. write "Kills: 0" at line 2 to file "plugins/Topkills/%victim%.txt"
  31. else:
  32. set {temp} to line 1 in file "plugins/Topkills/%victim%.txt"
  33. replace all "Deaths: " with "" in {temp}
  34. set {temp} to {temp}
  35. set {temp} to {temp} + 1
  36. broadcast "%{temp}%"
  37. set line 1 in file "plugins/Topkills/%victim%.txt" to "Deaths: %{temp}%"
  38. delete {temp}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement