Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ave_item_float = (first_item_count * (
- (min(weapon_class.max_float,
- qualityranges[item_quality]) + (
- weapon_class.min_float if item_quality == 0 else max(
- qualityranges[item_quality - 1],
- weapon_class.min_float))) / 2) +
- second_item_count * (
- (min(weapon_class2.max_float,
- qualityranges[item_quality2]) + (
- weapon_class2.min_float if item_quality2 == 0 else max(
- qualityranges[item_quality2 - 1],
- weapon_class2.min_float))) / 2)) / 10
- total_end_value = 0
- end_item_not_found = False
- for item1 in first_item_results:
- real_float = item1.min_float + (item1.max_float - item1.min_float)*ave_item_float
- end_quality = -1
- for i in range(0, len(qualityranges)):
- if real_float <= qualityranges[i]:
- end_quality = i
- break
- if end_quality not in item1.weapons:
- end_item_not_found = True
- break
- total_end_value += first_item_chance*item1.weapons[end_quality][0]
- #print(item1.name, end_quality, first_item_chance, item1.min_float, item1.max_float, item1.weapons[end_quality][0])
- for item1 in second_item_results:
- real_float = item1.min_float + (item1.max_float - item1.min_float) * ave_item_float
- end_quality = -1
- for i in range(0, len(qualityranges)):
- if real_float <= qualityranges[i]:
- end_quality = i
- break
- if end_quality not in item1.weapons:
- end_item_not_found = True
- break
- total_end_value += second_item_chance * item1.weapons[end_quality][0]
- #print(item1.name, end_quality, second_item_chance, item1.min_float, item1.max_float, item1.weapons[end_quality][0])
- if end_item_not_found:
- break
- #print(total_value, total_end_value)
- if total_end_value/total_value > 1.2 and total_value < 100:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement