Register for your free account! | Forgot your password?

You last visited: Today at 06:30

  • 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   #31
 
xScott's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
wow, to think i was gonna attempt this. great release
xScott is offline  
Old   #32
 
Holo••Ft's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 27
Received Thanks: 7
Okei, ive got errors guys on linkback so i will post the right one, and ALL CREDITS FOR Hepatites C
Quote:
#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 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 (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.CPs += 4500;
World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has claimed 4500 CPs and the TopGuildLeader Halo for winning GuildWar!", 2011, 0);
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 (Control == 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.TopDeputyLead er);
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
Holo••Ft is offline  
Old   #33
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
u break my sourse
|xabi| is offline  
Old   #34
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
loooool you dont know put that rigth in source -.-


and Holo••Ft you forgot put une thing xD
ramix is offline  
Old   #35
 
Holo••Ft's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 27
Received Thanks: 7
Whats it please, bcuz it works perfectly with me
Holo••Ft is offline  
Old   #36
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeade r);
GC.MyChar.CPs += 4500;
World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has claimed 4500 CPs and the TopGuildLeader Halo for winning GuildWar!", 2011, 0);
try


to receb the top guild leader
ramix is offline  
Old   #37
 
NoFatChicks's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 0
Hey, me again. Can you give me a tip about how to make the npc give the Top DL just for a certain number of DL's (like... 2) ? Or its a thing to change elsewhere?


Thanks
NoFatChicks is offline  
Old   #38
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,789
Received Thanks: 5,309
Quote:
Originally Posted by NoFatChicks View Post
Hey, me again. Can you give me a tip about how to make the npc give the Top DL just for a certain number of DL's (like... 2) ? Or its a thing to change elsewhere?


Thanks
I couldn't get that to work.
Not with the system I used.


Quote:
Originally Posted by Korvacs View Post
Thats overkill and really inefficient, 2 fields could be used to store everything you need, how do you determine which one is being used out of all of the possible halos available to the char?

Its better than the other that was released isn't it?
Arcо is offline  
Thanks
3 Users
Old   #39
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
Hepatiti C is possivel use that code for ban ip? :S
ramix is offline  
Old   #40


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,519
Quote:
Originally Posted by Hepatitis C View Post
I couldn't get that to work.
Not with the system I used.


Its better than the other that was released isn't it?
Im going to go with no. The reason im going to go with no is for the same reason that emme was massively disliked throughout epvpers.

If you release something which is badly written and people use it, they will assume that it is the best way of doing something, which means that they will use similar code practices for when they come to write their own updates and releases.

And that means that they are coding in inefficiencys and possibly exception prone code which they will fix probably with try/catch which is even more inefficient.
Korvacs is offline  
Thanks
1 User
Old   #41
 
w.maatman's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 28
Received Thanks: 0
how to make this so u cant get 4,5k cps all the time ??

it seems my halos arent working :S
w.maatman is offline  
Old   #42
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,789
Received Thanks: 5,309
Quote:
Originally Posted by w.maatman View Post
how to make this so u cant get 4,5k cps all the time ??

it seems my halos arent working :S
That's just an example npc.
You can use that for whatever you want.

Just takes a small but of common sense.
Arcо is offline  
Old   #43
 
renetjuuh's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 97
Received Thanks: 9
Code:
sw.WriteLine("" + GC.MyChar.EntityID + "#17179869184");
so this number "#17179869184" is for topguildleader. so can you tell me how i can find out what the numbers are for toptrojan and ect...

nvm i found it in the code in database.cs

btw realy nice release love it
renetjuuh is offline  
Old   #44
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
that is easy is in characters.cs
ramix is offline  
Old   #45
 
glover's Avatar
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
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.
glover is offline  
Reply




All times are GMT +2. The time now is 06:31.


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.