avt.qsrc 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. # avt
  2. tehNT = car['potential_new_condition']
  3. if tehNT = 0: tehNT = 200
  4. tehT = rand(10, tehNT)
  5. !! i could replace all tehT and tehNT with appropriate car[] variables but then the code gets even less readable
  6. if tehT >= tehNT * 75 / 100:$tehT = 'The car looks like it''s in excellent condition.'
  7. if tehT < tehNT * 75 / 100 and tehT >= tehNT * 50 / 100:$tehT = 'When you turn on the car, the engine makes some noise.'
  8. if tehT < tehNT * 50 / 100 and tehT >= tehNT * 25 / 100:$tehT = 'When you turn on the car, the engine rumbles and smokes.'
  9. if tehT < tehNT * 25 / 100:$tehT = 'You''re not sure how someone managed to get this piece of junk here.'
  10. if carT = 1:
  11. if tehT >= tehNT * 75 / 100:bupay = rand(100000, 180000)
  12. if tehT < tehNT * 75 / 100 and tehT >= tehNT * 50 / 100:bupay = rand(60000, 130000)
  13. if tehT < tehNT * 50 / 100 and tehT >= tehNT * 25 / 100:bupay = rand(35000, 65000)
  14. if tehT < tehNT * 25 / 100:bupay = rand(15000, 50000)
  15. elseif carT = 2:
  16. if tehT >= tehNT * 75 / 100:bupay = rand(80000, 100000)
  17. if tehT < tehNT * 75 / 100 and tehT >= tehNT * 50 / 100:bupay = rand(50000, 90000)
  18. if tehT < tehNT * 50 / 100 and tehT >= tehNT * 25 / 100:bupay = rand(30000, 60000)
  19. if tehT < tehNT * 25 / 100:bupay = rand(15000, 40000)
  20. end
  21. used_car['<<autotraidF_carnum>>_condition'] = tehT
  22. used_car['<<autotraidF_carnum>>_price'] = bupay
  23. killvar 'bupay'
  24. killvar 'tehNT'
  25. killvar 'tehT'
  26. killvar 'carT'
  27. --- avt ---------------------------------