Back to index

freedink-data  1.08.20080920
ITEM-ELI.c
Go to the documentation of this file.
00001 //item elixer
00002 
00003 void use( void )
00004 {
00005 &life += 20;
00006 if (&life > &lifemax)
00007     &life = &lifemax;
00008 playsound(22, 22050, 0,0,0);
00009 
00010 //lets make the star magic graphic effect
00011 spawn("mag-star");
00012 
00013 kill_cur_item();
00014 //nothing more will be read here, put stuff in disarm and drop if you need
00015 //something done
00016 }
00017 
00018 void disarm(void)
00019 {
00020 debug("Elixer disarmed.");
00021 
00022 kill_this_task();
00023 }
00024 
00025 void arm(void)
00026 {
00027 preload_seq(169);
00028 init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
00029 init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
00030 init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
00031 init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");
00032 
00033 init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
00034 init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
00035 init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
00036 init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");
00037 
00038 init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
00039 init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
00040 init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
00041 init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");
00042 
00043 }
00044 
00045 void pickup(void)
00046 {
00047 kill_this_task();
00048 }
00049 
00050 void drop(void)
00051 {
00052 debug("elixer removed");
00053 draw_status();
00054 kill_this_task();
00055 }