Spawning a monster while on a quest

08/03/2010 12:05 2010mrsurfer#1
Okay so im on my 3rd npc on my 3rd reborn quest, but im sort of stuck.. is there anyway of adding to the npc when you click "yes" to spawn a monster only when your on the quest?
My code:
#region Crystal
case 11889:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Are you sure you wish to release the dragon?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("Good luck."));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}
}
break;
#endregion

Theres a release for adding a dragon somewhere around here, im going to look for it
08/03/2010 15:41 pro4never#2
Use a char value for quest (personally i'd use a quest dictionary so more than 1 at a time) then in the code do like


If (gc.mmychar.quests.conntainskey(questnnumber)
//npc otions/text
else
//other npc text
08/04/2010 09:29 Santa#3
[Only registered and activated users can see links. Click Here To Register...]

Thats for Coemu but i think its what your looking for.
08/04/2010 10:20 Arcо#4
Code:
 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[GC.MyChar.Loc.Map];
                            DMap D = (DMap)DMaps.H_DMaps[GC.MyChar.Loc.Map];
                            Game.Mob _Mob = new NewestCOServer.Game.Mob(Demon);
                            _Mob.Loc = new NewestCOServer.Game.Location();
                            _Mob.Loc.Map = GC.MyChar.Loc.Map;
                            _Mob.Loc.X = GC.MyChar.Loc.X;
                            _Mob.Loc.Y = GC.MyChar.Loc.Y;


                            _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);
08/04/2010 22:33 FrontBoy#5
Quote:
Originally Posted by .Arco View Post
Code:
 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[GC.MyChar.Loc.Map];
                            DMap D = (DMap)DMaps.H_DMaps[GC.MyChar.Loc.Map];
                            Game.Mob _Mob = new NewestCOServer.Game.Mob(Demon);
                            _Mob.Loc = new NewestCOServer.Game.Location();
                            _Mob.Loc.Map = GC.MyChar.Loc.Map;
                            _Mob.Loc.X = GC.MyChar.Loc.X;
                            _Mob.Loc.Y = GC.MyChar.Loc.Y;


                            _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);
doesnt work
08/04/2010 23:02 Fish*#6
Quote:
Originally Posted by filip100456 View Post
doesnt work
what, it do works.
try again xD
08/05/2010 11:09 FrontBoy#7
can you help me to add it xD im kinda noob x.x
08/05/2010 12:11 2010mrsurfer#8
Thanks guys im sort of getting it to work, messing on where to put it xD