name grab1
type obstacle
scroll 1
health 300
speed 0
nomove 1 1
facing 1
noquake 1
shadow 0
falldie 1
antigrab 10
offscreenkill 30000
subject_to_wall 0
subject_to_platform 0
subject_to_obstacle 0
subject_to_hole 0
subject_to_gravity 0
diesound data/sounds/empty.wav
setlayer 999999998
lifebarstatus 150 20 0 1 0 2 5
lifeposition 120 240
nameposition -200 -200
nolife 1
script @script
void main()
{
void self = getlocalvar("self");
void attacker = getentityproperty(self,"parent");
void victim2 = getentityproperty(attacker, "opponent");
void victim = getentityproperty(victim2, "playerindex");
int HP = getentityproperty(self,"health");
int HPmax = getentityproperty(self,"maxhealth");
int x1 = getentityproperty(attacker,"x");
int z1 = getentityproperty(attacker,"z");
int escape = getentityvar(self, "grabgo"); //johnny madjon
if(HP>=HPmax && escape == 1){
changeentityproperty(victim2, "position", x1, z1);
performattack(victim2, openborconstant("ANI_FOLLOW15"));
setidle(attacker, openborconstant("ANI_IDLE"));
bindentity(victim2, NULL());
performattack(attacker, openborconstant("ANI_PAIN8"));
setentityvar(self, "madjon", NULL());
killentity(self);
} else if(HP>=HPmax && escape == 2){
changeentityproperty(victim2, "position", x1, z1);
performattack(victim2, openborconstant("ANI_FOLLOW16"));
setidle(attacker, openborconstant("ANI_IDLE"));
bindentity(victim2, NULL());
performattack(attacker, openborconstant("ANI_PAIN8"));
setentityvar(self, "madjon", NULL());
killentity(self);
} else if(playerkeys(victim, 2, "moveleft")){// Left is pressed?
changeentityproperty(self, "health", HP+1);
} else if(playerkeys(victim, 2, "moveup")){// Left is pressed?
changeentityproperty(self, "health", HP+1);
} else if(playerkeys(victim, 2, "movedown")){// Left is pressed?
changeentityproperty(self, "health", HP+1);
} else if(playerkeys(victim, 2, "moveright")){// Right is pressed?
changeentityproperty(self, "health", HP+1);
} else if(playerkeys(victim, 2, "attack")){// Right is pressed?
changeentityproperty(self, "health", HP+1);
} else if(playerkeys(victim, 2, "jump")){// Right is pressed?
changeentityproperty(self, "health", HP+1);
} else if(playerkeys(victim, 2, "special")){// Right is pressed?
changeentityproperty(self, "health", HP+2);
}
}
@end_script
anim death
loop 0
delay 5
offset 50 90
bbox 0 0 0 0
platform 1 1 1 1 1 1 1 1
frame data/chars/misc/grab/empty.gif
frame data/chars/misc/grab/empty.gif
anim follow1
loop 1
delay 6
offset 50 90
bbox 0 0 0 0
platform 1 1 1 1 1 1 1 1
frame data/chars/misc/grab/grab04.gif
frame data/chars/misc/grab/grab05.gif
frame data/chars/misc/grab/grab04.gif
frame data/chars/misc/grab/grab06.gif
anim idle
loop 0
delay 15
offset 90 90
bbox 0 0 0 0
platform 1 1 1 1 1 1 1 1
frame data/chars/misc/grab/grab00.gif
frame data/chars/misc/grab/grab01.gif
frame data/chars/misc/grab/grab02.gif
frame data/chars/misc/grab/grab03.gif
frame data/chars/misc/grab/grab02.gif
frame data/chars/misc/grab/grab01.gif #4
frame data/chars/misc/grab/grab02.gif
frame data/chars/misc/grab/grab03.gif
frame data/chars/misc/grab/grab02.gif
frame data/chars/misc/grab/grab01.gif
frame data/chars/misc/grab/grab02.gif
frame data/chars/misc/grab/grab03.gif
frame data/chars/misc/grab/grab00.gif
frame data/chars/misc/grab/empty.gif #12
anim spawn
@script
void self = getlocalvar("self");
void atk = getentityproperty(self,"parent");
void vtm = getentityproperty(atk, "opponent");
changeentityproperty(self, "health",-5);
if(getentityproperty(vtm, "type")==openborconstant("TYPE_NPC"))
{
killentity(self);
}
@end_script
loop 0
delay 5
offset 50 90
bbox 0 0 0 0
platform 1 1 1 1 1 1 1 1
frame data/chars/misc/grab/empty.gif
frame data/chars/misc/grab/empty.gif
frame data/chars/misc/grab/empty.gif
frame data/chars/misc/grab/empty.gif
#|edited by openBor Stats v 0.53