Date: 2016/02/23 08:47:40 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"PK_interact":
type: interact
steps:
# This step is a Jumping off point for ways the NPC interacts with you. By placing different types of triggers
# inside of the steps it can be a way to make One character more varried.
'1':
proximity trigger:
entry:
script:
# When a player enters the Proximity Range it will fire a script located lower down.
- if <player.has_flag[BeingAttacked]> {
- narrate format:GuardChat "Looks like you got this covered."
- queue stop
}
- if <player.gamemode> == "SURVIVAL" {
- if !<player.has_flag[listening]> {
- inject PK_weapon_check
- queue clear
}
}
"PK_weapon_check":
type: task
script:
#- narrate format:GuardChat "Doing weapon check!."
- walk <player.location>
- if <global.flag[weapons].as_list> contains <player.item_in_hand.material.name> {
- if !<player.has_flag[listening]> {
- flag <player> listening duration:10s
- flag <player> hated duration:2m
- pause waypoints
- lookclose <npc> state:true realistic
- inject PK_warning
}
}
"PK_warning":
type: task
script:
- pause waypoints
- lookclose <npc> state:true realistic
- walk <player.location>
- wait 1
- narrate format:GuardChat "<player.name>, you've been warned! This Prison does not allow weapons."
- playsound <npc.location> Grille_confiscate.weapons volume:2.0 pitch:1.0 custom
- run PK_attack
# }
-----
and the run attack basically works ok.. just don't want several NPCs all trying to attack (and talk) at the same time.. though I know the NPCs will help each other if they are in proximity and someone(npc) is being attacked.. I just don't want any scripts running on second and third NPCs...