Date: 2013/10/24 19:50:20 UTC-07:00
Type: Denizen Script
donthurtme:
type: assignment
actions:
on assignment:
- trigger name:damage state:true
- vulnerable state:true
- lookclose state:true
interact scripts:
- 10 donthurtme_interact
donthurtme_interact:
type: interact
steps:
1:
damage trigger:
script:
- heal <npc>
- if <player.flag[donthurtme]> == "true" {
- chat "Oh no you don't! You're in big trouble now!"
- execute as_npc "jail <player.name> jail 5m"
- narrate "<&c><&o>You have been jailed for <&b>5 minutes<&c><&o>!"
- flag player donthurtme:false
}
else {
- chat "Ouch! That hurt! Back off or you're going to jail!"
- flag player donthurtme:true
}