Sorry, the % actually returns the reminder (I use to get them mixed up in another programming language), instead we have to check how many times it can be divided with 3 and then floor that value before multiplying it with the 100.
It should calculate a bonus 100 gold for every 3rd month with this:
raw USERNOTICE:*:{
if ($msgtags(room-id).key == 12665) && (resub isin $msgtags) {
if (($msgtags(msg-param-months).key) >= 3) {
msg $1 !bonus $msgtags(display-name).key $calc( 500 + 100 * ( $floor( $calc( $msgtags(msg-param-months).key / 3 ) - 1 ) ) )
}
}
}
EDIT: added a -1 since if it starts at 3, then 3/3 will will give a bonus 100 right away
Could also start it at 400 as an alternative:
$calc( 400 + 100 * ( $floor( $calc( $msgtags(msg-param-months).key / 3 ) ) ) )
Not sure if I need the extra $calc there