Back to index

freedink-data  1.08.20080920
en-gmog.c
Go to the documentation of this file.
00001 //Mog Enemy sprite script
00002 
00003 void main( void )
00004 {
00005        int &mcounter;
00006        sp_brain(&current_sprite, 16);
00007        sp_speed(&current_sprite, 1);
00008        sp_distance(&current_sprite, 50);
00009        sp_range(&current_sprite, 45);
00010        sp_frame_delay(&current_sprite, 50);
00011        sp_timing(&current_sprite, 0);
00012        sp_exp(&current_sprite, 150);
00013        sp_base_walk(&current_sprite, 780);
00014        sp_base_attack(&current_sprite, 770);
00015        sp_defense(&current_sprite, 4);
00016        sp_strength(&current_sprite, 20);
00017        sp_touch_damage(&current_sprite, 8);
00018        sp_hitpoints(&current_sprite, 50);
00019        preload_seq(772);
00020        preload_seq(774);
00021        preload_seq(776);
00022        preload_seq(778);
00023        preload_seq(785);
00024        
00025        preload_seq(781);
00026        preload_seq(783);
00027        preload_seq(787);
00028        preload_seq(789);
00029        sp_pframe(&current_sprite, 1);
00030        sp_pseq(&current_sprite, 789);
00031 }
00032 
00033 
00034 void hit( void )            
00035 {
00036        sp_brain(&current_sprite, 9);
00037        sp_target(&current_sprite, &enemy_sprite);
00038        //lock on to the guy who just hit us
00039        //playsound
00040        playsound(28, 22050,0,&current_sprite, 0);
00041 }
00042 
00043 void die( void )
00044 {
00045        //fix, must make it so that the monster isn't hit again.
00046        sp_nohit(&current_sprite, 1);
00047        screenlock(0);
00048        freeze(1);
00049        sp_touch_damage(&current_sprite, 0);
00050        sp_brain(&current_sprite, 0);
00051        sp_seq(&current_sprite, 0);
00052        sp_pseq(&current_sprite, 785);
00053        sp_pframe(&current_sprite, 1);
00054        //For screen fade & change
00055        int &wherex = sp_x(1, -1);
00056        int &wherey = sp_y(1, -1);
00057 
00058        say_stop("`4Please...", &current_sprite);
00059        wait(500);
00060        say_stop("`4I will tell you where the secret Cast camp is...", &current_sprite);
00061        wait(1000);
00062        fade_down();
00063        wait(2000);
00064        &gobpass = 5;
00065        script_attach(1000);
00066 
00067    //change maps and stuff ...
00068        &player_map = 489;
00069        sp_x(1, 226);
00070        sp_y(1, 386);
00071        load_screen(489);
00072        draw_screen();
00073        draw_status();
00074        fade_up();
00075        kill_this_task();
00076 }
00077 
00078 void attack( void )
00079 {
00080        playsound(27, 22050,0,&current_sprite, 0);
00081        &mcounter = random(4000,0);
00082        sp_attack_wait(&current_sprite, &mcounter);
00083 }
00084 
00085