name		CommanderR
health		500
speed		8
type		enemy
aimove		avoid
hostile		player npc
candamage	player npc
aggression	25
gfxshadow	1
noquake		1
dust		dust
bflash		empty2
blockodds	1
risetime	250
nodieblink	2
animationscript	data/chars/commander/command.c
icon		data/chars/Commander/icon.gif
diesound	data/chars/commander/sounds/die.wav

load		grenade
load		Peluru

		
anim	spawn
drawmethod 250 250
	delay	12
	sound data/chars/commander/sounds/spawn.wav
	offset	41 113
	frame	data/chars/Commander/idle1.gif
	delay	15
	offset	45 114
	frame	data/chars/Commander/idle2.gif
	offset	44 116
	frame	data/chars/Commander/idle3.gif
	offset	43 115
	frame	data/chars/Commander/idle4.gif
	offset	43 114
	frame	data/chars/Commander/idle5.gif

anim	idle
drawmethod 250 250
	loop	1
	delay	12
	offset	41 113
	bbox	28 6 36 107
	frame	data/chars/Commander/idle1.gif
	delay	15
	offset	45 114
	frame	data/chars/Commander/idle2.gif
	offset	44 116
	frame	data/chars/Commander/idle3.gif
	offset	43 115
	frame	data/chars/Commander/idle4.gif
	offset	43 114
	frame	data/chars/Commander/idle5.gif
	
anim	walk
drawmethod 250 250
	loop	1
	delay	12
	offset	38 113
	bbox	17 4 40 109
	frame	data/chars/Commander/walk1.gif
	frame	data/chars/Commander/walk2.gif
	frame	data/chars/Commander/walk3.gif
	frame	data/chars/Commander/walk4.gif
	frame	data/chars/Commander/walk5.gif
	frame	data/chars/Commander/walk6.gif
	

anim	pain
drawmethod 250 250
	delay	10
	offset	54 136
	bbox	14 11 52 107
	frame	data/chars/Commander/pain1.gif
	offset	60 125
	sound	data/chars/commander/sounds/pain.wav
	frame	data/chars/Commander/pain2.gif
	offset	54 136
	frame	data/chars/Commander/pain1.gif
	
anim	fall
drawmethod 250 250
	offset	51 92
	delay	300
	landframe 1
	bbox	11 0 71 43
	frame	data/chars/Commander/fall1.gif
	delay	12
	offset	49 38
	bbox	0
	frame	data/chars/Commander/fall2.gif
	offset	86 19
	frame	data/chars/Commander/fall3.gif
			
anim	rise
@script
    void self = getlocalvar("self");

    if( frame == 0){
      int r = rand()%30;

      if( r > -10){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW3"));
      }
    }
@end_script
drawmethod 250 250
	delay	5
	offset	39 87
	frame	data/chars/Commander/rise1.gif
	delay	30
	frame	data/chars/Commander/rise1.gif
	offset	41 100
	@cmd	dodgez -3 0 1
	frame	data/chars/Commander/rise2.gif
	@cmd	dasher 0 0 0
	frame	data/chars/Commander/rise2.gif


anim	attack1
@script
    void self = getlocalvar("self");

    if( frame == 0){
      int r = rand()%30;

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
      }
    }
@end_script
drawmethod 250 250
	range	0 85
	rangez	-10 10
	offset	34 120
	followanim 1
	followcond 1
	bbox	16 12 35 113
	delay	1
	frame	data/chars/Commander/atk1-1.gif
	delay	10
	frame	data/chars/Commander/atk1-1.gif
	attack	51 25 57 95 15 0 0 0 20
	frame	data/chars/Commander/atk1-2.gif
	frame	data/chars/Commander/atk1-3.gif
	attack	0
	frame	data/chars/Commander/atk1-1.gif
	
anim	follow1
drawmethod 250 250
	rangez	-10 10
	offset	34 120
	bbox	16 12 35 113
	delay	10
	attack	51 25 57 95 15 0 0 0 20
	frame	data/chars/Commander/atk1-2.gif
	frame	data/chars/Commander/atk1-3.gif
	attack	0
	frame	data/chars/Commander/atk1-1.gif
	attack	51 25 57 95 15 0 0 0 20
	frame	data/chars/Commander/atk1-2.gif
	frame	data/chars/Commander/atk1-3.gif
	attack	0
	frame	data/chars/Commander/atk1-1.gif
	attack	51 25 57 95 15 1 0 0 30
	frame	data/chars/Commander/atk1-2.gif
	frame	data/chars/Commander/atk1-3.gif
	attack	0
	frame	data/chars/Commander/atk1-1.gif
	
anim	follow2
drawmethod 250 250
	range	0 85
	rangez	-10 10
	offset	34 120
	bbox	16 12 35 113
	delay	1
	frame	data/chars/Commander/atk1-1.gif
	delay	20
	offset	17 126
	bbox	4 41 35 76
	@cmd	dodgeleapz -3 3 0.5
	frame	data/chars/Commander/shoot1.gif
	offset	45 117
	bbox	31 27 32 53
	@cmd	targetL 3 35 0 1
	@cmd	tossT "Grenade" 35 92 0 3
	frame	data/chars/Commander/shoot2.gif
	offset	17 126
	bbox	4 41 35 76
	frame	data/chars/Commander/shoot1.gif
	delay	80
	offset	39 87
	bbox	26 14 34 74
	frame	data/chars/Commander/rise1.gif


anim	attack3
drawmethod 250 250
	range	0 85
	rangez	-50 -10
	offset	34 125
	bbox	16 12 35 113
	delay	20
	@cmd	targetL 3 60 0 1
	frame	data/chars/Commander/atk1-1.gif
	delay	10
	attack	51 25 57 95 15 0 0 0 30
	@cmd	tossT "Grenade" 63 94 0 3
	frame	data/chars/Commander/atk1-2.gif
	frame	data/chars/Commander/atk1-3.gif
	delay	80
	attack	0
	frame	data/chars/Commander/atk1-1.gif
	
anim	attack4
drawmethod 250 250
	range	0 85
	rangez	10 50
	offset	34 125
	bbox	16 12 35 113
	delay	20
	@cmd	targetL 3 60 0 1
	frame	data/chars/Commander/atk1-1.gif
	delay	10
	attack	51 25 57 95 15 0 0 0 30
	@cmd	tossT "Grenade" 63 94 0 3
	frame	data/chars/Commander/atk1-2.gif
	frame	data/chars/Commander/atk1-3.gif
	delay	80
	attack	0
	frame	data/chars/Commander/atk1-1.gif
			
anim attack2
drawmethod 250 250
       	range	75 550
	rangez	-40 40
	delay	20
	offset	108 172
	bbox	83 60 40 112
	sound	data/chars/commander/sounds/laugh.wav
	frame	data/chars/Commander/MiSho3.gif
	delay	8
	sound	data/sounds/gun.wav
	@cmd	target 2.4 1.2 0 0 0 1
	@cmd	shootT "Peluru" 50 87 1
	frame	data/chars/Commander/MiSho1.gif
	frame	data/chars/Commander/MiSho3.gif
	sound	data/sounds/gun.wav
	@cmd	shootT "Peluru" 50 87 1
	frame	data/chars/Commander/MiSho2.gif
	frame	data/chars/Commander/MiSho3.gif
	sound	data/sounds/gun.wav
	@cmd	shootT "Peluru" 50 87 1
	frame	data/chars/Commander/MiSho1.gif
	frame	data/chars/Commander/MiSho3.gif
	sound	data/sounds/gun.wav
	@cmd	shootT "Peluru" 50 87 1
	frame	data/chars/Commander/MiSho1.gif
	delay	80
	frame	data/chars/Commander/MiSho3.gif
		

anim	block
@script
    void self = getlocalvar("self");

    if( frame == 0){
      int r = rand()%30;

      if( r > -10){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW3"));
      }
    }
@end_script
drawmethod 250 250
	delay	10
	offset	39 87
	sound	data/chars/commander/sounds/laugh.wav
	frame	data/chars/Commander/rise1.gif
	delay	30
	@cmd	dasher -2 0 0
	frame	data/chars/Commander/rise1.gif
	offset	41 100
	@cmd	dodgez -3 0 1
	frame	data/chars/Commander/rise2.gif
	@cmd	dasher 0 0 0
	frame	data/chars/Commander/rise2.gif

anim	follow3
drawmethod 250 250
	delay	10
	offset	39 87
	sound	data/chars/commander/sounds/laugh.wav
	frame	data/chars/Commander/rise1.gif
	delay	30
	@cmd	flip
	@cmd	dasher -3 0 0
	frame	data/chars/Commander/rise1.gif
	offset	41 100
	@cmd	dodgez -3 0 1
	frame	data/chars/Commander/rise2.gif
	@cmd	dasher 0 0 0
	frame	data/chars/Commander/rise2.gif
