Question/Help :)

12/10/2009 04:26 -Shunsui-#1
Ok Ive Currently Added public bool LastAlive = false; Into 5165 Source In Character.cs and I want to Know So When I Code this Into The NPc what else do i have to do My Point on this is So That Option Checks if MyChar Is the Last one Alive in that Current Map If Anyone Can Help Me, Ftw My Npc Would Look Like
Code:
#region PKTourney Done
                            case 2727:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Have You killed all the other Challengers?"));
                                        GC.AddSend(Packets.NPCLink("Yeh, Menq", 1));
                                        GC.AddSend(Packets.NPCLink("Nah wait", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        if GC.MyChar.LastAlive = true;
                                        {
                                                GC.MyChar.Teleport(1002, 463, 366);    
                                                GC.MyChar.StatEff.Add(StatusEffectEn.TopTrojan);
                                                GC.Message(2005, GC.MyChar.Name + "Has won the Top Trojan Pk War and Has Been Awarded Top Tro Halo");
                                            }
                                    }
                                    break;
                                }
                            #endregion
Yeah this is My Progress to Class PK Tourney, Help Needed : )
12/10/2009 05:42 kinshi88#2
Loop thru each character that is online, checking if they're map id is equal the right map, and for each one that is, add that persons uid to an array, if the array has only one in it, use that uid to do whatever you want.
Could also add the character object itself to the array.
12/10/2009 05:47 hunterman01#3
Your doing the exact same thing i am doin

only difference is im not to that step yet

I was going to make a npc to get in the tourny but i decided to do a message cause someone challenged me and im having trouble with it so.....
12/11/2009 03:28 -Shunsui-#4
Hmmm.. Still having problems but ill try to get this Thanx for the help tho :)
12/11/2009 10:14 CompacticCo#5
Give me 2 days to get back to my other computer, I already coded this, I'll send it to you in a PM.
12/11/2009 13:08 -Shunsui-#6
Alrite ill close this thread.
12/11/2009 13:09 Huseby#7
#Closed