/% Place your story's setup code in this passage.\nAny macros in this passage will be run before the Start passage (or any passage you wish to Test Play) is run. %/\n<<set $cookbook to { \n Meat_Oil: { name: "Steak", goto: "P5" },\n Meat_Pasta: { name: "Spagetti", goto: "P7" },\n Seafood_Oil: { name: "Fish", goto: "P9" },\n Seafood_Rice: { name: "Paealla", goto: "P12" },\n}>>\n<<set $stock to [ "Meat", "Oil", "Seafood", "Pasta", "Rice" ]>>\n<<set $choice_count to 0>>\n<<set $choice to [-1, -1]>>
Recipie Test\n\n[[Start cooking|Cook]]
Mykael
<<nobr>>\n<<if $choice_count lt 2>><br>Pick you ingredients:\n<<if $choice[0] neq -1>><br><<print $stock[$choice[0]] + " and:">><<endif>>\n<<if $choice[0] neq 0>><br>[[<<print $stock[0]>>|passage()][$choice[$choice_count] to 0;$choice_count += 1]]<<endif>>\n<<if $choice[0] neq 1>><br>[[<<print $stock[1]>>|passage()][$choice[$choice_count] to 1;$choice_count += 1]]<<endif>>\n<<if $choice[0] neq 2>><br>[[<<print $stock[2]>>|passage()][$choice[$choice_count] to 2;$choice_count += 1]]<<endif>>\n<<if $choice[0] neq 3>><br>[[<<print $stock[3]>>|passage()][$choice[$choice_count] to 3;$choice_count += 1]]<<endif>>\n<<if $choice[0] neq 4>><br>[[<<print $stock[4]>>|passage()][$choice[$choice_count] to 4;$choice_count += 1]]<<endif>>\n<<else>>\n<<if $choice[1] gt $choice[2]>><<set $temp to $choice[0];$choice[0] to $choice[1];$choice[1] to $temp>><<endif>>\n<br>You chose <<$stock[$choice[0]]>> and <<$stock[$choice[1]]>>.\n<<set $key to $stock[$choice[0]] + "_" + $stock[$choice[1]]>>\n<<set $meal to $cookbook[$key]>>\n<<if $meal eq 0>><<set $meal to { name: "something disgusting", goto: "P15" }>><<endif>>\n<<print "<br><br>[[You make " + $meal.name + "|" + $meal.goto + "]]">>\n<<endif>>\n<<endnobr>>
Recipie Test