Advertisement
ZoriaRPG

Bomb Arrows for 2.55 (Weapon Script)

Mar 18th, 2019
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.01 KB | None | 0 0
  1. lweapon script bombarrow
  2. {
  3.     void run()
  4.     {
  5.         //quit if bombs not in a slot
  6.         itemdata bomb; bool found; bool super;
  7.         bomb = Game->LoadItemData(Link->ItemA);
  8.         if ( bomb->Family == IC_BOMB ) found = true;
  9.         if ( bomb->Family == IC_SBOMB ) { found = true; super = true; }
  10.         if ( !found )
  11.         {
  12.             bomb = Game->LoadItemData(Link->ItemB);
  13.             if ( bomb->Family == IC_BOMB ) { found = true;
  14.             if ( bomb->Family == IC_SBOMB ) { found = true; super = true; }
  15.         }
  16.         if ( !found ) Quit();
  17.         else
  18.         {
  19.             pow = bomb->Damage;
  20.             if ( super )
  21.             {
  22.                 if ( !Game->Counter[CR_SBOMBS] ) Quit();
  23.                 else --Game->Counter[CR_SBOMBS];
  24.             }
  25.             else
  26.             {
  27.                 if ( !Game->Counter[CR_BOMBS] ) Quit();
  28.                 else --Game->Counter[CR_BOMBS];
  29.                
  30.             }
  31.         }
  32.         //quit if not enough bombs
  33.         int x; int y; int pow;
  34.         while(this->isValid()) { x = this->X; y = this->Y; Waitframe(); }
  35.         lweapon boom = Screen->CreateLWeapon( (( super ) ? LW_SBOMBBLAST : LW_BOMBBLAST ));
  36.         boom->Damage = pow;
  37.         boom->X = x;
  38.         boom->Y = y;
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement