// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'BOX' 

:anim
wait 0 
if or
84EE:   not animation "BASEBALL" loaded  
84EE:   not animation "SWORD" loaded 
jf @BOX_11
04ED: load_animation "SWORD" 
04ED: load_animation "BASEBALL" 
wait 1 
if and
04EE:   animation "BASEBALL" loaded  
04EE:   animation "SWORD" loaded 
jf @anim

:BOX_11
wait 3 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @BOX_11 
if 
044B:   actor $PLAYER_ACTOR on_foot 
else_jump @BOX_11 
if 
82D8:   not actor $PLAYER_ACTOR current_weapon == 1 
else_jump @BOX_11 
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
if 
0AE1: 0@ = random_actor_near_point 1@ 2@ 3@ in_radius 2.0 find_next 0 pass_deads 1 //IF and SET 
else_jump @BOX_11 
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
if 
0184:   actor 0@ health >= 30 
else_jump @BOX_11 
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
089F: get_actor 0@ pedtype_to 4@ 
if and
   not 4@ == 22 
   not 4@ == 5 
   not 4@ == 21 
   not 4@ == 17 
else_jump @BOX_11 
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
if 
   Actor.Animation(0@) == "HIT_FIGHTKICK_B"
else_jump @KICKBOX_68
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
0792: disembark_instantly_actor 0@ 
0812: AS_actor 0@ perform_animation "BAT_HIT_1" IFP "BASEBALL" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB 
wait 750 
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
if and
   not 4@ == 8 
86EE:   not actor 0@ in_group $PLAYER_GROUP 
09ED:   actor 0@ is_within_field_of_view_actor $PLAYER_ACTOR 
else_jump @BOX_11 
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR 
jump @BOX_11 

:KICKBOX_68
wait 0
if 
056D:   actor 0@ defined 
jf @BOX_11
if 
   Actor.Animation(0@) == "HITD_3"
jf @KUNG
wait 0 
if 
056D:   actor 0@ defined 
jf @BOX_11
0792: disembark_instantly_actor 0@ 
0812: AS_actor 0@ perform_animation "SWORD_HIT_1" IFP "SWORD" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB 
wait 750 
if 
056D:   actor 0@ defined 
jf @BOX_11
if and
   not 4@ == 8 
86EE:   not actor 0@ in_group $PLAYER_GROUP 
09ED:   actor 0@ is_within_field_of_view_actor $PLAYER_ACTOR 
jf @BOX_11
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR 
jump @BOX_11



:KUNG
wait 0
if 
056D:   actor 0@ defined 
jf @BOX_11
if 
   Actor.Animation(0@) == "HITC_3"
jf @KICK_77
wait 0 
if 
056D:   actor 0@ defined 
jf @BOX_11
0792: disembark_instantly_actor 0@ 
0812: AS_actor 0@ perform_animation "SWORD_HIT_2" IFP "SWORD" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB 
wait 750 
if 
056D:   actor 0@ defined 
jf @BOX_11
if and
   not 4@ == 8 
86EE:   not actor 0@ in_group $PLAYER_GROUP 
09ED:   actor 0@ is_within_field_of_view_actor $PLAYER_ACTOR 
jf @BOX_11
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR 
jump @BOX_11


:KICK_77
wait 0
if 
056D:   actor 0@ defined 
jf @BOX_11
if 
   Actor.Animation(0@) == "HITB_3"
jf @BOX_11
wait 0 
if 
056D:   actor 0@ defined 
jf @BOX_11
wait 270
0792: disembark_instantly_actor 0@ 
0812: AS_actor 0@ perform_animation "HITA_3" IFP "PED" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB 
wait 600 
if 
056D:   actor 0@ defined 
jf @BOX_11
if and
   not 4@ == 8 
86EE:   not actor 0@ in_group $PLAYER_GROUP 
09ED:   actor 0@ is_within_field_of_view_actor $PLAYER_ACTOR 
jf @BOX_11
if 
056D:   actor 0@ defined 
else_jump @BOX_11 
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR 
jump @BOX_11

