spawn command?

09/01/2008 03:56 em2241992#1
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
09/01/2008 16:19 jochemke#2
go to ur database
then to the monsters
and choose a id that is used for a mod
then use the command + that id

now u have a mod that every1 can see

*note there are some ids that won't work

press the thanks button if it helped u :)
09/04/2008 02:12 em2241992#3
thanks a lot, it works but they are still invincible any idea about that?
09/04/2008 06:59 _Emme_#4
Quote:
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; }
}
How to use: Type /addspawn MobID Area Amout

Example: /addspawn 1 20 50


Now you added the monster with mobid 1,and you added them around the area of 20,and you added 50 of them.



Remember: You need to restart the server when you added a monsterspawn to make the monsters invisible.


Emme
09/04/2008 22:31 taguro#5
Thanks Emme, this command makes adding spawns a ton quicker, and lets me spend my time doing more important things =)
09/04/2008 22:59 _Emme_#6
You're welcome.
09/05/2008 09:10 elragal_30#7
ty for this
i was just missed part after no guild
i hope it work now
ty again