Back to index

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