Advertisement
Guest User

Diamondhunt

a guest
Aug 30th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. function eatFood(food)
  2. {
  3. var timeItTakes = 0;
  4. var energyGains = 0;
  5. var exploringLevel = getLevel(exploringXp);
  6.  
  7. if(food == "potato")
  8. {
  9. timeItTakes = 1;
  10. energyGains = 5000;
  11. }
  12.  
  13.  
  14. var textToShow = "<div class='basic-smallbox'><b>+" + energyGains + " Energy</b><br />Over " + timeItTakes + " minutes.</div>";
  15.  
  16. if(exploringLevel == 1)
  17. textToShow = "Feeding your explorers will give them energy. Note that you cannot eat two things at a time.<br /><br />" + textToShow;
  18.  
  19. openDialogue("Energy++;",textToShow,"EAT_FOOD=" + food);
  20. }
  21.  
  22. function explore(areaChosen)
  23. {
  24. openDialogue("Confrim","Send your explorers to examine the " + areaChosen + "?","EXPLORE=" + areaChosen);
  25. }
  26.  
  27. function explorerTick()
  28. {
  29. //explorer status
  30. var energyElement = document.getElementById("energy-amount");
  31. var statusElement = document.getElementById("explorer-status");
  32.  
  33. statusElement.innerHTML = "";
  34. energyElement.innerHTML = "Energy: " + energy;
  35.  
  36. if(eatingTimer > 0)
  37. {
  38. var minLeft = parseInt(eatingTimer / 60);
  39. statusElement.innerHTML = "("+eatingTimer+")";
  40. }
  41. if(exploringTimer > 0)
  42. {
  43. var minLeft = parseInt(exploringTimer / 60) + 1;
  44. statusElement.innerHTML = "<span style='font-size:10pt;'>("+exploringTimer+")</span>";
  45. }
  46.  
  47. }
  48.  
  49. //d0n4te sum g0ld t0 safe on DH f0r th1s c0de pl0x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement