Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //YoyoProj.cs
- using Terraria;
- using System;
- using Terraria.ID;
- using Microsoft.Xna.Framework;
- using System.Diagnostics;
- using Terraria.ModLoader;
- namespace Mokilspecial.Items //Make sure this leads to this file using '.' to show folder insides - Eg. ExampleMod.Weapons.Yoyos
- {
- public class StarYoyo : ModItem
- {
- public override void SetStaticDefaults()
- {
- DisplayName.SetDefault("Звёздная йо-йо Мокил'a");
- Tooltip.SetDefault("Отлично подходит для убийства монстров!");
- }
- public override void SetDefaults() //Setting the default stats of the item.
- {
- item.CloneDefaults(ItemID.Terrarian); //Telling the item to clone the stats of a wooden yoyo, change to a more powerful one if you want a better yoyo by default.
- item.damage = 170; //How much damage the yoyo does.
- item.value = 50000; //It's value is how many copper coins it's worth - Eg. 50000 = 5 Gold
- item.rare = 5; //Wether it will burn in lava or not - 0 Means it will.
- item.knockBack = 0; //The items knockback.
- item.channel = true; //No explantion.
- item.useStyle = 5; //How the item is used.
- item.useAnimation = 25; //The animation the item uses.
- item.useTime = 25; //The speed of the animation.
- item.shoot = mod.ProjectileType("YoyoProj"); //What projectile the item shoots.
- }
- public override void AddRecipes() //Adds a recipe to the game.
- {
- ModRecipe recipe = new ModRecipe(mod); //Initializes the recipe.
- recipe.AddIngredient(Terraria.ID.ItemID.DirtBlock, 1); //Setting an ingredient of 1 dirt block.
- recipe.AddTile(TileID.WorkBenches); //Setting the requirement of a work bench.
- recipe.SetResult(this); //Setting the result of the recipe.
- recipe.AddRecipe(); //Finalzing the recipe.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment