(assign, ":lb", [first party]),
(assign, ":ub", [last party]),
(try_for_range, ":iteration", ":lb", ":ub"),
(is_between, ":iteration", ":lb", ":ub"), # to coax the MS into accepting the code
(store_random_in_range, ":center_smaller_than_town", ":lb", ":ub",
(this_or_next|party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_village),
(party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_castle),
[do your stuff]
(assign, ":ub", ":lb"), # to break the loop when you're finished
(try_end),
(assign, ":ub", [last party]),
(try_for_range, ":iteration", ":lb", ":ub"),
(is_between, ":iteration", ":lb", ":ub"), # to coax the MS into accepting the code
(store_random_in_range, ":center_smaller_than_town", ":lb", ":ub",
(this_or_next|party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_village),
(party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_castle),
[do your stuff]
(assign, ":ub", ":lb"), # to break the loop when you're finished
(try_end),