»
EnglishFrenchVietnamese

Print - Crazy Lego Man Game - JavaScriptBank.com

Full version: jsB@nk » Game » Skill » Crazy Lego Man Game
URL: https://www.javascriptbank.com/crazy-lego-man-game-index.html

Crazy Lego Man Game © JavaScriptBank.comTest your skill. How many cash buttons can you check in many level?

Full version: jsB@nk » Game » Skill » Crazy Lego Man Game
URL: https://www.javascriptbank.com/crazy-lego-man-game-index.html



JavaScript
<SCRIPT language=javascript>function setdiff() {var dif = prompt("Difficulty?","Type lowercase easy, medium, or hard");if(dif == "easy") {document.nums.dif.value = "EASY";}else if(dif == "medium") {document.nums.dif.value = "MEDIUM";}else if(dif == "hard") {document.nums.dif.value = "HARD";}else {alert("That isn't a level of difficulty");setdiff();}}function moveit() {if(document.nums.dif.value == "EASY") {var d = 600;}else if(document.nums.dif.value == "MEDIUM") {var d = 400;}else if(document.nums.dif.value == "HARD") {var d = 200;}else {alert("You must first set a difficulty");setdiff();}if(document.nums.pass.value == "1") {var x = 1;}else {var x = 3;}if(document.layers) {  document.truck.left += x;  if(document.truck.left > d) {  document.truck.left = 0;   }   }   else if(document.all) {  truck.style.left = parseInt(truck.style.left) + x;  if(parseInt(truck.style.left) > d) {   truck.style.left = 0;   }   }      if((document.all) || (document.layers)) {    var time = setTimeout("moveit()", 100);   }   }   function addone() {   var x = document.nums.num.value;   x++;   document.nums.num.value = x;   if(x == 5) {   alert("You are a lutenant cursor!");   document.nums.status.value="lutenant";   }   if(x == 10) {   alert("You are a captain cursor!");   document.nums.status.value="Captain";   }   if(x == 15) {   ALERT("You are a general cursor");   document.nums.status.value="General!";   }   if(x == 20) {   alert("You are a 5 star general cursor!");   document.nums.status.value="5 Star General!!!";   }   if(x == 25) {   alert("You WIN!");   alert("You are a MASTER CURSOR!");   document.nums.status.value="MASTER CURSOR!!!!!!!";   }   }   function setpass() {   var pass = prompt("Password?","");   if(pass == "ultraeasy13") {     document.nums.pass.value = "1"; } }    </SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<DIV id=truck style="LEFT: 0px; POSITION: relative; TOP: 0px">  <IMG onclick="moveit(); addone();" src="captan.gif" width="45" height="68"> <FORM name=nums>  <INPUT onclick="alert('Dont click this, or you would be a cheater!')" value=0 name=num size="20"> </DIV>Status:<INPUT value=private name=status size="20"> Difficulty:<INPUT onclick=setdiff() type=button value=SET name=dif> Password<INPUT onclick=setpass() type=button value=SET name=pass> </FORM><!--    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/Crazy_Lego_Man_Game/captan.gif