Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using Terraria;
  3. using Terraria.ModLoader;
  4.  
  5. namespace DropCrazy
  6. {
  7. public class DropCrazy : Mod
  8. {
  9. public DropCrazy()
  10. {
  11. Properties = new ModProperties()
  12. {
  13. Autoload = true,
  14. };
  15. }
  16. }
  17.  
  18. public class DropCrazyGlobalNPC : GlobalNPC
  19. {
  20. public override void NPCLoot(NPC npc)
  21. {
  22. if(Main.rand.NextFloat() < 1.0f) // 100% chance to drop another item
  23. {
  24. Item.NewItem(npc.position, npc.width, npc.height, Main.rand.Next(Terraria.ModLoader.ItemLoader.ItemCount));
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement