on step on pressure plate:
if event-block is a iron pressure plate:
if block below event-location is iron block:
set {_n} to a random integer between 1 and 25
if {_n} is 25:
set {_n} to a random integer between 26 and 75
if {_n} is 75:
set {_n} to a random integer between 76 and 100
if {_n} is between 1 and 24:
give player iron nugget named "&fIron Nugget" with lore "This is worth 1¢"
if player has 50 iron nugget named "&fIron Nugget" with lore "This is worth 1¢" in inventory:
remove 50 iron nugget named "&fIron Nugget" with lore "This is worth 1¢" from player's inventory
give 1 white dye named "&fIron Chunk" with lore "This is worth 50¢" to player
if {_n} is between 26 and 74:
give player white dye named "&fIron Chunk" with lore "This is worth 50¢"
if {_n} is between 76 and 99:
send "&fThat was a &51/1875 &fchanse to get!"
give player iron ingot named "&fIron Ingot" with lore "This is worth 20$"
if {_n} is 100:
make console execute command "/say &fSOMEONE JUST GOT A IRON BLOCK WHICH IS A &51/46875 &fCHANSE TO GET!"
give player iron block named "&fIron Block" with lore "This is worth 400$"
Posted by: cleisss from the skUnity Discord. View the thread on skUnity Discord here
if event-block is a iron pressure plate:
if block below event-location is iron block:
set {_n} to a random integer between 1 and 25
if {_n} is 25:
set {_n} to a random integer between 26 and 75
if {_n} is 75:
set {_n} to a random integer between 76 and 100
if {_n} is between 1 and 24:
give player iron nugget named "&fIron Nugget" with lore "This is worth 1¢"
if player has 50 iron nugget named "&fIron Nugget" with lore "This is worth 1¢" in inventory:
remove 50 iron nugget named "&fIron Nugget" with lore "This is worth 1¢" from player's inventory
give 1 white dye named "&fIron Chunk" with lore "This is worth 50¢" to player
if {_n} is between 26 and 74:
give player white dye named "&fIron Chunk" with lore "This is worth 50¢"
if {_n} is between 76 and 99:
send "&fThat was a &51/1875 &fchanse to get!"
give player iron ingot named "&fIron Ingot" with lore "This is worth 20$"
if {_n} is 100:
make console execute command "/say &fSOMEONE JUST GOT A IRON BLOCK WHICH IS A &51/46875 &fCHANSE TO GET!"
give player iron block named "&fIron Block" with lore "This is worth 400$"
Posted by: cleisss from the skUnity Discord. View the thread on skUnity Discord here