ZoriaRPG

Custom Screen Guy (v0.2) NPC Script for 2.55

Mar 8th, 2019
125
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import "std.zh"
  2.  
  3. ///////////////////////////
  4. /// NPC Script Room Guy ///
  5. /// v0.2                ///
  6. /// 8th March, 2019     ///
  7. /// By: ZoriaRPG        ///
  8. ///////////////////////////
  9.  
  10. //ZQuest Screen Menu Sets Options
  11. //Set Screen->String to the string to display
  12. //Set Screen->Catchall to the delay time, if the roomtype is none.
  13. //Otherwise, you can set a default delay on the enemy using D0.
  14.  
  15. npc script screenguy
  16. {
  17.     const int DELAY = 20; //Time to spawn.
  18.     void run(int delay)
  19.     {
  20.         delay = this->InitD[0] > 0 ? delay : DELAY;
  21.        
  22.         if ( !Screen->RoomType )
  23.         {
  24.             if ( Screen->Catchall )
  25.             {
  26.                 delay = Screen->Catchall;
  27.             }
  28.         }
  29.         this->CollDetection = false;
  30.         //this->DrawYOffset = -32768;
  31.         //Waitframes(Screen->Catchall); //might be in use depending on room type
  32.         Waitframes(delay);
  33.         Screen->Message(Screen->String);
  34.     }
  35. }
RAW Paste Data