Date: 2014/05/03 15:41:45 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
#You need to have a inventory for the script to use
#Change the chest definition to where you want it to be.
players:
type: world
events:
on players command:
- define chest '376.0,76.0,239.0,keangdom'
- inventory open d:in@location[holder=l@%chest%]
- inventory clear d:in@location[holder=l@%chest%]
- inventory add d:in@location[holder=l@%chest%] o:i@sign[display_name=Player_List;lore=Click_on_a_player_to|request_a_teleport.]
- foreach <player.list.online> {
- flag global skull:%value%
- if <p@%value%.flag[pvp]> flag global item:witherskeleton_skull
else flag global item:human_skull
- inventory add d:in@location[holder=l@%chest%] o:i@playerskull
}
- determine FULFILLED
#A very customized skull item
playerskull:
type: item
material: <global.flag[item]>
display name: <global.flag[skull]>
lore:
- "Name: <light_purple><p@<global.flag[skull]>.name.display>"
- "Health: <light_purple><p@<global.flag[skull]>.health>"
- "Money: <light_purple><p@<global.flag[skull]>.money>"
- "World: <light_purple><p@<global.flag[skull]>.location.world>"
- "Cords; <light_purple>X:<p@<global.flag[skull]>.location.x.as_int>, Y:<p@<global.flag[skull]>.location.y.as_int>, Z:<p@<global.flag[skull]>.location.z.as_int>"
- "Corpse: <light_purple><p@<global.flag[skull]>.flag[body]>"
no_id: true
#Stops players from taking the skulls out of the display.
#Runs a tpa command when a player skull is clicked on
#Runs a tp command if the player has custom.admin permission.
playersinventory:
type: world
events:
on player clicks in inventory:
#Debugging - announce "<context.item>"
- if <context.inventory> == in@location[holder=l@%chest%] {
- if <context.item.has_display> {
- if <player.has_permission[custom.admin]> execute as_player "tp <context.item.display>"
else execute as_player "tpa <context.item.display>"
}
- determine CANCELLED
}