ZoriaRPG

Automatic Dark Room Candle Item Script

Sep 5th, 2019
186
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Set to an item's action script, and flag that item as having a passive script.
  2. //Requires the script flag 'Item Scripts Continue to Run'
  3.  
  4. item script autocandleA
  5. {
  6.     int f;
  7.     while(1)
  8.     {
  9.         ++f;
  10.         unless ( ((f%20)) && !Screen->Lit ) Screen->Lit = true; //this could all be a pointless waste of instructions
  11.                     //trying to reduce how often we write ->Lit.
  12.         Waitframe();
  13.     }
  14. }
  15.  
  16. item script autocandleB //Lighter ZASM. need to check performance difference against v. A
  17. {
  18.     while(1)
  19.     {
  20.         Screen->Lit = true;
  21.         Waitframe();
  22.     }
  23. }
RAW Paste Data