Date: 2018/05/04 20:49:41 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
Wanderer_assignment:
type: assignment
actions:
on assignment:
- trigger name:chat state:true radius:100
interact scripts:
- 1 Wanderer
#----------------------------------
# Start of the quest scripts, I
# would not advise editing any-
# thing beyond here if you are not
# an experienced scripter.
#----------------------------------
Wanderer:
Type: Interact
Steps:
1:
Click trigger:
Script:
- ^engage
- chat "Hey Stranger, need help?"
- chat "It's <red>3333<white> gold"
- narrate "<white>You can say, <green>yes<white> or <red>no<white>."
- ^disengage
Chat Trigger:
1:
Trigger: /yes/
Script:
- if <player.money> >= "3333" {
- chat "Alright!!"
- money take quantity:3333
- narrate "<&c>A NPC joins you, 3333 gold removed."
- EXECUTE as_op "npc create Companion --trait sentinel" (silent)
- EXECUTE as_op "npc skin Parkour" (silent)
- EXECUTE as_op "sentinel addtarget MONSTERS" (silent)
- EXECUTE as_op "sentinel damage 10" (silent)
- EXECUTE as_op "sentinel health 175" (silent)
- EXECUTE as_op "sentinel speed 1.39" (silent)
- EXECUTE as_op "sentinel respawntime 5" (silent)
- EXECUTE as_op "npc assign script --set bodyguard1a" (silent)
- narrate "right click your bodyguard to give him orders!<delay=120>" (silent)
} else {
- narrate "<&c>You do not have enough money!"
}
2:
Trigger: /no/
Script:
- ^engage
- chat "As you want."
- ^disengage
I made my first script
But one thing is I want to set a value that if player have that value stored on him
he cant buy another bodyguard
with IF function
What would you do?