Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Microsoft.Xna.Framework;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- namespace YourModName.Items.Weapons
- {
- public class MagicWeapon : ModItem
- {
- public override void SetDefaults()
- {
- item.name = "Magic";
- item.damage = 34;
- item.magic = true; //this make the item do magic damage
- item.width = 24;
- item.height = 28;
- item.toolTip = "Casts a fire bolt.";
- item.useTime = 30;
- item.useAnimation = 30;
- item.useStyle = 5; //this is how the item is holded
- item.noMelee = true;
- item.knockBack = 2;
- item.value = 1000;
- item.rare = 6;
- item.mana = 5; //mana use
- item.UseSound = SoundID.Item21; //this is the sound when you use the item
- item.autoReuse = true;
- item.shoot = mod.ProjectileType ("MagicProjectile"); //this make the item shoot your projectile
- item.shootSpeed = 8f; //projectile speed when shoot
- }
- }
- }
- RAW Paste Data
- using System;
- using Microsoft.Xna.Framework;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- namespace YourModName.Items.Weapons
- {
- public class MagicWeapon : ModItem
- {
- public override void SetDefaults()
- {
- item.name = "Magic";
- item.damage = 34;
- item.magic = true; //this make the item do magic damage
- item.width = 24;
- item.height = 28;
- item.toolTip = "Casts a fire bolt.";
- item.useTime = 30;
- item.useAnimation = 30;
- item.useStyle = 5; //this is how the item is holded
- item.noMelee = true;
- item.knockBack = 2;
- item.value = 1000;
- item.rare = 6;
- item.mana = 5; //mana use
- item.UseSound = SoundID.Item21; //this is the sound when you use the item
- item.autoReuse = true;
- item.shoot = mod.ProjectileType ("MagicProjectile"); //this make the item shoot your projectile
- item.shootSpeed = 8f; //projectile speed when shoot
- }
- }
- }
- We use cookies
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement