Advertisement
ZoriaRPG

Scripted ZC (Z1) Candle

Jun 25th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. //D0 Set to 0 for a red candle; any other value for a blue candle.
  2. item script scriptcandle
  3. {
  4.     void run(int useonce)
  5.     {
  6.         int q[8]; lweapon flame[2];
  7.         if ( useonce )
  8.         {
  9.             //seek a marker
  10.             for ( q[0] = Screen->NumLWeapons(); q[0] > 0; --q[0] )
  11.             {
  12.                 flame[1] = Screen->LoadLWeapon[q[0]];
  13.                 if ( flame[1]->ID != LW_SCRIPT10 ) continue();
  14.                 if ( flame[1]->Misc[15] = 1 ) Quit();
  15.             }
  16.             flame[1] = Screen->CreateLWeapon(LW_SCRIPT10);
  17.             flame[1]->DeadState = -10;
  18.             flame[1]->DrawYOffset = -900;
  19.             flame[1]->Misc[15] = 1;
  20.         }
  21.         Link->Action = LA_ATTACKING;
  22.         flame[0] = NextToLink(LW_FLAME, 16);
  23.         Game->PlaySound(this->UseSound);
  24.         flame[0]->Damage = this->Power;
  25.         flame[0]->UseSprite(12);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement