diff --git a/src/pregmod/theCattleRanch.tw b/src/pregmod/theCattleRanch.tw
index df5d538c5b478c7c7b1785f6034658f9779c19ce..c3a781b99f235bdf3527277770da0dbaa80bab40 100644
--- a/src/pregmod/theCattleRanch.tw
+++ b/src/pregmod/theCattleRanch.tw
@@ -23,20 +23,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other cows to order"|The Cattle Ranch][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TCR.schoolSale = 0, $TCR.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TCR.schoolSale = 0, $TCR.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $his + " and finish your order of cattle"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TCR.schoolSale = 0, $TCR.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another cow"|The Cattle Ranch][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of cattle|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
\ No newline at end of file
+<<buyingFromSchoolControls $TCR "cow" "cattle">>
diff --git a/src/pregmod/theHippolytaAcademy.tw b/src/pregmod/theHippolytaAcademy.tw
index 64e6a41fbdb10483706cc8f073d6de696678cebb..e98bbd741df1ecb28bc3d421185f3f48bcce8b77 100644
--- a/src/pregmod/theHippolytaAcademy.tw
+++ b/src/pregmod/theHippolytaAcademy.tw
@@ -32,20 +32,4 @@ The Hippolyta Academy is one of the most famous slave bodyguarding schools in al
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|The Hippolyta Academy][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $HA.schoolSale = 0, $HA.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $HA.schoolSale = 0, $HA.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $HA.schoolSale = 0, $HA.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|The Hippolyta Academy][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $HA "slave" "slaves">>
diff --git a/src/pregmod/wetwareCPUs.tw b/src/pregmod/wetwareCPUs.tw
index 2ca8c4f05ed4384db6dcaa8f9b47356832285829..897709070d036f9a1a2a485e1793dbf270c11d80 100644
--- a/src/pregmod/wetwareCPUs.tw
+++ b/src/pregmod/wetwareCPUs.tw
@@ -18,20 +18,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|Wetware CPUs][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|Wetware CPUs][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromMarketControls>>
diff --git a/src/uncategorized/corporateMarket.tw b/src/uncategorized/corporateMarket.tw
index 019fcb19cdb7e2a24a7712c74a6b48023d0e1f06..45018c9a56e86747c29e5d9d34b379b2e1c11c88 100644
--- a/src/uncategorized/corporateMarket.tw
+++ b/src/uncategorized/corporateMarket.tw
@@ -82,22 +82,11 @@ while you browse.
 	<<set $slaveCost *= 0.9>>
 <</if>>
 
-<<setLocalPronouns $activeSlave>>
 <<set $slaveCost = 500*Math.trunc($slaveCost/500)>>
 The offered price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 <br>
-<<if $cash >= $slaveCost>>
-	[["Buy " + $his + " slave contract"|New Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave),$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main"]]
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>
-[["Decline to purchase " + $him + " and check out another slave"|Corporate Market][$slavesSeen += 1]]
-
-<br><br>
-<<set $saleDescription = 1, $applyLaw = 1>><<include "Long Slave Description">>
-
-<br><br>
+<<setLocalPronouns $activeSlave>>
+<<buyingFromMarketControls>>
 
 <<link "End corporate slave sales here and return this sector to standard markets">>
 	<<set $corpMarket = 0>>
diff --git a/src/uncategorized/growthResearchInstitute.tw b/src/uncategorized/growthResearchInstitute.tw
index 7d07b9231ad4a7b2c3c085cc18337af803df8b7f..98dda618e00f3c8252213d59949d67422ee4067d 100644
--- a/src/uncategorized/growthResearchInstitute.tw
+++ b/src/uncategorized/growthResearchInstitute.tw
@@ -24,21 +24,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|Growth Research Institute][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $GRI.schoolSale = 0, $GRI.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $GRI.schoolSale = 0, $GRI.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $GRI.schoolSale = 0, $GRI.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|Growth Research Institute][$slavesSeen += 1]]
-
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $GRI "slave" "slaves">>
diff --git a/src/uncategorized/lecoleDesEnculees.tw b/src/uncategorized/lecoleDesEnculees.tw
index c455ccaadab7b6451728db8283b8c74b628faa9c..9ae5f97efaee15da4b252ed127ff9a8da678619a 100644
--- a/src/uncategorized/lecoleDesEnculees.tw
+++ b/src/uncategorized/lecoleDesEnculees.tw
@@ -23,20 +23,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|L'École des Enculées][cashX(forceNeg($slaveCost), "slaveTransaction"), $LDE.schoolSale = 0, $LDE.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][cashX(forceNeg($slaveCost), "slaveTransaction"), $LDE.schoolSale = 0, $LDE.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][cashX(forceNeg($slaveCost), "slaveTransaction"), $LDE.schoolSale = 0, $LDE.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|L'École des Enculées][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $LDE "slave" "slaves">>
diff --git a/src/uncategorized/slaveMarkets.tw b/src/uncategorized/slaveMarkets.tw
index c1ccf6a13e81f047259473cbba3f5b9324805d80..27f194b12bd43ce6f039e538d0835cde3af35eed 100644
--- a/src/uncategorized/slaveMarkets.tw
+++ b/src/uncategorized/slaveMarkets.tw
@@ -195,23 +195,4 @@ You visit the slave markets off the arcology plaza. It's always preferable to ex
 The offered price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|Slave Markets][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave),$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|Slave Markets][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<if $slaveMarket != "indentures" && $slaveMarket != "neighbor" && $slaveMarket != "heap" && $slaveMarket != "wetware">>
-	<<set $applyLaw = 1>>
-<</if>>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromMarketControls>>
diff --git a/src/uncategorized/stClaverPreparatory.tw b/src/uncategorized/stClaverPreparatory.tw
index 140fd159c10e3708d81ab5a6ac6e6d33a299b68b..60af457651ac64016fc1058399f96254081be721 100644
--- a/src/uncategorized/stClaverPreparatory.tw
+++ b/src/uncategorized/stClaverPreparatory.tw
@@ -23,20 +23,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|St. Claver Preparatory][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $SCP.schoolSale = 0, $SCP.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $SCP.schoolSale = 0, $SCP.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $SCP.schoolSale = 0, $SCP.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|St. Claver Preparatory][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $SCP "slave" "slaves">>
diff --git a/src/uncategorized/theFutanariSisters.tw b/src/uncategorized/theFutanariSisters.tw
index 07b8e4679e6fca4a97976ceaf1ab142d73e7ea0f..b2780126275b8db06c4b764a4d3535e88388b1c7 100644
--- a/src/uncategorized/theFutanariSisters.tw
+++ b/src/uncategorized/theFutanariSisters.tw
@@ -118,20 +118,4 @@ The Sisters offer a member selected for sale into slavery for inspection via vid
 The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|The Futanari Sisters][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TFS.schoolSale = 0, $TFS.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TFS.schoolSale = 0, $TFS.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TFS.schoolSale = 0, $TFS.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|The Futanari Sisters][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $TFS "slave" "slaves">>
diff --git a/src/uncategorized/theGymnasiumAcademy.tw b/src/uncategorized/theGymnasiumAcademy.tw
index 6af965cc830b2fe96fc110b307ec9a595918660c..7485964441d427598e7a377328f1f7c8eb9ec39d 100644
--- a/src/uncategorized/theGymnasiumAcademy.tw
+++ b/src/uncategorized/theGymnasiumAcademy.tw
@@ -23,20 +23,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|The Gymnasium-Academy][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TGA.schoolSale = 0, $TGA.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TGA.schoolSale = 0, $TGA.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TGA.schoolSale = 0, $TGA.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|The Gymnasium-Academy][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $TGA "slave" "slaves">>
diff --git a/src/uncategorized/theSlavegirlSchool.tw b/src/uncategorized/theSlavegirlSchool.tw
index d356e2914f12f99493b80013b0b472b81f32ba35..f0f4391de8e3205e98e0b72b71e7d835f7188474 100644
--- a/src/uncategorized/theSlavegirlSchool.tw
+++ b/src/uncategorized/theSlavegirlSchool.tw
@@ -23,20 +23,4 @@
 <br><br>The price is <<print cashFormat($slaveCost)>>.<<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
 
 <<setLocalPronouns $activeSlave>>
-<<if $cash >= $slaveCost>>
-	<br>[["Buy " + $him + " and check out other slaves to order"|The Slavegirl School][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TSS.schoolSale = 0, $TSS.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
-	<<if $newSlaves.length == 0>>
-		<br>[["Buy " + $his + " slave contract"|New Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TSS.schoolSale = 0, $TSS.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
-	<<else>>
-		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][$cashX(forceNeg($slaveCost), "slaveTransaction", $activeSlave), $TSS.schoolSale = 0, $TSS.studentsBought += 1, $newSlaves.push($activeSlave)]]
-	<</if>>
-<<else>>
-	//You lack the necessary funds to buy this slave.//
-<</if>>
-<br>[["Decline to purchase " + $him + " and check out another slave"|The Slavegirl School][$slavesSeen += 1]]
-<<if $newSlaves.length > 0>>
-	<br>[[Finish your order of slaves|Bulk Slave Intro]]
-<</if>>
-
-<br><br>
-<<set $saleDescription = 1>><<include "Long Slave Description">>
+<<buyingFromSchoolControls $TSS "slave" "slaves">>
diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw
index c90d1680a1dc3612ce433e9afd473f0b35d09e7a..40f92d0f249448c95c214283885aec0cd0f2b1f7 100644
--- a/src/utility/slaveCreationWidgets.tw
+++ b/src/utility/slaveCreationWidgets.tw
@@ -4783,3 +4783,59 @@
 		/* Closes Entertain */
 		<</switch>>
 <</widget>>
+
+/%
+ % Shows controls for buying and advancing the queue for buying slaves from a school
+ % Arguments: none
+ % Call as <<buyingFromMarketControls>>
+ %/
+<<widget "buyingFromMarketControls">>
+<br>[["Decline to purchase " + $him + " and check out another slave"|passage()][$slavesSeen += 1]]
+<<if $cash >= $slaveCost>>
+	<br>[["Buy " + $him + " and check out other slaves to order"|passage()][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave),$newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
+	<<if $newSlaves.length == 0>>
+		<br>[["Buy " + $his + " slave contract"|New Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave),$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main"]]
+	<<else>>
+		<br>[["Buy " + $him + " and finish your order of slaves"|Bulk Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave), $newSlaves.push($activeSlave)]]
+	<</if>>
+<<else>>
+	<br>//You lack the necessary funds to buy this slave.//
+<</if>>
+<<if $newSlaves.length > 0>>
+	<br>[[Finish your order of slaves|Bulk Slave Intro]]
+<</if>>
+<br><br>
+<<if $slaveMarket != "indentures" && $slaveMarket != "neighbor" && $slaveMarket != "heap" && $slaveMarket != "wetware">>
+	<<set $applyLaw = 1>>
+<</if>>
+<<set $saleDescription = 1>><<include "Long Slave Description">>
+<</widget>>
+
+/%
+ % Shows controls for buying and advancing the queue for buying slaves from a school
+ % Arguments:
+ % 0: school
+ % 1: name for a single slave ("slave", "cow", etc.)
+ % 2: name for a bunch of them ("slaves", "cattle", etc.)
+ % Call as <<buyingFromSchoolControls $TCR "cow" "cattle">>
+ %/
+<<widget "buyingFromSchoolControls">>
+<br>[["Decline to purchase " + $him + " and check out another " + $args[1]|passage()][$slavesSeen += 1]]
+<<if $cash >= $slaveCost>>
+	<<set _schoolToBuyFrom = $args[0]>>
+	<br>[["Buy " + $him + " and check out other " + $args[2] + "s to order"|passage()][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave), _schoolToBuyFrom.schoolSale = 0, _schoolToBuyFrom.studentsBought += 1, $newSlaves.push($activeSlave), $introType = "multi", $slavesSeen+=1]]
+	<<if $newSlaves.length == 0>>
+		<br>[["Buy " + $his + " slave contract"|New Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave), _schoolToBuyFrom.schoolSale = 0, _schoolToBuyFrom.studentsBought += 1, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main"]]
+	<<else>>
+		<br>[["Buy " + $him + " and finish your order of " + $args[3]|Bulk Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave), _schoolToBuyFrom.schoolSale = 0, _schoolToBuyFrom.studentsBought += 1, $newSlaves.push($activeSlave)]]
+	<</if>>
+<<else>>
+	<br>//You lack the necessary funds to buy this $args[1].//
+<</if>>
+<<if $newSlaves.length > 0>>
+	<br>[["Finish your order of " + $args[2]|"Bulk Slave Intro"]]
+<</if>>
+
+<br><br>
+<<set $saleDescription = 1>><<include "Long Slave Description">>
+<</widget>>