So far I got this snippet for getting the number of ships of each type:
Code: Select all
$shipm5.arr = get ship array: of race Player class/type = M5
$numbersm5 = size of array $shipm5.arr
$costm5 = $numberm5 * 5000
$maintenance = $maintenance + $costm5
*repeat for all ship classes
Then I got this to "pay" for the upkeep of my ships:
Code: Select all
$money get player money
if $money > $maintenance
$costmain = - $maintenance
add money to player: $costmain
if $money = $maintenance
$costmain = - $maintenance
add money to player: $costmain
send incoming message 'Account at zero' to player: display it = [TRUE]
if $money < maintenance
$minus = - $money
add money to player: $minus
send incoming message 'Lack of funds for maintenance' to player: display it = [TRUE]
Then there's the "repeat once a day" part. Here I'm totally and utterly lost, and have no clue whatsoever. I also need to cobble this together and make the parts cooperate, and that's another part I have no clue about. Here I suspect I basically need someone to do it for me, or at least explain like I'm 5 years old.