Date: 2016/09/11 05:12: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
NPC_Blacksmith:
type: assignment
interact scripts:
- 10 Blacksmith
actions:
on assignment:
- trigger name:chat toggle:true radius:2
- trigger name:click toggle:true
Blacksmith:
type: interact
steps:
'1':
click trigger:
script:
- narrate "<npc.name> : Greeting, i am <npc.name>, i can repair your Ditem for 0,10 money"
- wait 2
- narrate "<npc.name> : To begin hold the item that you want to repair in your hand, and confirm me by saying <&9>Yes or <&9>No"
chat trigger:
'oui':
trigger: '/yes/'
script:
- if <pl.item_in_hand.scriptname||null> && <pl.item_in_hand.is_repairable||null> == null {
- narrate "<npc.name> : If you want me to repair your Ditem, you must hold it in your hand"
- queue clear
}
else {
- ^adjust <pl.item_in_hand> durability:0 save:item_reparation
- ^take <pl.item_in_hand>
- ^money take qty:0.10
- ^inventory set d:<player.inventory> o:i@<entry[item_reparation].result> slot:<pl.item_in_hand.slot>
- ^narrate "<npc.name> : <pl.item_in_hand.display_name> <&7>--><gold> Repair done!"
- random {
- narrate "<npc.name> : Goodbye !"
- narrate "<npc.name> : See you soon !"
}
- queue clear
}
'non':
trigger: '/no/'
script:
- random {
- narrate "<npc.name> : Ok !"
- narrate "<npc.name> : Ok then !"
}
- queue clear