123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- # initKik
- set init = speed + reakt
- set initKoef = init * 20/100
- set initi = rand(initi - initKoef, initi + initKoef)
- set initV = speedV + reaktV
- set initKoefV = initV * 20/100
- set initiV = rand(initiV - initKoefV, initiV + initKoefV)
- if initi > initiV and hodtime < 3 and ionce = 0 or hodtimeV >= 3 and ionce = 0:
- set hod = 0
- set hodtime += 1
- if hodtimeV >= 3:set hodtimeV = 0
- '<font color="green">You took the initiative</font>'
- set ionce = 1
- end
- if initi < initiV and hodtimeV < 3 and ionce = 0 or hodtime >= 3 and ionce = 0:
- set hod = 1
- set hodtimeV += 1
- if hodtime >= 3:set hodtime = 0
- '<font color="red"><<$nameV>> took the initiative</font>'
- set ionce = 1
- end
- if initi = initiV and hodtime < 3 and hodtimeV < 3 and ionce = 0:
- set inrand = rand(0, 1)
- set ionce = 1
- if inrand = 0:
- set hod = 0
- set hodtime += 1
- '<font color="green">You took the lead</font>'
- end
- if inrand = 1:
- set hod = 1
- set hodtimeV += 1
- '<font color="red"><<$nameV>> took the initiative</font>'
- end
- end
- if initi = initiV and hodtime >= 3 and ionce = 0 or initi = initiV and hodtimeV >= 3 and ionce = 0:
- set hodtime = 0
- set hodtimeV = 0
- set inrand = rand(0, 1)
- set ionce = 1
- if inrand = 0:
- set hod = 0
- set hodtime += 1
- '<font color="green">You took the lead</font>'
- end
- if inrand = 1:
- set hod = 1
- set hodtimeV += 1
- '<font color="red"><<$nameV>> took the initiative</font>'
- end
- end
- --- initKik ---------------------------------
|