Commit 9fd70ce2 authored by Atsukio's avatar Atsukio 🐬

Mob, Smelt and Socket

- Updated the way lore works since lore's are now objects
- Added instructions to books
- Shortened some code
parent 6ddbb9dc
......@@ -50,13 +50,13 @@ on damage of player:
on death:
if victim's name contains "&cZombiy":
chance of 5%:
drop 1 enchanted book named "Book of Smelting lv.3" with lore "&r&6AutoSmelt||&r&6Tier 3" at victim
drop 1 enchanted book named "Book of Smelting lv.3" with lore "Right click while holding this book and then" and "right click a pickaxe that has been socketed" and "by a book of socketing" and "&r&6AutoSmelt" and "&r&6Tier 3" at victim
stop
chance of 10%:
drop 1 enchanted book named "Book of Smelting lv.2" with lore "&r&6AutoSmelt||&r&6Tier 2" at victim
drop 1 enchanted book named "Book of Smelting lv.2" with lore "Right click while holding this book and then" and "right click a pickaxe that has been socketed" and "by a book of socketing" and "&r&6AutoSmelt" and "&r&6Tier 2" at victim
stop
chance of 50%:
drop 1 enchanted book named "Book of Smelting lv.1" with lore "&r&6AutoSmelt||&r&6Tier 1" at victim
drop 1 enchanted book named "Book of Smelting lv.1" with lore "Right click while holding this book and then" and "right click a pickaxe that has been socketed" and "by a book of socketing" and "&r&6AutoSmelt" and "&r&6Tier 1" at victim
stop
on death:
......@@ -66,7 +66,7 @@ on death:
stop
if victim is zombie:
chance of 0.5%:
drop 1 enchanted book named "Book of Socketing" with lore "Adds one socket slot to your item" at victim
drop 1 enchanted book named "Book of Socketing" with lore "Right click while holding this book and then" and "right click a tool or weapon to add a socket" and "Adds one socket slot to your item" at victim
on spawn:
if event-entity is a zombie or a skeleton or a blaze or a spider or a silverfish or a cave spider:
......
......@@ -5,8 +5,9 @@
#
on right click with pickaxe or shovel or axe:
if lore of player's tool contains "&r&aAutoSmelt":
add lore of player's tool split at "||" to {_lore::*}
if "%lore of player's tool%" contains "&r&aAutoSmelt":
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt I":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1) parsed as number
......@@ -128,7 +129,7 @@ on right click with pickaxe or shovel or axe:
on mine:
if player is holding a pickaxe:
if lore of player's tool contains "&r&aAutoSmelt":
if "%lore of player's tool%" contains "&r&aAutoSmelt":
if event-block is iron ore:
cancel event
set block to air
......@@ -143,7 +144,8 @@ on mine:
damage player's tool by 1
else:
damage player's tool by 1
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1) parsed as number
......@@ -191,7 +193,8 @@ on mine:
damage player's tool by 1
else:
damage player's tool by 1
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1) parsed as number
......@@ -239,7 +242,8 @@ on mine:
damage player's tool by 1
else:
damage player's tool by 1
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1) parsed as number
......@@ -285,7 +289,8 @@ on mine:
damage player's tool by 1
else:
damage player's tool by 1
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1) parsed as number
......@@ -329,7 +334,8 @@ on mine:
damage player's tool by 1
else:
damage player's tool by 1
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1) parsed as number
......@@ -362,7 +368,8 @@ on mine:
if player is holding an axe:
if lore of player's tool contains "&r&aAutoSmelt":
if event-block is a log or a acacia log or a dark oak log:
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
cancel event
set block to air
if player's tool is enchanted with unbreaking 1:
......@@ -413,8 +420,9 @@ command /toggleautosmelt:
usage: /tas
executable by: players
trigger:
if lore of player's tool contains "&r&aAutoSmelt":
add lore of player's tool split at "||" to {_lore::*}
if "%lore of player's tool%" contains "&r&aAutoSmelt":
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt I":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1)
......@@ -430,8 +438,9 @@ command /toggleautosmelt:
set line {_number} of lore of player's tool to "&r&8AutoSmelt III &o&7[%{_durability}%/288]"
message "[PotatoSmelt] AutoSmelt disabled"
stop
if lore of player's tool contains "&r&8AutoSmelt":
add lore of player's tool split at "||" to {_lore::*}
if "%lore of player's tool%" contains "AutoSmelt":
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt I":
set {_durability} to subtext of {_lore::%loop-index%} from (first index of "[" in {_lore::%loop-index%} + 1) to (first index of "/" in {_lore::%loop-index%} - 1)
......
......@@ -7,15 +7,17 @@
command /noitemautosmelt1:
permission: test.ting
trigger:
give player 1 enchanted book named "Book of Smelting lv.1" with lore "&r&6AutoSmelt||&r&6Tier 1"
set {_book} to 1 enchanted book named "Book of Smelting lv.1" with lore "Right click while holding this book and then" and "right click a pickaxe that has been socketed" and "by a book of socketing" and "&r&6AutoSmelt" and "&r&6Tier 1"
give player {_book}
command /noitemsocket:
permission: test.ting
trigger:
give player 1 enchanted book named "Book of Socketing" with lore "Adds one socket slot to your item"
give player 1 enchanted book named "Book of Socketing" with lore "Right click while holding this book and then" and "right click a tool or weapon to add a socket" and "Adds one socket slot to your item"
on right click with enchanted book:
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
loop {_lore::*}:
if "%loop-value%" contains "Adds one socket slot to your item":
set {psocket.bookofsocketing.%player%} to 1
......@@ -56,7 +58,8 @@ on right click with enchanted book:
on right click:
if player's tool is pickaxe or shovel or axe:
if {psocket.bookofsmelting.%player%} is 1:
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
set {_check} to 0
loop {_lore::*}:
if "%loop-value%" contains "AutoSmelt":
......@@ -107,7 +110,8 @@ on right click:
stop loop
if player's tool is sword or pickaxe or shovel or axe:
if {psocket.bookofsocketing.%player%} is 1:
add lore of player's tool split at "||" to {_lore::*}
set {_lore::*} to lore of player's tool
# add lore of player's tool split at "||" to {_lore::*}
if {_lore::*} is set:
loop {_lore::*}:
if "%loop-value%" contains "&f○" or "&a●":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment