1
0

initKik 1.4 KB

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