Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pest Control Calculator

Featured Replies

Submitted by website user Pushee. Leaving this here ...

 

You need to add some form of truncate function (cuts off the decimal) to the following equation on the Pest Control Calculator. I believe the Javascript function is "floor()".

 

var xpPerPoint = Math.floor(((curLvl * curLvl) / 600) * data[skill][4]) * bonus); // Points per ticket for the theoretical level

var xpPerPoint = Math.floor((floor((curLvl * curLvl) / 600) * data[skill][4]) * bonus); // Points per ticket for the theoretical level

 

Because when I'm level 34, your equation say that I'm getting 67xp per point. Which then tells me I need 33 points to level up to 35, But in reality, I need 62.

 

34 * 34 = 1156 / 600 = 1.926 * 35 = 67

Where as... 34 * 34 = 1156 / 600 = 1.926 -> floor() = 1 * 35 = 35

 

 

A week or two ago I submitted a correction for the Pest Control Calculator. You guys did not put the Math.floor command in the right spot' date=' so it's still not working properly. Every level from 25 to 34 will earn the player 35xp per point (disregarding bonus), not 67xp for level 34. Please note the placements of the parenthesis () in the code below!

 

Current code: Line 287: var xpPerPoint = Math.floor((((curLvl * curLvl) / 600) * data[skill'][4]) * bonus); // Points per ticket for the theoretical level

Needs to be: var xpPerPoint = ((Math.floor((curLvl * curLvl) / 600) * data[skill][4]) * bonus); // Points per ticket for the theoretical level

  • Author

All good now.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.