Register for your free account! | Forgot your password?

You last visited: Today at 23:32

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

Advertisement



[Release]Save Haloes

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

Reply
 
Old   #1
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,785
Received Thanks: 5,304
[Release]Save Haloes

I made a new easier way of saving halos.
I took what Korvacs said into effect.
First we're going to define. Lets go to Character.cs and search for:
Code:
public PKMode PKMode = PKMode.Capture;
Atop of that place this
Code:
        public int Top = 0;
Now let's go to Database.cs and search for this:
Code:
        public static Game.Character LoadCharacter(string Name, ref string Account)
In the bottom of that you will see:
Code:
                            C.Spouse = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
                            C.UniversityPoints = BR.ReadUInt32();
Under that insert this:
Code:
C.Top = BR.ReadInt32();
Then a little lower you will see:
Code:
C.UniversityPoints = 0;
Under that insert this:
Code:
C.Top = 0;
Now a little bit lower of that you will see
Code:
C.Loaded = true;
Under that put this:
Code:
                    if (C.Top == 1) 
                    {

                    }
Her is how you will use this.
You can place that under C.Loaded = true; as many times as you want, just change the number to what you want and put the effect into the brackets.
EX:
Code:
                    if (C.Top == 1) 
                    {
                        C.StatEff.Add(StatusEffectEn.WeeklyPKChampion);
                    }
Like that.
Now lets go down a little to
Code:
        public static Game.Robot LoadAsRobot(string Name, ref string Account)
and repeat everything you just did.
Next go to
Code:
        public static void SaveCharacter(Game.Character C, string Acc)
And towards the bottom go to:
Code:
                BW.Write(C.UniversityPoints);
And under that put
Code:
                BW.Write(C.Top);
Now go to:
Code:
        public static string CreateCharacter(string Account, string Name, ushort Body, byte Job)
And go towards the bottom to
Code:
                        BW.Write((uint)0);//Quiz Pts
And under that put
Code:
                        BW.Write((int)0);//TopEffect
The way I loaded the effects was this:
Code:
                    #region Tops
                    if (C.Top == 1) 
                    {
                        C.StatEff.Add(StatusEffectEn.TopGuildLeader);
                    }
                    if (C.Top == 2)
                    {
                        C.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                    }
                    if (C.Top == 3)
                    {
                        C.StatEff.Add(StatusEffectEn.TopNinja);
                    }
                    if (C.Top == 4)
                    {
                        C.StatEff.Add(StatusEffectEn.TopTrojan);
                    }
                    if (C.Top == 5)
                    {
                        C.StatEff.Add(StatusEffectEn.TopArcher);
                    }
                    if (C.Top == 6)
                    {
                        C.StatEff.Add(StatusEffectEn.TopWarrior);
                    }
                    if (C.Top == 7)
                    {
                        C.StatEff.Add(StatusEffectEn.TopFireTaoist);
                    }
                    if (C.Top == 8)
                    {
                        C.StatEff.Add(StatusEffectEn.TopWaterTaoist);
                    }
                    if (C.Top == 9)
                    {
                        C.StatEff.Add(StatusEffectEn.MonthlyPKChampion);
                    }
                    if (C.Top == 10)
                    {
                        C.StatEff.Add(StatusEffectEn.WeeklyPKChampion);
                    }
#endregion
And just used an npc doing this:
Code:
                            #region GWArenaNPC
                            case 380:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Do you want enter the guild arena?"));
                                        GC.AddSend(Packets.NPCLink("Yes.", 1));
                                        GC.AddSend(Packets.NPCLink("I won the GuildWar and would like to claim my TopGuildLEader halo.", 2));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.Teleport(1038, 350, 350); 
                                    }
                                    else if (Control == 2)
                                    {
                                        if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
                                        {
                                            GC.MyChar.Top = 1;
                                            GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
                                        }
                                    }
                                        break;
                                }
                            #endregion
There you go, this is way better than my other one.
Arcо is offline  
Thanks
11 Users
Old 02/03/2010, 07:07   #2
 
WHITELIONX's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 534
Received Thanks: 66
I have no problems with your old way so I shall not be changing it lol
WHITELIONX is offline  
Old 02/03/2010, 13:22   #3
 
.Ocularis's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 309
Received Thanks: 208
Nice dude. wicked job
I think i may switch this one out with the other one... just for the sake of deleting the tops folder and to give me something to do like add this to the character panel so you can add or remove a halo from someone since you won't be able to do it manually without a command.

Maybe I'll make that and release it here in a few days who knows

Btw Acro! Check your pms please bro. I sent you a message like 2 days ago


Halo edit added to character form. Grab it from !
.Ocularis is offline  
Old 02/03/2010, 13:56   #4
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
good release bro

but this code can delete halo if othe person get?

for exemple.. some one win gw get halo guildleader and the next gw he lose, and the winner get that halo... the person lose the halo is deleted? :S
ramix is offline  
Old 02/03/2010, 14:42   #5
 
elite*gold: 0
Join Date: Jan 2010
Posts: 74
Received Thanks: 18
Good job Arco!
Metapod is offline  
Old 02/03/2010, 14:50   #6
 
.Ocularis's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 309
Received Thanks: 208
Quote:
Originally Posted by ramix View Post
good release bro

but this code can delete halo if othe person get?

for exemple.. some one win gw get halo guildleader and the next gw he lose, and the winner get that halo... the person lose the halo is deleted? :S

check the release section! I just made a release for this. But it doesn't do it automatically of course, you would have to add that on your own unless someone releases it. I don't think it would be too hard.

I'm not even using this. I like his old halo save system better :P

But, I think if you add new functions to endgw that will remove the halo from any character who is not a member of the winning guild...

And when disbanding a guild I think the "easy" way to remove the GL and dep halos would be making a check for all characters in the guild, to see if they have a value of (GL number) or (Dep number) for C.Tops and if so it should set it to 0.



To make this halo system full... C.Tops would have to broken down into all halo classes.
C.TopArcher
C.TopTrojan
C.TopGLeader
C.TopDLeader
.... and so on with switches of 1 or 0/true or false... I think switches of 1 or 0 would be better.

If Acro does this I'll update my character form for it.

Lol. I just noticed what glover said while I was editing my post.... Oh well xD
.Ocularis is offline  
Old 02/03/2010, 15:24   #7
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Hello .Arco.
On your code any accounts can get multiple effects like GW winner and Top player and others ? if not you can reorganize your C.Top for use bits for multiple effects.
Like:
bit 0 = TopGuildLeader
bit 1 = TopDeputyLeader
bit 2 = TopNinja
...
...
...
glover is offline  
Old 02/03/2010, 15:36   #8
 
.Ocularis's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 309
Received Thanks: 208
Quote:
Originally Posted by glover View Post
Hello .Arco.
On your code any accounts can get multiple effects like GW winner and Top player and others ? if not you can reorganize your C.Top for use bits for multiple effects.
Like:
bit 0 = TopGuildLeader
bit 1 = TopDeputyLeader
bit 2 = TopNinja
...
...
...

Thats pretty much the way it is.
You gotta add them yourself.

Thing is you can't do 2 halos at one time unless you add a massive list... like


bit 301 = TopGL + Top Ninja + Monthly pk champ
bit 403 = Topdl + Top Trojan + weekly pk champ

If C.Tops was broken down you could have all those

.Ocularis is offline  
Old 02/03/2010, 15:51   #9
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Quote:
Originally Posted by Mentalis View Post
Thats pretty much the way it is.
You gotta add them yourself.

Thing is you can't do 2 halos at one time unless you add a massive list... like


bit 301 = TopGL + Top Ninja + Monthly pk champ
bit 403 = Topdl + Top Trojan + weekly pk champ

If C.Tops was broken down you could have all those

Lol you wrong Mentalis.
You need to check only 10 bits
And this is added once like when player are login into server, and when get win this stat.

there is a simple code:

Code:
                    int Top = 7;
                    if ((Top & 0x1) != 0)
                        C.StatEff.Add(StatusEffectEn.TopGuildLeader);
                    if ((Top & 0x2) != 0)
                        C.StatEff.Add(StatusEffectEn.TopDeputyLeader);
                    if ((Top & 0x4) != 0)
                        C.StatEff.Add(StatusEffectEn.TopNinja);
glover is offline  
Old 02/03/2010, 15:57   #10
 
.Ocularis's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 309
Received Thanks: 208
But then you still have to remove the effects at some point...
I'm working on splitting C.Tops up

It would be easier to remove effects if someone else wins the same effect unless your a DL...

At least for me....

And yea I figured I was wrong. :P My very first look at visual studio was 3-4 weeks ago...

Still a nub
.Ocularis is offline  
Old 02/03/2010, 16:04   #11
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
yea you can ^^.
But GW stats are in this source and are writen and loaded when server begin and ending.
Btw. i got C# language from January ^^ i broke programming from 2000 year.
glover is offline  
Old 02/20/2010, 02:45   #12
 
elite*gold: 0
Join Date: Sep 2008
Posts: 26
Received Thanks: 2
plz man can upload your file Database.cs
because i have Error from (StatusEffectEn)
and i will complete
memo1340 is offline  
Old 02/20/2010, 02:54   #13
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,785
Received Thanks: 5,304
Quote:
Originally Posted by memo1340 View Post
plz man can upload your file Database.cs
because i have Error from (StatusEffectEn)
and i will complete
Search for
using System;
And add this under it:
using NewestCOServer.Game;
Arcо is offline  
Thanks
4 Users
Old 02/20/2010, 03:55   #14
 
elite*gold: 0
Join Date: Sep 2008
Posts: 26
Received Thanks: 2
man can U upload your Source plz
memo1340 is offline  
Old 02/20/2010, 03:57   #15
 
elite*gold: 0
Join Date: Sep 2008
Posts: 26
Received Thanks: 2
Quote:
Originally Posted by .Arco View Post
Search for
using System;
And add this under it:
using NewestCOServer.Game;
where me search
memo1340 is offline  
Reply


Similar Threads Similar Threads
[Release]INI save system for 12tail's flowers!
11/14/2010 - CO2 PServer Guides & Releases - 37 Replies
OK, this save system works, but you have to get the actually flower system working(like me). First in your C:\OldCODB\ folder, make a NEW FOLDER called "Flowers" (without the quotes) Then... Find in Database.cs: public static Game.Character LoadCharacter(string Name, ref string Account) and above that add:
[RELEASE]Great Save!
06/15/2010 - CO2 PServer Guides & Releases - 17 Replies
This is for tanels source :) Is just a autosave. Go to Program.cs. Search for: public static System.Timers.Timer DropEventTimer = null; user it put: public static System.Timers.Timer Thetimer;
[RELEASE][GC All Version] Macro & Save Files a.k.a BOT + Tutorials
04/02/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 411 Replies
THIS IS AN EXPLOIT IN GRANDCHASE USING MACRO TOOLS FOR MANUAL BOT.AND WITH TUTORIAL LINK AND VIDEO SO YOU CAN UNDERSTAND IT FASTER..YOU CAN CREATE UR OWN SCRIPT AND SHARE IT TO OTHERS JUST POST IT HERE TO AVOID SPAMMING PLEASE ^^ AND DONT FORGET TO PUT WHAT PROGRAM YOU USE LIKE AXIFE OR GRASsSOFT.... IT IS FOR THOSE PEOPLE THAT NEED TIME TO RELAX OR NEED TO DO SOME OTHER CHORES. AND MAYBE IT CAN BE USE IN OTHER ONLINE GAMES TOO :):cool::) NEEDED: Brian~ SD Hack...
[Release]CoEmu Save CPs
08/10/2009 - CO2 PServer Guides & Releases - 3 Replies
People gettin tired of CP's not saving? Stop asking ... its a freakin noob change Go to Database>Database Search for public static void SaveCharacter(Character Client) Replace the whole void with public static void SaveCharacter(Character Client)
[Release]Auto Save!!
11/05/2008 - CO2 PServer Guides & Releases - 16 Replies
open client.cs search for if (World.AllChars.Contains(MyChar.UID)) World.AllChars.Remove(MyChar.UID); } catch (Exception Exc) { General.WriteLine(Exc.ToString()); } Add below



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


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