Date: 2020/06/02 11:41:38 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
minage:
type: command
name: minage
description: permet de se tp aux monde ressource
usage: /minage
script:
- flag player tpcancelled:!
- if <player.world.name> != Monde_ressource:
- if <player.world.name> == Monde_construction:
- if <player.location.find.entities[cave_spider|enderman|spider|blaze|creeper|drowned|elder_guardian|endermite|evoker|ghast|guardian|husk|illusioner|magma_cube|phantom|pillager|ravager|shulker|silverfish|skeleton|slime|stray|vex|vindicator|witch|wither_skeleton|zombie|zombie_villager|ender_dragon|wither].within[5].is_empty>:
- narrate "<gold>Vous allez etre tp ne bougez pas sinon le tp va etre annulez"
- flag player temps:5
- while !<player.has_flag[tpcancelled]> && <player.flag[temps]> != 0:
- narrate "temps restant avant tp :<red> <player.flag[temps]>"
- flag player temps:-:1
- wait 1s
- flag player temps:!
- if <player.has_flag[tpcancelled]>:
- narrate "<gold>Le tp a ete annulé"
- else:
- flag player avantlocation:<player.location.simple>
- flag player test
- flag player tentative
- flag player nouvellelocation:<player.location.simple.as_location.with_world[Monde_ressource]>
- while <player.has_flag[test]> || <player.flag[tentative]> < 10:
- flag player nouvellelocation:<player.flag[nouvellelocation].as_location.with_x[<util.random.int[0].to[1000]>]>
- flag player nouvellelocation:<player.flag[nouvellelocation].as_location.with_z[<util.random.int[0].to[1000]>]>
- chunkload <player.flag[nouvellelocation].as_location.chunk>
- flag player nouvellelocation:<player.flag[nouvellelocation].as_location.highest>
- chunkload remove <player.flag[nouvellelocation].as_location.chunk>
- if <player.flag[nouvellelocation].as_location.material.name> != lava:
- flag player test:!
- else:
- flag player tentative:++
- if <player.flag[tentative]> == 10:
- narrate "<gold>Aucun point de tp n'as pu etre trouvé veuillez recommencez !"
- else:
- teleport <player.name> <player.flag[nouvellelocation]>
- flag player tentative:!
- else:
- narrate "<gold>Il y a des monstres a proximités vous ne pouvez pas vous tp"
- else:
- narrate "<gold>Vous devez etre dans le monde <red>Monde_construction <gold>pour pouvoir vous tp dans le monde <red>Monde_ressouce"
aventure:
type: command
name: aventure
description: permet de se tp aux monde construction
usage: /aventure
script:
- flag player tpcancelled:!
- if <player.world.name> != Monde_construction:
- if <player.world.name> == Monde_ressource:
- if <player.location.find.entities[cave_spider|enderman|spider|blaze|creeper|drowned|elder_guardian|endermite|evoker|ghast|guardian|husk|illusioner|magma_cube|phantom|pillager|ravager|shulker|silverfish|skeleton|slime|stray|vex|vindicator|witch|wither_skeleton|zombie|zombie_villager|ender_dragon|wither].within[5].is_empty>:
- narrate "<gold>Vous allez etre tp ne bougez pas sinon le tp va etre annulez"
- flag player temps:5
- while !<player.has_flag[tpcancelled]> && <player.flag[temps]> != 0:
- narrate "Temps restant avant tp :<red> <player.flag[temps]>"
- flag player temps:-:1
- wait 1s
- if <player.has_flag[tpcancelled]>:
- narrate "<gold>Le tp a ete annulé"
- else:
- teleport <player.name> <player.flag[avantlocation]>
- else:
- narrate "<gold>Il y a des monstres a proximités vous ne pouvez pas vous tp"
- else:
- narrate "<gold>Vous devez etre dans le monde <red>Monde_ressouce <gold>pour pouvoir vous tp dans le monde <red>Monde_construction"
reasontpcancel:
type: world
events:
on entity targets player:
- flag player tpcancelled
on player killed by entity:
- flag player tpcancelled
on player walks:
- flag player tpcancelled
on player damaged:
- narrate "hello"
- flag player tpcancelled