Date: 2015/12/08 05:49:48 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
58
59
60
61
62
CreaftVigne:
type: world
events:
on player breaks melon_stem,7 with sugar_cane:
- playsound <player.location> DIG_GRASS pitch:0.1
- take iteminhand qty:1
- playeffect <context.location> instant_spell data:2 visibility:5 quantity:10
- WAIT 1
- modifyblock <context.location> dark_oak_fence
- modifyblock <context.location.above> darkoak_leaves
on player right clicks dark_oak_fence with shears:
- define VIGNE <context.location>
- if <context.location.above.material.is[==].to[m@darkoak_leaves]> || <context.location.above.material.is[==].to[m@leaves_2,9]> {
- inject USAGE_OUTIL
}
else {
- narrate "<&c>votre pied de vigne est mal en point..."
}
USAGE_OUTIL:
type: task
script:
- if <player.item_in_hand.durability.is[OR_MORE].than[238]> {
- take iteminhand
- playsound location:<player.location> sound:item_BREAK
}
else {
- playsound <player.location> SHEEP_SHEAR pitch:0.8
- adjust <player.item_in_hand> durability:<player.item_in_hand.durability.add[14]> save:USURE
- inventory set o:<entry[USURE].result> d:<player.inventory> slot:<player.item_in_hand.slot>
- if <player.location.biome.formatted> == desert {
- INJECT RECOLTE_CHARDONNAY
}
else if <player.location.biome.formatted.is[==].to[forest]> {
- INJECT RECOLTE_PINOT_NOIR
}
else if <player.location.biome.formatted.is[==].to[plains]> {
- INJECT RECOLTE_PINOT_MEUNIER
}
else {
- narrate "<&c>Le climat de la région ne permet pas de faire pousser du raisin..."
}
}
RECOLTE_CHARDONNAY:
type: task
script:
- narrate "%VIGNE%"
- define CHANCE <util.random.int[1].to[100]>
- if <def[Chance]> >= 80 {
- narrate "<def[Chance]>"
- drop i@RaisinChardonnay <context.location> quantity:2
}
else if <def[Change]> >= 10 {
- narrate "<def[Chance]>"
- drop i@RaisinChardonnay <context.location> quantity:1
}
else {
- narrate "<def[Chance]>"
- narrate "<def[VIGNE]>"
- modifyblock <def[VIGNE]> melon_stem,3
}