Date: 2014/08/08 12:09:46 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
# To assign to an NPC, literally type:
# /npc assign --set "prof_woodsman_selector"
prof_woodsman_selector:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:proximity state:true
- trigger name:chat state:true
interact scripts:
- 10 prof_woodsman_interact
prof_woodsman_interact:
type: interact
steps:
1:
click trigger:
script:
- if <player.flag[prof]> == prof_woodsman {
- narrate format:cchat "Your profession is already woodsman, move on"
}
else {
- narrate format:cchat "<player.name> I can tell you about the Profession of <&4> Woodsman"
- narrate format:cchat "Do you want to hear what I have to say?"
- narrate format:cchat "You can say <&c>Yes <&f>or <&c>No"
}
chat trigger:
1:
trigger: /yes/ Tell me about the Woodsman.
script:
- narrate format:cchat "Woodsmen get special abilities and XP for cutting down trees and leaves that no one else get"
- wait 3
- narrate format:cchat "The Woodsman usually supports a group or town and sells his work and materials"
- wait 3
- narrate format:cchat "You also get some sweet Axe offensive abilities and XP as well <player.name>"
- wait 2
- narrate format:cchat "Do you want to cut trees and sell materials for a living on the server as a <&6>Woodsman<&f>?"
- narrate "You can say <&c>Join <&f>or <&c>Leave"
2:
trigger: I want to /Join/ the Woodsmen and plant and cut trees with my mighty Axe
script:
- narrate format:cchat "You are now a <&6>Woodsman<&f>!"
- if <player.flag[prof]||null> != null {
- execute as_server "pex user <player.name> group remove fisherman"
- execute as_server "pex user <player.name> group remove farmer"
- execute as_server "pex user <player.name> group remove smithy"
- execute as_server "pex user <player.name> group remove beastmaster"
- execute as_server "pex user <player.name> group remove stoneflinger"
- execute as_server "pex user <player.name> group remove archer"
- execute as_server "pex user <player.name> group remove ranger"
- execute as_server "pex user <player.name> group remove barbarian"
}
- flag player prof:prof_woodsman
- execute as_server "pex user <player.name> group add woodsman"
3:
trigger: /No/, I will move on.
script:
- narrate format:cchat "Ok"
4:
trigger: I think I will /leave/ and look at other professions.
script:
- narrate format:cchat "Goodbye"