Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Use an item with a negative counter effect for this.
- const int SAC_D_REG = 0;
- const int SAC_TILE_GUY = 0;
- const int SAC_GUY_CSET = 0;
- const int SAC_GUY_X = 0;
- const int SAC_GUY_Y = 0;
- const int SAC_STR_X = 0;
- const int SAC_STR_Y = 0;
- const int SAC_STR_FONT = 0;
- const int SAC_STR_COLOUR = 0x01;
- const int SAC_MODE_GUYFLICKER = 1;
- const int SAC_GUY_FLICKEROUT_TIME = 80;
- ffc script OneItemSacrifice
- {
- void run(int item_id, int msg_str, int string_x, int string_x, int string_font, int string_colour, int guy_tile, int guy_cset)
- {
- if ( string_x <= 0 ) { string_x = SAC_STR_X;}
- if ( string_y <= 0 ) { string_x = SAC_STR_Y;}
- if ( string_colour <= 0 ) { string_x = SAC_STR_COLOUR;}
- if ( string_font <= 0 ) { string_x = SAC_STR_FONT;}
- if ( guy_tile <= 0 ) { guy_tile = SAC_TILE_GUY; }
- if ( guy_cset <= 0 || guy_cset > 13) { guy_cset = SAC_GUY_CSET; }
- int __msgstr[256];
- GetMessage(msg_str, __msgstr);
- //make combos solid
- int __solid_cmbs[]=
- {
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
- };
- int __old_combo_solidity[42];
- for ( q = 41; q >= 0; --q )
- {
- __old_combo_solidity[q] = Screen->ComboS[q];
- Screen->ComboS[q] = 4;
- }
- item i; int q; bool match; int mode;
- while(1)
- {
- if ( Screen->D[ SAC_D_REG ] ) { break; }
- match = false;
- for ( q = Screen->NumItems(); q > 0; ++q )
- {
- i = Screen->LoadItem(q);
- if ( i->ID == itm_id ) { match = true }
- }
- //Draw Guy
- Screen->DrawTile(1, SAC_GUY_X, SAC_GUY_Y, guy_tile,
- 1, 1, guy_cset, -1, -1, 0,0,0,0, true, 128);
- //draw String
- Screen->DrawString( 1, string_x, string_y, string_font, string_colour, 0, 0, __msgstr, 128);
- if ( !match )
- {
- //play sound
- Game->PlaySound(SFX_SECRET);
- Screen->D[ SAC_D_REG ] = 1;
- break;
- }
- Waitframe();
- }
- for ( q = 0; q < SAC_GUY_FLICKEROUT_TIME; ++q )
- {
- if ( q % 1 )
- {
- //Draw guy flickering
- Screen->DrawTile(1, SAC_GUY_X, SAC_GUY_Y, guy_tile,
- 1, 1, guy_cset, -1, -1, 0,0,0,0, true, 128);
- }
- }
- //open shutters
- bool shuttersound;
- for ( q = 0; q < 4; ++q )
- {
- if (Screen->Door[q] == D_SHUTTER )
- {
- shuttersound = true;
- Screen->Door[q] = D_OPEN;
- }
- }
- if (shuttersound) { Game->PlaySound(SFX_SHUTTER);}
- //make combos non-solid
- for ( q = 41; q >= 0; --q )
- {
- Screen->ComboS[q] = __old_combo_solidity[q];
- }
- this->Data = 0; Quit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement