1
0

initKik 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # initKik
  2. init = speed + reakt
  3. initKoef = init * 20 / 100
  4. initi = rand(initi - initKoef, initi + initKoef)
  5. initV = speedV + reaktV
  6. initKoefV = initV * 20 / 100
  7. initiV = rand(initiV - initKoefV, initiV + initKoefV)
  8. if initi > initiV and hodtime < 3 and ionce = 0 or hodtimeV >= 3 and ionce = 0:
  9. hod = 0
  10. hodtime += 1
  11. if hodtimeV >= 3:hodtimeV = 0
  12. '<font color="green">You took the initiative</font>'
  13. ionce = 1
  14. elseif initi < initiV and hodtimeV < 3 and ionce = 0 or hodtime >= 3 and ionce = 0:
  15. hod = 1
  16. hodtimeV += 1
  17. if hodtime >= 3:hodtime = 0
  18. '<font color="red"><<$nameV>> took the initiative</font>'
  19. ionce = 1
  20. elseif initi = initiV and hodtime < 3 and hodtimeV < 3 and ionce = 0:
  21. ionce = 1
  22. inrand = rand(0, 1)
  23. if inrand = 0:
  24. hod = 0
  25. hodtime += 1
  26. '<font color="green">You took the lead</font>'
  27. else
  28. hod = 1
  29. hodtimeV += 1
  30. '<font color="red"><<$nameV>> took the initiative</font>'
  31. end
  32. elseif initi = initiV and hodtime >= 3 and ionce = 0 or initi = initiV and hodtimeV >= 3 and ionce = 0:
  33. hodtime = 0
  34. hodtimeV = 0
  35. ionce = 1
  36. inrand = rand(0, 1)
  37. if inrand = 0:
  38. hod = 0
  39. hodtime += 1
  40. '<font color="green">You took the lead</font>'
  41. else
  42. hod = 1
  43. hodtimeV += 1
  44. '<font color="red"><<$nameV>> took the initiative</font>'
  45. end
  46. end
  47. --- initKik ---------------------------------