para quem nao sabe o que e halos e os top ninja, top trojan etc....
1º abre NewestCOServer com o visual C#
2º vai a database.cs
3º meter isto no top na database.cs "using NewestCOServer.Game;"
4º procura isto na database.cs "Features.QuizShow.AllQuestions.Clear();"
5º acrescenta isto por debaixo Features.QuizShow.AllQuestions.Clear();
}
- Código:
public static void LoadTopLeader(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopLeader.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopLeader.txt");
int TopLeader = AllLines.Length;
for (int x = 0; x < TopLeader; x++)
{
string[] TopGuildLeaderz = AllLines[x].Split('#');
string CharID = TopGuildLeaderz[0];
string GuildHalo = TopGuildLeaderz[1];
if (TopGuildLeaderz.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(GuildHalo); // A check if it reads it right.
if (GuildHalo == "17179869184")
GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
}
}
}
}
public static void LoadTopDeputy(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopDeputy.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopDeputy.txt");
int TopDeputy = AllLines.Length;
for (int x = 0; x < TopDeputy; x++)
{
string[] TopGuildDeputyz = AllLines[x].Split('#');
string CharID = TopGuildDeputyz[0];
string DeputyHalo = TopGuildDeputyz[1];
if (TopGuildDeputyz.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(DeputyHalo); // A check if it reads it right.
if (DeputyHalo == "34359738368")
GC.MyChar.StatEff.Add(StatusEffectEn.TopDeputyLeader);
}
}
}
}
public static void LoadPkWeek(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\PkWeek.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\PkWeek.txt");
int PkWeek = AllLines.Length;
for (int x = 0; x < PkWeek; x++)
{
string[] WeeklyPK = AllLines[x].Split('#');
string CharID = WeeklyPK[0];
string WeekHalo = WeeklyPK[1];
if (WeeklyPK.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(WeekHalo); // A check if it reads it right.
if (WeekHalo == "137438953472")
GC.MyChar.StatEff.Add(StatusEffectEn.WeeklyPKChampion);
}
}
}
}
public static void LoadTopTrojan(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopTrojan .txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopTrojan.txt");
int TopTrojan = AllLines.Length;
for (int x = 0; x < TopTrojan; x++)
{
string[] TopTro = AllLines[x].Split('#');
string CharID = TopTro[0];
string TroHalo = TopTro[1];
if (TopTro.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(TroHalo); // A check if it reads it right.
if (TroHalo == "549755813888")
GC.MyChar.StatEff.Add(StatusEffectEn.TopTrojan);
}
}
}
}
public static void LoadTopWarrior(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopWarrior.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopWarrior.txt");
int TopWarrior = AllLines.Length;
for (int x = 0; x < TopWarrior; x++)
{
string[] TopWar = AllLines[x].Split('#');
string CharID = TopWar[0];
string WarHalo = TopWar[1];
if (TopWar.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(WarHalo); // A check if it reads it right.
if (WarHalo == "274877906944")
GC.MyChar.StatEff.Add(StatusEffectEn.TopWarrior);
}
}
}
}
public static void LoadTopArcher(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopArcher.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopArcher.txt");
int TopArcher = AllLines.Length;
for (int x = 0; x < TopArcher; x++)
{
string[] TopArch = AllLines[x].Split('#');
string CharID = TopArch[0];
string ArchHalo = TopArch[1];
if (TopArch.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(ArchHalo); // A check if it reads it right.
if (ArchHalo == "1099511627776")
GC.MyChar.StatEff.Add(StatusEffectEn.TopArcher);
}
}
}
}
public static void LoadTopNinja(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopNinja.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopNinja.txt");
int TopNinja = AllLines.Length;
for (int x = 0; x < TopNinja; x++)
{
string[] TopNin = AllLines[x].Split('#');
string CharID = TopNin[0];
string NinHalo = TopNin[1];
if (TopNin.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(NinHalo); // A check if it reads it right.
if (NinHalo == "8796093022208")
GC.MyChar.StatEff.Add(StatusEffectEn.TopNinja);
}
}
}
}
public static void LoadTopFire(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopFire.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopFire.txt");
int TopFire = AllLines.Length;
for (int x = 0; x < TopFire; x++)
{
string[] TopFirez = AllLines[x].Split('#');
string CharID = TopFirez[0];
string FireHalo = TopFirez[1];
if (TopFirez.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(FireHalo); // A check if it reads it right.
if (FireHalo == "4398046511104")
GC.MyChar.StatEff.Add(StatusEffectEn.TopFireTaoist);
}
}
}
}
public static void LoadTopWater(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\TopWater.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\TopWater.txt");
int TopWater = AllLines.Length;
for (int x = 0; x < TopWater; x++)
{
string[] TopWaterz = AllLines[x].Split('#');
string CharID = TopWaterz[0];
string WaterHalo = TopWaterz[1];
if (TopWaterz.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(WaterHalo); // A check if it reads it right.
if (WaterHalo == "2199023255552")
GC.MyChar.StatEff.Add(StatusEffectEn.TopWaterTaoist);
}
}
}
}
public static void LoadPKMonth(StatusEffectEn Value, Main.GameClient GC)
{
if (File.Exists(@"C:\OldCODB\Tops\PkMonth.txt"))
{
string[] AllLines = System.IO.File.ReadAllLines(@"C:\OldCODB\Tops\PkMonth.txt");
int PkMonth = AllLines.Length;
for (int x = 0; x < PkMonth; x++)
{
string[] PkMonthz = AllLines[x].Split('#');
string CharID = PkMonthz[0];
string MonthHalo = PkMonthz[1];
if (PkMonthz.Contains(GC.MyChar.EntityID.ToString()) && CharID.Contains(GC.MyChar.EntityID.ToString()))
{
Program.WriteLine(MonthHalo); // A check if it reads it right.
if (MonthHalo == "68719476736")
GC.MyChar.StatEff.Add(StatusEffectEn.MonthlyPKChampion);
}
}
}
}
6º agora vai a packethandling e carrega em telesport.cs
7º agora procurem isto "if (Game.World.KOBoard[0].Name == GC.MyChar.Name)" em telesport.cs
8º por cima desse codigo que procuraram metem isto
- Código:
Game.StatusEffect StatusEffect = new NewestCOServer.Game.StatusEffect(GC.MyChar);
Database.LoadTopLeader(StatusEffect.Value, GC);
Database.LoadTopDeputy(StatusEffect.Value, GC);
Database.LoadPkWeek(StatusEffect.Value, GC);
Database.LoadPKMonth(StatusEffect.Value, GC);
Database.LoadTopArcher(StatusEffect.Value, GC);
Database.LoadTopWarrior(StatusEffect.Value, GC);
Database.LoadTopTrojan(StatusEffect.Value, GC);
Database.LoadTopNinja(StatusEffect.Value, GC);
Database.LoadTopFire(StatusEffect.Value, GC);
Database.LoadTopWater(StatusEffect.Value, GC);
9º agora vai ao npcdialog.cs e so acrescentas isto no npc que da os halos atencao que este aqui esta so para top guild leader tem que fazer para o outros tops
- Código:
if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner && (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader))
{
GC.MyChar.StatEff.Add(StatusEffectEn.TopGuildLeader);
World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has claimed 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);
}
}
}
10º vao ao oldcodb e criem uma pasta chamado "Tops"
11º dentro da pasta tops criem ficheiros com estes nomes
- Código:
TopWarrior
TopNinja
TopTrojan
TopArcher
TopWater
TopFire
TopLeader
TopDeputy
PkMonth
PkWeek
Creditos para o Hepatiti C por ter feito o code eu so acrescentei umas coisa que ele se tinha esquecido mais nada creditos todos para ele obrigado