Lol Bozo
Steampunker
it says there is an error, but i dont know how to fix it
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace LordBozo.NPCs
{
public class MyGlobalNPC : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
if (npc.type == NPCID.Golem) //this is where the error is at
public override bool PreNPCLoot(NPC npc)
{
int rand = Main.rand.Next(0, 9);
if (rand == 0)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1258);
// Drop item 1
else if (rand == 1)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1122);
// Drop item 2
else if (rand == 2)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 8899);
else if (rand == 3)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1248);
else if (rand == 4)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1294);
else if (rand == 5)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1295);
else if (rand == 6)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1296);
else if (rand == 7)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 1297);
else if (rand == 8)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("OneRing")); // Etc etc, untill you reach 8, where you drop your own item.
return false;
}
}
}
}