Skip to content

Instantly share code, notes, and snippets.

@2blackbar
Created April 3, 2023 23:58
Show Gist options
  • Save 2blackbar/5fbb2ccf01246094347b630a13ddf8be to your computer and use it in GitHub Desktop.
Save 2blackbar/5fbb2ccf01246094347b630a13ddf8be to your computer and use it in GitHub Desktop.
name BOULI
health 30
speed 30
running 65 8 1.4 1 1
type player
gfxshadow 1
nolife 1
jumpheight 8.4
jumpspeed 54
jumpmove 7 7
nodieblink 1
falldie 1
palette data/chars/bouli/idle01.gif
icon data/chars/bouli/icon.gif 1
alternatepal data/chars/bouli/idle02.gif
alternatepal data/chars/bouli/idle03.gif
alternatepal data/chars/bouli/idle04.gif
alternatepal data/chars/bouli/idle05.gif
alternatepal data/chars/bouli/idle06.gif
alternatepal data/chars/bouli/idle07.gif
alternatepal data/chars/bouli/idle08.gif
holdblock 1
dust dust
grabdistance 45
candamage enemy obstacle npc
blockback 1
bounce 0
subject_to_platform 0
subject_to_hole 0
riseinv 3
backpain 1
takedamagescript data/scripts/damage.c
onspawnscript data/scripts/spawn.c
animationscript data/scripts/anim.c
#script data/scripts/snow.c
anim attack1
loop 0
offset 114 237
bbox 70 67 82 172
delay 4
frame data/chars/bouli/ata1.gif
frame data/chars/bouli/ata2.gif
sound data/chars/bouli/a.wav
frame data/chars/bouli/ata3.gif
sound data/sounds/a2.wav
frame data/chars/bouli/ata4.gif
@cmd projectile 1 "jab" 65 0 98 1 0 1
frame data/chars/bouli/ata5.gif
idle 1
frame data/chars/bouli/ata6.gif
frame data/chars/bouli/ata7.gif
frame data/chars/bouli/ata8.gif
frame data/chars/bouli/ata9.gif
anim backpain
loop 0
offset 124 224
bbox 81 53 82 172
@script
void self = getlocalvar("self");
if ((getentityproperty(self, "direction")==1)&&(frame > 1)){
changeentityproperty(self, "velocity", 2, 0, 0);
}
if ((getentityproperty(self, "direction")==0)&&(frame > 1)){
changeentityproperty(self, "velocity", -2, 0, 0);
}
@end_script
@cmd projectile 1 "step2" -22 0
@cmd projectile 1 "step1" 20 0
sound data/chars/bouli/pain.wav
delay 2
frame data/chars/bouli/pain2.gif
delay 5
frame data/chars/bouli/pain2.gif
delay 7
frame data/chars/bouli/pain3.gif
frame data/chars/bouli/pain2.gif
frame data/chars/bouli/pain1.gif
anim death
loop 0
offset 126 225
bbox 84 54 82 172
delay 8
@script
void self = getlocalvar("self");
if ((getentityproperty(self, "direction")==1)&&(frame > 1)){
changeentityproperty(self, "velocity", -2, 0, 0);
}
if ((getentityproperty(self, "direction")==0)&&(frame > 1)){
changeentityproperty(self, "velocity", 2, 0, 0);
}
@end_script
landframe 3
sound data/chars/bouli/fall.wav
frame data/chars/bouli/FALL1.gif
frame data/chars/bouli/FALL2.gif
frame data/chars/bouli/FALL3.gif
frame data/chars/bouli/FALL4.gif
frame data/chars/bouli/FALL5.gif
anim fall
loop 0
offset 126 225
bbox 84 54 82 172
delay 8
landframe 3
sound data/chars/bouli/fall.wav
frame data/chars/bouli/FALL1.gif
frame data/chars/bouli/FALL2.gif
frame data/chars/bouli/FALL3.gif
frame data/chars/bouli/FALL4.gif
DELAY 500
frame data/chars/bouli/FALL5.gif
anim follow1
loop 0
@script
void self = getlocalvar("self");
int pindex = getentityproperty(self,"playerindex");
void moveup = playerkeys(pindex, 0, "moveup");
void movedown = playerkeys(pindex, 0, "movedown");
int iDirection = getentityproperty(self, "direction");
int sx = getentityproperty(self,"x");
int sz = getentityproperty(self,"z");
int Vx = getentityproperty(self, "xdir");
int Vz = getentityproperty(self, "zdir");
int a = getentityproperty(self, "a");
int sped = 6.4;
void fX;
void step3;
float x;
float y;
float x;
float y;
float Hasil;
float c;
c = 0.5*2/x;
int Angle = antitang2(Vz, Vx);
if ( a != 0){ //Is entity facing left?
Angle = 15 + a/9.5;
}
if (iDirection == 0){ //Is entity facing left?
fX = -fX; //Reverse X direction to match facing.
sped = -sped;
}
if ( a != 0 && iDirection == 0){ //Is entity facing left?
Angle = -Angle+180;
}
if (frame >= 1 ){
changeentityproperty(self, "velocity", sped, 0, 0);
}
if (frame >= 5 && frame <= 22 ){
clearspawnentry();
setspawnentry("name","step3");
changeentityproperty(step3, "direction", fX );
changedrawmethod(step3, "reset", 1);
changedrawmethod(step3, "rotate", Angle);
changeentityproperty(step3, "position", sx, sz, 0);
step3 = spawn();
}
if (frame >= 22){
changeentityproperty(self, "velocity", 0, 0, 0);
}
if (moveup)
{
changeentityproperty(self, "velocity", NULL(),-2.0,NULL());
}
if (movedown)
{
changeentityproperty(self, "velocity", NULL(),2.0,NULL());
}
@end_script
offset 90 284
bbox 47 113 82 172
delay 4
sound data/sounds/jump.wav
frame data/chars/bouli/jump12.gif
sound data/sounds/throw.wav
frame data/chars/bouli/jump11.gif
bbox 47 65 82 172
offset 90 257
frame data/chars/bouli/jump10.gif
bbox 47 109 82 126
offset 94 232
frame data/chars/bouli/jump09.gif
bbox 79 109 82 126
offset 122 228
frame data/chars/bouli/FALL8.gif
frame data/chars/bouli/FALL7.gif
frame data/chars/bouli/FALL6.gif
HITFX data/sounds/beatg.wav
attack 69 155 78 75 10 1 0 0 25 20
dropv 5 3
delay 4
frame data/chars/bouli/FALL5.gif
offset 120 225
frame data/chars/bouli/FALL4.gif
offset 123 221
frame data/chars/bouli/FALL3.gif
offset 127 218
frame data/chars/bouli/FALL2.gif
offset 129 217
frame data/chars/bouli/FALL1.gif
offset 127 218
frame data/chars/bouli/FALL2.gif
offset 123 221
frame data/chars/bouli/FALL3.gif
offset 120 225
frame data/chars/bouli/FALL4.gif
offset 122 228
frame data/chars/bouli/FALL5.gif
ATTACK 0 0 0 0 0 0 0 0 0 0
delay 4
offset 125 225
bbox 84 54 82 172
frame data/chars/bouli/FALL6.gif
frame data/chars/bouli/FALL7.gif
frame data/chars/bouli/FALL8.gif
frame data/chars/bouli/FALL9.gif
anim idle
loop 1
offset 77 216
bbox 38 45 82 172
delay 8
@cmd projectile 1 "step2" -22 0
@cmd projectile 1 "step1" 20 0
frame data/chars/bouli/idle01.gif
frame data/chars/bouli/idle02.gif
frame data/chars/bouli/idle03.gif
frame data/chars/bouli/idle04.gif
frame data/chars/bouli/idle05.gif
frame data/chars/bouli/idle06.gif
frame data/chars/bouli/idle07.gif
frame data/chars/bouli/idle08.gif
frame data/chars/bouli/idle09.gif
frame data/chars/bouli/idle10.gif
frame data/chars/bouli/idle11.gif
frame data/chars/bouli/idle12.gif
anim jump
loop 0
offset 100 294
bbox 58 124 82 172
delay 2
sound data/sounds/jump.wav
frame data/chars/bouli/jump03.gif
sound data/chars/bouli/a.wav
delay 20
frame data/chars/bouli/jump03.gif
delay 7
frame data/chars/bouli/jump04.gif
frame data/chars/bouli/jump05.gif
delay 15
frame data/chars/bouli/jump06.gif
delay 6
frame data/chars/bouli/jump07.gif
frame data/chars/bouli/jump08.gif
frame data/chars/bouli/jump09.gif
frame data/chars/bouli/jump10.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
frame data/chars/bouli/jump11.gif
frame data/chars/bouli/jump12.gif
anim jumpattack
loop 0
offset 114 237
bbox 70 67 82 172
delay 5
frame data/chars/bouli/ata1.gif
frame data/chars/bouli/ata2.gif
sound data/chars/bouli/a.wav
frame data/chars/bouli/ata3.gif
sound data/sounds/a2.wav
frame data/chars/bouli/ata4.gif
@cmd projectile 1 "jab" 65 0 98 1 0 1
frame data/chars/bouli/ata5.gif
idle 1
frame data/chars/bouli/ata6.gif
frame data/chars/bouli/ata7.gif
frame data/chars/bouli/ata8.gif
frame data/chars/bouli/ata9.gif
anim jumpdelay
loop 0
offset 100 294
bbox 58 124 82 172
delay 6
frame data/chars/bouli/jump01.gif
frame data/chars/bouli/jump02.gif
anim jumpland
loop 0
offset 100 294
bbox 58 124 82 172
delay 3
sound data/sounds/step1.wav
frame data/chars/bouli/jump02.gif
sound data/sounds/step2.wav
frame data/chars/bouli/jump02.gif
delay 6
frame data/chars/bouli/jump01.gif
anim pain
loop 0
offset 124 224
bbox 81 53 82 172
@script
void self = getlocalvar("self");
if ( getentityproperty(self, "direction") == 1 && frame > 1 ){
changeentityproperty(self, "velocity", -2, 0, 0);
}
if ( getentityproperty(self, "direction")==0 && frame > 1 ){
changeentityproperty(self, "velocity", 2, 0, 0);
}
@end_script
@cmd projectile 1 "step2" -22 0
@cmd projectile 1 "step1" 20 0
drawmethod tintmode 1
drawmethod tintcolor 250_250_250
sound data/chars/bouli/pain.wav
delay 2
frame data/chars/bouli/pain2.gif
nodrawmethod 1
delay 5
frame data/chars/bouli/pain2.gif
delay 7
frame data/chars/bouli/pain3.gif
frame data/chars/bouli/pain2.gif
frame data/chars/bouli/pain1.gif
anim respawn
loop 0
offset 77 216
bbox 38 45 82 172
delay 8
frame data/chars/bouli/idle01.gif
anim rise
loop 0
offset 126 225
bbox 84 54 82 172
delay 8
frame data/chars/bouli/FALL6.gif
frame data/chars/bouli/FALL7.gif
frame data/chars/bouli/FALL8.gif
frame data/chars/bouli/FALL9.gif
anim run
loop 1
offset 82 240
bbox 42 63 82 179
delay 7
@cmd projectile 1 "step2" 2 0
frame data/chars/bouli/run3.gif
frame data/chars/bouli/run4.gif
frame data/chars/bouli/run5.gif
sound data/sounds/step1.wav
frame data/chars/bouli/run6.gif
@cmd projectile 1 "step1" 2 0
frame data/chars/bouli/run7.gif
frame data/chars/bouli/run8.gif
frame data/chars/bouli/run1.gif
sound data/sounds/step2.wav
frame data/chars/bouli/run2.gif
anim runattack
loop 0
@script
void self = getlocalvar("self");
int pindex = getentityproperty(self,"playerindex");
void moveup = playerkeys(pindex, 0, "moveup");
void movedown = playerkeys(pindex, 0, "movedown");
int iDirection = getentityproperty(self, "direction");
int sx = getentityproperty(self,"x");
int sz = getentityproperty(self,"z");
int Vx = getentityproperty(self, "xdir");
int Vz = getentityproperty(self, "zdir");
int a = getentityproperty(self, "a");
int sped = 6.4;
void fX;
void step3;
float x;
float y;
float x;
float y;
float Hasil;
float c;
c = 0.5*2/x;
int Angle = antitang2(Vz, Vx);
if ( a != 0 && iDirection == 0){ //Is entity facing left?
Angle = -Angle+180;
}
if (iDirection == 0){ //Is entity facing left?
fX = -fX; //Reverse X direction to match facing.
sped = -sped;
}
if ( a != 0 && iDirection == -1){ //Is entity facing left?
Angle = -15 + a/9.5;
}
if (frame >= 1 ){
changeentityproperty(self, "velocity", sped, 0, 0);
}
if (frame >= 5 && frame <= 22 ){
clearspawnentry();
setspawnentry("name","step3");
changeentityproperty(step3, "direction", fX );
changedrawmethod(step3, "reset", 1);
changedrawmethod(step3, "rotate", Angle);
changeentityproperty(step3, "position", sx, sz, 0);
step3 = spawn();
}
if (frame >= 22){
changeentityproperty(self, "velocity", 0, 0, 0);
}
if (moveup)
{
changeentityproperty(self, "velocity", NULL(),-2.0,NULL());
}
if (movedown)
{
changeentityproperty(self, "velocity", NULL(),2.0,NULL());
}
@end_script
offset 90 284
bbox 47 113 82 172
delay 4
sound data/sounds/jump.wav
frame data/chars/bouli/jump12.gif
sound data/sounds/throw.wav
frame data/chars/bouli/jump11.gif
bbox 47 65 82 172
offset 90 257
frame data/chars/bouli/jump10.gif
bbox 47 109 82 126
offset 94 232
frame data/chars/bouli/jump09.gif
bbox 79 109 82 126
offset 122 228
frame data/chars/bouli/FALL8.gif
frame data/chars/bouli/FALL7.gif
frame data/chars/bouli/FALL6.gif
HITFX data/sounds/beatg.wav
attack 69 155 78 75 10 1 0 0 25 20
dropv 5 3
delay 4
frame data/chars/bouli/FALL5.gif
offset 120 225
frame data/chars/bouli/FALL4.gif
offset 123 221
frame data/chars/bouli/FALL3.gif
offset 127 218
frame data/chars/bouli/FALL2.gif
offset 129 217
frame data/chars/bouli/FALL1.gif
offset 127 218
frame data/chars/bouli/FALL2.gif
offset 123 221
frame data/chars/bouli/FALL3.gif
offset 120 225
frame data/chars/bouli/FALL4.gif
offset 122 228
frame data/chars/bouli/FALL5.gif
ATTACK 0 0 0 0 0 0 0 0 0 0
delay 4
offset 125 225
bbox 84 54 82 172
frame data/chars/bouli/FALL6.gif
frame data/chars/bouli/FALL7.gif
frame data/chars/bouli/FALL8.gif
frame data/chars/bouli/FALL9.gif
anim select
loop 0
offset 77 216
bbox 38 45 82 172
shadowcoords 9999 9999
delay 8
sound data/chars/bouli/select.wav
frame data/chars/bouli/idle01.gif
offset 100 294
bbox 58 124 82 172
sound data/sounds/gem.wav
frame data/chars/bouli/jump01.gif
nodrawmethod 1
drawmethod tintmode 4
drawmethod tintcolor 200_250_250
frame data/chars/bouli/jump02.gif
nodrawmethod 1
frame data/chars/bouli/jump02.gif
frame data/chars/bouli/jump01.gif
offset 77 216
bbox 38 45 82 172
delay 8
frame data/chars/bouli/idle01.gif
anim spawn
loop 0
offset 77 216
bbox 0 0 0 0
delay 8
frame data/chars/bouli/idle01.gif
anim waiting
loop 1
offset 77 216
bbox 38 45 82 172
shadowcoords 9999 9999
delay 8
frame data/chars/bouli/idle01.gif
frame data/chars/bouli/idle02.gif
frame data/chars/bouli/idle03.gif
frame data/chars/bouli/idle04.gif
frame data/chars/bouli/idle05.gif
frame data/chars/bouli/idle06.gif
frame data/chars/bouli/idle07.gif
frame data/chars/bouli/idle08.gif
frame data/chars/bouli/idle09.gif
frame data/chars/bouli/idle10.gif
frame data/chars/bouli/idle11.gif
frame data/chars/bouli/idle12.gif
anim walk
loop 1
offset 79 224
bbox 44 46 82 179
delay 7
frame data/chars/bouli/walk08.gif
frame data/chars/bouli/walk09.gif
frame data/chars/bouli/walk10.gif
frame data/chars/bouli/walk11.gif
sound data/sounds/step2.wav
frame data/chars/bouli/walk12.gif
@cmd projectile 1 "step2" 40 0
frame data/chars/bouli/walk01.gif
frame data/chars/bouli/walk02.gif
frame data/chars/bouli/walk03.gif
frame data/chars/bouli/walk04.gif
frame data/chars/bouli/walk05.gif
sound data/sounds/step1.wav
frame data/chars/bouli/walk06.gif
@cmd projectile 1 "step1" 40 0
frame data/chars/bouli/walk07.gif
#|edited by openBor Stats v 0.67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment