SHARE
TWEET

Fake Z1 Room Guy (v0.3, Final)

ZoriaRPG Dec 12th, 2018 (edited) 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import "std.zh"
  2.  
  3. ///////////////////////////
  4. /// Fake Room Guy FFC   ///
  5. /// v0.3                ///
  6. /// 11th December, 2018 ///
  7. /// By: ZoriaRPG        ///
  8. ///////////////////////////
  9.  
  10. // Instructions
  11. //Put a solid combo down where you want the fake guy,
  12. //then add an ffc to the screen.
  13. //Set the FFC combo to the combo of a guy.
  14. //Set its script to fakeroomguy, then as the script args:
  15.  
  16. // D0: The Screen Message to show. This is mandatory.
  17. // D1: Override the X position of the string. This is optional.
  18. // D2: Override the Y position of the string. This is optional.
  19. // D3: Override the default (white in Classic) string colour.
  20. // D4: Override the default Z1 font.
  21. // D5: Delay between characters output to the screen. Emulates Z1 messages.
  22.  
  23. ffc script fakeroomguy
  24. {
  25.     void run(int zqstring, int mx, int my, int mcolour, int mfont, int delay)
  26.     {
  27.         if ( !mx ) mx = 24;
  28.         if ( !my ) my = 32;
  29.         if ( !mcolour ) mcolour = 0x01;
  30.         if ( !mfont ) mfont = FONT_Z1;
  31.         if ( !delay ) delay = 8;
  32.         int buffer[100];
  33.         GetMessage(zqstring, buffer);
  34.         for ( int q = 99; q > 0; --q )
  35.         {
  36.             if ( buffer[q] != 0 && buffer[q] != ' ' ) break;
  37.             else buffer[q] = 0;
  38.         }
  39.         int msg[100]; int pos; int f; bool trail; bool done = false;
  40.         while(1)
  41.         {
  42.            
  43.             ++f;
  44.             if ( !(f%delay) && !done )
  45.             {
  46.                 if ( !buffer[pos] )
  47.                 {
  48.                     done = true;
  49.                 }
  50.                 else
  51.                 {
  52.                     msg[pos] = buffer[pos];
  53.                     if ( buffer[pos] != 0 ) Game->PlaySound(18);
  54.                     ++pos;
  55.                 }
  56.             }
  57.            
  58.             Screen->DrawString(1, mx, my, mfont, mcolour, -1, 0, msg, 128);
  59.             Waitframe();
  60.         }
  61.     }
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top