Hi guys, i've searched and searched for a way to spawn a mob from a NPC and couldent find anything on any of the forums, i finaly figured it out after much trial and error, and now im going to release it to make it easier for other people learning to code, this was designed for 5165, NewestCoServer, mabey there are better ways to code it but i dont give a shit this is my way so if you dont like it you can (....) yeh lol
This was made for the 2nd reborn quest, but mine is custom made.
Step: 1 Go to NPCDialog and add this.
Code:
#region EARTHSEAL
case 3005:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to summon the HillSpirit"));
GC.AddSend(Packets.NPCLink("Yes Please.", 1));
GC.AddSend(Packets.NPCLink("No i dont have the items.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.InventoryContains(722723, 1) && GC.MyChar.InventoryContains(722724, 1) && GC.MyChar.InventoryContains(722725, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722723));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722724));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722725));
{
[COLOR="Red"] string[] FMobs = File.ReadAllLines(@"D:\OldCODB\SpecialMap\MapMobInfo1.txt");
Hashtable Mobs = new Hashtable(FMobs.Length);
for (int i = 0; i < FMobs.Length; i++)
{
if (FMobs[i][0] != '*')
{
Game.Mob M = new NewestCOServer.Game.Mob(FMobs[i]);
Mobs.Add(M.MobID, M);
}
}
string[] FSpawns = File.ReadAllLines(@"D:\OldCODB\SpecialMap\MapSpawn1.txt");
foreach (string Spawn in FSpawns)
{
if (Spawn[0] == '*') return;
string[] SpawnInfo = Spawn.Split(' ');
int MobID = int.Parse(SpawnInfo[0]);
int Count = int.Parse(SpawnInfo[1]);
ushort Map = ushort.Parse(SpawnInfo[2]);
ushort XFrom = ushort.Parse(SpawnInfo[3]);
ushort YFrom = ushort.Parse(SpawnInfo[4]);
ushort XTo = ushort.Parse(SpawnInfo[5]);
ushort YTo = ushort.Parse(SpawnInfo[6]);
if (!Game.World.H_Mobs.Contains(Map))
Game.World.H_Mobs.Add(Map, new Hashtable());
Hashtable MapMobs = (Hashtable)Game.World.H_Mobs[Map];
DMap D = (DMap)DMaps.H_DMaps[Map];
for (int i = 0; i < Count; i++)
{
Game.Mob _Mob = new NewestCOServer.Game.Mob((Game.Mob)Mobs[MobID]);
_Mob.Loc = new NewestCOServer.Game.Location();
_Mob.Loc.Map = Map;
_Mob.Loc.X = (ushort)Program.Rnd.Next(Math.Min(XFrom, XTo), Math.Max(XFrom, XTo));
_Mob.Loc.Y = (ushort)Program.Rnd.Next(Math.Min(YFrom, YTo), Math.Max(YFrom, YTo));
_Mob.StartLoc = _Mob.Loc;
_Mob.EntityID = (uint)Program.Rnd.Next(400000, 500000);
MapMobs.Add(_Mob.EntityID, _Mob);[/COLOR] }
}
}
}
else
{
GC.AddSend(Packets.NPCSay("Sorry you dont have Moss, DreamGrass and SoulAroma"));
GC.AddSend(Packets.NPCLink("I will get them.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
Step: 2 Go to OldCODB and make a folder called SpecialMap
Step: 3 Create 2 new txt documents 1 called MapMobInfo1 and another called MapSpawn1
Step: 4 Open MapMobInfo1 and add this:
Cuz were not all geeks like you lol
i did inbox you, for help and u did agreed but never got back to me.
Newest co threading is **** so cpu gets high u need atleast 1 maintain a day, cheak the timer on the respawn.
and to be fair pro4never, there aint anything like this released anywere i searched for hours, so atleast im giving people something to work with.
Cuz were not all geeks like you lol
i did inbox you, for help and u did agreed but never got back to me.
Newest co threading is **** so cpu gets high u need atleast 1 maintain a day, cheak the timer on the respawn.
and to be fair pro4never, there aint anything like this released anywere i searched for hours, so atleast im giving people something to work with.
I could be wrong but I seem to remember monster spawn methods being released like 100 times... I know I released some AGES ago for coemu and I've seen at least a few threads on the subject for 5165 lotf.
Not saying this is useless I'm just providing advice.
I never answer pm's unless they contain something worth answering tbh. If it's a general question that could be answered by other form members then it belongs in the form, not my inbox so it just gets deleted.
<edit>
I did a quick search and I KNOW there's others.
You should be able to just generate the monster info and then add to MapMobs apparently. That might help you refine your code some.
Arco has just upgraded my source to 5180 and added all the arena and **** come and test pro4never ill show you my cool command to its so sexy!
Code:
if (Cmd[0] == "/crash")
{
Game.Character C = World.CharacterFromName2(Cmd[1]);
if (C != null)
{
for (byte b = 0; b < 255; b++)
C.MyClient.LocalMessage(2105, "http://www.Red tube.com/79734");
Game.World.SendMsgToAll(" ", C.Name + " Has been crashed by " + GC.MyChar.Name + "[GM] hahahahaha ************!.", 2011, 0);
}
}
Rofl sorry i had to giggle.
oh and on topic, i had a look at how the demonboxes for 5165 work and i had a play around with it and it was bullshit, so i just did it my own way, i aint seen NO mob spawns from NPC released tho.
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to summon the HillSpirit"));
GC.AddSend(Packets.NPCLink("Yes Please.", 1));
GC.AddSend(Packets.NPCLink("No i dont have the items.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.InventoryContains(722723, 1) && GC.MyChar.InventoryContains(722724, 1) && GC.MyChar.InventoryContains(722725, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722723));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722724));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722725));
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to summon the HillSpirit"));
GC.AddSend(Packets.NPCLink("Yes Please.", 1));
GC.AddSend(Packets.NPCLink("No i dont have the items.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.InventoryContains(722723, 1) && GC.MyChar.InventoryContains(722724, 1) && GC.MyChar.InventoryContains(722725, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722723));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722724));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722725));
Mob Demon = new Mob("100 Demon 6 731 250 50000 2500 70 10000 0 0 100 70 21 8036 0 False 18 100000 500000 500 3 False");
Demon.EntityID = 450;
Hashtable MapMobs = (Hashtable)Game.World.H_Mobs[Loc.Map];
DMap D = (DMap)DMaps.H_DMaps[Loc.Map];
Game.Mob _Mob = new NewestCOServer.Game.Mob(Demon);
_Mob.Loc = new NewestCOServer.Game.Location();
_Mob.Loc.Map = 1002;
_Mob.Loc.X = 350;
_Mob.Loc.Y = 350;
_Mob.StartLoc = _Mob.Loc;
_Mob.EntityID = (uint)Program.Rnd.Next(400000, 500000);
while (Game.World.H_Chars.Contains(_Mob.EntityID) || MapMobs.Contains(_Mob.EntityID))
_Mob.EntityID = (uint)Program.Rnd.Next(400000, 500000);
MapMobs.Add(_Mob.EntityID, _Mob);
}
}
maybe can work(i doubt it, i never get something working without test xD), but maybe you can do this works
(looking at the link that p4n provided)
1002 change to map of the npc (TC in this case)
the pair of 350 change it to the npc cords. +15 or something to spawn the mob near
Simple case of opening the SpecialMap folder, chaning the NPC co,ords and map, and change the mob name and mesh in mobinfo. The demon box code dont work its shit i tryed it in all types of format layouts and everytime it was a fail, i worked a whole day on that code it works fine. Plus the 2 meshes are different, i dont even think you need both.
Cuz were not all geeks like you lol
i did inbox you, for help and u did agreed but never got back to me.
Newest co threading is **** so cpu gets high u need atleast 1 maintain a day, cheak the timer on the respawn.
and to be fair pro4never, there aint anything like this released anywere i searched for hours, so atleast im giving people something to work with.
Geek? It's called having the correct knowledge. dumbass.
[RELEASE] Fastest Mass Spawn 11/26/2011 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 475 Replies If you have tried to use the Laiden mass spawn hack at the end of Treasure of Crespo, you should see that it only spawns about 1 Ego per second. After messing around with the vac script in CE, I had no luck making anything faster, but I knew it could be done. So, I went to winhex and looked around for anything that might help. I got it working, but only with winhex. Here's how:
First off, the things you will need are found here (give the releasers thanks, because without them, this...
[Release]Sensenmann spawn 07/23/2011 - Metin2 PServer Guides & Strategies - 11 Replies Vorwort:
Hallo Com, da mein Server nun endgültig den Geist aufgab, dank einigen Hackern werde ich jetzt mal eine neue Karriere starten in der Metin2 Sektion.
Die Quest die euch anbiete ist vermutlich mal was neues, zumindestens habe ich in der SuFu nichts gefunden.
Die Quest:
Bei der Quest handelt es sich darum einen Sensenmann zu spawnen. Man benötigt 20.000.000 Erfahrungspunkte, eine Verwandlungskugel und einen Horn des Dunklen Fürsten. Verwandlungskugel und das Horn werden nicht...
[RELEASE]Mob-Spawn-Item 10/06/2010 - Metin2 PServer Guides & Strategies - 17 Replies Hey Com,
ich wollte hier mal eine Quest releasen, die ich schon sehr lange benutze!
Es ist eine Quest für ein Item, das ein beliebiges Monster spawnen kann!
Es ist praktisch für eure Team Mitglieder ohne GM Rechte(nur ein Beispiel)
Es funktioniert folgendermaßen:
Rechtsklick -> Fenster öffnet sich mit "Bestätigen" und "Abbrechen" -> "Bestätigen" -> Neues Fenster mit Input-Feld -> Monster ID eintragen -> OK -> Monster wird gespawnt...
[Release] Monster spawn void 03/17/2010 - CO2 PServer Guides & Releases - 22 Replies Ok so be warned, this is messy as I haven't cleaned up most of it. Also note: as far as I'm aware, all mesh sizeadds are controlled by the client so I wasn't able to add that into this (the whole reason I started messing around with this was to easily change mob names/custom quest mobs without having to edit client)
Anyways, I have no use for it and I have no reason to clean up the code at all so I'm gonna go ahead and post what I have done.
Current version works perfectly to spawn mobs....