[Release]SaveHalos

01/19/2010 23:36 xScott#31
wow, to think i was gonna attempt this. great release :)
01/20/2010 13:50 Holo••Ft#32
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
01/20/2010 15:48 |xabi|#33
u break my sourse
01/20/2010 15:54 ramix#34
loooool you dont know put that rigth in source -.-


and Holo••Ft you forgot put une thing xD
01/20/2010 16:48 Holo••Ft#35
Whats it please, bcuz it works perfectly with me
01/20/2010 19:06 ramix#36
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 :D
01/21/2010 03:50 NoFatChicks#37
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
01/21/2010 06:15 Arcо#38
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?
01/21/2010 09:47 ramix#39
Hepatiti C is possivel use that code for ban ip? :S
01/21/2010 11:56 Korvacs#40
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.
01/21/2010 13:17 w.maatman#41
how to make this so u cant get 4,5k cps all the time ??

it seems my halos arent working :S
01/22/2010 00:26 Arcо#42
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.
02/01/2010 13:26 renetjuuh#43
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
02/01/2010 14:37 ramix#44
that is easy is in characters.cs
02/02/2010 18:52 glover#45
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.