»
EnglishFrenchVietnamese

Print - Pancake Shop Management - JavaScriptBank.com

Full version: jsB@nk » Game » Pancake Shop Management
URL: https://www.javascriptbank.com/pancake-shop-management-index.html

Pancake Shop Management © JavaScriptBank.comYou bought a PanCake Shop. How is your management skill?

Full version: jsB@nk » Game » Pancake Shop Management
URL: https://www.javascriptbank.com/pancake-shop-management-index.html



JavaScript
<SCRIPT>HelpLine="PanCake Shop Management Game!\n________________________________\nby Kien Caoxuan www.caoxuan.com"HelpLine+="\n\nSo you bought a pancake joint and hope you'd make it."HelpLine+="\nIt's easy enough. Buy the eggs, butter and sugar from the shop,"HelpLine+="\nput 3 eggs, 2 butter and one sugar in the pan  to make 1 pancake."HelpLine+="\nThen press the 'make pancake' button then 'sell it!'... Easy?"HelpLine+="\nBut (!) you have to pay rent and taxes, and the money continues ot drain."HelpLine+="\nIf more than 10 customers are waiting, they'll all leave and"HelpLine+="\nyou get bad review on the paper. The more times you let them leave," HelpLine+="\nthe longer you'll have to for them to come back...\nGoal : You can sell the shop if you get $750!"HelpLine+="\n\nGoodluck to you!"HelpLine+="\nAnd thank you for taking over the lease and the shop...Hehehe!\n\nKien"function Pays(i,m){document.F.Money.value=parseInt(document.F.Money.value)-mdocument.F["Ing"+i].value=10+parseInt(document.F["Ing"+i].value)}function Cooks(i){if(parseInt(document.F["Ing"+i].value)<1)returndocument.F["PIng"+i].value=parseInt(document.F["PIng"+i].value)+1document.F["Ing"+i].value=parseInt(document.F["Ing"+i].value)-1}function Pancake(){Perf=1for(pn=0;pn<3;pn++){if(parseInt(document.F["PIng"+pn].value)!=(3-pn))Perf=0}if(Perf==1)document.F.SellIt.value="OK! SELL IT!"else document.F.SellIt.value="YUK! BAD CAKE!"for(pn=0;pn<3;pn++){document.F["PIng"+pn].value=0}}function Sell(v){if(document.F.Customers.value<1){alert("No customers in the shop!");return}if(v=="OK! SELL IT!"){Cust--document.F.Customers.value=(Cust<0)?0:CustMony+=25document.F.Money.value=Monydocument.F.SellIt.value="MAKE MORE!"}}function Init(){Over=0document.F.reset()t=0Cust=0Wait=0Mony=500Game=setInterval('Timer()',3000)}function Timer(){t++Cust++Mony-=10if(Mony<10)GameOver(0)if(Mony>750)GameOver(1)document.F.Money.value=Monyif(Cust>10){Wait++Cust=-2*Wait}document.F.Customers.value=(Cust<0)?0:Custdocument.F.Satis.value=10-Wait}function GameOver(w){Over=1clearInterval('Game')alert((w==1)?"You made a thousand bucks!":"Sorry! Your shop is gone!")if(confirm("Play again?"))Init()else location="http://www.caoxuan.com/zip4free/request.html"}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=Init()><FORM name=F><TABLE cellPadding=4 border=2>  <TBODY>  <TR>    <TD align=middle colSpan=3><FONT size=5>Buy from shops</FONT> (Each click buys 10)     <TD align=right rowSpan=4>Money left <INPUT size=10 value=500 name=Money>       <P>Eggs <INPUT size=10 value=0 name=Ing0><BR>Butter <INPUT size=10 value=0       name=Ing1><BR>Sugar <INPUT size=10 value=0 name=Ing2><BR>      <P>Eggs on Pan <INPUT size=10 value=0 name=PIng0><BR>Butter on Pan <INPUT       size=10 value=0 name=PIng1><BR>Sugar on Pan <INPUT size=10 value=0       name=PIng2><BR>      <P>Customers <INPUT size=10 name=Customers>      <P>Paper Review <INPUT size=10 name=Satis> </P>  <TR>    <TD align=middle><B>Eggs ($50 for 10)</B>      <P><A onclick=Pays(0,50)       href="index.html#"><IMG       src="shopeggs.gif"       border=0></A> </P>    <TD align=middle><B>Butter ($30 for 10 cups)</B>      <P><A onclick=Pays(1,30)       href="index.html#"><IMG       src="shopbutter.gif"       border=0></A> </P>    <TD align=middle><B>Sugar ($10 for 10 spoons)</B>      <P><A onclick=Pays(2,10)       href="index.html#"><IMG       src="shopsugar.gif"       border=0></A> </P>  <TR>    <TD align=middle colSpan=3><FONT size=5>Put in Pan</FONT> (Each click puts in pan one)   <TR>    <TD align=middle><B>3 eggs</B>      <P><A onclick=Cooks(0)       href="index.html#"><IMG       src="paneggs.gif"       border=0></A> </P>    <TD align=middle><B>2 cups of butter</B>      <P><A onclick=Cooks(1)       href="index.html#"><IMG       src="panbutter.gif"       border=0></A> </P>    <TD align=middle><B>1 spoon of sugar</B>      <P><A onclick=Cooks(2)       href="index.html#"><IMG       src="pansugar.gif"       border=0></A> </P>  <TR>    <TD align=middle><INPUT style="WIDTH: 175px" onclick=Pancake() type=button value="MAKE PANCAKE" name=CSugar width="150">     <TD><INPUT style="WIDTH: 175px" onclick=alert(HelpLine) type=button width="150">     <TD><INPUT style="WIDTH: 175px" onclick=Sell(this.value) type=button value="SELL PANCAKE" name=SellIt width="150">     <TD><INPUT style="WIDTH: 175px" onclick=alert(HelpLine) type=button value=HINTS name=HelpButton width="150">   </TR></TBODY></TABLE></FORM></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/game/Pancake_Shop_Management/Pancake_Shop_Management_images.zip