ZoriaRPG

One Item Sacrifice Room FFC v0.3

Mar 10th, 2018
129
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Use an item with a negative counter effect for this.
  2.  
  3. const int SAC_D_REG = 0;
  4. const int SAC_TILE_GUY =      0;
  5. const int SAC_GUY_CSET =    0;
  6. const int SAC_GUY_X =           0;
  7. const int SAC_GUY_Y = 0;
  8. const int SAC_STR_X = 0;
  9. const int SAC_STR_Y = 0;
  10. const int SAC_STR_FONT = 0;
  11. const int SAC_STR_COLOUR = 0x01;
  12. const int SAC_MODE_GUYFLICKER = 1;
  13. const int SAC_GUY_FLICKEROUT_TIME = 80;
  14. ffc script OneItemSacrifice
  15. {
  16.      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)
  17.      {
  18.           if ( string_x <= 0 ) { string_x = SAC_STR_X;}
  19.           if ( string_y <= 0 ) { string_x = SAC_STR_Y;}
  20.           if ( string_colour <= 0 ) { string_x = SAC_STR_COLOUR;}
  21.           if ( string_font <= 0 ) { string_x = SAC_STR_FONT;}
  22.           if ( guy_tile <= 0 ) { guy_tile = SAC_TILE_GUY; }
  23.           if ( guy_cset <= 0 || guy_cset > 13) { guy_cset = SAC_GUY_CSET; }
  24.           int __msgstr[256];
  25.           GetMessage(msg_str, __msgstr);
  26.           //make combos solid
  27.           int __solid_cmbs[]=
  28.           {
  29.                34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  30.                50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  31.                66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
  32.           };
  33.           int __old_combo_solidity[42];
  34.           for ( q = 41; q >= 0; --q )
  35.           {
  36.                __old_combo_solidity[q] = Screen->ComboS[q];
  37.                Screen->ComboS[q] = 4;
  38.           }
  39.           item i; int q; bool match; int mode;
  40.           while(1)
  41.           {
  42.                if ( Screen->D[ SAC_D_REG ] ) { break; }
  43.                match = false;
  44.                for ( q = Screen->NumItems(); q > 0; ++q )
  45.                {
  46.                     i = Screen->LoadItem(q);
  47.                     if ( i->ID == itm_id ) { match = true }
  48.                }
  49.                //Draw Guy
  50.                Screen->DrawTile(1, SAC_GUY_X, SAC_GUY_Y, guy_tile,
  51. 1, 1, guy_cset, -1, -1, 0,0,0,0, true, 128);
  52.  
  53.                //draw String
  54.                Screen->DrawString( 1, string_x, string_y, string_font, string_colour, 0, 0, __msgstr, 128);
  55.  
  56.                if ( !match )
  57.                {
  58.                     //play sound
  59.                     Game->PlaySound(SFX_SECRET);
  60.                     Screen->D[ SAC_D_REG ] = 1;
  61.                     break;
  62.                }
  63.                Waitframe();
  64.           }
  65.           for ( q = 0; q < SAC_GUY_FLICKEROUT_TIME; ++q )
  66.           {
  67.                if ( q % 1 )
  68.                {
  69.                     //Draw guy flickering
  70.                     Screen->DrawTile(1, SAC_GUY_X, SAC_GUY_Y, guy_tile,
  71. 1, 1, guy_cset, -1, -1, 0,0,0,0, true, 128);
  72.                }
  73.           }
  74.           //open shutters
  75.           bool shuttersound;
  76.           for ( q =  0; q < 4; ++q )
  77.           {
  78.                if (Screen->Door[q] == D_SHUTTER )
  79.                {
  80.                     shuttersound = true;
  81.                     Screen->Door[q] = D_OPEN;
  82.                }
  83.           }
  84.           if (shuttersound) { Game->PlaySound(SFX_SHUTTER);}
  85.           //make combos non-solid
  86.           for ( q = 41; q >= 0; --q )
  87.           {
  88.                Screen->ComboS[q] = __old_combo_solidity[q];
  89.           }
  90.           this->Data = 0; Quit();
  91.      }
  92. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×