Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////
- /// Simple Whistle Trigger ///
- /// v0.3 - 3rd July, 2018 ///
- /// By: ZoriaRPG ///
- //////////////////////////////
- const int CF_CUSTOM_WHISTLE = 0; // If non-zero, the script will affect combos
- // with this flag. Otherwise, it will use CF_SCRIPT5.
- //D0: The number of times the whistle must be used to trigger.
- //D1: Special combo flag. If this is <= 0, then the script will try
- // to use 'CF_CUSTOM_WHISTLE'. If that is also <= 0, then the script defaults to CF_SCRIPT5.
- //D2: The secret sound to play. If set to 0, the script defaults to SFX_SECRET.
- ffc script whistlesecret
- {
- void run(int count, int cf, int sfx)
- {
- lweapon w;
- while(count > 0)
- {
- for ( int q = Screen->NumLWeapons(); q > 0; --q )
- {
- w = Screen->LoadLWeapon(q);
- if ( w->ID == LW_WHISTLE )
- {
- if ( w->HitXOffset > -32768 )
- {
- --count; Game->PlaySound(Cond(sfx > 0, sfx, SFX_SECRET));
- }
- else
- {
- w->HitXOffset = -32768;
- Remove(w);
- }
- }
- }
- Waitframe();
- }
- //Run secret here
- //e.g.
- for ( int q = 0; q < 176; ++q )
- {
- if ( Screen->ComboF[q] == Cond(cf > 0, cf, Cond(CF_CUSTOM_WHISTLE > 0, CF_CUSTOM_WHISTLE, CF_SCRIPT5)) )
- {
- ++Screen->ComboD[q];
- Screen->ComboF[q] = 0;
- }
- else if ( Screen->ComboI[q] == Cond(cf > 0, cf, Cond(CF_CUSTOM_WHISTLE > 0, CF_CUSTOM_WHISTLE, CF_SCRIPT5)) )
- {
- ++Screen->ComboD[q];
- }
- }
- }
- }//////////////////////////////
- /// Simple Whistle Trigger ///
- /// v0.2 - 2nd July, 2018 ///
- /// By: ZoriaRPG ///
- //////////////////////////////
- const int CF_CUSTOM_WHISTLE = 0; // If non-zero, the script will affect combos
- // with this flag. Otherwise, it will use CF_SCRIPT5.
- //D0: The number of times the whistle must be used to trigger.
- //D1: Special combo flag. If this is <= 0, then the script will try
- // to use 'CF_CUSTOM_WHISTLE'. If that is also <= 0, then the script defaults to CF_SCRIPT5.
- //D2: The secret sound to play. If set to 0, the script defaults to SFX_SECRET.
- ffc script whistlesecret
- {
- void run(int count, int cf, int sfx)
- {
- lweapon w;
- while(count > 0)
- {
- for ( int q = Screen->NumLWeapons(); q > 0; --q )
- {
- w = Screen->LoadLWeapon(q);
- if ( w->ID == LW_WHISTLE )
- {
- if ( w->HitXOffset > -32768 )
- {
- --count; Game->PlaySound(Cond(sfx > 0, sfx, SFX_SECRET));
- }
- else
- {
- w->HitXOffset = -32768;
- Remove(w);
- }
- }
- }
- Waitframe();
- }
- //Run secret here
- //e.g.
- for ( int q = 0; q < 176; ++q )
- {
- if ( Screen->ComboF[q] == Cond(cf > 0, cf, Cond(CF_CUSTOM_WHISTLE > 0, CF_CUSTOM_WHISTLE, CF_SCRIPT5)) )
- {
- ++Screen->ComboD[q];
- Screen->ComboF[q] = 0;
- }
- else if ( Screen->ComboI[q] == Cond(cf > 0, cf, Cond(CF_CUSTOM_WHISTLE > 0, CF_CUSTOM_WHISTLE, CF_SCRIPT5)) )
- {
- ++Screen->ComboD[q];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement