Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. setNbrThrown : function(value){
  2. this.nbrThrown = value;
  3.  
  4. // We choose which smiley we want to add at the end of the sentence
  5. if(this.nbrThrown <= 10) smiley = ".";
  6. else if(this.nbrThrown <= 20) smiley = "...";
  7. else if(this.nbrThrown <= 30) smiley = "...?";
  8. else if(this.nbrThrown <= 40) smiley = "...? <tt>:|</tt>";
  9. else if(this.nbrThrown <= 50) smiley = "...? <tt>:/</tt>";
  10. else if(this.nbrThrown <= 60) smiley = "...? <tt>:(</tt>";
  11. else if(this.nbrThrown <= 70) smiley = "...? <tt>:[</tt>";
  12. else if(this.nbrThrown <= 80) smiley = "...? <tt>:{</tt>";
  13. else if(this.nbrThrown <= 90) smiley = "...? <tt>:'(</tt>";
  14. else smiley = "...? <tt>(;_;)</tt>";
  15.  
  16. if(this.nbrThrown != 1) htmlInteraction.setInnerHtml("candies_thrown", "You threw " + this.nbrThrown + " candies on the ground" + smiley);
  17. else htmlInteraction.setInnerHtml("candies_thrown", "You threw 1 candy on the ground" + smiley);
  18. htmlInteraction.setElementVisibility("candies_thrown", true);
  19. },
  20.  
  21. bug2: function() {
  22. var rndrnd;
  23. if (lollipops.nbrOwned >= 10000000) {
  24. lollipops.setNbrOwned(lollipops.nbrOwned - 10000000);
  25. switch (random.getRandomIntUpTo(2)) {
  26. case 0:
  27. candies.setNbrOwned(candies.nbrOwned + candies.nbrThrown);
  28. htmlInteraction.setInnerHtml("computer_comment_2", "You picked up all candies you have thrown on the floor. (" + candies.nbrThrown + ")");
  29. candies.setNbrThrown(0);
  30. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement