In the LOFT source and shadow source how does the spawn command work, can someone give me an example so they dont come out invincible
How to use: Type /addspawn MobID Area AmoutQuote:
Search for example ; /recall,then it gets you to the command area. After /recall command,add this:
if (Splitter[0] == "/addspawn")
{
uint MobID = uint.Parse(Splitter[1]);
ushort Area = byte.Parse(Splitter[2]);
ushort Amount = ushort.Parse(Splitter[3]);
DataBase.NewSpawn(MyChar.LocMap, (ushort)(MyChar.LocX - Area), (ushort)(MyChar.LocY + Area), (ushort)(MyChar.LocX + Area), (ushort)(MyChar.LocY - Area), Amount, MobID);
}
Now when you done that,search for: public static void NoGuild(uint UID)
Under the } bracklet,add this :
public static bool NewSpawn(ushort Map, ushort XStart, ushort YStart, ushort XEnd, ushort YEnd, ushort SpawnNr, uint MobID)
{
try
{
MySqlCommand Command = new MySqlCommand("INSERT INTO mobspawns (SpawnWhatID,SpawnNr,XStart,YStart,XEnd,YEnd,Map) VALUES (" + MobID + "," + SpawnNr + "," + XStart + "," + YStart + "," + XEnd + "," + YEnd + "," + Map + ")", Connection);
Command.ExecuteNonQuery();
return true;
}
catch { return false; }
}