Advertisement
Georggi

Untitled

Feb 7th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. ave_item_float = (first_item_count * (
  2. (min(weapon_class.max_float,
  3. qualityranges[item_quality]) + (
  4. weapon_class.min_float if item_quality == 0 else max(
  5. qualityranges[item_quality - 1],
  6. weapon_class.min_float))) / 2) +
  7. second_item_count * (
  8. (min(weapon_class2.max_float,
  9. qualityranges[item_quality2]) + (
  10. weapon_class2.min_float if item_quality2 == 0 else max(
  11. qualityranges[item_quality2 - 1],
  12. weapon_class2.min_float))) / 2)) / 10
  13. total_end_value = 0
  14. end_item_not_found = False
  15. for item1 in first_item_results:
  16. real_float = item1.min_float + (item1.max_float - item1.min_float)*ave_item_float
  17. end_quality = -1
  18. for i in range(0, len(qualityranges)):
  19. if real_float <= qualityranges[i]:
  20. end_quality = i
  21. break
  22. if end_quality not in item1.weapons:
  23. end_item_not_found = True
  24. break
  25. total_end_value += first_item_chance*item1.weapons[end_quality][0]
  26. #print(item1.name, end_quality, first_item_chance, item1.min_float, item1.max_float, item1.weapons[end_quality][0])
  27. for item1 in second_item_results:
  28. real_float = item1.min_float + (item1.max_float - item1.min_float) * ave_item_float
  29. end_quality = -1
  30. for i in range(0, len(qualityranges)):
  31. if real_float <= qualityranges[i]:
  32. end_quality = i
  33. break
  34. if end_quality not in item1.weapons:
  35. end_item_not_found = True
  36. break
  37. total_end_value += second_item_chance * item1.weapons[end_quality][0]
  38. #print(item1.name, end_quality, second_item_chance, item1.min_float, item1.max_float, item1.weapons[end_quality][0])
  39. if end_item_not_found:
  40. break
  41. #print(total_value, total_end_value)
  42. if total_end_value/total_value > 1.2 and total_value < 100:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement