FrostedWeFall

Untitled

Oct 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /st [<text>] [<text>]:
  2. trigger:
  3. if player has permission "stattrak.admin":
  4. if arg-1 is "add":
  5. set {_lore1::*} to lore of player's tool split at "||"
  6. set line {_loresize1} + 1 of player's tool's lore to "&f『&aStatTrak : &f0』"
  7. send "&aStatTrak &fhas added to your hand item!"
  8. stop
  9. if arg-1 is "del":
  10. set {_loredetect1::*} to lore of player's tool split at "||"
  11. loop {_loredetect1::*}:
  12. {_loredetect1::%loop-index%} contains "&aStatTrack :":
  13. set {_linenumber1} to loop-index parsed as number
  14. delete line {_linenumber1} of player's tool's lore
  15. send "&aStatTrak &fhas removed from your hand item!"
  16. stop
  17. if player has permission "stattrak.reset":
  18. if arg-1 is "r":
  19. set {_loredetect1::*} to lore of player's tool split at "||"
  20. loop {_loredetect1::*}:
  21. if {_loredetect1::%loop-index%} contains "&aStatTrack":
  22. set {_linenumber1} to loop-index parsed as number
  23. set line {_linenumber1} of player's tool's lore to "&f『&aStatTrak : &f0』"
  24. send "&aStatTrak &fhas reset your hand item!"
  25. stop
  26. on death of player:
  27. set {_loredetect1::*} to lore of attacker's tool split at "||"
  28. loop {_loredetect1::*}:
  29. {_loredetect1::%loop-index%} contains "&aStatTrak :":
  30. replace all "&f『&aStatTrak : &f" with "" in {_loredetect1::%loop-index%}
  31. replace all "』" with "" in {_loredetect1::%loop-index%}
  32. set {_StatTrak.Num.Add} to {_loredetect1::%loop-index%} parsed as integer
  33. add 1 to {_StatTrak.Num.Add}
  34. set {_linenumber1} to loop-index parsed as number
  35. set line {_linenumber1} of attacker's tool's lore to "&f『&aStatTrak : &f%{_StatTrak.Num.Add}%』"
  36. stop
Add Comment
Please, Sign In to add comment