コード例 #1
0
ファイル: EN-BONC1.c プロジェクト: qubodup/freedink-data
void main( void )
{
//can't get out of screen until this dude is DEAD
screenlock(1);
int &mcounter;
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_nohit(&current_sprite, 0);
sp_distance(&current_sprite, 50);
sp_timing(&current_sprite, 33);
sp_exp(&current_sprite, 40);
sp_base_walk(&current_sprite, 530);
sp_base_death(&current_sprite, 550);
sp_base_attack(&current_sprite, 540);
sp_defense(&current_sprite, 3);
sp_strength(&current_sprite, 8);
sp_touch_damage(&current_sprite, 5);
sp_hitpoints(&current_sprite, 20);
preload_seq(531);
preload_seq(533);
preload_seq(537);
preload_seq(539);
preload_seq(551);
preload_seq(553);
preload_seq(557);
preload_seq(559);


preload_seq(542);
preload_seq(544);
preload_seq(546);
preload_seq(548);

}
コード例 #2
0
ファイル: EN-PBON.c プロジェクト: qubodup/freedink-data
void main( void )
{
int &mcounter;
screenlock(1);
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_nohit(&current_sprite, 0);
sp_distance(&current_sprite, 50);
sp_timing(&current_sprite, 0);
sp_exp(&current_sprite, 25);
sp_base_walk(&current_sprite, 610);
sp_base_death(&current_sprite, 550);
sp_base_attack(&current_sprite, 620);
sp_defense(&current_sprite, 3);
sp_strength(&current_sprite, 8);
sp_touch_damage(&current_sprite, 5);
sp_hitpoints(&current_sprite, 30);
preload_seq(611);
preload_seq(613);
preload_seq(617);
preload_seq(619);
preload_seq(621);
preload_seq(623);
preload_seq(627);
preload_seq(629);


preload_seq(542);
preload_seq(544);
preload_seq(546);
preload_seq(548);

}
コード例 #3
0
ファイル: SGOLD.c プロジェクト: qubodup/freedink-data
void main( )
{
        sp_pseq(&current_sprite, 178);
        sp_frame(&current_sprite, 4); //so the seq will start
     //   sp_brain(&current_sprite, 6);
        sp_touch_damage(&current_sprite, -1);
        sp_nohit(&current_sprite, 1);
}
コード例 #4
0
ファイル: DINFO.c プロジェクト: qubodup/freedink-data
void die( void )
{
freeze(1);
&update_status = 0;
int &mholdx = sp_x(1,-1);
int &mholdy = sp_y(1,-1)

//int &crap = create_sprite(&mholdx,&mholdy,5,436,1);

sp_seq(1, 436);
sp_base_idle(1, -1);
wait(3000);
sp_nohit(1, 1);
sp_brain(1, 0);
again:
        choice_start();
"Load a previously saved game"
"Restart game"
"Quit to system"
        choice_end();

if (&result == 1)
{
load();
kill_this_task();
}
   if (&result == 2)
   {
   sp_nohit(1, 0);
   restart_game();
   }

   if (&result == 3)
   {
   kill_game();
   }


}
コード例 #5
0
ファイル: DINFO.c プロジェクト: qubodup/freedink-data
void load( void )
{
Playsound(18,22050,0,0,0);
        choice_start();
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        choice_end();

int &mycrap = game_exist(&result);
if (&mycrap == 0)
    goto again;
    sp_brain(1, 1);
    sp_nohit(1, 0);

    stopmidi();
    script_attach(1000);
   //script now can't die when the load is preformed..
init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");

init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");

init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");

   load_game(&result);
//loading a game kills ALL tasks
}
コード例 #6
0
ファイル: DAM-A1.c プロジェクト: qubodup/freedink-data
void damage( void )
{
    int &hold = sp_editor_num(&missile_target);

if (&missile_target == 0)
  {
     sp_speed(&current_sprite, 0);
     sp_brain(&current_sprite, 0);
    sp_nohit(&current_sprite, 1);
    playsound(41, 22050,0,0,0);
//    sp_script(&current_sprite, "");
    kill_this_task();
  }

  if (&hold != 0)
    {
      &scrap = sp_brain(&missile_target, -1);
      if (&scrap != 0)
      {
   //looks like we should not make the arrow stick
    kill_shadow(&current_sprite);
    sp_active(&current_sprite, 0);
    playsound(41, 22050,0,0,0);
     return;
      }
     sp_speed(&current_sprite, 0);
     sp_brain(&current_sprite, 0);
    playsound(41, 22050,0,0,0);
  //  sp_script(&current_sprite, "");
    return;
    }
    kill_shadow(&current_sprite);
   sp_active(&current_sprite, 0);
    playsound(41, 22050,0,0,0);
  //  sp_script(&current_sprite, "");

    kill_this_task();

   

}
コード例 #7
0
ファイル: EN-PILL1.c プロジェクト: qubodup/freedink-data
void main( void )
{
screenlock(1);
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 2);
sp_nohit(&current_sprite, 0);
sp_exp(&current_sprite, 10);
sp_base_walk(&current_sprite, 130);
sp_base_death(&current_sprite, 140);
sp_touch_damage(&current_sprite, 3);
sp_hitpoints(&current_sprite, 15);
preload_seq(131);
preload_seq(133);
preload_seq(141);
preload_seq(143);

if (random(2,1) == 1)
 {
 sp_target(&current_sprite, 1);
 }
}
コード例 #8
0
ファイル: dinfo.c プロジェクト: wijnen/pydink
void die ()
{
	int r;
	freeze (1);
	sp_base_idle (1, "");
	sp_brain (1, "none");
	sp_seq (1, "die");
	sp_frame (1, 1);
	sp_nohit (1, 1);
	wait (3000);
	while (1)
	{
		r = choice ("Load", "Restart", "Quit");
		if (r == 1)
			escape.load ();
		else if (r == 2)
			restart_game ();
		else if (r == 3)
			kill_game ();
	}
}
コード例 #9
0
ファイル: CH2-GH.c プロジェクト: qubodup/freedink-data
void hit ( void )
 {
  //play noise
  int &hold = sp_editor_num(&current_sprite);

  if (&hold != 0)
    {
     //this was placed by the editor, lets make the chest stay open
     editor_type(&hold, 4); 
     editor_seq(&hold, 177);
     editor_frame(&hold, 6);
     //type means show this seq/frame combo as background in the future
    }
  &save_x = sp_x(&current_sprite, -1);
  &save_y = sp_y(&current_sprite, -1);
  external("make", "gheart");

  sp_seq(&current_sprite, 177);
  sp_script(&current_sprite, "");
  sp_notouch(&current_sprite, 1);
  sp_nohit(&current_sprite, 1);
  kill_this_task();
 }
コード例 #10
0
ファイル: ITEM-B2.c プロジェクト: qubodup/freedink-data
void use( void )
{
    activate_bow();
    &mypower = get_last_bow_power();

    &mholdx = sp_x(1, -1);
    &mholdy = sp_y(1, -1);

    &mydir = sp_dir(1, -1);

    if (&mypower < 100)
    {
        return;
    }


    playsound(44, 22050,0,0,0);


    if (&mydir == 6)
    {
        &mholdx += 30;
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 6);
        sp_dir(&junk, 6);
    }

    if (&mydir == 4)
    {
        &mholdx -= 30;
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 4);
        sp_dir(&junk, 4);
    }

    if (&mydir == 2)
    {
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 2);
        sp_dir(&junk, 2);
    }

    if (&mydir == 8)
    {
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 8);
        sp_dir(&junk, 8);
    }

    if (&mydir == 9)
    {
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 5);
        sp_dir(&junk, 9);
    }
    if (&mydir == 1)
    {
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 1);
        sp_dir(&junk, 1);
    }
    if (&mydir == 7)
    {
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 7);
        sp_dir(&junk, 7);
    }

    if (&mydir == 3)
    {
        &junk = create_sprite(&mholdx, &mholdy, 11, 25, 3);
        sp_dir(&junk, 3);
    }

    &mypower / 100;
    &temp = &strength;
    &temp / 5;


    if (&temp == 0)
    {
        &temp = 1;
    }
    &mypower * &temp;
    sp_timing(&junk, 0);

    if (&bowlore == 1)
    {
        &temp = random(2, 1);

        if (&temp == 1)
        {
            //critical hit
            &mypower * 3;
            playsound(44, 14050,0,0,0);

            say("`4* POWER SHOT *", 1);
        }
    }
    sp_speed(&junk, 6);

    sp_strength(&junk, &mypower);
    sp_range(&junk, 10);
    //this makes it easier to hit stuff
    sp_flying(&junk, 1);
    sp_script(&junk, "dam-a1");
    //when the fireball hits something, it will look to this script, this way
    //we can burn trees when appropriate
    &mshadow = create_sprite(&mholdx, &mholdy, 15, 432, 3);
    sp_brain_parm(&mshadow, &junk);
    sp_que(&mshadow, -500);
    sp_brain_parm(&junk, 1);
    sp_brain_parm2(&junk, &mshadow);
    sp_nohit(&mshadow, 1);


    return;
}
コード例 #11
0
ファイル: DAM-A1.c プロジェクト: qubodup/freedink-data
 void hit( void )
 {
 playsound(37, 28050, 0,0,0);
 sp_active(&current_sprite, 0);
  sp_nohit(&current_sprite, 1);
 }
コード例 #12
0
ファイル: S7-MOM.c プロジェクト: qubodup/freedink-data
void main( void )
{
 preload_seq(221);
 preload_seq(223);
 preload_seq(225);
 preload_seq(227);
 preload_seq(229);
 sp_base_walk(&current_sprite,220);
 sp_brain(&current_sprite, 16);
 sp_speed(&current_sprite,1);
 sp_timing(&current_sprite,33);
 sp_nohit(&current_sprite, 1);
 sp_nodraw(&current_sprite, 1);
 int &wait;

loop:

&wait = random(3000,1000);
wait(&wait);

&wait = random(5, 1);

if (&wait == 1)
  {
    say_stop("`#Woe are us!",&current_sprite);

  }

if (&wait == 2)
  {

    say_stop("`#You cannot hurt us Dink.",&current_sprite);

  }

if (&wait == 3)
  {
    sp_nodraw(&current_sprite, 1);
    say_stop("`#You cannot see us Dink.",&current_sprite);

  }

if (&wait == 4)
  {
    sp_nodraw(&current_sprite, 0);
    say_stop("`#LOOK UPON MY DEFORMED FACE!",&current_sprite);
    wait(500);
    say_stop("Spirit, leave me alone!",1);
  }

if (&wait == 5)
  {
    say_stop("`#Some of us like to eat humans.  I would leave if I were you.",&current_sprite);
    wait(500);
    say_stop("I am not afraid, ghost.",1);
  }



goto loop;

}