Description: This script a mithril armour set to the game that can be crafted and obtained by mining the lapis lazuli ore. You must execute the command /erze when adding a new ore to the list of regenerating ores. Only then can the mithril ore be obtained. Otherwise the ores will not regenerate and the lapis will drop lapis only. Also forces you to use certain ranks of pickaxes for certain ores. You can either take those out or change them as you wish. My apologies for the mixture of languages but you should be able to change the basic information. If you have any questions ask me. Big thanks to BlackCoyote, mcmonkey and aufdemrand for the help.
Erze:
type: world
events:
on player breaks m@emerald_ore:
- if <player.item_in_hand.material> == m@diamond_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give emerald_ore qty:1
- run "ReplaceBlock" def:120|<context.location>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on player breaks m@diamond_ore:
- if <player.item_in_hand.material> == m@diamond_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give diamond_ore qty:1
- run "ReplaceBlock" def:120|<context.location>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on player breaks m@gold_ore:
- if <player.item_in_hand.material> == m@gold_pickaxe || <player.item_in_hand.material> == m@diamond_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give gold_ore qty:1
- run "ReplaceBlock" def:105|<context.location>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on player breaks m@iron_ore:
- if <player.item_in_hand.material> == m@iron_pickaxe || <player.item_in_hand.material> == m@gold_pickaxe || <player.item_in_hand.material> == m@diamond_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give iron_ore qty:1
- run "ReplaceBlock" def:60|<context.location>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on player breaks m@lapis_ore:
- if <player.item_in_hand.material> == m@stone_pickaxe || <player.item_in_hand.material> == m@iron_pickaxe || <player.item_in_hand.material> == m@gold_pickaxe || <player.item_in_hand.material> == m@diamond_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give mithrilerz qty:1
- run "ReplaceBlock" def:45|<context.location.simple>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on player breaks m@coal_ore:
- if <player.item_in_hand.material> == m@stone_pickaxe || <player.item_in_hand.material> == m@iron_pickaxe || <player.item_in_hand.material> == m@gold_pickaxe || <player.item_in_hand.material> == m@diamond_pickaxe || <player.item_in_hand.material> == m@wood_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give coal_ore qty:1
- run "ReplaceBlock" def:30|<context.location.simple>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on player breaks m@cobblestone:
- if <player.item_in_hand.material> == m@stone_pickaxe || <player.item_in_hand.material> == m@iron_pickaxe || <player.item_in_hand.material> == m@gold_pickaxe || <player.item_in_hand.material> == m@diamond_pickaxe || <player.item_in_hand.material> == m@wood_pickaxe {
- if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- give cobblestone qty:1
- run "ReplaceBlock" def:15|<context.location.simple>|<context.material>|bedrock
- determine nothing
}} else if <server.flag[erzliste].as_list> contains "<context.location>" && <player.gamemode> == "SURVIVAL"{
- narrate "<&c>Du brauchst eine bessere pickaxe um dieses Erz abzubauen!"
- determine cancelled
- determine nothing
}
on erze command:
- if <server.has_flag[erzliste]> {
- flag global erzliste:->:<player.location.cursor_on>
- determine fulfilled
} else flag global erzliste:l@-100000000,100,-100000000,world
on furnace smelts Mithrilerz:
- determine Mithril
'Mithrilerz':
type: item
material: lapis_ore
display name: <&9>Mithril-Erz
'Mithril':
type: item
material: lapis_lazuli
display name: <&9>Mithril
'MithrilHelm':
type: item
material: leather_helmet
display name: <&9>Mithril-Helm
recipe:
- Mithril|Mithril|Mithril
- Mithril|i@air|Mithril
- i@air|i@air|i@air
color: navy
'MithrilRuestung':
type: item
material: leather_chestplate
display name: <&9>Mithril-RĂ¼stung
recipe:
- Mithril|i@air|Mithril
- Mithril|Mithril|Mithril
- Mithril|Mithril|Mithril
color: navy
'MithrilBeine':
type: item
material: leather_leggings
display name: <&9>Mithril-Beinschutz
recipe:
- Mithril|Mithril|Mithril
- Mithril|i@air|Mithril
- Mithril|i@air|Mithril
color: navy
'MithrilStiefel':
type: item
material: leather_boots
display name: <&9>Mithril-Stiefel
recipe:
- i@air|i@air|i@air
- Mithril|i@air|Mithril
- Mithril|i@air|Mithril
color: navy
ReplaceBlock:
Type: Task
Script:
- wait 1
- modifyblock %2% %4%
- wait %1%
- modifyblock %2% %3%