- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Ditems Blacksmith


By Noiknez
Created: 2016/09/09 17:44:08 UTC-07:00 (8 years and 105 days ago)
Edited: 2016/09/11 05:12:38 UTC-07:00 (8 years and 104 days ago)
Likes: 1

Denizen Version: Version 0.9.8
Script Version: Script Version 2
Description:

A blacksmith script to use specifically and only with Denizen items

Of course you can change the text, and the money to adapt it to yours need


Download script | View raw 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
5400

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








View History