Date: 2020/12/01 01:23:35 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
TeleporterNPC:
type: assignment
debug: true
actions:
on assignment:
- trigger name: click state:true
on click:
- if <player.item_in_hand.material.name> == emerald:
- playsound <player> ENTITY_VILLAGER_NO
- narrate "<&f>Let me count those real quick.<&f>."
- wait 1s
- repeat 16:
- if <player.item_in_hand.material.name> == emerald
- playsound <player> ENTITY_EXPERIENCE_ORB_PICKUP
- take iteminhand
- wait 0.15s
- define Count:+:1
- else:
- playsound <player> ENTITY_VILLAGER_NO
- narrate "<&f>That's just <&3><[Count]> Emeralds!"
- wait 1
- playsound <player> ENTITY_VILLAGER_NO
- narrate "Sorry, but i won't sell a scroll for those."
- give <player> emerald qty:<[Count]>
- define Count:0
- stop
- if <[Count]> == 16:
- playsound <player> ENTITY_VILLAGER_CELEBRATE
- narrate "Alright. Take your <&6>Farwater Teleport Scroll<&f>."
- give <item[FarwaterTeleportScroll]>
- if <player.item_in_hand.material.name> == diamond:
- playsound <player> ENTITY_VILLAGER_NO
- narrate "<&f>Let me count those real quick.<&f>."
- wait 1s
- repeat 32:
- if <player.item_in_hand.material.name> == diamond
- playsound <player> ENTITY_EXPERIENCE_ORB_PICKUP
- take iteminhand
- wait 0.15s
- define Count:+:1
- else:
- playsound <player> ENTITY_VILLAGER_NO
- narrate "<&f>That's just <&3><[Count]> Diamonds!"
- wait 1
- playsound <player> ENTITY_VILLAGER_NO
- narrate "Sorry, but i won't sell a scroll for those."
- give <player> diamond qty:<[Count]>
- define Count:0
- stop
- if <[Count]> == 32:
- playsound <player> ENTITY_VILLAGER_CELEBRATE
- narrate "Alright. Take your <&6>Farwater Teleport Scroll<&f>."
- give <item[FarwaterTeleportScroll]>
- else:
- playsound <player> ENTITY_VILLAGER_NO
- narrate "I'm making these scrolls everone is talking about."
- wait 2s
- playsound <player> ENTITY_VILLAGER_NO
- narrate "<&f>You can buy one for 16 <&3>emeralds <&f>or 32 <&b>diamonds<&f>."