/goto NPC

06/14/2009 14:21 Vortex.#1
Has anyone ever forgot where they added an NPC?
Or if its still in your database?
I have, and I'm wondering is it possible to create a command to goto an npc?
06/14/2009 14:55 _Emme_#2
LOTF:
Quote:
if (Splitter[0] == "/goto")
{
SingleNPC npc = (SingleNPC)NPCs.AllNPCs[Splitter[1]];
MyChar.Teleport((ushort)npc.Map, (ushort)npc.X, (ushort)npc.Y);
}

CoEmu v2:

Quote:
case "goto":
{
if (CSocket.Client.isPM || CSocket.Client.isGM)
{
Struct.NPC npc = (Struct.NPC)Nano.Npcs[int.Parse(Command[1])];
Handler.Teleport(npc.Map,npc.X,npc.Y,0,CSocket);

}
}
I dont have neither source but that should work.

Oh, edit:
Usage:
/goto NpcID
06/14/2009 17:32 Vortex.#3
LOL, I made it already