Register for your free account! | Forgot your password?

You last visited: Today at 23:41

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

Advertisement



[Release]SaveHalos

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

Reply
 
Old 02/03/2010, 03:59   #46
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by glover View Post
Hi everyone.
A simple source code without using a new file for TopGuilds, it's already added into this source ^^
at database.cs in function LoadCharacter()
You can add it Under this:
Code:
                    C.Loaded = true;
Code:
                    if (C.MyGuild == Features.GuildWars.LastWinner && (C.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                        C.StatEff.Add(StatusEffectEn.TopGuildLeader);
                    if (C.MyGuild == Features.GuildWars.LastWinner && (C.GuildRank == NewestCOServer.Features.GuildRank.DeputyManager))
                            C.StatEff.Add(StatusEffectEn.TopDeputyLeader);
For other effects you need only add next feature ranking.
If you got error on: StatusEffectEn try to add reference.
But for this wouldn't you also need to do something for each save character and create character void?
Arcо is offline  
Old 02/03/2010, 15:04   #47
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Quote:
Originally Posted by .Arco View Post
But for this wouldn't you also need to do something for each save character and create character void?
No you do not need. this stats is loaded when character has login and automatically got this stats once for all deputy Leaders and Guild Leader. source 5165 automatically saving GuildWars structure.
If other guild will win second GW old GL, DL's Still got this effect.
I must write new source code in function endgw for delete this effect on old winner characters or this will be disapear when old winner got relog:-)
glover is offline  
Old 02/05/2010, 04:19   #48
 
elite*gold: 0
Join Date: Feb 2010
Posts: 6
Received Thanks: 0
Question

where to put this code?
at the chat.cs? please reply real quick
Code:
 #region GWArenaNPC
                            case 380:
                                {
                                    if (Linkback == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Do you want enter the guild arena?"));
                                        GC.AddSend(Packets.NPCLink("Yes.", 1));
                                        GC.AddSend(Packets.NPCLink("I am the winning Guild Leader!", 2));
                                        GC.AddSend(Packets.NPCLink("But I'm a Deputy Leader and I want the Deputy Leader Halo.", 3));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Linkback == 1)
                                    {
                                        GC.MyChar.Teleport(1038, 350, 350);
                                    }
                                    else if (Linkback == 2)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {

                                            GC.MyChar.CPs += 4500;
                                            World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has claimed 4500 CPs and the TopGuildLeader Halo for winning GuildWar!", 2011, 0);

                                            GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader); 
                                            try
                                            {
                                                StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopLeader.txt");
                                                sw.WriteLine("" + GC.MyChar.EntityID + "#17179869184");
                                                sw.Close();
                                            }
                                            catch (Exception e)
                                            {
                                                Console.WriteLine(e.Message);
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You already claimed your 4500 cps! Get out of here!"));
                                            GC.AddSend(Packets.NPCLink("Sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("You are not in the Top Guild!"));
                                        GC.AddSend(Packets.NPCLink("Oh sorry", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }

                                    if (Linkback == 3)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.DeputyManager))
                                        {
                                            World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has claimed the TopDeputyLeader Halo!", 2011, 0);
                                            GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                                            try
                                            {
                                                // Now it should work 100%
                                                StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopDeputy.txt");
                                                sw.WriteLine("" + GC.MyChar.EntityID + "#34359738368");
                                                sw.Close();
                                            }
                                            catch (Exception e)
                                            {
                                                Console.WriteLine(e.Message);
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You are not in the Top Guild!"));
                                            GC.AddSend(Packets.NPCLink("Oh sorry", 255));
                                            GC.AddSend(Packets.NPCSetFace(30));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                                    
                                
                            #endregion
maximumbrutal is offline  
Old 02/05/2010, 07:28   #49
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
considering its an npc.....
npcdialog.cs
Arcо is offline  
Old 03/01/2010, 02:49   #50
 
elite*gold: 0
Join Date: Feb 2007
Posts: 26
Received Thanks: 0
The NPC doesent work for me Im getting an error concerning the link back??
ztcjsa is offline  
Old 03/01/2010, 02:50   #51
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by ztcjsa View Post
The NPC doesent work for me Im getting an error concerning the link back??
Change Linkback -> Control
Arcо is offline  
Old 03/01/2010, 02:52   #52
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
You need to update thread.
Decker_ is offline  
Old 03/01/2010, 02:53   #53
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by Decker_ View Post
You need to update thread.
No I don't.
Arcо is offline  
Thanks
1 User
Old 03/01/2010, 04:38   #54
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Well, works perfectly for me. =] Just changed Linkback to Control and bam ^^
Secrets-man is offline  
Old 03/16/2010, 18:57   #55
 
xI NiNJA DuCKey's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 51
Received Thanks: 17
Rite i've added this to ma test source...
So under every save halo 'Give' should i put
Code:
try
{
StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopLeader.txt");
sw.WriteLine("" + GC.MyChar.EntityID + "#17179869184");
sw.Close();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
xI NiNJA DuCKey is offline  
Old 03/16/2010, 19:04   #56
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by xI NiNJA DuCKey View Post
Rite i've added this to ma test source...
So under every save halo 'Give' should i put
Code:
try
{
StreamWriter sw = new StreamWriter("C:\\OldCODB/Tops/TopLeader.txt");
sw.WriteLine("" + GC.MyChar.EntityID + "#17179869184");
sw.Close();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
And change the number to the enum of that skill.
Arcо is offline  
Thanks
1 User
Old 03/17/2010, 08:36   #57
 
xI NiNJA DuCKey's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 51
Received Thanks: 17
Thanks.

Kinda off topic but i almost got a screenshot of 1337 Thanks on ur profile but it was 1338
xI NiNJA DuCKey is offline  
Old 07/13/2010, 02:23   #58
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by -Java- View Post
i done evrtying right but no save when relog...here npc i use
Copy and paste his GWArenaNPC then change "Linkback" to "Control" and it will work fine.
.Beatz is offline  
Old 07/13/2010, 02:54   #59
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by -Java- View Post
i dusnt wann copy i want use own npc
The amount of help you want of people is rediculous. Here is a hint if you want to make your own NPC for it. Copy and past .Arco's NPC then change the parts that you want to change. Dont mess with the parts you know nothing about.
.Beatz is offline  
Old 07/13/2010, 02:58   #60
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by -Java- View Post
okay i fixed but i need numbers for it

sw.WriteLine("" + GC.MyChar.EntityID + "#17179869184");

someone plz ty
Every single number you need .Arco has released! It is on the very first post if you read you will see it.
.Beatz is offline  
Reply




All times are GMT +1. The time now is 23:42.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.