szumielxd

QuestPoke

Sep 5th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. command /questszum <text> [<integer>]:
  2. permission: mod
  3. trigger:
  4. arg 1 is "set":
  5. arg 2 is set:
  6. block below player is diamond block:
  7. {questpoke.portal::%location of block below player%} is not set:
  8. set {questpoke.loc::%arg 2%} to location of block below player
  9. set {questpoke.portal::%location of block below player%} to arg 2
  10. send "&aUstawiono portal nr %arg 2% na kordy &e%{questpoke.loc::%arg 2%}%"
  11. else:
  12. send "&cNie stoisz na bloku diamentu!"
  13. else:
  14. send "&eUzyj /questszum set <numer>"
  15.  
  16. arg 1 is "rem" or "remove":
  17. arg 2 is set:
  18. {questpoke.loc::%arg 2%} is set:
  19. delete {questpoke.portal::%{questpoke.loc::%arg 2%}%}
  20. delete {questpoke.loc::%arg 2%}
  21. {questpoke.loc::%arg 2+1%} is set:
  22. set {_a} to size of {questpoke.loc::*}+1
  23. set {questpoke.portal::%{questpoke.loc::%{_a}%}%} to arg 2
  24. set {questpoke.loc::%arg 2%} to {questpoke.loc::%{_a}%}
  25. delete {questpoke.loc::%{_a}%}
  26. send "&aPomyslnie usunieto portal o numerze %arg 2%"
  27. else:
  28. send "&cNie ma portalu nr %arg 2%"
  29. else:
  30. send "&eUzyj /questszum rem <numer>"
  31.  
  32. arg 1 is "list":
  33. send "&3Razem jest &c%size of {questpoke.loc::*}% &3portali:"
  34. loop {questpoke.loc::*}:
  35. send " &b%loop-index%. &7%loop-value%"
  36.  
  37. arg 1 is "clear":
  38. delete {questpoke.portal::*}
  39. delete {questpoke.loc::*}
  40. send "&aPomyslnie usunieto wszystkie portale"
  41.  
  42. # arg 1 is "regset":
  43. # arg 2 is set:
  44. # set {questpoke.spawn::%arg 2%} to player's location
  45. # send "&aUstawiono spawn przy wejsciu na region 'pokoj%arg 2%' na kordy &e%player's location%"
  46. #
  47. # arg 1 is "regdel":
  48. # arg 2 is set:
  49. # {questpoke.spawn::%arg 2%} is set:
  50. # set {questpoke.spawn::%arg 2%} to player's location
  51. # send "&aUsunieto spawn przy wejsciu na region 'pokoj%arg 2%'"
  52. # else:
  53. # send "&cNie ma takiego spawnu"
  54. #
  55. # arg 1 is "reglist":
  56. # send "&3Razem jest &c%size of {questpoke.spawn::*}% &3spawnow regionow:"
  57. # loop {questpoke.spawn::*}:
  58. # send " &b%loop-index%. &7%loop-value%"
  59.  
  60.  
  61. on walk on diamond block:
  62. {questpoke.portal::%location of event-block%} is set:
  63. loop regions at player:
  64. "%loop-region%" contains "pokoj":
  65. loop all entities:
  66. "%regions at loop-entity%" contains "%loop-region%":
  67. "%type of loop-entity%" is "zombie" or "zombie pigman" or "creeper" or "spider" or "wither" or "skeleton":
  68. send "&cNie ladnie tak uciekac przed walka c:"
  69. stop
  70. exit 2 sections
  71. set {_p} to {questpoke.portal::%location of event-block%}
  72. set {_nr} to {_p}+{questpoke.rand}+length of name of player
  73. set {_tp} to false
  74. while {_tp} is false:
  75. add 1 to {_nr}
  76. set {_nr} to mod({_nr}, size of {questpoke.loc::*}) + 1
  77. set {_l} to location of block above {questpoke.loc::%{_nr}%}
  78. set {_b} to block at {_l}
  79. loop blocks from block above {_b} to block at player:
  80. loop-block is not air:
  81. set {_tp} to true
  82. exit 2 sections
  83. teleport player to {_l}
  84.  
  85.  
  86. on script load:
  87. set {questpoke.rand} to random integer between 0 and 60
  88.  
  89.  
  90. #on region enter:
  91. # "%region%" starts with "pokoj":
  92. # set {_r} to "%region%"
  93. # replace all "in world %player's world%" in {_r} with ""
  94. # teleport player to {questpoke.spawn::%{_r}%}
Advertisement
Add Comment
Please, Sign In to add comment