this is the command:
Code:
private static bool Command_AddNpc(Player user, string[] data)
{
if (user.Permission < PlayerPermission.GM) return false;
Npc npc = new Npc();
npc.UID = uint.Parse(data[1]);
npc.ID = npc.UID;
npc.Name = data[4];
npc.Mesh = ushort.Parse(data[2]);
npc.Map = user.Map;
npc.Location = user.Location;
npc.Flag = byte.Parse(data[3]);
user.Map.Insert(npc);
Database.AddNpc(npc);
return true;
So I need to use the UID, NAME, MESH and FLAG. I did that command. But that didn't worked.
Honestly I find that weird.
Now it is working. I don't know how it is possible but it is fixed. Thank you.
I only have one problem now. I want to let it speak, but when I add this into 300001.npc it isn't talking. I relogged in because otherwise it wouldn't work.
Mine Code:
Code:
def npc(Client, Option):
if(Option == 0):
Text("What? A group of Cattle Thieves Stole the Saddles of the cavalry! Without the")
Text(" Saddles, they won't be able to hold any drills. If you can help get the saddles")
Text(" from the Cattle Thieves, I might give you a Steed as reward!")
Link("Here is the saddle.", 1)
Link("Where are the thieves?", 255)
Finish()
if(Option == 1):
Text("Thanks for bringing it back! Please choose from one of these steeds!")
Link("Black Steed.", 255)
Finish()
return 0
Code of Already existing NPC:
Code:
def npc(Client, Option):
if(Option == 0):
Text("Do you want to leave the market? I can teleport you for free.")
Link("Yeah. Thanks.", 1)
Link("No, I shall stay here.", 255)
Face(156)
Finish()
if(Option == 1):
PreviousMap()
return 0
What is wrong with mine code?