Exemple #1
0
 def xp_needed_to_level_up(self, skill):
     """ Returns xp needed to level up """
     xp = self.xp_lookup(skill)
     if xp == 200000000:
         return 0
     virtual_level = xp_to_level(xp)
     return level_to_xp(virtual_level + 1) - xp
Exemple #2
0
 def closest_level_up(self):
     """ Returns a string of the skill closest to level up """
     ret = ""
     compare = 200000000
     ret_name = ""
     ret_xp = 0
     for (name, lvl, xp, rank) in self.levels:
         xp_needed = level_to_xp(xp_to_level(xp) + 1) - xp
         if xp_needed < compare:
             compare = xp_needed
             ret_name = name
             ret_xp = xp
     return next_level_string(ret_xp, ret_name)
Exemple #3
0
 def laps_to_next_course(self):
     """ Returns number of laps until user can access next course """
     if self.determine_course() == 'Draynor':
         return (level_to_xp(20) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Al Kharid':
         return (level_to_xp(30) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Varrock':
         return (level_to_xp(40) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Canifis':
         return (level_to_xp(50) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Falador':
         return (level_to_xp(60) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Seers':
         return (level_to_xp(70) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Pollniveach':
         return (level_to_xp(80) - self.agility_xp) // self.lap_xp + 1
     elif self.determine_course() == 'Rellekka':
         return (level_to_xp(90) - self.agility_xp) // self.lap_xp + 1
     else:
         return (level_to_xp(99) - self.agility_xp) // self.lap_xp + 1
Exemple #4
0
 def alchs_to_level_up(self):
     """ Returns number of alchs needed to level up """
     needed = level_to_xp(xp_to_level(self.magic_xp) + 1) - self.magic_xp
     return (needed // HIGH_ALCH_XP) + 1
Exemple #5
0
 def xp_needed_to_level_up(self):
     """ Returns the amount of xp needed to level up """
     return level_to_xp(self.agility_level + 1) - self.agility_xp
Exemple #6
0
 def xp_needed_to_level_up(self):
     """ Returns xp needed to level up """
     if self.runecraft_xp == 200000000:
         return 0
     virtual_level = xp_to_level(self.runecraft_xp)
     return level_to_xp(virtual_level + 1) - self.runecraft_xp
Exemple #7
0
 def kills_to_level_up(self):
     remaining = (level_to_xp(self.firemaking_level + 1)) - self.firemaking_xp
     return remaining // self.average()
Exemple #8
0
 def xp_needed_to_level_up(self):
     """ Returns xp needed to level up """
     return level_to_xp(self.slayer_level + 1) - self.slayer_xp