Question: How do I make a monster spawn from a npc choice

10/22/2013 08:33 Novakhan#1
Title says it all.. I've searched and didn't see any answer to my question. I'm making custom quests and one of 'em would be like you need to talk to a npc, Then if you choose the wrong answer, A monster spawns right near the npc. Does someone have any idea on how to? I know this exists (I've already seen this before).

Thanks, Nova.

PS: Sorry for english faults, My original language is French. :p
10/22/2013 10:04 GameHackerPM#2
The Code will be :

Code:
MonsterInformation information3;
                                        Entity entity;
                                       
                                        _String str2;
                                        information3 = new MonsterInformation
                                        {
                                            Hitpoints = 50000000,
                                            Level = 140,
                                            Mesh = 954,
                                            Name = "NameOfMonster",
                                            MaxAttack = 10500,
                                            AttackRange = 5,
                                            AttackType = 2,
                                            AttackSpeed = 1000,
                                            ViewRange = 2,
                                            MoveSpeed = 500,
                                            RunSpeed = 500,
                                            MinAttack = 59000
                                        };
                                        entity = new Entity(EntityFlag.Monster, false)
                                        {
                                            MapObjType = MapObjectType.Monster,
                                            MonsterInfo = information3
                                        };
                                        entity.MonsterInfo.Owner = entity;
                                        entity.Name = "NameOfMonster";
                                        entity.MinAttack = information3.MinAttack;
                                        entity.MaxAttack = entity.MagicAttack = information3.MaxAttack;
                                        entity.Hitpoints = entity.MaxHitpoints = information3.Hitpoints;
                                        entity.Body = information3.Mesh;
                                        entity.Level = information3.Level;
                                        entity.Defence = 5000;
                                        entity.MapID = client.Entity.MapID;
                                        entity.X = client.Entity.X;
                                        entity.Y = client.Entity.Y;
                                        entity.EntityFlag = EntityFlag.Monster;
                                        entity.UID = (uint)Kernel.Random.Next(500000, 500100);
                                        entity.SendUpdates = true;
                                        str2 = new _String(true)
                                        {
                                            UID = information3.ID,
                                            Type = 10
                                        };
                                        str2.Texts.Add("MBStandard");
                                        client.Map.RemoveEntity(entity);
                                        client.Map.AddEntity(entity);
Don't forget to edit the name and the information.. and Map ID, X, Y! :)
10/22/2013 10:36 Novakhan#3
Thanks it works fine!