Advertisement
DampfWaffel

Untitled

Aug 23rd, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. function saveinv(w: text, p: player):
  2. set {_count} to 0
  3. loop 36 times:
  4. set {inv::%{_p}%::%{_count}%0::%{_w}%} to slot {_count} of {_p}'s inventory
  5. add 1 to {_count}
  6. set {inv::%{_p}%::helmet::%{_w}%} to {_p}'s helmet
  7. set {inv::%{_p}%::chest::%{_w}%} to {_p}'s chestplate
  8. set {inv::%{_p}%::legs::%{_w}%} to {_p}'s leggings
  9. set {inv::%{_p}%::feet::%{_w}%} to {_p}'s boots
  10. clear {_p}'s inventory
  11.  
  12. function giveinv(w: text, p: player):
  13. clear {_p}'s inventory
  14. set {_count} to 0
  15. loop 36 times:
  16. set slot {_count} of {_p}'s inventory to {inv::%{_p}%::%{_count}%::%{_w}%}
  17. add 1 to {_count}
  18. set the helmet of {_p} to {inv::%{_p}%::helmet::%{_w}%}
  19. set the chestplate of {_p} to {inv::%{_p}%::chest::%{_w}%}
  20. set the leggings of {_p} to {inv::%{_p}%::legs::%{_w}%}
  21. set the boots of {_p} to {inv::%{_p}%::feet::%{_w}%}
  22. clear {inv::%{_p}%::*}
  23.  
  24. command /setge:
  25. permission: sk.admin
  26. trigger:
  27. set {warp.Gefangnis} to location of player
  28. send "gestzt death"
  29.  
  30. on rightclick:
  31. if name of entity is "Cop":
  32. open virtual chest with size 1 named "Polizei" to player
  33. set {_counter} to 0
  34. loop 9 times:
  35. format gui slot {_counter} of player with white glass pane named ""
  36. add 1 to set {_counter} to 0
  37. format gui slot 4 of player with lime concrete named "&aSchicht beginnen" with lore "Lohn= 10$ / 30 Minuten"
  38. format gui slot 8 of player with red concrete named "&cSchicht beenden"
  39. on inventory click:
  40. if player's current inventory's name is "Polizei":
  41. cancel event
  42. if clicked slot is 4:
  43. open virtual chest with size 1 named "Polizei" to player
  44. set {_counter} to 0
  45. loop 9 times:
  46. format gui slot {_counter} of player with white glass pane named ""
  47. add 1 to set {_counter} to 0
  48. format gui slot 3 of player with stone Shovel named "SWAT"
  49. format gui slot 4 of player with gray dye named "Gefängniswärter"
  50. format gui slot 5 of player with iron hoe named "Streife"
  51. on inventory click:
  52. if player's current inventory's name is "Polizei":
  53. cancel event
  54. if name of clicked item is "Gefängniswärter":
  55. saveinv("Polizei", player)
  56. on inventory click:
  57. if player's current inventory's name is "Polizei":
  58. cancel event
  59. if name of clicked item is "&cSchicht beenden":
  60. giveinv("Polizei", player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement