set {_cost} to {@first-genBuyCost}
if (size of {{@variable-prefix}::Generators::*}) < 1:
return {@first-genBuyCost}
else if (size of {{@variable-prefix}::Generators::*}) > 1:
return # Formula Here
I'm trying to make a automatic genBuyCost setter, I don't know what formula to use. Here is the options I made.
options:
variable-prefix: gens
default-GenSlots: 20
default-Multiplier: 1
first-genBuyCost: 100
first-genDropValue: 50
I need to know what formula I should use?
Full Code:
variable-prefix: gens
default-GenSlots: 20
default-Multiplier: 1
first-genBuyCost: 100
first-genDropValue: 50
on first join:
set {{@variable-prefix}::GenSlots::%player's uuid%} to {@default-GenSlots}
set {{@variable-prefix}::Multiplier::%player's uuid%} to {@default-Multiplier}
function registerGenerator(block: block-type, drop: item-type): # Coming Soon
function genBuyCost():
set {_cost} to {@first-genBuyCost}
if (size of {{@variable-prefix}::Generators::*}) < 1:
return {@first-genBuyCost}
else if (size of {{@variable-prefix}::Generators::*}) > 1:
return # Formula Here