Guest User

Untitled

a guest
Jun 3rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. guard:
  2. type: assignment
  3. actions:
  4.  
  5. default contants:
  6. - define lastPos = <npc>.location
  7.  
  8. on assignment:
  9. - trigger name:proximity state:true
  10. - flag <player> hasDrugs:false
  11. - flag <npc> chasing:false
  12.  
  13. on enter proximity:
  14. - define heldItem <player.item_in_hand.simple>
  15. - define drugs li@i@sugar_cane|i@sugar|i@paper|i@cactus|i@cactus_greens|i@ink_sack|i@iron_ingot|i@wheat|i@wheat_seeds|i@netherwort|i@pumpkin|i@pumpkin_seeds|i@melon|i@melon_block|i@melon_seeds
  16. - if <def[drugs]> CONTAINS <def[heldItem]> && !<npc>.flag[chasing] {
  17. - chat "Stop, criminal scum!"
  18. - lookclose true <npc> realistic
  19. - walk <npc> <player.location>
  20. - flag <npc> chasing:true
  21. }
  22.  
  23. on exit proximity:
  24. - if <npc.flag[chasing]> {
  25. - walk <npc> <def[lastPos]>
  26. - chat "Not worth my time..."
  27. - flag <npc> chasing:false
  28. }
  29.  
  30. on move proximity:
  31. - walk <npc> <player.location>
Advertisement
Add Comment
Please, Sign In to add comment