Advertisement
ZoriaRPG

Simple Wand of Wondor

Jan 23rd, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.07 KB | None | 0 0
  1.  
  2.  
  3.     case itype_wand:
  4.         {
  5.             //!Dimentio Edit Territory
  6.             int itemid = (int)Link.getDirectItem(); //Grab the item from the item Link is using this frame.
  7.             if(Lwpns.idCount(itemsbuf[itemid].misc1))
  8.                 return false; //kill it if he has already used it.
  9.         //! This will be BROKEN if other weapons of this type are on the screen, so BEWARE.
  10.            
  11.         //Create the weapon
  12.         //params ( x, y, z, weapon_type, item_family, damage, direction, parent_item_id, UID )
  13.         Lwpns.add(new weapon((fix)wx,(fix)wy,(fix)wz,itemsbuf[itemid].misc1,itemsbuf[itemid].family,itemsbuf[itemid].power*DAMAGE_MULTIPLIER,dir,itemid,getUID()));
  14.             //Play the sound associated with this weapon.
  15.         sfx(itemsbuf[itemid].usesound,pan(Wx));
  16.         /*
  17.        
  18.         w->LOADGFX(itemsbuf[wandfireweapon1].wpn3 + w->dir); //use Sprites[2]
  19.                  w->step = itemsbuf[wandfireweapon1].misc2; //Attributes[1]
  20.        
  21.         */
  22.         //Pay the magic cost associated with this weapon.
  23.             paymagiccost(itemid);
  24.            
  25.  
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement