Ok, got the NPC's fixed, just had to move around your code a bit. This was in the wrong place:
Code:
else
{
GC.AddSend(Packets.NPCSay("You do not have a Earth Token Kill AgilRats for the token"));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
This is what I changed the code to be. Also added the code above to the Lab1 NPC. So now it looks like this.
Lab2:
Code:
#region Lab2
case 1153:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would u like to go to lab2 it will cost u a Skytoken."));
GC.AddSend(Packets.NPCLink("Lab 2", 1));
GC.AddSend(Packets.NPCLink("TwinCity", 2));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.Inventory.Count < 40)
{
if (GC.MyChar.InventoryContains(721537, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(721537));
GC.MyChar.Teleport(1352, 029, 230);
}
else
{
GC.AddSend(Packets.NPCSay("You do not have a Sky Token Kill Gold Ghosts for the token"));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
}
if (Control == 2)
{
GC.MyChar.Teleport(1002, 431, 379);
}
break;
}
#endregion
Lab3:
Code:
#region Lab3
case 1154:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would u like to go to lab3 it will cost u 1 Earth Token."));
GC.AddSend(Packets.NPCLink("Lab 3", 1));
GC.AddSend(Packets.NPCLink("TwinCity", 2));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.Inventory.Count < 40)
{
if (GC.MyChar.InventoryContains(721538, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(721538));
GC.MyChar.Teleport(1353, 028, 270);
}
else
{
GC.AddSend(Packets.NPCSay("You do not have a Earth Token Kill AgilRats for the token"));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
}
if (Control == 2)
{
GC.MyChar.Teleport(1002, 431, 379);
}
break;
}
#endregion
Lab4
Code:
#region Lab4
case 1155:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would u like to go to Lab4 or go back to TwinCity?"));
GC.AddSend(Packets.NPCLink("Lab4", 1));
GC.AddSend(Packets.NPCLink("TwinCity", 2));
GC.AddSend(Packets.NPCLink("No thanks i think i'm gonna stay here awhile!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.Inventory.Count < 40)
{
if (GC.MyChar.InventoryContains(721539, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(721539));
GC.MyChar.Teleport(1354, 009, 290);
}
else
{
GC.AddSend(Packets.NPCSay("You do not have a SoulToken Kill FiendBats for the token"));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
}
if (Control == 2)
{
GC.MyChar.Teleport(1002, 431, 379);
}
break;
}
#endregion
Still have the problem with the Invisable AgileRats and the Bladeling..will post back if I can find a fix.
Please don't give me thanks, this is coreymills code, I just changed it up to work for me.
I know how to get these: name, level, max hp, Def, MDef, Min/Max Attack, Dodge, all from the CO Website, but how to get the rest of the info I have no idea.
MobSpawns:
87 125 1352 496 518 532 486
I know those in red, in order are, MobID, Amount Spawned, and MapID...also that 2 of the last 4 sets of numbers are x,y locations, just not sure which ones or what the other 2 would be.
Earth tokens aren't dropping btw.
Change the code to:
Code:
else if (Name == "AgileRat")
{
if (MyMath.ChanceSuccess(30))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 721538;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
}
EDIT 2: Btw everyone, I'm a newbie at coding. x_x" I'm pretty sure this is right. It worked for me at least. =P Enjoy? (I hope ._.)