Date: 2017/06/22 10:20:18 UTC-07: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
58
59
60
61
62
63
64
65
my_npc:
type: assignment
actions:
on assignment:
- trigger name: click state:true
- trigger name: chat state:true
interact scripts:
- 169 my_npc_interact
my_npc_interact:
type: interact
steps:
1:
click trigger:
script:
- chat "Salut tu veux que l'on essaie ?"
- narrate "Dis oui ou non"
chat trigger:
1:
trigger: /Oui/ c'est d'accord
script:
- chat "Cool, suis moi !"
- ^create player MyNpc <npc.location> save:mynpc
- ^adjust <player> hide_entity:<npc>
- ^adjust <server.list_online_players.exclude[<player>]> hide_entity:<entry[mynpc].created_npc>
- ^run my_npc_path npc:<entry[mynpc].created_npc> def:<^npc> instantly
- zap 2
2:
trigger: /Non/ pas envie
script:
- chat "Tcho"
my_npc_path:
type: task
defintions: masternpc
script:
- chat "Salut et bienvenue"
- wait 2s
- while <npc.location.distance[<def[masternpc].anchor[plop1]>].is[OR_MORE].than[2]> {
- ~walk <def[masternpc].anchor[plop1]> auto_range
}
- ^inject my_npc_trypause
- chat "C'est trop cool ici"
- wait 2s
- while <npc.location.distance[<def[masternpc].anchor[plop2]>].is[OR_MORE].than[2]> {
- ~walk <def[masternpc].anchor[plop2]> auto_range
}
- ^inject my_npc_trypause
- chat "Ici c'est aussi pas mal je trouve"
- wait 2s
- while <npc.location.distance[<def[masternpc].anchor[plop3]>].is[OR_MORE].than[2]> {
- ~walk <def[masternpc].anchor[plop3]> auto_range
}
- wait 1s
- remove <npc>
- adjust <player> show_entity:<def[masternpc]>
- zap 1 script:s@my_npc_interact
my_npc_trypause:
type: task
script:
- ^while <npc.location.distance[<player.location>].is[OR_LESS].than[5]> {
- chat "Blablabla"
- wait 1s
}