Register for your free account! | Forgot your password?

You last visited: Today at 16:58

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

Advertisement



[Release]GuildWar LOTF

Discussion on [Release]GuildWar LOTF within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
[Release]GuildWar LOTF

I will give you the release of a fixed GW (Some how) for LOTF 5017.

First open World.cs then search for:
PHP Code:
        public static Hashtable GWScores = new Hashtable(); 
under that paste:
PHP Code:
        public static bool GW false
Now open general.cs
Search for:
PHP Code:
Thetimer = new System.Timers.Timer(); 
And under the code paste:
PHP Code:
                System.Timers.Timer cTimer = new System.Timers.Timer(1000.0);
                
cTimer.Start();
                
cTimer.Elapsed += delegate GuildWar(); };
                
System.Timers.Timer BTimer = new System.Timers.Timer(1000.0);
                
BTimer.Start();
                
BTimer.Elapsed += delegate GuildWarEnd(); }; 
Now search for (Still in general.cs):
PHP Code:
public static void DoStuff() 
And above that paste:
PHP Code:
        public static void GuildWar()
        {
            if (
DateTime.Now.Minute == 00)
            {
                
World.GW true;
                
World.SendMsgToAll("There is GuildWar, hurry up to enter.""SYSTEM"2011);
            }
        }

        public static 
void GuildWarEnd()
        {
            foreach (
DictionaryEntry DE in World.AllChars)
            {
                
Character Char = (Character)DE.Value;

                if (
DateTime.Now.Minute == 25 && World.Gw == true)
                {
                    
World.GW false;
                    
World.SendMsgToAll("GuildWar has auto ended.""SYSTEM"2011);
                }
            }
        } 
Now the NPC (Thanks to PeTe Ninja for the random thing)
Search for:
PHP Code:
if (CurrentNPC == 600
Replace the whole code with:
PHP Code:
                            if (CurrentNPC == 600//Guild Controller
                            
{
                                if (
World.GW == true)
                                {
                                    
SendPacket(General.MyPackets.NPCSay("Would you like to enter GuildWars?"));
                                    
SendPacket(General.MyPackets.NPCLink("Oh Yes Please!"1));
                                    
SendPacket(General.MyPackets.NPCLink("We have won and im GL, so i want the prize!"2));
                                    
SendPacket(General.MyPackets.NPCLink("No No No, It's Too Scary!"255));
                                    
SendPacket(General.MyPackets.NPCSetFace(30));
                                    
SendPacket(General.MyPackets.NPCFinish());
                                }
                                else
                                {
                                    
SendPacket(General.MyPackets.NPCSay("GuildWar has not started, sorry or either is too late to join."));
                                    
SendPacket(General.MyPackets.NPCLink("We have won and im GL, so i want the prize!"2));
                                    
SendPacket(General.MyPackets.NPCLink("Okay sorry."255));
                                    
SendPacket(General.MyPackets.NPCSetFace(30));
                                    
SendPacket(General.MyPackets.NPCFinish());
                                }
                            } 
Now the control
Search for:
PHP Code:
if (MyChar.MyGuild != null && MyChar.MyGuild == World.PoleHolder 
Replace the whole NPC code with:
PHP Code:
                            if (CurrentNPC == 600)
                            {
                                if (
Control == 1)
                                {
                                    
Random R = new Random();
                                    
int Nr R.Next(110);
                                    if (
Nr == 1//Random Spot 1
                                    
{
                                        
MyChar.Teleport(1038351341);
                                    }
                                    if (
Nr == 2//Random Spot 2
                                    
{
                                        
MyChar.Teleport(1038335345);
                                    }
                                    if (
Nr == 3//Random Spot 3
                                    
{
                                        
MyChar.Teleport(1038309369);
                                    }
                                    if (
Nr == 4//Random Spot 4
                                    
{
                                        
MyChar.Teleport(1038283340);
                                    }
                                    if (
Nr == 5//Random Spot 5
                                    
{
                                        
MyChar.Teleport(1038310327);
                                    }
                                    if (
Nr == 6//Random Spot 6
                                    
{
                                        
MyChar.Teleport(1038318297);
                                    }
                                    if (
Nr == 7//Random Spot 7
                                    
{
                                        
MyChar.Teleport(1038347309);
                                    }
                                    if (
Nr == 8//Random Spot 8
                                    
{
                                        
MyChar.Teleport(1038337320);
                                    }
                                    if (
Nr == 9//Random Spot 9
                                    
{
                                        
MyChar.Teleport(1038309293);
                                    }
                                    if (
Nr == 10//Random Spot 10
                                    
{
                                        
MyChar.Teleport(1038371300);
                                    }
                                }
                                if (
Control == 2)
                                {
                                    if (
MyChar.MyGuild != null && MyChar.MyGuild == World.PoleHolder && MyChar.GuildPosition == 100 && !MyChar.MyGuild.ClaimedPrize && MyChar.ItemsInInventory 40)
                                    {
                                        
MyChar.AddItem("1088000-0-0-0-0-0"0, (uint)General.Rand.Next(346623472)); //LOL a dragonball
                                        
MyChar.MyGuild.ClaimedPrize true;
                                    }
                                    else
                                    {
                                        
SendPacket(General.MyPackets.NPCSay("Either the prize has been taken already, your guild has not been victorious the last time or you are not a deputy leader nor guild leader."));
                                        
SendPacket(General.MyPackets.NPCLink("Ok."255));
                                        
SendPacket(General.MyPackets.NPCSetFace(30));
                                        
SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            } 
Now open Entities.cs
and search for:
PHP Code:
                    foreach (DictionaryEntry DE in Guilds.AllGuilds)
                    {
                        
Guild AGuild = (Guild)DE.Value;
                        
AGuild.HoldingPole false;
                        
AGuild.ClaimedPrize false;
                        if (
AGuild.PoleDamaged Highest
Replace from
PHP Code:
                    foreach (DictionaryEntry DE in Guilds.AllGuilds
to
PHP Code:
                    Attacker.Attacking false;
                } 
With this:
PHP Code:
                    foreach (DictionaryEntry DE in Guilds.AllGuilds)
                    {
                        
Guild AGuild = (Guild)DE.Value;
                        
AGuild.HoldingPole false;
                        
AGuild.ClaimedPrize false;
                        if (
AGuild.PoleDamaged Highest)
                        {
                            
Highest AGuild.PoleDamaged;
                            
Winner AGuild;
                        }
                        
AGuild.PoleDamaged 0;
                    }
                    if (
Winner != null && World.GW == true)
                    {
                        
Winner.HoldingPole true;
                        
World.GW false;
                        
World.PoleHolder Winner;
                        
World.SendMsgToAll(Winner.GuildName " has won the guildwar! The GuildLeader can now go take his/hers Dragonball.""SYSTEM"2011);
                        
World.SendMsgToAll("GuildWar has ended. The pole can't be taken, either if you hit it down. No entry allowed to GW.""SYSTEM"2005);
                    }
                    
World.GWScores.Clear();
                    
Attacker.TGTarget null;
                    
Attacker.Attacking false;
                } 
Thats it

Note:
Code:
The GuildWar Starts XX:00 Every Hour and AutoEnds XX:25
Also the GW Ends, if you hit down the pole :)
Press thansk if i helped :)

@Dont ask if i release my other tournaments ^^
Fish* is offline  
Old 04/02/2010, 13:42   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
grillmad do u have as erver?
PeTe Ninja is offline  
Old 04/02/2010, 14:04   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by PeTe Ninja View Post
grillmad do u have as erver?
Yupsi XD is my friends, but i help him with coding lol ^^ will buy host next week, right now is hamachi ****
Fish* is offline  
Old 04/03/2010, 02:10   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by grillmad View Post
Yupsi XD is my friends, but i help him with coding lol ^^ will buy host next week, right now is hamachi ****
wish it was a level server.
PeTe Ninja is offline  
Thanks
1 User
Old 07/12/2010, 18:28   #5
 
elite*gold: 0
Join Date: Apr 2009
Posts: 130
Received Thanks: 90
nice release,
For CoMy users:

World.GW = true;

Must be

World.GWOn = true;

and

World.GW = false;

with:
World.GWOn = false;
irritantgassie is offline  
Old 07/13/2010, 05:36   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
nope, cuz the bools are used in my code other places
if u use comy, remove the gw code for comy
Fish* is offline  
Old 07/13/2010, 12:02   #7
 
elite*gold: 0
Join Date: Apr 2009
Posts: 130
Received Thanks: 90
Quote:
Originally Posted by grillmad View Post
nope, cuz the bools are used in my code other places
if u use comy, remove the gw code for comy
That didnt work, I tried everything, it starts but it doesnt end when I hit down the pole!
irritantgassie is offline  
Old 07/13/2010, 14:04   #8
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
This should be the fixed. Problem was at last part.
Please make sure somethings as Locmap etc. will make error.
I dont remember the exactly code.
Code:
                    foreach (DictionaryEntry DE in Guilds.AllGuilds)
                    {
                        Guild AGuild = (Guild)DE.Value;
                        AGuild.HoldingPole = false;
                        AGuild.ClaimedPrize = false;
                        if (AGuild.PoleDamaged > Highest)
                        {
                            Highest = AGuild.PoleDamaged;
                            Winner = AGuild;
                        }
                        AGuild.PoleDamaged = 0;
                    }
                    if (Winner != null && World.GW == true)
                    {
            foreach (DictionaryEntry DE in World.AllChars)
            {
                Character Char = (Character)DE.Value;
if (Char.LocMap == 1038)
{
Char.Teleport(1002, 400, 400);
}
                        Winner.HoldingPole = true;
                        World.GW = false;
                        World.PoleHolder = Winner;
                        World.SendMsgToAll(Winner.GuildName + " has won the guildwar! The GuildLeader can now go take his/hers Dragonball.", "SYSTEM", 2011);
                        World.SendMsgToAll("GuildWar has ended. The pole can't be taken, either if you hit it down. No entry allowed to GW.", "SYSTEM", 2005);
                    }
                 }
                    World.GWScores.Clear();
                    Attacker.TGTarget = null;
                    Attacker.Attacking = false;
                }
Fish* is offline  
Reply


Similar Threads Similar Threads
[Release]GuildWar Fix
09/19/2010 - CO2 PServer Guides & Releases - 23 Replies
For lotf Hello, i will show you how to fix guildwar in lotf. First open World.cs Then under: public static Hashtable GWScores = new Hashtable(); add this:
[RELEASE] old 5017 lotf
03/20/2010 - CO2 PServer Guides & Releases - 8 Replies
it works okay... this is my second draft because my first one got wiped so dont expect it to be as good... haven't spent much time on it.. its all urs.. do what you want.. LOTF v5017.. put the database in your C: and define it directly in the src.. it loads dmaps and npcs from there.. to do npcs just go to NPcSystem.cs ... yeah just put it in recently .. it works ifne , i have tested it.
[Release]XP Shield(LOTF)
07/31/2009 - CO2 PServer Guides & Releases - 16 Replies
I haven't released anything in awhile, and I removed all my other releases so... I'll throw a random lotf release since a bunch of people are using lotf lately for practise. This is handy, and can be used as a reference when making skills of similar style. First, add in database.cs SkillAttributes = new ushort; SkillAttributes = new ushort { 7, 0, 0, 0, 0, 0 }; SkillsDone.Add(1020, 0); Now the rest goes into character.cs, just search the lines I...
[LOTF RELEASE] Ip Ban!!
05/18/2009 - CO2 PServer Guides & Releases - 22 Replies
Ip Ban! Credits to Ultimatum First...Search this ( It is in General.cs ) public static System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"\ServerLog.txt", true);
[Release] Those still using LOTF
04/17/2009 - CO2 PServer Guides & Releases - 23 Replies
Help yourself be a better coder and listen to what the community is trying to say. One day you will understand why some are trying to encourage people still using LOTF to move to a more stable source and only use LOFT as a basis of learning and how you can improve (A LOT) on the LOTF coding. There's a lot of GREAT coding examples in InfamousNoone's source which you can actually learn from and gain a greater understanding of how a PROPER server operates. After all why do you think...



All times are GMT +1. The time now is 17:00.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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