Bodyguard scripts


Author: Ares513
Created: 2013-07-02T04:50:41-0400
Edited: 2013-07-02T04:53:12-0400
Denizen Version: 0.8.9 pre
Views: 32
Downloads: 870
Likes: 0


WGET
Description: These scripts are intended to be used with a Sentry NPC that follows the player. These can help players have an interaction with their bodyguard as well as give orders.

Requires Sentry to work properly.

Should be copy-paste ready. Credit me if you feel like it. If you have problems you can find me on IRC.

"Bodyguard":
    type: assignment
    interact scripts:
    - 110 BodyguardActions

BodyguardActions:
 Type: Interact
 Requirements:
   Mode: All
   List:
   - owner
 Steps:
    1:
      Click Trigger:
       Script:
       - chat "Hello, <player.name>. What can I do for you?"
       - narrate "*Wait* here."
       - narrate "*Follow* me."
       - narrate "*Dismiss* this bodyguard permanently."
       - narrate "Equip a *bow* for combat."
       - narrate "Equip a *sword* for combat."
       - narrate "*Add a safe* player."
       - narrate "*Remove a safe* player."
       - narrate "*Add a player* that is hostile and should be targeted on sight."
       - narrate "*Remove a player* that is hostile and should be targeted on sight."
       - finish
      Chat Trigger:
        1:
          Trigger: /Wait/ here.
          Script:
          - CHAT "I'll wait for your signal, sir."
          - narrate "This NPC will target anything you have told him to."
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry guard"
        2:
          Trigger: /Follow/ me.
          Script:
          - CHAT "Right behind you, sir."
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry guard <player.name>"
        3:
          Trigger: /Dismiss/ me.
          Script:
          - CHAT "I understand, sir."
          - execute asserver "npc sel <npc.id>"
          - execute asserver "npc remove"
        4:
          Trigger: Use a /bow/ while in combat.
          Script:
          - CHAT "Yes, sir."
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry strength 5"
          - execute asserver "sentry equip bow"          
        5:
          Trigger: Use a /sword/ in combat.
          Script:
          - CHAT "Yes, sir."
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry strength 7"
          - execute asserver "sentry equip IRON_SWORD"
        6:
          Trigger: /Add a player/ target.
          Script:
          - CHAT "Yes, sir."
          - zap 3
          - narrate "Type the name of the player you wish to target."
          - execute asserver "npc sel <npc.id>"
        7:
          Trigger: /Add a safe/ target.
          Script:
          - CHAT "Yes, sir."
          - zap 2
          - narrate "Type the name of the player you wish to ignore."
          - execute asserver "npc sel <npc.id>"
        8:
          Trigger: /Remove a safe/ target.
          Script:
          - CHAT "Yes, sir."
          - zap 4
          - narrate "Type the name of the player you no longer wish to ignore."
          - execute asserver "npc sel <npc.id>"
        9:
          Trigger: /Remove a player/ target.
          Script:
          - CHAT "Yes, sir."
          - zap 5
          - narrate "Type the name of the player you no longer wish to target."
          - execute asserver "npc sel <npc.id>"
    2:
      Chat Trigger:
        1:
          Trigger: /<player.chat_history>/ is friendly. Don't kill him!
          Script:
          - CHAT "Yes sir. I'll be careful."
          - zap 1
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry ignore add player:<player.chat_history>"
    3:
      Chat Trigger:
        1:
          Trigger: /<player.chat_history>/ is now a target and should be killed on sight.
          Script:
          - CHAT "Yes sir. I'll watch out for him."
          - zap 1
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry target add player:<player.chat_history>"
    4:
      Chat Trigger:
        1:
          Trigger: /<player.chat_history>/ is no longer friendly and should not be ignored.
          Script:
          - CHAT "Yes sir. I'll watch out for him."
          - zap 1
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry ignore remove player:<player.chat_history>"
    5:
      Chat Trigger:
        1:
          Trigger: /<player.chat_history>/ is no longer a target and should not be targeted.
          Script:
          - CHAT "Understood."
          - zap 1
          - execute asserver "npc sel <npc.id>"
          - execute asserver "sentry target remove player:<player.chat_history>"




Comments
2013-09-07 16:53:01 - Harrygo:

Is it still working on latest denizen version 0.9.2 - citizens 2.0.9 ? Because click trigger work fine, but not chat trigger. Do I have to setup something ?
2013-09-07 16:53:51 - Harrygo:

Is it still working on latest denizen version 0.9.2 - citizens 2.0.9 ? Because click trigger work fine, but not chat trigger. Do I have to setup something ?
2013-09-07 16:54:16 - Harrygo:

Is it still working on latest denizen version 0.9.2 - citizens 2.0.9 ? Because click trigger work fine, but not chat trigger. Do I have to setup something ?
2013-09-07 16:54:29 - Harrygo:

Is it still working on latest denizen version 0.9.2 - citizens 2.0.9 ? Because click trigger work fine, but not chat trigger. Do I have to setup something ?