123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- # kickboxing_funcs
- if $ARGS[0] = 'init_fight_vars':
- temp_kickboxVars['pcs_points'] = 0
- temp_kickboxVars['npc_points'] = 0
- temp_kickboxVars['round'] = 1
- temp_kickboxVars['time'] = 0
- temp_kickboxVars['max_rounds'] = 3
- end
- if $ARGS[0] = 'generate_opponent':
- if $ARGS[1] = 'spar':
- gs 'npcgeneratec', 1, 'sparring partner', rand(19, 45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(10, 20)
- temp_kickboxVars['npc_speed'] = rand(10, 20)
- temp_kickboxVars['npc_agil'] = rand(10, 20)
- temp_kickboxVars['npc_react'] = rand(10, 20)
- temp_kickboxVars['npc_vital'] = rand(10, 20)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(5, 20)
- temp_kickboxVars['npc_punch'] = rand(5, 20)
- temp_kickboxVars['npc_kick'] = rand(5, 20)
- temp_kickboxVars['npc_def'] = rand(5, 20)
- !!parameters
- elseif $ARGS[1] = 'amateur_fight':
- if ARGS[2] <= 0:
- gs 'npcgeneratec', 1, 'Useless rival', rand(19,45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(10, 20)
- temp_kickboxVars['npc_speed'] = rand(10, 20)
- temp_kickboxVars['npc_agil'] = rand(10, 20)
- temp_kickboxVars['npc_react'] = rand(10, 20)
- temp_kickboxVars['npc_vital'] = rand(10, 20)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(10, 30)
- temp_kickboxVars['npc_punch'] = rand(10, 30)
- temp_kickboxVars['npc_kick'] = rand(10, 30)
- temp_kickboxVars['npc_def'] = rand(10, 30)
- elseif ARGS[2] = 1:
- gs 'npcgeneratec', 1, '3rd class rival', rand(19,45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(15, 25)
- temp_kickboxVars['npc_speed'] = rand(15, 25)
- temp_kickboxVars['npc_agil'] = rand(15, 25)
- temp_kickboxVars['npc_react'] = rand(15, 25)
- temp_kickboxVars['npc_vital'] = rand(15, 25)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(15, 35)
- temp_kickboxVars['npc_punch'] = rand(15, 35)
- temp_kickboxVars['npc_kick'] = rand(15, 35)
- temp_kickboxVars['npc_def'] = rand(15, 35)
- elseif ARGS[2] = 2:
- gs 'npcgeneratec', 1, '2rd class rival', rand(19,45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(20, 30)
- temp_kickboxVars['npc_speed'] = rand(20, 30)
- temp_kickboxVars['npc_agil'] = rand(20, 30)
- temp_kickboxVars['npc_react'] = rand(20, 30)
- temp_kickboxVars['npc_vital'] = rand(20, 30)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(30, 50)
- temp_kickboxVars['npc_punch'] = rand(30, 50)
- temp_kickboxVars['npc_kick'] = rand(30, 50)
- temp_kickboxVars['npc_def'] = rand(30, 50)
- elseif ARGS[2] = 3:
- gs 'npcgeneratec', 1, '1st class rival', rand(19,45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(30, 40)
- temp_kickboxVars['npc_speed'] = rand(30, 40)
- temp_kickboxVars['npc_agil'] = rand(30, 40)
- temp_kickboxVars['npc_react'] = rand(30, 40)
- temp_kickboxVars['npc_vital'] = rand(30, 40)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(40, 60)
- temp_kickboxVars['npc_punch'] = rand(40, 60)
- temp_kickboxVars['npc_kick'] = rand(40, 60)
- temp_kickboxVars['npc_def'] = rand(40, 60)
- elseif ARGS[2] = 4:
- gs 'npcgeneratec', 1, 'Excellent rival', rand(19,45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(40, 60)
- temp_kickboxVars['npc_speed'] = rand(40, 60)
- temp_kickboxVars['npc_agil'] = rand(40, 60)
- temp_kickboxVars['npc_react'] = rand(40, 60)
- temp_kickboxVars['npc_vital'] = rand(40, 60)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(60, 80)
- temp_kickboxVars['npc_punch'] = rand(60, 80)
- temp_kickboxVars['npc_kick'] = rand(60, 80)
- temp_kickboxVars['npc_def'] = rand(60, 80)
- else
- gs 'npcgeneratec', 1, 'Best rival in the gym', rand(19,45)
- gs 'boyStat', $npclastgenerated
- temp_kickboxVars['npc_stren'] = rand(60, 100)
- temp_kickboxVars['npc_speed'] = rand(60, 100)
- temp_kickboxVars['npc_agil'] = rand(60, 100)
- temp_kickboxVars['npc_react'] = rand(60, 100)
- temp_kickboxVars['npc_vital'] = rand(60, 100)
- temp_kickboxVars['npc_intel'] = 10
- temp_kickboxVars['npc_will'] = 10
- !!skills
- temp_kickboxVars['npc_jab'] = rand(80, 110)
- temp_kickboxVars['npc_punch'] = rand(80, 110)
- temp_kickboxVars['npc_kick'] = rand(80, 110)
- temp_kickboxVars['npc_def'] = rand(80, 110)
- end
- end
- temp_kickboxVars['npc_max_health'] = temp_kickboxVars['npc_vital'] * 10 + temp_kickboxVars['npc_stren'] * 5
- temp_kickboxVars['npc_health'] = temp_kickboxVars['npc_max_health']
- temp_kickboxVars['npc_stam'] = (30 * (2 * temp_kickboxVars['npc_vital'] + temp_kickboxVars['npc_agil'] + temp_kickboxVars['npc_stren']) + 1000) / 13
- end
- if $ARGS[0] = 'set_initiative':
- temp_kickboxVars['pcs_init'] = pcs_agil + pcs_react
- temp_kickboxVars['npc_init'] = temp_kickboxVars['npc_speed'] + temp_kickboxVars['npc_react']
- temp_kickboxVars['pcs_init_true'] = rand(temp_kickboxVars['pcs_init'] - temp_kickboxVars['pcs_init'] / 5, temp_kickboxVars['pcs_init'] + temp_kickboxVars['pcs_init'] / 5)
- temp_kickboxVars['npc_init_true'] = rand(temp_kickboxVars['npc_init'] - temp_kickboxVars['npc_init'] / 5, temp_kickboxVars['npc_init'] + temp_kickboxVars['npc_init'] / 5)
- if temp_kickboxVars['set_init'] = 0:
- temp_kickboxVars['set_init'] = 1
- if temp_kickboxVars['pcs_init_true'] > temp_kickboxVars['npc_init_true'] and temp_kickboxVars['pcs_inittime'] < 3 or temp_kickboxVars['npc_inittime'] >= 3:
- temp_kickboxVars['active_init'] = 0
- temp_kickboxVars['pcs_inittime'] += 1
- temp_kickboxVars['npc_inittime'] = 0
- '<font color="green">You take the initiative.</font>'
- elseif temp_kickboxVars['pcs_init_true'] < temp_kickboxVars['npc_init_true'] and temp_kickboxVars['npc_inittime'] < 3 or temp_kickboxVars['pcs_inittime'] >= 3:
- temp_kickboxVars['active_init'] = 1
- temp_kickboxVars['pcs_inittime'] = 0
- temp_kickboxVars['npc_inittime'] += 1
- '<font color="red"><<$boydesc>> took the initiative.</font>'
- else
- if rand(0, 1) = 0:
- temp_kickboxVars['active_init'] = 0
- temp_kickboxVars['pcs_inittime'] += 1
- temp_kickboxVars['npc_inittime'] = 0
- '<font color="green">You take the initiative.</font>'
- else
- temp_kickboxVars['active_init'] = 1
- temp_kickboxVars['pcs_inittime'] = 0
- temp_kickboxVars['npc_inittime'] += 1
- '<font color="red"><<$boydesc>> took the initiative.</font>'
- end
- end
- end
- end
- if $ARGS[0] = 'attack':
- if $ARGS[1] = 'player':
- if $ARGS[2] = 'jab':
- temp_kickboxVars['damage'] = rand(pcs_stren / 12, pcs_stren / 8)
- temp_kickboxVars['hit_mod'] = (pcs_agil + pcs_react + pcs_jab) * 2
- elseif $ARGS[2] = 'punch':
- temp_kickboxVars['damage'] = pcs_stren + rand(-pcs_stren / 5, pcs_stren / 5)
- temp_kickboxVars['hit_mod'] = (pcs_agil + pcs_react + pcs_punch)
- elseif $ARGS[2] = 'kick':
- temp_kickboxVars['damage'] = 3 * pcs_stren + rand(-3 * (pcs_stren / 5), 3 * (pcs_stren / 5))
- temp_kickboxVars['hit_mod'] = (pcs_agil + pcs_react + pcs_kick) / 2
- end
- temp_kickboxVars['hit_chance'] = temp_kickboxVars['hit_mod'] + rand(-temp_kickboxVars['hit_mod'] / 5, temp_kickboxVars['hit_mod'] / 5)
- if temp_kickboxVars['damage'] <= 0: temp_kickboxVars['damage'] = 1
- temp_kickboxVars['base_def'] = temp_kickboxVars['npc_agil'] + temp_kickboxVars['npc_react'] + temp_kickboxVars['npc_def']
- temp_kickboxVars['defence'] = temp_kickboxVars['base_def'] + rand(-temp_kickboxVars['base_def'] / 5, temp_kickboxVars['base_def'] / 5)
- if temp_kickboxVars['hit_chance'] < temp_kickboxVars['defence']:
- '<font color="red">You''ve missed.</font>'
- else
- if temp_kickboxVars['hit_chance'] < temp_kickboxVars['defence'] * 2:
- '<font color="green">Contact</font>'
- else
- '<b><font color="green">HIT</font></b>'
- temp_kickboxVars['damage'] += temp_kickboxVars['damage'] / 5
- end
- temp_kickboxVars['npc_health'] -= temp_kickboxVars['damage']
- temp_kickboxVars['pcs_points'] += 1
- '<font color="green">You have dealt <<temp_kickboxVars[''damage'']>> points of damage.</font>'
- if temp_kickboxVars['damage'] >= temp_kickboxVars['npc_health'] / 5:
- temp_kickboxVars['pcs_points'] += 1
- '<font color="green"><<$boydesc>> falls to the ground.</font>'
- if temp_kickboxVars['npc_health'] < temp_kickboxVars['npc_max_health'] / 4:
- '<font color="green"><<$boydesc>> is knocked out. You''ve won!</font>'
- temp_kickboxVars['KO'] = 1
- end
- end
- end
- end
- if $ARGS[1] = 'enemy':
- if $ARGS[2] = 'jab':
- temp_kickboxVars['damage'] = rand(temp_kickboxVars['npc_stren'] / 12, temp_kickboxVars['npc_stren'] / 8)
- temp_kickboxVars['hit_mod'] = (temp_kickboxVars['npc_speed'] + temp_kickboxVars['npc_react'] + temp_kickboxVars['npc_jab']) * 2
- elseif $ARGS[2] = 'punch':
- temp_kickboxVars['damage'] = temp_kickboxVars['npc_stren'] + rand(-temp_kickboxVars['npc_stren'] / 5, temp_kickboxVars['npc_stren'] / 5)
- temp_kickboxVars['hit_mod'] = (temp_kickboxVars['npc_speed'] + temp_kickboxVars['npc_react'] + temp_kickboxVars['npc_punch'])
- elseif $ARGS[2] = 'kick':
- temp_kickboxVars['damage'] = 3 * temp_kickboxVars['npc_stren'] + rand(-3 * (temp_kickboxVars['npc_stren'] / 5), 3 * (temp_kickboxVars['npc_stren'] / 5))
- temp_kickboxVars['hit_mod'] = (temp_kickboxVars['npc_speed'] + temp_kickboxVars['npc_react'] + temp_kickboxVars['npc_kick']) / 2
- end
- temp_kickboxVars['hit_chance'] = temp_kickboxVars['hit_mod'] + rand(-temp_kickboxVars['hit_mod'] / 5, temp_kickboxVars['hit_mod'] / 5)
- if temp_kickboxVars['damage'] <= 0: temp_kickboxVars['damage'] = 1
- temp_kickboxVars['base_def'] = pcs_agil + pcs_react + pcs_def
- temp_kickboxVars['defence'] = temp_kickboxVars['base_def'] + rand(-temp_kickboxVars['base_def'] / 5, temp_kickboxVars['base_def'] / 5)
- if temp_kickboxVars['hit_chance'] < temp_kickboxVars['defence']:
- '<font color="green">Missed</font>'
- else
- if temp_kickboxVars['hit_chance'] < temp_kickboxVars['defence'] * 2:
- '<font color="red">You''ve gotten hit.</font>'
- else
- '<b><font color="red">You''ve gotten hit.</font></b>'
- temp_kickboxVars['damage'] += temp_kickboxVars['damage'] / 5
- end
- pcs_health -= temp_kickboxVars['damage']
- temp_kickboxVars['npc_points'] += 1
- '<font color="red">You have received <<temp_kickboxVars[''damage'']>> points of damage.</font>'
- if temp_kickboxVars['damage'] >= pcs_health / 5:
- temp_kickboxVars['npc_points'] += 1
- '<font color="red">You have fallen to the ground.</font>'
- if pcs_health < healthmax / 4:
- '<font color="red">You are knocked out. You''ve lost!</font>'
- temp_kickboxVars['KO'] = 1
- end
- end
- end
- end
- end
- if $ARGS[0] = 'sash_advancement':
- if kickbox['sash'] = 0:
- if kickbox['advancement'] >= 5:
- kickbox['sash'] = 1
- kickbox['advancement'] = 0
- kickbox['money'] = 200
- 'Having covered red, yellow and orange in your basic training, you have now been awarded green sash(rank 4).'
- end
- elseif kickbox['sash'] = 1:
- if kickbox['advancement'] >= 10:
- kickbox['sash'] = 2
- kickbox['advancement'] = 0
- kickbox['money'] = 500
- 'You have been awarded purple sash(rank 5).'
- end
- elseif kickbox['sash'] = 2:
- if kickbox['advancement'] >= 15:
- kickbox['sash'] = 3
- kickbox['advancement'] = 0
- kickbox['money'] = 1500
- 'You have been awarded blue sash(rank 6).'
- end
- elseif kickbox['sash'] = 3:
- if kickbox['advancement'] >= 20:
- kickbox['sash'] = 4
- kickbox['advancement'] = 0
- kickbox['money'] = 3500
- 'You have been awarded brown sash(rank 7).'
- end
- elseif kickbox['sash'] = 4:
- if kickbox['advancement'] >= 25:
- kickbox['sash'] = 5
- kickbox['advancement'] = 0
- kickbox['money'] = 7500
- 'You have been awarded black sash, 1st dan.'
- end
- end
- end
- if $ARGS[0] = 'display_header':
- '<b>= = = = = = = = = = = = = (ROUND <<temp_kickboxVars[''round'']>>) = = = = = = = = = = = = =</b>'
- if temp_kickboxVars['time'] = 0:
- '<b>Start of the round</b>'
- elseif temp_kickboxVars['time'] = 1:
- '<b>Time in round 0:30</b>'
- elseif temp_kickboxVars['time'] = 2:
- '<b>Time in round 1:00</b>'
- elseif temp_kickboxVars['time'] = 3:
- '<b>Time in round 1:30</b>'
- elseif temp_kickboxVars['time'] = 4:
- '<b>Time in round 2:00</b>'
- elseif temp_kickboxVars['time'] = 5:
- '<b>Time in round 2:30</b>'
- else
- '<b>Time in round 3:00</b>'
- end
- '<b><<$boydesc>></b> health <b><font color="red"><<temp_kickboxVars[''npc_health'']>></font></b>, Stamina <b><font color="green"><<temp_kickboxVars[''npc_stam'']>></font></b>'
- 'Your health <b><font color="red"><<pcs_health>></font></b>, stamina <b><font color="green"><<pcs_stam>></font></b>'
- '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
- 'Your points: <<temp_kickboxVars[''pcs_points'']>> Opponent''s points: <<temp_kickboxVars[''npc_points'']>>'
- '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
- end
- if $ARGS[0] = 'display_header2':
- end
- --- kickboxing_funcs ---------------------------------
|