Advertisement
Guest User

Untitled

a guest
May 31st, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.83 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using Terraria;
  3. using Terraria.ID;
  4. using Terraria.ModLoader;
  5.  
  6. namespace ExampleMod.Items.Weapons
  7. {
  8.     public class Sabie : ModItem
  9.     {
  10.         public override void SetDefaults()
  11.         {
  12.             item.name = "Bucificatorul";        //The name of your weapon
  13.             item.damage = 50;           //The damage of your weapon
  14.             item.melee = true;          //Is your weapon a melee weapon?
  15.             item.width = 200;           //Weapon's texture's width
  16.             item.height = 200;          //Weapon's texture's height
  17.             item.toolTip = "Da bine rau la buci.";  //The text showed below your weapon's name
  18.             item.useTime = 20;          //The time span of using the weapon. Remember in terraria, 60 frames is a second.
  19.             item.useAnimation = 20;         //The time span of the using animation of the weapon, suggest set it the same as useTime.
  20.             item.useStyle = 1;          //The use style of weapon, 1 for swinging, 2 for drinking, 3 act like shortsword, 4 for use like life crystal, 5 for use staffs or guns
  21.             item.knockBack = 6;         //The force of knockback of the weapon. Maxium is 20
  22.             item.value = 10000;         //The value of the weapon
  23.             item.rare = 2;              //The rarity of the weapon, from -1 to 13
  24.             item.UseSound = SoundID.Item1;      //The sound when the weapon is using
  25.             item.autoReuse = true;          //Whether the weapon can use automaticly by pressing mousebutton
  26.         }
  27.  
  28.         public override void AddRecipes()
  29.         {
  30.             ModRecipe recipe = new ModRecipe(mod);
  31.             recipe.AddIngredient(ItemID.DirtBlock , 10);
  32.             recipe.AddTile(TileID.WorkBenches);
  33.             recipe.SetResult(this);
  34.             recipe.AddRecipe();
  35.         }
  36.  
  37.        
  38.  
  39.         public override void MeleeEffects(Player player, Rectangle hitbox)
  40.         {
  41.            
  42.         }
  43.  
  44.         public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
  45.         {
  46.             target.AddBuff(BuffID.OnFire, 60);      //Add Onfire buff to the NPC for 1 second
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement