Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guard:
- type: assignment
- actions:
- default contants:
- - define lastPos = <npc>.location
- on assignment:
- - trigger name:proximity state:true
- - flag <player> hasDrugs:false
- - flag <npc> chasing:false
- on enter proximity:
- - define heldItem <player.item_in_hand.simple>
- - 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
- - if <def[drugs]> CONTAINS <def[heldItem]> && !<npc>.flag[chasing] {
- - chat "Stop, criminal scum!"
- - lookclose true <npc> realistic
- - walk <npc> <player.location>
- - flag <npc> chasing:true
- }
- on exit proximity:
- - if <npc.flag[chasing]> {
- - walk <npc> <def[lastPos]>
- - chat "Not worth my time..."
- - flag <npc> chasing:false
- }
- on move proximity:
- - walk <npc> <player.location>
Advertisement
Add Comment
Please, Sign In to add comment