The Dink Network

Original Dink Scripts search

June 19th 2012, 07:23 PM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
So I'm trying to re-create scripts that cause the basic and most common functions of Dink, but I have no idea which scripts these are or how to actually go about it. Simple question: Can anyone tell me the name of which scripts these are and their contents? (I'm not a fan of .d conversion, and also haven't gotten it to work anyway).

The Level Up script (Text editing/No longer Needed)
Death menu (Going to play a death midi & edit the text)
Escape/Pause menu and its subsequent Quit screen (text editing)

edit: Found the levelup one mentioned in the DinkC book by chance in an example box (lraise.c) so I no longer need that one. Thankyou, Dan Walma
PS: posting this from college and google is blocked, so I can't simply do a search that way for previous topics.
June 19th 2012, 07:33 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Death: dinfo.c
Escape: escape.c

Contents:

dinfo:
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 Windows"
        choice_end();

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

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

}

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
}


escape.c:
//this is run when the escape key is pressed

void main(void)
{
int &old_result;
Playsound(18, 22050, 0,0,0);
freeze(1);
help:

        choice_start();
        "Load a previously saved game"
        "Restart"
        "Quit to Windows"
        "Help"
        "Continue"
        "View/change gamepad buttons"
        choice_end();

if (&result == 1)
  {
        choice_start();
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "Nevermind"
        choice_end();
if (&result == 11) goto help;

if (game_exist(&result) == 0)
  {

  unfreeze(1);
  wait(2000);  
  Say("Wow, this loaded game looks so familiar.", 1);
  kill_this_task();
    return;
   }

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");

init("load_sequence_now graphics\dink\hit\normal\ds-h2- 102 75 60 72 -19 -9 19 9");
init("load_sequence_now graphics\dink\hit\normal\ds-h4- 104 75 61 73 -19 -10 19 10");
init("load_sequence_now graphics\dink\hit\normal\ds-h6- 106 75 58 71 -18 -10 18 10");
init("load_sequence_now graphics\dink\hit\normal\ds-h8- 108 75 61 71 -19 -10 19 10");

  unfreeze(1);
  load_game(&result);
 &update_status = 1;
 draw_status();

  kill_this_task();
  }

if (&result == 3)
  {
        choice_start();
        "Yes, I really want to quit the game"
        "I was just kidding, back to the action, please"
        choice_end();
   if (&result == 2)
   {
    wait(300);
    say("Phew, that was a close one!",1);
   }
   if (&result == 1)
   {
   kill_game();
   }
  unfreeze(1);
  kill_this_task();
  }

  if (&result == 4)
  {
helpstart:
        choice_start();
        set_y 240
        title_start();

What would you like help on?
        title_end();
        "Keyboard commands"
        "How to save the game"
        "Done"
        choice_end();
Debug("Ok, result is &result");

      if (&result == 1)
     {
        choice_start();
        set_y 240
        title_start();
Ctrl = Attack/choose
Space = Talk/examine/skip text
Shift = Magic
Enter = Item/magic equip screen

Use the arrow keys to move.  Joystick and control pad are also supported.
        title_end();
        "Ok"
        choice_end();
       goto helpstart;
     }

      if (&result == 2)
     {
        choice_start();
        set_y 240
        title_start();
In this quest, saving your game can
only be done at the special 'Save
Machine'. (it hums strangely)

        title_end();
        "Ok"
        choice_end();
       goto helpstart;
     }

      if (&result == 3)
      {
       goto help;
      }

  }

if (&result == 2)
  {
        choice_start();
        "Yes, I really want to restart from scratch"
        "No, go back!"
        choice_end();
   if (&result == 2)
   {
   goto help;
   }
   if (&result == 1)
   {
   unfreeze(1);
   restart_game();
   kill_this_task();
   }
  unfreeze(1);
  kill_this_task();
  }

   if (&result == 6)
   {
   buttonstart:
        choice_start();
        "Button 1 - &buttoninfo"
        "Button 2 - &buttoninfo"
        "Button 3 - &buttoninfo"
        "Button 4 - &buttoninfo"
        "Button 5 - &buttoninfo"
        "Button 6 - &buttoninfo"
        "Button 7 - &buttoninfo"
        "Button 8 - &buttoninfo"
        "Button 9 - &buttoninfo"
        "Button 10 - &buttoninfo"
        "Nevermind"
        choice_end();

if (&result != 11)
  {
  &old_result = &result;
        choice_start();
        set_y 140
        title_start();
What should button &old_result do?
        title_end();
        "Attack"
        "Talk/look"
        "Magic"
        "Item screen"
        "Main menu"
        "View map (if you have one)"
        "Nevermind"
        choice_end();
  if (&result < 7)
   set_button(&old_result, &result);

   goto buttonstart;
  }
    
       goto help;

   }

   if (&result == 7)
   {
        choice_start();
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo"
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "&savegameinfo" 
        "Nevermind"
        choice_end();

   save_game(&result);

   }

  unfreeze(1);
  kill_this_task();
}
June 19th 2012, 07:38 PM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Thanks a ton

Although I did find some errors in the escape.c script; Fixed now though but previously the game simply wouldn't unfreeze Dink, nor load the secondary menu's (confirmation screens). Or in the case of the Quit button, it would open the Restart Game option's confirmation menu after displaying the Quit confirm choice menu, before freezing.

Fixed these anyway, as I've said.
June 21st 2012, 04:05 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Wait, Google is blocked? WTF?