this is my simple code any ppl can do this code
lets start...
First you need put this two npc's in npcdialog.cs
Flame Toist
Code:
#region FlameToist case 300861:// FlameToist { if (Control == 0) { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { GC.AddSend(Packets.NPCSay("You must have heard that the Olympic Games. I've been waiting for it for my entire life.")); GC.AddSend(Packets.NPCSay(" There are 10 flames stones that i would like you to light up...You will get some rewards, of cource.")); GC.AddSend(Packets.NPCSay(" It really makes sense to us, ah, at least to me.")); GC.AddSend(Packets.NPCLink("I would like to light up the flames", 10)); GC.AddSend(Packets.NPCLink("Rewards? Tell me more! Come on!", 1)); GC.AddSend(Packets.NPCLink("Not Intrested.", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else { GC.AddSend(Packets.NPCSay("you must have heard that the Olympic Games. I've been waiting for it for my entire life.")); GC.AddSend(Packets.NPCSay(" There are 10 flames stones that i would like you to light up...You will get some rewards, of cource.")); GC.AddSend(Packets.NPCSay(" It really makes sense to us, ah, at least to me.")); GC.AddSend(Packets.NPCLink("Rewards? Tell me more! Come on!", 1)); GC.AddSend(Packets.NPCLink("I have the Rune. Give me the Reward", 4)); GC.AddSend(Packets.NPCLink("Not Intrested.", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 16 && DateTime.Now.Minute == 01 && DateTime.Now.Second > 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute == 01 && DateTime.Now.Second < 02) { Database.FlameQuestReset(); } } if (Control == 1) { GC.AddSend(Packets.NPCSay("Ah, you seem very interested! Good. You are eligible to ligth up the flame! But, it's not the rigth time.")); GC.AddSend(Packets.NPCSay(" You see, the ceremony will be held till the last two hours of the Guild War. Come and sign up then.")); GC.AddSend(Packets.NPCLink("would you please give me more information?", 2)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } if (Control == 2) { GC.AddSend(Packets.NPCSay("Yeah. I've prepare 10 Flames Stones in the Wind Plain and Guild Arena. When the times comes,")); GC.AddSend(Packets.NPCSay(" i will give you a jade Rune. You just take it to ligth up all the Flame Stones in sequence")); GC.AddSend(Packets.NPCLink("Sure.", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } if (Control == 4) { if (GC.MyChar.Level < 137) { #region Reward if (GC.MyChar.InventoryContains(729960, 1))//JadeRune { #region Reward 1 expballexp //Reward 1 expballexp GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729960)); #endregion } else if (GC.MyChar.InventoryContains(729961, 1))//GoldRune { #region Reward 2 expballexp //Reward 2 expballexp GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729961)); #endregion } else if (GC.MyChar.InventoryContains(729962, 1))//GoldRune { #region Reward 3 expballexp //Reward 3 expballexp for (int x = 0; x < 3; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729962)); #endregion } else if (GC.MyChar.InventoryContains(729963, 1))//GoldRune { #region Reward 4 expballexp //Reward 4 expballexp for (int x = 0; x < 4; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729963)); #endregion } else if (GC.MyChar.InventoryContains(729964, 1))//SpiritRune { #region Reward 5 expballexp //Reward 5 expballexp for (int x = 0; x < 5; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729964)); #endregion } else if (GC.MyChar.InventoryContains(729965, 1))//SpiritRune { #region Reward 6 expballexp //Reward 6 expballexp for (int x = 0; x < 6; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729965)); #endregion } else if (GC.MyChar.InventoryContains(729966, 1))//SpiritRune { #region Reward 7 expballexp //Reward 7 expballexp for (int x = 0; x < 7; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729966)); #endregion } else if (GC.MyChar.InventoryContains(729967, 1))//HeavenRune { #region Reward 8 expballexp //Reward 8 expballexp for (int x = 0; x < 8; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729967)); #endregion } else if (GC.MyChar.InventoryContains(729968, 1))//HeavenRune { #region Reward 9 expballexp //Reward 9 expballexp for (int x = 0; x < 9; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729968)); #endregion } else if (GC.MyChar.InventoryContains(729969, 1))//HeavenRune { #region Reward 10 expballexp //Reward 10 expballexp for (int x = 0; x < 10; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729969)); #endregion } else if (GC.MyChar.InventoryContains(729970, 1))//DragonRune { #region Reward 12 expballexp //Reward 12 expballexp for (int x = 0; x < 12; x++) GC.MyChar.IncreaseExp((GC.MyChar.ExpBallExp), false); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729970)); #endregion } #endregion else { GC.AddSend(Packets.NPCSay("Sorry but you not have the Flame Stone")); GC.AddSend(Packets.NPCLink("Ups my mistake", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } else { GC.AddSend(Packets.NPCSay("You are level 137 sorry you cant get the reward")); GC.AddSend(Packets.NPCLink("OMG you rigth", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } if (Control == 10) { if (!GC.MyChar.FlameStone) { GC.MyChar.FlameStone = true; GC.MyChar.AddItem(729960); GC.AddSend(Packets.NPCSay("Good luck, light up the flames")); GC.AddSend(Packets.NPCLink("Thanks", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else { GC.AddSend(Packets.NPCSay("You already have the flamestone go light up the flames")); GC.AddSend(Packets.NPCLink("Sure", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } break; } #endregion
Code:
#region Flames case 300841: // Flame1 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729960, 1)) { GC.AddSend(Packets.NPCSay("You have the GoldRune, go to the next Flame the coord is (317,270)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729960)); GC.MyChar.AddItem(729961); } else { GC.LocalMessage(2005, "You not have the JadeRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300842: // Flame2 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729961, 1)) { GC.AddSend(Packets.NPCSay("You have the GoldRune, go to the next Flame the coord is (236,291)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729961)); GC.MyChar.AddItem(729962); } else { GC.LocalMessage(2005, "You not have the GoldRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300843: // Flame3 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729962, 1)) { GC.AddSend(Packets.NPCSay("You have the GoldRune, go to the next Flame the coord is (194,168)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729962)); GC.MyChar.AddItem(729963); } else { GC.LocalMessage(2005, "You not have the GoldRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300844: // Flame4 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729963, 1)) { GC.AddSend(Packets.NPCSay("You have the SpiritRune, go to the next Flame the coord is (115,53)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729963)); GC.MyChar.AddItem(729964); } else { GC.LocalMessage(2005, "You not have the GoldRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300845: // Flame5 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729964, 1)) { GC.AddSend(Packets.NPCSay("You have the SpiritRune, go to the next Flame the coord is (316,378)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729964)); GC.MyChar.AddItem(729965); } else { GC.LocalMessage(2005, "You not have the SpiritRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300846: // Flame6 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729965, 1)) { GC.AddSend(Packets.NPCSay("You have the SpiritRune, go to the next Flame the coord is (136,182)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729965)); GC.MyChar.AddItem(729966); } else { GC.LocalMessage(2005, "You not have the SpiritRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300847: // Flame7 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729966, 1)) { GC.AddSend(Packets.NPCSay("You have the HeavenRune, go to the next Flame the coord is (38,94)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729966)); GC.MyChar.AddItem(729967); } else { GC.LocalMessage(2005, "You not have the SpiritRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300848: // Flame8 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729967, 1)) { GC.AddSend(Packets.NPCSay("You have the HeavenRune, go to the next Flame the coord is (350,321)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729967)); GC.MyChar.AddItem(729968); } else { GC.LocalMessage(2005, "You not have the HeavenRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300849: // Flame9 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 00 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729968, 1)) { GC.AddSend(Packets.NPCSay("You have the HeavenRune, go to the next Flame the coord is (62,59)")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729968)); GC.MyChar.AddItem(729969); } else { GC.LocalMessage(2005, "You not have the HeavenRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } case 300850: // Flame10 { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday && DateTime.Now.Hour == 15 && DateTime.Now.Minute >= 30 && DateTime.Now.Hour == 16 && DateTime.Now.Minute <= 00) { if (Control == 0) { if (GC.MyChar.InventoryContains(729969, 1)) { GC.AddSend(Packets.NPCSay("You have the DragonRune, go now to flametoist for your reward")); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); GC.MyChar.RemoveItem(GC.MyChar.NextItem(729969)); GC.MyChar.AddItem(729970); } else { GC.LocalMessage(2005, "You not have the HeavenRune"); } } } else { GC.LocalMessage(2005, "Its not the right time to light up the flames"); } break; } #endregion
under that code put thisQuote:
public byte ExpBallsUsedToday = 0;
now go to packet Teleport Scrolls in character.csQuote:
public bool FlameStone = false;
and below put thisQuote:
#region Teleport Scrolls
Code:
#region FlamesStones case 729960: { MyClient.LocalMessage(2005, "The 1º Flame Cristal is (350,327)"); break; } case 729961: { MyClient.LocalMessage(2005, "The 2º Flame Cristal is (317,270)"); break; } case 729962: { MyClient.LocalMessage(2005, "The 3º Flame Cristal is (236,291)"); break; } case 729963: { MyClient.LocalMessage(2005, "The 4º Flame Cristal is (194,168)"); break; } case 729964: { MyClient.LocalMessage(2005, "The 5º Flame Cristal is (115,53)"); break; } case 729965: { MyClient.LocalMessage(2005, "The 6º Flame Cristal is (316,378)"); break; } case 729966: { MyClient.LocalMessage(2005, "The 7º Flame Cristal is (136,182)"); break; } case 729967: { MyClient.LocalMessage(2005, "The 8º Flame Cristal is (38,94)"); break; } case 729968: { MyClient.LocalMessage(2005, "The 9º Flame Cristal is (350,321)"); break; } case 729969: { MyClient.LocalMessage(2005, "The 10º Flame Cristal is (62,59)"); break; } case 729970: { MyClient.LocalMessage(2005, "Go to the FlameToist (355,325)"); break; } #endregion
and search for this
below you put thisQuote:
public static Game.Character LoadCharacter(string Name, ref string Account)
Code:
public static void FlameQuestReset() { foreach (string Path in Directory.GetFiles(@"C:\OldCODB\Users\Characters\")) { if (Path.Remove(0, Path.Length - 4) == ".chr") { try { string Name = Path.Substring(Path.LastIndexOf("\\") + 1, Path.LastIndexOf('.') - Path.LastIndexOf("\\") - 1); Game.Character C; C = Game.World.CharacterFromName2(Name); if (C == null) { string Account = ""; C = LoadCharacter(Name, ref Account); if (C != null) { C.FlameStone = false; SaveCharacter(C, Account); } } else { C.FlameStone = false; } } catch (Exception e) { Console.WriteLine(e.ToString()); } } } }
under that code you find thisQuote:
public static Game.Character LoadCharacter(string Name, ref string Account)
under this code you put thisQuote:
C.UniversityPoints = BR.ReadUInt32();
now we go toQuote:
C.FlameStone = BR.ReadBoolean();
find this code tooQuote:
public static Game.Robot LoadAsRobot(string Name, ref string Account)
and under you put this code tooQuote:
C.UniversityPoints = BR.ReadUInt32();
now we go to this codeQuote:
C.FlameStone = BR.ReadBoolean();
find this codeQuote:
public static void SaveCharacter(Game.Character C, string Acc)
under that put this codeQuote:
BW.Write(C.UniversityPoints);//Quiz Pts
now go to program.csQuote:
BW.Write(C.FlameStone);//Quest Flame toist
and find this
Code:
if (Cmd[0] == "/expballs") Database.ExpBallReset();
Code:
if (Cmd[0] == "/flamequest") Database.FlameQuestReset();
PacketHandling / itempacket / DropAnItem.cs
replease all the DropAnItem.cs
for this
Code:
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace NewestCOServer.PacketHandling.ItemPacket { public class DropAnItem { public static void Handle(Main.GameClient GC, byte[] Data) { uint ItemUID = BitConverter.ToUInt32(Data, 4); Game.Item I = GC.MyChar.FindInvItem(ItemUID); if (I.ID != 0) { if (I.ID != 729960 && I.ID != 729961 && I.ID != 729962 && I.ID != 729963 && I.ID != 729964 && I.ID != 729965 && I.ID != 729966 && I.ID != 729967 && I.ID != 729968 && I.ID != 729969 && I.ID != 729970) { if (GC.MyChar.MyShop == null) { if (!I.FreeItem) { Game.DroppedItem DI = new NewestCOServer.Game.DroppedItem(); DI.Info = I; DI.DropTime = DateTime.Now; DI.Loc = GC.MyChar.Loc; DI.UID = (uint)Program.Rnd.Next(10000000); if (!DI.FindPlace((Hashtable)Game.World.H_Items[GC.MyChar.Loc.Map])) return; DI.Drop(); } /*else { if (I.ID == 300000) { if (I.Plus < 2) { Game.DroppedItem DI = new NewestCOServer.Game.DroppedItem(); DI.Info = I; DI.DropTime = DateTime.Now; DI.Loc = GC.MyChar.Loc; DI.UID = (uint)Program.Rnd.Next(10000000); if (!DI.FindPlace((Hashtable)Game.World.H_Items[GC.MyChar.Loc.Map])) return; DI.Drop(); } } }*/ GC.MyChar.RemoveItem(I); } else GC.LocalMessage(2005, "Cannot drop Free items."); } else GC.LocalMessage(2005, "Cannot drop this item."); } else GC.AddSend(Packets.ItemPacket(ItemUID, 0, 3)); } } }
find this case
replease all case 6: for this caseQuote:
case 6:
Code:
case 6: { Character Who = (Character)World.H_Chars[C.MyChar.TradingWith]; if (Who != null) { if (C.MyChar.TradeSide.Count < 20) { if (Who.Inventory.Count + C.MyChar.TradeSide.Count < 40) { Game.Item I = C.MyChar.FindInvItem(UID); if (I.ID != 729960 && I.ID != 729961 && I.ID != 729962 && I.ID != 729963 && I.ID != 729964 && I.ID != 729965 && I.ID != 729966 && I.ID != 729967 && I.ID != 729968 && I.ID != 729969 && I.ID != 729970) { if (!I.FreeItem) { Who.MyClient.AddSend(Packets.TradeItem(I)); C.MyChar.TradeSide.Add(I.UID); } else { C.AddSend(Packets.TradePacket(UID, 11)); C.AddSend(Packets.ChatMessage(C.MessageID, "SYSTEM", C.MyChar.Name, "[Trade]Cannot trade items made with gm commands.", 2005, 0)); } } else { C.AddSend(Packets.TradePacket(UID, 11)); C.AddSend(Packets.ChatMessage(C.MessageID, "SYSTEM", C.MyChar.Name, "[Trade]Cannot trade this items.", 2005, 0)); } } else { C.AddSend(Packets.TradePacket(UID, 11)); C.AddSend(Packets.ChatMessage(C.MessageID, "SYSTEM", C.MyChar.Name, "[Trade]Your trade partner can't hold any more items.", 2005, 0)); Who.MyClient.AddSend(Packets.ChatMessage(C.MessageID, "SYSTEM", C.MyChar.Name, "[Trade]The one your trading with cant add anymore items on the table because you have no room in your inventory.", 2005, 0)); } } } break; }
go to Oldcodb / npc.txt
and put this npc's
Code:
300841 6570 2 0 1002 350 327 300842 6580 2 0 1038 317 270 300843 6590 2 0 1038 236 291 300844 6600 2 0 1038 194 168 300845 6610 2 0 1038 115 53 300846 6620 2 0 1038 316 378 300847 6630 2 0 1038 136 182 300848 6640 2 0 1038 38 94 300849 6650 2 0 1002 350 321 300850 6660 2 0 1038 62 59 300861 6816 2 0 1002 355 325
i forgot this quest start in Saturday the 14h and end 16h
event reset in 16h01
This Code was maded by : ME
and i post in forum 4botters too... for ppl not call me leecher... i made this code alone...
Peace and love
Partner : Jogos Brasil