Guest User

Untitled

a guest
Jan 6th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. //YoyoProj.cs
  2. using Terraria;
  3. using System;
  4. using Terraria.ID;
  5. using Microsoft.Xna.Framework;
  6. using System.Diagnostics;
  7. using Terraria.ModLoader;
  8.  
  9. namespace Mokilspecial.Items //Make sure this leads to this file using '.' to show folder insides - Eg. ExampleMod.Weapons.Yoyos
  10. {
  11. public class StarYoyo : ModItem
  12. {
  13. public override void SetStaticDefaults()
  14. {
  15. DisplayName.SetDefault("Звёздная йо-йо Мокил'a");
  16. Tooltip.SetDefault("Отлично подходит для убийства монстров!");
  17. }
  18.  
  19. public override void SetDefaults() //Setting the default stats of the item.
  20. {
  21. 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.
  22. item.damage = 170; //How much damage the yoyo does.
  23. item.value = 50000; //It's value is how many copper coins it's worth - Eg. 50000 = 5 Gold
  24. item.rare = 5; //Wether it will burn in lava or not - 0 Means it will.
  25. item.knockBack = 0; //The items knockback.
  26. item.channel = true; //No explantion.
  27. item.useStyle = 5; //How the item is used.
  28. item.useAnimation = 25; //The animation the item uses.
  29. item.useTime = 25; //The speed of the animation.
  30. item.shoot = mod.ProjectileType("YoyoProj"); //What projectile the item shoots.
  31. }
  32.  
  33. public override void AddRecipes() //Adds a recipe to the game.
  34. {
  35. ModRecipe recipe = new ModRecipe(mod); //Initializes the recipe.
  36. recipe.AddIngredient(Terraria.ID.ItemID.DirtBlock, 1); //Setting an ingredient of 1 dirt block.
  37. recipe.AddTile(TileID.WorkBenches); //Setting the requirement of a work bench.
  38. recipe.SetResult(this); //Setting the result of the recipe.
  39. recipe.AddRecipe(); //Finalzing the recipe.
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment