Date: 2016/11/22 16:34:59 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
randomchest:
type: world
events:
on player right clicks chest:
- if <context.location.simple> == -2560,61,-2932,world && <player.has_flag[testchest]> == false {
- define contents <util.random.int[1].to[100]>
- wait .1s
}
- if <def[contents]> < 10 && testchest == false {
- inventory add d:<player.open_inventory> o:i@386
- flag player testchest
- queue clear
}
- if <def[contents]> >= 11 && <def[contents]> < 20 testchest == false {
- inventory add d:<player.open_inventory> o:i@sand[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 21 && <def[contents]> < 30 testchest == false {
- inventory add d:<player.open_inventory> o:i@gold_ingot[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 31 && <def[contents]> < 40 testchest == false {
- inventory add d:<player.open_inventory> o:i@iron_ingot[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 41 && <def[contents]> < 50 testchest == false {
- inventory add d:<player.open_inventory> o:i@stick[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 51 && <def[contents]> < 60 testchest == false {
- inventory add d:<player.open_inventory> o:i@redstone[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 61 && <def[contents]> < 70 testchest == false {
- inventory add d:<player.open_inventory> o:i@stone[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 71 && <def[contents]> < 80 testchest == false {
- inventory add d:<player.open_inventory> o:i@diamond[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 81 && <def[contents]> < 90 testchest == false {
- inventory add d:<player.open_inventory> o:i@dirt[quantity=32]
- flag player testchest
- queue clear
}
- if <def[contents]> >= 90 && <def[contents]> < 101 testchest == false {
- inventory add d:<player.open_inventory> o:i@planks[quantity=32]
- flag player testchest
- queue clear
}