$nomention
$reply
$onlyIf[$checkContains[$customID;$authorID]==true;]
$onlyIf[$checkContains[$customID;mslot]==true;]
$c[check which slot was picked]
$if[$customID==mslot1]
$var[slotp;1]
$elseif[$customID==mslot2]
$var[slotp;2]
$elseif[$customID==mslot3]
$var[slotp;3]
$elseif[$customID==mslot4]
$var[slotp;4]
$elseif[$customID==mslot5]
$var[slotp;5]
$elseif[$customID==mslot6]
$var[slotp;6]
$elseif[$customID==mslot7]
$var[slotp;7]
$elseif[$customID==mslot8]
$var[slotp;8]
$elseif[$customID==mslot9]
$var[slotp;9]
$elseif[$customID==mslot10]
$var[slotp;10]
$elseif[$customID==mslot11]
$var[slotp;11]
$elseif[$customID==mslot12]
$var[slotp;12]
$elseif[$customID==mslot13]
$var[slotp;13]
$elseif[$customID==mslot14]
$var[slotp;14]
$elseif[$customID==mslot15]
$var[slotp;15]
$endif
$jsonParse[$getVar[mineloot;$authorID]]
$if[$json[dura]==none]
$jsonSetString[dura;5]
$setVar[mineslots;$jsonStringify;$authorID]
$endif
$jsonParse[$getVar[mineslots;$authorID]]
$if[$json[s$var[slotp]v]==yes]
$c[ roll for ores ]
$jsonParse[$getVar[pickaxestat;$authorID]] $c[add more luck based on the precision pick upgrade]
$if[$json[ptier]==1]
$var[precisionluckbonus;$json[prec]]
$elseif[$json[ptier]==2]
$var[precisionluckbonus;$multi[3;$json[prec]]]
$elseif[$json[ptier]==3]
$var[precisionluckbonus;$multi[5;$json[prec]]]
$endif
$var[luck;$sum[$getVar[luck;$authorID];$var[precisionluckbonus]]
$var[roll;$random[1;10001]]
$c[--- base chances ---]
$var[t1Base;7000] $c[70%]
$var[t2Base;2000] $c[20%]
$var[t3Base;1000] $c[10%]
$c[--- apply luck scaling ---]
$var[t2Bonus;$round[$multi[$var[luck];$divide[$var[t2Base];100]]]]
$var[t3Bonus;$round[$multi[$var[luck];$divide[$var[t3Base];100]]]]
$var[t2;$sum[$var[t2Base];$var[t2Bonus]]]
$var[t3;$sum[$var[t3Base];$var[t3Bonus]]]
$c[ T1 shrinks by the bonuses added to T2 + T3 ]
$var[t1;$sub[$var[t1Base];$sum[$var[t2Bonus];$var[t3Bonus]]]]
$c[--- cumulative ranges ---]
$var[t1End;$var[t1]]
$var[t2End;$sum[$var[t1End];$var[t2]]]
$var[t3End;10000]
$c[--- roll check ---]
$if[$var[roll]<=$var[t1End]]
$var[ore;$randomText[Copper Ore;Iron Ore;Gold Ore]]
$var[otier;<:Tier1:1420697240250617866>]
$var[color;#808080]
$var[ct;t1]
$elseif[$var[roll]<=$var[t2End]]
$var[ore;$randomText[Diamond Ore;Sapphire Ore;Emerald Ore]]
$var[otier;<:Tier2:1420697276783001630>]
$var[color;#008000]
$var[ct;t2]
$else
$var[ore;$randomText[Basilisk Ore;Unholy Ore;Divinity Ore]]
$var[otier;<:Tier3:1420697261276397599>]
$var[color;#FF0000]
$var[ct;t3]
$endif
$endif
$if[$json[s$var[slotp]v]==no]
$var[ore;Coal Ore]
$var[otier;<:Tier1:1420697240250617866>]
$var[color;#808080]
$var[ct;t1]
$endif
$jsonParse[$getVar[mineslots;$authorID]]
$if[$and[$json[s$var[slotp]e]==yes;$json[s$var[slotp]v]==yes]] $c[checks if selected slot has both enemy and veins]
$c[Chooses an enemy]
$var[enemyn;$randomText[Trollge Goblin;The Rake;Re-animated Skeleton;Insane Trollge;Psycho Trollge]]
$var[enemydmg;$random[1;$random[25;61]]]
$var[Final Display;You found a **$var[ore]**! However while you were mining you were hit by an attack from **$var[enemyn]** and you lost **$var[enemydmg] hp**!]
$elseif[$json[s$var[slotp]e]==yes]
$if[$json[s$var[slotp]v]!=yes]
$var[enemyn;$randomText[Trollge Goblin;The Rake;Re-animated Skeleton;Insane Trollge;Psycho Trollge]]
$var[enemydmg;$random[1;$random[25;61]]]
$var[Final Display;Tough luck.. you found nothing valuable AND lost **$var[enemydmg] hp** from battling **$var[enemyn]**... Its fine though atleast you got **$var[ore]**]
$endif
$endif$c[end of roll for ores]
$description[$var[Final Display];3] <-- this is apparently the line that is missing a closing bracket but when I put a closing bracket error changes to "`$if` not closed with `$endif` or invalid use of `$var`"