[Release] Guild War Winner npc

11/30/2009 02:14 hunterman01#1
Ok so what this npc does is checks to see if the person who is trying to talk to the npc is the guild leader and if that guild leader won guild war and if it isnt the guild leader of the winning guild then it does not say anything at all

Here it is

Code:
#region Gw Winner npc
                            case 6701:
                                {
                                    if (Control == 0)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello obviously since i am talking to you, you must be the Guild Leader of the winning Guild!"));
                                            GC.AddSend(Packets.NPCSay("Congratulations on Winning now i am sure you are looking for your reward,Well here you go"));
                                            GC.AddSend(Packets.NPCLink("Thanks!", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.CPs += 3000;
                                        GC.Message(2005, GC.MyChar.Name + "Claimed 3000cps from GuildWar");
                                    }

                                }
                            #endregion
#Edit this is for the 5165 source
11/30/2009 02:26 airborne.#2
For what source? and patch?
11/30/2009 02:29 hunterman01#3
the 5165 source.....
11/30/2009 02:51 airborne.#4
#edit worked for me.

Solution: use an already made npc that doesn't have anything coded to it and use it's cases. I used the npc id: 300002 for example.

#EDIT- my solution only fixes the error on c# but the NPC ingame literally doesn't work. click on it and it doesnt say a thing.
11/30/2009 03:02 -Shunsui-#5
He forgot the break; part he also ddint add the text control part he only added the control part

Code:
#region Gw Winner npc
                            case 6701:
                                {
                                    if (Control == 0)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello obviously since i am talking to you, you must be the Guild Leader of the winning Guild!"));
                                            GC.AddSend(Packets.NPCSay("Congratulations on Winning now i am sure you are looking for your reward,Well here you go"));
                                            GC.AddSend(Packets.NPCLink("Yes iam give me my reward", 1));
                                            GC.AddSend(Packets.NPCLink("Thanks!", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.CPs += 3000;
                                        GC.Message(2005, GC.MyChar.Name + "Claimed 3000cps from GuildWar");
                                    }
                               }
                      break;
                        }
                            #endregion
Should work fine now
11/30/2009 03:05 hunterman01#6
I made it to where u have to actually have WON guild war for it to even talk to you
11/30/2009 03:09 airborne.#7
Quote:
Originally Posted by flako27 View Post
He forgot the break; part he also ddint add the text control part he only added the control part

Code:
#region Gw Winner npc
                            case 6701:
                                {
                                    if (Control == 0)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {
                                            GC.AddSend(Packets.NPCSay("Hello obviously since i am talking to you, you must be the Guild Leader of the winning Guild!"));
                                            GC.AddSend(Packets.NPCSay("Congratulations on Winning now i am sure you are looking for your reward,Well here you go"));
                                            GC.AddSend(Packets.NPCLink("Yes iam give me my reward", 1));
                                            GC.AddSend(Packets.NPCLink("Thanks!", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.CPs += 3000;
                                        GC.Message(2005, GC.MyChar.Name + "Claimed 3000cps from GuildWar");
                                    }

                                }
                      break;
                        }
                            #endregion
Should work fine now
I added the break; and it still doesn't work.
11/30/2009 03:12 |BasicCoder|#8
Quote:
Originally Posted by hunterman01 View Post
I made it to where u have to actually have WON guild war for it to even talk to you
Win not Won lol but anyways hunter nice release as is ;)
11/30/2009 03:12 -Shunsui-#9
Quote:
Originally Posted by airborne. View Post
I added the break; and it still doesn't work.
i just edited the one i posted try it now
11/30/2009 03:13 Arcо#10
Quote:
Originally Posted by hunterman01 View Post
I made it to where u have to actually have WON guild war for it to even talk to you
I think it looks sloppy if it doesn't speak at all.
11/30/2009 03:13 |BasicCoder|#11
Quote:
Originally Posted by hunterman01 View Post
I made it to where u have to actually have WON guild war for it to even talk to you
Allso what about the

NPCs.txt part?
11/30/2009 03:15 airborne.#12
Lol I tried 2 cases and I have the code correct (according to hunter- and yea i added #endregion and break; ) but the npc still doesn't talk.
11/30/2009 03:37 -Shunsui-#13
i edited it, i will try to edit it further more cause players can abuse it maybe after he clicks controll 1 ill prob make the Npc teleport some where else nor when you win Guild war make a NPc pop up idk..

Code:
#region Gw Winner npc
                            case 8888:
                                {
                                    if (Control == 0)
                                    {
                                            GC.AddSend(Packets.NPCSay("Hello if you win guild war you can recive good prizes!"));
                                            GC.AddSend(Packets.NPCSay("i can give you 3,00 Cps for wining"));
                                            GC.AddSend(Packets.NPCLink("My guild won give me my reward please", 1));
                                            GC.AddSend(Packets.NPCLink("Thats cool", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    else if (Control == 1)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {
                                            GC.MyChar.CPs += 3000;
                                            GC.Message(2005, GC.MyChar.Name + "Claimed 3000cps from GuildWar");
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCLink("Your Guild ddint win Guild war", 1));
                                            GC.AddSend(Packets.NPCLink("WAHT!?.. we suck", 255));
                                        }
                                    }
                                    break;
                                }
                            #endregion
11/30/2009 04:08 airborne.#14
Quote:
Originally Posted by flako27 View Post
i edited it, i will try to edit it further more cause players can abuse it maybe after he clicks controll 1 ill prob make the Npc teleport some where else nor when you win Guild war make a NPc pop up idk..

Code:
#region Gw Winner npc
                            case 8888:
                                {
                                    if (Control == 0)
                                    {
                                            GC.AddSend(Packets.NPCSay("Hello if you win guild war you can recive good prizes!"));
                                            GC.AddSend(Packets.NPCSay("i can give you 3,00 Cps for wining"));
                                            GC.AddSend(Packets.NPCLink("My guild won give me my reward please", 1));
                                            GC.AddSend(Packets.NPCLink("Thats cool", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    else if (Control == 1)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {
                                            GC.MyChar.CPs += 3000;
                                            GC.Message(2005, GC.MyChar.Name + "Claimed 3000cps from GuildWar");
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCLink("Your Guild ddint win Guild war", 1));
                                            GC.AddSend(Packets.NPCLink("WAHT!?.. we suck", 255));
                                        }
                                    }
                                    break;
                                }
                            #endregion
It works now but it's still effed up. Just test it. I tested without having a guild lmao.
11/30/2009 05:35 Tw3ak#15
Quote:
Originally Posted by airborne. View Post
It works now but it's still effed up. Just test it. I tested without having a guild lmao.
well duh! cus you have control 1 on 2 dialogs.:rolleyes:

You can't have dialog with true and false controls the same which is what you have done lol

Code:
GC.AddSend(Packets.NPCLink("My guild won give me my reward please", 1));

and 

GC.AddSend(Packets.NPCLink("Your Guild ddint win Guild war", 1));
Your basically tellin npc if there guild leader/winner give reward and even if there not give reward anyway with pointing them both to control 1.