void damage( void ) { int &hold = sp_editor_num(&missile_target); if (&missile_target == 0) { sp_speed(¤t_sprite, 0); sp_brain(¤t_sprite, 0); sp_nohit(¤t_sprite, 1); playsound(41, 22050,0,0,0); // sp_script(¤t_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(¤t_sprite); sp_active(¤t_sprite, 0); playsound(41, 22050,0,0,0); return; } sp_speed(¤t_sprite, 0); sp_brain(¤t_sprite, 0); playsound(41, 22050,0,0,0); // sp_script(¤t_sprite, ""); return; } kill_shadow(¤t_sprite); sp_active(¤t_sprite, 0); playsound(41, 22050,0,0,0); // sp_script(¤t_sprite, ""); kill_this_task(); }
void click () { int game = choice ("&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "&savegameinfo;", "Nevermind"); if (game == 11 || !game_exist (game)) return; stopmidi (); stopcd (); load_game (game); kill_this_task (); }
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(); } }
void touch( void ) { freeze(1); sp_x(1, 283); sp_y(1, 320); sp_seq(1, 452); sp_frame(1, 1); sp_nocontrol(1, 1); //dink can't move until anim is done! sp_touch_damage(¤t_sprite, 0); sp_brain(1, 0); wait(2000); script_attach(1000); fade_down(); &player_map = 198; sp_x(1, 315); sp_y(1, 375); load_screen(198); sp_brain(1, 1); draw_screen(); fade_up(); kill_this_task(); }
void hit ( void ) { //play noise int &hold = sp_editor_num(¤t_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(¤t_sprite, -1); &save_y = sp_y(¤t_sprite, -1); external("make", "gheart"); sp_seq(¤t_sprite, 177); sp_script(¤t_sprite, ""); sp_notouch(¤t_sprite, 1); sp_nohit(¤t_sprite, 1); kill_this_task(); }
void drop(void) { Debug("Item dropped."); kill_this_task(); }
void pickup(void) { Debug("Player now owns this item."); kill_this_task(); }
void disarm(void) { &strength -= 8; kill_this_task(); }
void main( void ) { if (&caveguy == 5) { script_attach(1000); //preload_seq(740); <-- for sucking. preload_seq(375); preload_seq(168); int &junk; int &dude; int &evil; int &evil2; int &evil3; freeze(1); &dude = create_sprite(551, 157, 0, 0, 0); sp_brain(&dude, 0); sp_base_walk(&dude, 370); sp_speed(&dude, 2); sp_timing(&dude, 0); //set starting pic sp_pseq(&dude, 371); sp_pframe(&dude, 1); //Now EVIL &evil = create_sprite(-20, 130, 0, 0, 0); sp_brain(&evil, 0); sp_base_walk(&evil, 300); sp_speed(&evil, 1); sp_timing(&evil, 0); //set starting pic sp_pseq(&evil, 303); sp_pframe(&evil, 1); //Now EVIL's friend &evil2 = create_sprite(-20, 210, 0, 0, 0); sp_brain(&evil2, 0); sp_base_walk(&evil2, 300); sp_speed(&evil2, 1); sp_timing(&evil2, 0); //set starting pic sp_pseq(&evil2, 303); sp_pframe(&evil2, 1); //And the third EVIL &evil3 = create_sprite(300, 470, 0, 0, 0); sp_brain(&evil3, 0); sp_base_walk(&evil3, 300); sp_speed(&evil3, 1); sp_timing(&evil3, 0); //set starting pic sp_pseq(&evil3, 307); sp_pframe(&evil3, 1); Playmidi("1004.mid"); say_stop("`5Ok, let's get going before they come.", &dude); wait(500); say_stop("`5This way.", &dude); move(&dude, 4, 500, 1); wait(50); move(1, 4, 550, 1); wait(150); say("`4Not so fast.", &evil); move(&evil, 6, 100, 1); wait(850); move(&evil3, 8, 380, 1); move_stop(&evil2, 6, 67, 1); say_stop("`4We have a small matter to discuss with your friend.", &evil); say("`4Hahahaaahaha", &evil); say("`4Haha ha ha", &evil2); say_stop("`4Ha ha haaa", &evil3); wait(800); sp_dir(&dude, 3); say_stop("`5It's okay Dink, I can take 'em.", &dude); wait(250); say("`5Allright.", &dude); move_stop(&dude, 4, 400, 1); sp_dir(&dude, 1); say_stop("`5Which one of you is first?", &dude); wait(250); say("`4Haha ha ha", &evil2); wait(500); say_stop("`4Ha ha haaa", &evil3); wait(500); say_stop("`4I am!!", &evil); move_stop(&evil, 2, 157, 1); move_stop(&evil, 6, 170, 1); wait(500); //say("`4I'm attacking now...", &evil); &junk = create_sprite(240, 157, 11, 506, 1); sp_seq(&junk, 506); sp_dir(&junk, 6); sp_speed(&junk, 6); sp_flying(&junk, 1); wait(390); sp_active(&junk, 0); &junk = create_sprite(390, 157, 7, 168, 1); sp_seq(&junk, 168); sp_pseq(&dude, 375); sp_pframe(&dude, 1); say_stop("`5Ahhhhhh!", &dude); wait(50); sp_active(&junk, 0); //Kill guy too say("Noooo!!", 1); move(1, 4, 450, 1); wait(500); say("`4Haha ha ha", &evil2); say_stop("`4Ha ha haaa", &evil3); wait(500); say_stop("`4Our work is done here.", &evil); wait(500); say_stop("`4You may live, if you forget all that you've seen here.", &evil); wait(250); say_stop("Forget ...", 1); wait(500); say_stop("I'll forget allright.", 1); wait(250); move(&evil, 4, -20, 1); wait(360); move(&evil2, 4, -20, 1); move_stop(&evil3, 4, 180, 1); move_stop(&evil3, 2, 470, 1); sp_active(&evil, 0); sp_active(&evil2, 0); sp_active(&evil3, 0); wait(250); say_stop("Forget to remove my foot from your ASS!!", 1); wait(500); say_stop("Are you okay?", 1); wait(500); say_stop("`5I just got hit by a fireball", &dude); wait(500); say_stop("`5I'm going to die!", &dude); wait(250); say_stop("I'm sorry I wasn't fast enough.", 1); wait(500); say_stop("`5It's not your fault", &dude); wait(500); say_stop("`5Just .. just be careful... also, take this...", &dude); wait(500); say_stop("Alright.. what is it?", 1); wait(500); say_stop("`5The Mordavia scroll. It contains magic I needed to...", &dude); say_stop("`5Ahhhhhh.", &dude); wait(1000); say_stop("Ah man...", 1); sp_active(&dude, 0); &caveguy = 6; add_magic("item-p1", 438,14); &story = 7; unfreeze(1); //Fade fade_down(); fill_screen(0); //move Dink &player_map = 625; sp_x(1, 268); sp_y(1, 173); sp_dir(1, 8); load_screen(); draw_screen(); draw_status(); fade_up(); kill_this_task(); } }
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 system" "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(); }
void talk( void ) { knocked: if (&caveguy == 2) { int &me; &me = ¤t_sprite; script_attach(1000); freeze(1); wait(500); playsound(45, 12000, 0,0,0); wait(500); say_stop("Hello, anyone in there?", 1); wait(500); say_stop("Hello?!?", 1); wait(300); say_stop("`0Who wants to know?", &me); wait(300); say_stop("I .. I'm Dink Smallwood, I'm trying to help...", 1); wait(200); say_stop("a poor guy who is imprisoned in the dungeon south of here.", 1); wait(300); say_stop("`0Young Maulwood, people get trapped in places they shouldn't go all the time.", &me); wait(200); say_stop("`0Why should I care what happens to this man?", &me); wait(500); sp_dir(1, 2); wait(500); sp_dir(1, 4); wait(500); say_stop("It's Smallwood sir, and he says...", 1); wait(200); say_stop("he was imprisoned by agents of the Cast and that the lock can only be broken with magic!", 1); wait(300); say_stop("`0Are you high?", &me); wait(300); say_stop("No.", 1); say_stop("`0Oh.", &me); wait(200); say_stop("`0Well, if those Cast members are involved I'd best help.", &me); wait(200); say_stop("`0Come in.", &me); fade_down(); fill_screen(0); //move Dink &player_map = 38; sp_x(1, 261); sp_y(1, 350); load_screen(); draw_screen(); draw_status(); fade_up(); kill_this_task(); return; } if (&caveguy == 3) { int &me; &me = ¤t_sprite; script_attach(1000); freeze(1); playsound(45, 12000, 0,0,0); wait(700); say_stop("Hey, I'm back!", 1); wait(300); say_stop("`0Ah, yes Smallwand, come in ..", &me); fade_down(); fill_screen(0); //move Dink &player_map = 38; sp_x(1, 261); sp_y(1, 350); load_screen(); draw_screen(); draw_status(); fade_up(); kill_this_task(); return; } freeze(1); wait(500); playsound(45, 12000, 0,0,0); wait(500); say_stop("Hello, anyone home?", 1); unfreeze(1); }
void main () { if (debug) { player_map = 400; sp_x (1, 320); sp_y (1, 200); kill_this_task (); } script_attach (1000); player_map = 1; dink_can_walk_off_screen (1); sp_x (1, 320); sp_y (1, 500); load_screen (); draw_screen (); wait (1); int daniel = sp ("daniel-intro"); int knight = create_sprite (320, 500, "none", "silverknight 7", 1); sp_base_walk (knight, "silverknight"); freeze (1); sp_speed (knight, 3); freeze (knight); move_stop (knight, 8, 270, 1); say_stop ("`7Sire! Listen!", knight); say_stop ("`3What is it, John?", daniel); say_stop ("`7The maid in the bar says Dink has been rude to her!", knight); say_stop ("`3What?! That's outrageous!", daniel); say_stop ("`3Fetch him for me!", daniel); say_stop ("`7At once, sire!", knight); move_stop (knight, 2, 500, 1); sp_active (knight, 0); say_stop ("`3What would be a good punishment...", daniel); sp_x (1, 320); sp_y (1, 500); move_stop (1, 8, 270, 1); say_stop ("`3SMALLWOOD HAS RETURNED!", daniel); say_stop ("And his ears hurt...", 1); say_stop ("`3Dink! Your behaviour is intolerable!", daniel); say_stop ("`3You are banished from the kingdom!", daniel); say_stop ("Whatever you say, Danny. Bye!", 1); move_stop (1, 2, 500, 1); say_stop ("`3I hope that was a good idea...", daniel); fade_down_stop (); player_map = 400; load_screen (); draw_screen (); wait (1); bedink.main (); freeze (1); sp_x (1, 320); sp_y (1, -50); fade_up_stop (); move_stop (1, 2, 200, 1); say_stop ("Hmm, what to do now?", 1); say_stop ("I need money to buy food...", 1); say_stop ("Stealing is too evil for me...", 1); say_stop ("Unless... That's an idea!", 1); fade_down_stop (); say_stop_xy ("Dink decided to steal only from those who could spare it.", 10, 200); say_stop_xy ("When he wasn't 'working', he wore armour to hide himself.", 10, 200); say_stop_xy ("After a few years, he had become a very skilled thief.", 10, 200); say_stop_xy ("Then, one night...", 10, 200); beknight.main (); save_game (-1); kill_this_task (); }
void load( void ) { Playsound(18,22050,0,0,0); choice_start(); "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "&savegameinfo" "Nevermind" choice_end(); if (&result == 11) return; if (game_exist(&result) == 0) return; stopmidi(); stopcd(); sp_active(1, 1); sp_x(1, 334); sp_y(1, 161); sp_base_walk(1, 70); sp_base_attack(1, 100); sp_dir(1, 4); sp_brain(1, 1); sp_que(1, 0); sp_noclip(1, 0); set_mode(2); //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"); 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"); load_game(&result); kill_this_task(); }