Advertisement
AdamLam

Untitled

Jan 25th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. on join:
  2. set {now} to now formatted as "dd"
  3. if difference between {now} and {quests.combotime.%player%} is greater than 2:
  4. set {quests.combo.%player%} to 0
  5. on first join:
  6. set {quests.combo.%player%} to 0
  7. command /cquests:
  8. trigger:
  9. if {quests.combo.%player%} is not set:
  10. set {quests.combo.%player%} to 0
  11. send "Twoje combo: %{quests.combo.%player%}%" to player
  12. else:
  13. send "Twoje combo: %{quests.combo.%player%}%" to player
  14. command /rquests:
  15. trigger:
  16. set {quests.allow.%player%} to true
  17. function questGUI(p:player,d: text):
  18. set {name} to skutil yaml value "%{_d}%.name" from file "quests.yml"
  19. set {desc} to skutil yaml value "%{_d}%.desc" from file "quests.yml"
  20. set {type} to skutil yaml value "%{_d}%.type" from file "quests.yml"
  21. open virtual chest with size 3 named "&5%{name}%" to {_p}
  22. wait 5 ticks
  23. set {i.loop} to 0
  24. loop 27 times:
  25. create gui slot {i.loop} of {_p} with black stained glass pane named " " with lore " " to do nothing
  26. set {i.loop} to {i.loop}+1
  27. create gui slot 13 of {_p} with book named "&5&l%{desc}%" with lore "&6&lType: %{type}% ||&aClick to accept" to run:
  28. set {quests.allow.%{_p}%} to false
  29. close player's inventory
  30. wait 10 seconds
  31. set {quests.combo.%player%} to {quests.combo.%player%}+1
  32. set {quests.allow.%{_p}%} to true
  33. set {quests.combotime.%{_p}%} to now formatted as "dd"
  34. on load:
  35. file "quests.yml" doesn't exist:
  36. create file "quests.yml"
  37. command /npc:
  38. trigger:
  39. spawn a Skeleton at player's location
  40. set displayname of last spawned entity to "&6Quests"
  41. set the weapon of the event-entity to iron sword
  42. apply slowness 255 to last spawned skeleton for 999 days
  43. command /quests:
  44. trigger:
  45. set {day} to now formatted as "dd"
  46. if {quests.allow.%player%} is true:
  47. questGUI(player,"%{day}%")
  48. else:
  49. if {quests.allow.%player%} is false:
  50. send "Mozesz tylko raz dziennie wykonywac questy"
  51. else:
  52. set {quests.allow.%player%} to true
  53. send "Ustawiono"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement