Register for your free account! | Forgot your password?

You last visited: Today at 03:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Fixed GW :P

Discussion on [RELEASE]Fixed GW :P within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
[RELEASE]Fixed GW :P

Hello ElitePvpers I will release my gw npc, wich should work, so peoples cant keep claim the prize.
This is for the 5165Source by Tanel.

First replace your GWNPC with this:
Code:
#region GWArenaNPC
                            case 380:
                                {
                                    if (Control == 0)
                                    {
                                        if (Features.GuildWars.GWW == true)
                                        {
                                            GC.AddSend(Packets.NPCSay("Do you want enter the guild arena?"));
                                            GC.AddSend(Packets.NPCLink("Yes.", 1));
                                            GC.AddSend(Packets.NPCLink("I have won GW and want my price.", 2));
                                            GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("There is no GuildWar going on."));
                                            GC.AddSend(Packets.NPCLink("I have won GW and want my price.", 2));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 1)
                                    {
                                        GC.MyChar.Teleport(1038, 350, 350);
                                    }
                                    if (Control == 2)
                                    {
                                        if (Features.GuildWars.LastWinner == GC.MyChar.MyGuild && Features.GuildWars.GWPRIZE == true && GC.MyChar.GuildRank == Features.GuildRank.GuildLeader)
                                        {
                                            foreach (Character Char in World.H_Chars.Values)
                                            {
                                                if (Char.GuildRank == Features.GuildRank.DeputyManager && Features.GuildWars.LastWinner == Char.MyGuild)
                                                {
                                                    Char.Nobility.Donation += 20;
                                                    Game.World.NewEmpire(Char);
                                                    Char.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                                                    GC.Message(2005, Char.Name + " has got the TopDL for being DL in the winner Guild of last GuildWar.");
                                                }
                                                if (Char.GuildRank == Features.GuildRank.GuildLeader && Features.GuildWars.LastWinner == Char.MyGuild)
                                                {
                                                    Char.Nobility.Donation += 50;
                                                    Game.World.NewEmpire(Char);
                                                    Char.StatEff.Add(StatusEffectEn.TopGuildLeader);
                                                    GC.Message(2005, Char.Name + " has got the TopGL for being the leader in the winner Guild of last GuildWar.");
                                                }
                                                GC.MyChar.CPs += 1075;
                                                Features.GuildWars.GWPRIZE = false;
                                                GC.AddSend(Packets.NPCSay("Here is your CPs."));
                                                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else if (Features.GuildWars.LastWinner == GC.MyChar.MyGuild && Features.GuildWars.GWPRIZE == true)
                                        {
                                            GC.AddSend(Packets.NPCSay("You are not the GuildLeader."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You have not won the GuildWar."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
NOW GO TO GuildWars.cs
search for:
Code:
    public class GuildWars
under it put:
Code:
        public static bool GWW = false;
        public static bool GWPRIZE = false;
now search for:
Code:
        public static void EndWar()
replace the whole code with:
Code:
        public static void EndWar()
        {
            War = false;
            TheLeftGate.Opened = false;
            TheRightGate.Opened = false;
            
            TheLeftGate.CurHP = TheLeftGate.MaxHP;
            TheRightGate.CurHP = TheRightGate.MaxHP;
            TheLeftGate.ReSpawn();
            TheRightGate.ReSpawn();

            GWScore Highest = new GWScore();
            Highest.Score = 0;

            foreach (GWScore Score in Scores.Values)
            {
                if (Score.Score > Highest.Score)
                    Highest = Score;
            }

            if (Highest.TheGuild != null)
            {
                foreach (Character Charr in World.H_Chars.Values)
                {
                    if (Charr.Loc.Map == 1038)
                    {
                        GWW = false;
                        Charr.Teleport(1002, 400, 400);
                        LastWinner = Highest.TheGuild;
                        LastWinner.Wins++;
                        ThePole.ReSpawn();
                        GWPRIZE = true;
                        World.SendMsgToAll("SYSTEM", Highest.TheGuild.GuildName + " have won the GuildWars Congratulations!", 2011, 0);
                    }
                    else
                    {
                        GWW = false;
                        LastWinner = Highest.TheGuild;
                        LastWinner.Wins++;
                        ThePole.ReSpawn();
                        GWPRIZE = true;
                        World.SendMsgToAll("SYSTEM", Highest.TheGuild.GuildName + " have won the GuildWars Congratulations!", 2011, 0);
                    }
                }
            }

            SendScores();
            Scores = new Hashtable();
        }
    }
}
Now in your GW Command put:
Code:
Features.GuildWars.GWW = true;
Done
.Summer is offline  
Thanks
3 Users
Old 06/06/2010, 12:44   #2
 
elite*gold: 0
Join Date: Feb 2010
Posts: 83
Received Thanks: 8
hahaha nice work thx k+ repLy
kewell5454 is offline  
Thanks
1 User
Old 06/06/2010, 12:54   #3
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
Thanks
.Summer is offline  
Old 06/06/2010, 21:27   #4
 
t_dubble_uu's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 267
Received Thanks: 180
Nice Releases but i have 1 question does the gw system end when the pole hits 0hp or does it restart it self until the weekend is over?
t_dubble_uu is offline  
Old 06/06/2010, 21:42   #5
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
@summer
Um. I think people can claim again after a server restart x.x You probably have to write to file stating that it's claimed.

@t_dubble_uu
You need to add a timer and then you need to let end war check if guild war is over, if not call the GW method again. until guildwar is over. I think summer released a minute based code for start time for TDM you could look at that for your timer.
dragon89928 is offline  
Old 06/06/2010, 22:56   #6
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
Quote:
Originally Posted by dragon89928 View Post
@summer
Um. I think people can claim again after a server restart x.x You probably have to write to file stating that it's claimed.

@t_dubble_uu
You need to add a timer and then you need to let end war check if guild war is over, if not call the GW method again. until guildwar is over. I think summer released a minute based code for start time for TDM you could look at that for your timer.
they cant claim after restart as the bool is set to false everytime server is starting
if want a timer, then PM me and I will give you one
But first tell me, when if you want every hour, day etc.
.Summer is offline  
Old 10/01/2010, 02:39   #7
 
BitzIn's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 92
Received Thanks: 4
dont work when i try it i o straight to the:
GC.AddSend(Packets.NPCSay("There is no GuildWar going on."));
GC.AddSend(Packets.NPCLink("I have won GW and want my price.", 2));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
And NPC doesnt ask me if i wanna enter. Even when i start gw
BitzIn is offline  
Reply


Similar Threads Similar Threads
[Release]Fixed SS/FB System
12/21/2011 - CO2 PServer Guides & Releases - 84 Replies
Big credits to saint for showing me the geometry behind this. First go to MyMath.cs and search for public static class MyMath and over that put this:public struct coords { public int X; public int Y; public coords(int x, int y) { this.X = x;
[RELEASE]Fixed PKJailSystem
10/01/2010 - CO2 PServer Guides & Releases - 3 Replies
The previous PKJaiLSystem, was not working. Here is a fixed one. If you got the other use this: search for (in character.cs): public void Revive(bool Tele) remove:
[Release]FIXED MARRIAGE
10/29/2008 - CO2 Private Server - 15 Replies
Sorry for my first post .This release may help you .. FIXED DIVORCE O.O' Ok , Let's go. Search in Client.cs for : if (CurrentNPC == 390) { if (MyChar.Spouse == "" || MyChar.Spouse == "None") {
[Fixed Release]EXP pot
10/25/2008 - CO2 Private Server - 9 Replies
*REMOVED* cuz keving15 asked me to O.O



All times are GMT +2. The time now is 03:51.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.