- 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.





MiningDropSkill


By BloodEko
Created: 2018/06/02 20:14:53 UTC-07:00 (6 years and 205 days ago)
Edited: 2018/06/02 20:30:54 UTC-07:00 (6 years and 205 days ago)
Likes: 0

Denizen Version: mc 1.12.2
Script Version: 1
Description:

Give players the flag bDrop.use to get them more drops out of ores.

You can also configurate the chances.


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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
6800

MiningDropSkill:
  type: world

  #-------------------------------|
  # Here you can edit the chance. |
  # 1 to x   , you define x here. |
  #-------------------------------|
  gold_ore: 12
  iron_ore: 10
  coal_ore: 5
  lapis_ore: 8
  diamond_ore: 16
  redstone_ore: 12
  emerald_ore: 6
  quartz_ore: 7

  #-----------------------------------------------------------|
  # Only gets activated if the player has the flag: bDrop.use |
  #-----------------------------------------------------------|
  handleBreak:
  - if !<player.has_flag[bDrop.use]>
    || <util.random.int[1].to[<script.yaml_key[<c.material.name>]>]> != 1
    || <server.has_flag[bDrop.noDrop.<c.location.simple>]>
    || <c.cancelled> queue clear
  - drop <def[it]> <c.location>
  - narrate "<&o>A bonus <def[it].after[i@]> dropped out of this ore."

  events:
    on player breaks gold_ore:
    - define it i@gold_ore
    - inject locally handleBreak

    on player breaks iron_ore:
    - define it i@iron_ore
    - inject locally handleBreak

    on player breaks coal_ore:
    - define it i@coal
    - inject locally handleBreak

    on player breaks lapis_ore:
    - define it i@lapis_lazuli
    - inject locally handleBreak

    on player breaks diamond_ore:
    - define it i@diamond
    - inject locally handleBreak

    on player breaks redstone_ore:
    - define it i@redstone
    - inject locally handleBreak

    on player breaks emerald_ore:
    - define it i@emerald
    - inject locally handleBreak

    on player breaks quartz_ore:
    - define it i@quartz
    - inject locally handleBreak

    on system time hourly:
    - webget "http://stats.denizenscript.com/tracker?script=141&version=1&players=<server.list_online_players.size>"










View History