Some of those are already been released by me but still have PMs asking for them so i'll try to collect them in one thread (if i missed any feel free to post it here or tell me about it and i'll add it)
Note:- you may need to edit the NPCs IDs coz some of them are not in the main Data base and u have to add them
So what is in this thread ?!
1-Some useful Voids and Functions
2-Proficiency God
3-ArtisanOu
4-MagicArtisan
5-Weapon Master
6-Black Smith Lee
7-CelestialTao
8-Ethereal
9-DisCity
10-Fixed Socketgem.cs (have Thunder and Glory Gems And remove gem from socket
11-Lottery System
12-Socketing Talismans
13-Some Skills
14-Honor Ranks (TopTrojan,Worrior,....)
15-Reborn
16-Ware House password system
17-DropMoney
some voids and functions u may need (go to NPcTalk.cs)
public static void AddItem(int itemid, int bless, int dura, int enchant, int plus,int Progress, int position, int soc1, int soc2, int color, ClientSocket CSocket,byte Count)
{
for (byte t = 0; t < Count; t++)
{
Struct.ItemInfo Item = new Struct.ItemInfo();
if (dura == 255)
{
Item.Dura = Item.MaxDura;
}
else
{
Item.Dura = dura;
}
Item.Bless = bless;
Item.Enchant = enchant;
Item.ItemID = itemid;
Item.Plus = plus;
Item.Progress = Progress;
Item.Position = position;
Item.Soc1 = soc1;
Item.Soc2 = soc2;
Item.Color = color;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
CSocket.Client.Inventory.Add(Item.UID, Item);
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Progress, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color,0,0));
}
}
public static bool HasItem(int ItemId, byte Count, ClientSocket CSocket)
{
//720027 MeteorScroll ,720028 DBScroll, 1088001 Meteor, 1088000 DragonBall, 1080001 Emerald
byte ItemsFound = 0;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (ItemsFound < Count)
{
if (Item.ItemID == ItemId) ItemsFound++;
}
else break;
}
if (ItemsFound >= Count) return true;
return false;
}
public static void DeleteItem(int ItemID, byte Count, ClientSocket CSocket)
{
int[] Uids = new int[Count]; byte ItemsFound = 0;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == ItemID)
{
Uids[ItemsFound] = Item.UID; ItemsFound++;
}
if (ItemsFound == Count) break;
}
for (byte t = 0; t < Count; t++)
{
CSocket.Client.Inventory.Remove(Uids[t]);
CSocket.Send(ConquerPacket.ItemUsage(Uids[t], 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(Uids[t]);
}
}
notice that i added a variable at the AddItem void after "CSocket" ,here u have 3 options to do
A:-Keep ur old one and use mine too so u wont have any errors
B:-Keep urs without using mine that will need to remove the last number from each additem call in my codes
C:-Replace urs with my one but u will need to edit all AddItem calls and add the number of items to add for each call u had be4
#region ArtisanOu SocketerMan at bird island
case 41://Using CPs
{
if (LinkBack == 0)
{
Text("Hello there ,i am the amazing socketer u heard about :P", CSocket);
Text("i never fail sockiting your weapon,tho i am a littel expinsive", CSocket);
Text("the first socket costs 215 CPS,,, the second costs 1075", CSocket);
Link("First Socket", 1, CSocket);
Link("Second Socket", 2, CSocket);
Link("R u kidding, bye", 255, CSocket);
Face(60, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.CPs > 214)
{
if (CSocket.Client.Equipment.ContainsKey(4))
{
if (CSocket.Client.Equipment[4].Soc1 == 0)
{
CPs(-215, CSocket);
CSocket.Client.Equipment[4].Soc1 = 255;int Uid=CSocket.Client.Equipment[4].UID;
ItemUnequip(4, Uid, CSocket);
ItemEquip(4, Uid, CSocket);
Text("Here you go check your weapon", CSocket);
Link("Nice great man,thanks", 255, CSocket);
Face(60, CSocket);
End(CSocket);
}
else
{
Text("Are You crazy ,your weapon has the socket!!!!", CSocket);
Link("Aw just kidding,bye", 255, CSocket);
Face(60, CSocket);
End(CSocket);
}
}
else
{
Text("Put the weapon on first you dumb", CSocket);
Link("Oh,4got that ", 255, CSocket);
End(CSocket);
}
}
else
{
Text("So you just came to bother me ??you dont have the CPs", CSocket);
Text("i'll bay back , heyyyyy catsh that thief", CSocket);
Face(60, CSocket);
End(CSocket);
}
}
else if (LinkBack == 2)
{
if (CSocket.Client.CPs > 1074)
{
if (CSocket.Client.Equipment.ContainsKey(4))
{
if (CSocket.Client.Equipment[4].Soc2 == 0)
{
CPs(-1074, CSocket);
CSocket.Client.Equipment[4].Soc2 = 255; int Uid = CSocket.Client.Equipment[4].UID;
ItemUnequip(4, Uid, CSocket);
ItemEquip(4, Uid, CSocket);
Text("Here you go check your weapon", CSocket);
Link("Nice great man,thanks", 255, CSocket);
Face(60, CSocket);
End(CSocket);
}
else
{
Text("Are You crazy ,your weapon has the socket!!!!", CSocket);
Link("Aw just kidding,bye", 255, CSocket);
Face(60, CSocket);
End(CSocket);
}
}
else
{
Text("Put the weapon on first you dumb", CSocket);
Link("Oh,4got that ", 255, CSocket);
End(CSocket);
}
}
else
{
Text("So you just came to bother me ??you dont have the CPs", CSocket);
Text("i'll bay back , heyyyyy catsh that thief", CSocket);
Face(60, CSocket);
End(CSocket);
}
}
break;
}
#endregion
#region MagicArtisan
case 10062: //Magic Artisan
{
if (LinkBack == 0)
{
Text("Hi. i can help u upgrading your gears ,choose the upgrade type plz", CSocket);
Link("Upgrade Level", 10, CSocket);
Link("Upgrade quality", 20, CSocket);
Face(55, CSocket);
End(CSocket);
}
#region Upgrade level
else if (LinkBack == 10)
{
Text("Hi. i can help u upgrading your gears level using the meteor pwoer,", CSocket);
Text("\n choose which one u want to upgrade", CSocket);
Link("HeadGear", 1, CSocket);
Link("Nicklase/Bags", 2, CSocket);
Link("Armor/Coat", 3, CSocket);
Link("Weapons", 4, CSocket);
Link("Ring/Bracelete", 6, CSocket);
Link("Boots", 8, CSocket);
Link("Nevermind", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 0 && LinkBack < 9)
{
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID; byte Plus = (byte)CSocket.Client.Equipment[LinkBack].Plus;
byte MetsNeed = Calculation.MetsNeeded(ItemId, Plus);
if (MetsNeed < 1)
{
Text("Oh sorry this item is very high for me to deal with", CSocket);
Text("Try your luck with WeaponMaster beside me,or ArtisanWind at TC", CSocket);
Link("Looser ", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(1088001, MetsNeed, CSocket))
{
int NewItemId = Calculation.NextEquipLevel(ItemId);
if (NewItemId != ItemId && ReqLvl(NewItemId, CSocket))
{
CSocket.Client.Equipment[LinkBack].ItemID = NewItemId;
DeleteItem(1088001, MetsNeed, CSocket); ItemId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, ItemId, CSocket);
ItemEquip(LinkBack, ItemId, CSocket);
Text("Congratulations your item has been upgraded", CSocket);
Link("Awesome, thanks man", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Oops, i can not upgrade that item ,it gives me invalid level for u to use", CSocket);
Link("Oh,damn", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
else
{
Text("Sorry you don't have enough mets, this items costs " + MetsNeed + " Meteors", CSocket);
Link("Oh bye", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Are you joking,how will i upgrade a none existing item", CSocket);
Text("Please wear your item first", CSocket);
Link("Oh,sorry forgot to wear it", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
#endregion
#region Upgrade quality
else if (LinkBack == 20)
{
Text("I can help u upgrading your gears quality using the pwoer of dragonballs ", CSocket);
Text("\n choose which one u want to upgrade", CSocket);
Link("HeadGear", 21, CSocket);
Link("Nicklase/Bags", 22, CSocket);
Link("Armor/Coat", 23, CSocket);
Link("Weapons", 24, CSocket);
Link("Ring/Bracelete", 26, CSocket);
Link("Boots", 28, CSocket);
Link("StarTwoer", 31, CSocket);
Link("HeavenFan", 30, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 20)
{
LinkBack -= 20;
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
int ItemId = CSocket.Client.Equipment[LinkBack].ItemID;
byte DbNeed = Calculation.DbNeeded(ItemId);
if (DbNeed < 1)
{
Text("Oh this item has reached the highest quality or i do not have it's difenesion", CSocket);
Link("Looser ", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(1088000, DbNeed, CSocket))
{
int NewItemId = ItemId + 1;
CSocket.Client.Equipment[LinkBack].ItemID = NewItemId;
DeleteItem(1088000, DbNeed, CSocket); ItemId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, ItemId, CSocket);
ItemEquip(LinkBack, ItemId, CSocket);
Text("Congratulations your item has been upgraded", CSocket);
Link("Awesome, thanks man", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Sorry you don't have enough DragonBalls, this items costs " + DbNeed + " DBs", CSocket);
Link("Oh bye", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Are you joking,how will i upgrade a none existing item", CSocket);
Text("Please wear your item first", CSocket);
Link("Oh,sorry forgot to wear it", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
#endregion
break;
}
#endregion
For the magic artisan u will need to replace your NextLevelEquip.cs with the one i attached coz too many asked for upgrade level fix and it also contains the Metneed and dbneed functions ,or u can just replace all the code inside it with the following
Code:
/*
* Created by SharpDevelop.
* User: sams
* Date: 3/29/2009
* Time: 1:24 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using CoEmu_v2_GameServer.Connections;
using CoEmu_v2_GameServer.Entities;
using CoEmu_v2_GameServer.Structs;
using CoEmu_v2_GameServer.Packets;
using CoEmu_v2_GameServer.Calculations;
using CoEmu_v2_GameServer.Database;
namespace CoEmu_v2_GameServer.Calculations
{
public partial class Calculation
{
/// <summary>
/// Generates the next item equip level.
/// </summary>
/// <param name="ItemID">The current item id to level</param>
/// <returns>the new item id</returns>
public static int NextEquipLevel(int ItemId)
{
int NewItem = ItemId;
Struct.ItemData Item = Nano.Items[ItemId];
if(ArmorType(ItemId) == false || WeaponType(Convert.ToString(ItemId)) == 117)
{
if (Type2(Convert.ToString(ItemId)) != 12 && Type2(Convert.ToString(ItemId)) != 15 && Type2(Convert.ToString(ItemId)) != 16 || Item.Level == 45 && Type2(Convert.ToString(ItemId)) == 12 || Item.Level >= 112 && Type2(Convert.ToString(ItemId)) == 12)
NewItem += 10;
else if (Type2(Convert.ToString(ItemId)) == 12 && Item.Level < 45)
NewItem += 20;
else if (Type2(Convert.ToString(ItemId)) == 12 && Item.Level >= 52 && Item.Level < 112)
NewItem += 30;
else if (Type2(Convert.ToString(ItemId)) == 15 && Item.Level == 1 || Type2(Convert.ToString(ItemId)) == 15 && Item.Level >= 110)
NewItem += 10;
else if (Type2(Convert.ToString(ItemId)) == 15)
NewItem += 20;
else if (Type2(Convert.ToString(ItemId)) == 16 && Item.Level < 124)
NewItem += 20;
else if (Type2(Convert.ToString(ItemId)) == 16)
NewItem += 10;
if (WeaponType(Convert.ToString(NewItem)) == 421)
{
NewItem = ItemId;
if (Item.Level == 45 || Item.Level == 55)
NewItem += 20;
else
NewItem += 10;
}
}
else if (Type2(Convert.ToString(ItemId)) != 12 && Type2(Convert.ToString(ItemId)) != 15)
{
if (Item.Class == 21)
if (Type2(Convert.ToString(ItemId)) == 13)
{
if (Item.Level <= 110)
NewItem += 10;
else
NewItem += 5000;
}
if (Item.Class == 11)
if (Type2(Convert.ToString(ItemId)) == 13)
{
if (Item.Level <= 110)
NewItem += 10;
else
NewItem += 5000;
}
if (Item.Class == 40)
if (Type2(Convert.ToString(ItemId)) == 13)
{
if (Item.Level <= 112)
NewItem += 10;
else
NewItem += 5000;
}
if (Item.Class == 190)
if (Type2(Convert.ToString(ItemId)) == 13)
{
if (Item.Level <= 115)
NewItem += 10;
else
NewItem += 5000;
}
if (Item.Class == 21)
if (Type2(Convert.ToString(ItemId)) == 11)
{
if (Item.Level< 112)
NewItem += 10;
else
NewItem += 920;
}
if (Item.Class == 11)
if (Type2(Convert.ToString(ItemId)) == 11)
{
if (Item.Level < 112)
NewItem += 10;
else
NewItem -= 6010;
}
if (Item.Class == 40)
if (Type2(Convert.ToString(ItemId)) == 11)
{
if (Item.Level < 117)
NewItem += 10;
else
NewItem -= 1060;
}
if (Item.Class == 190)
if (Type2(Convert.ToString(ItemId)) == 11)
{
if (Item.Level < 112)
NewItem += 10;
else
NewItem -= 2050;
}
}
if (ItemId == 500301)
NewItem = 500005;
if (ItemId == 410301)
NewItem = 410005;
return NewItem;
}
public static byte MetsNeeded(int ItemId,byte Plus)
{
byte MetsNeeded = 0;
Struct.ItemData Item = Nano.Items[ItemId];
if (Item.Level < 40) MetsNeeded = 2;
else if (Item.Level < 60) MetsNeeded = 4;
else if (Item.Level < 75) MetsNeeded = 5;
else if (Item.Level < 85) MetsNeeded = 7;
else if (Item.Level < 95) MetsNeeded = 9;
else if (Item.Level < 100) MetsNeeded = 11;
else if (Item.Level < 112) MetsNeeded = 18;
else if (Item.Level >= 112) return 0;
if (Item.Quality == 9) MetsNeeded += 4;
else if (Item.Quality == 8) MetsNeeded += 2;
else if (Item.Quality == 7) MetsNeeded += 1;
if (Plus > 2) MetsNeeded += Plus;
return MetsNeeded;
}
public static byte DbNeeded(int ItemId)
{
byte DbNeeded = 0;
Struct.ItemData Item = Nano.Items[ItemId];
if (Item.Level < 60) DbNeeded = 2;
else if (Item.Level < 100) DbNeeded = 4;
else DbNeeded = 6;
if (Item.Quality == 9) return 0;
else if (Item.Quality > 5) DbNeeded += (byte)(Item.Quality - 5);
else DbNeeded = 1;
return DbNeeded;
}
}
}
#region CelestialTao
case 350050:
{
if (LinkBack == 0)
{
Text("Hello sweet face ,i can help u reallot your points if u want", CSocket);
Text("\n you may need to reallot them to customize your attributes", CSocket);
Text("\n but i will charge you one Dragon Ball ,so are you ready?", CSocket);
Link("Yes let's do it", 1, CSocket);
Link("Nuh i am poor", 255, CSocket);
Face(63, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (HasItem(1088000, 1, CSocket))
{
DeleteItem(1088000, 1, CSocket);
CSocket.Client.StatPoints += CSocket.Client.Strength;
CSocket.Client.StatPoints += CSocket.Client.Dexterity;
CSocket.Client.StatPoints += CSocket.Client.Spirit;
CSocket.Client.StatPoints += CSocket.Client.Vitality;
CSocket.Client.Strength = CSocket.Client.Dexterity = CSocket.Client.Spirit = CSocket.Client.Vitality = 0;
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Strength, Struct.StatusTypes.StrengthStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Dexterity, Struct.StatusTypes.DexterityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Vitality, Struct.StatusTypes.VitalityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Spirit, Struct.StatusTypes.ManaStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.StatPoints, Struct.StatusTypes.AttributePoints));
Calculation.Vitals(CSocket, false); Calculation.Attack(CSocket);
Text("Congratz your points has been reset", CSocket);
Link("Ok,thanks", 255, CSocket);
Face(63, CSocket);
End(CSocket);
}
else
{
Text("Sorry you do not have any Dragon balls", CSocket);
Link("Oh sorry i'll be back", 255, CSocket);
Face(63, CSocket);
End(CSocket);
}
}
break;
}
#endregion
#region Ethereal //Enchanted & +10 Man
case 450: //Ethereal
{
if (LinkBack == 0)
{
Text("Hey sweety, what is up ?", CSocket);
Text("\n I can help you having some extra HP", CSocket);
Text("\n reduce the damage on you", CSocket);
Text("\n or upgrade your gears 10-12", CSocket);
Link("Enchant my gears", 1, CSocket);
Link("Bless my gears", 2, CSocket);
Link("Compose my gears", 3, CSocket);
Link("Nothing, l8er :P", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack == 1) CSocket.Send(ConquerPacket.Enchant(CSocket.Client.ID));
else if (LinkBack == 2)
{
Text("Ok here we go , here you are my Price List", CSocket);
Text("\n 1 Super Tortoise Gem if your item has no bless or -1", CSocket);
Text("\n 3 Super Tortoise Gem if your item is -3 to be -5", CSocket);
Text("\n 5 Super Tortoise Gem if your item is -5 to be -7", CSocket);
Text("\n If you agree with that choose your item", CSocket);
Link("HeadGear", 21, CSocket);
Link("Nicklase/Bags", 22, CSocket);
Link("Armor/Coat", 23, CSocket);
Link("Weapons", 24, CSocket);
Link("Ring/Bracelete", 26, CSocket);
Link("Boots", 28, CSocket);
Link("Nevermind", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 20 && LinkBack < 30)
{
LinkBack -= 20;
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
byte StgNeeded = 0;
if (CSocket.Client.Equipment[LinkBack].Bless <3) StgNeeded = 1;
else if (CSocket.Client.Equipment[LinkBack].Bless == 3) StgNeeded = 3;
else if (CSocket.Client.Equipment[LinkBack].Bless == 5) StgNeeded = 5;
if (StgNeeded < 1)
{
Text("Oh sorry your item has reached the max bless i can give", CSocket);
Link("ok,bye ", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
if (HasItem(700073, StgNeeded, CSocket))
{
if (CSocket.Client.Equipment[LinkBack].Bless == 0) CSocket.Client.Equipment[LinkBack].Bless = -1;
CSocket.Client.Equipment[LinkBack].Bless +=2;
DeleteItem(700073, StgNeeded, CSocket); int UId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, UId, CSocket);
ItemEquip(LinkBack, UId, CSocket);
Text("Congratulations your item has been upgraded", CSocket);
Link("Awesome, thanks man", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Sorry you don't have enough Tortois Gems, this items costs " + StgNeeded + " STGs", CSocket);
Link("Oh bye", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Are you joking,how will i upgrade a none existing item", CSocket);
Text("Please wear your item first", CSocket);
Link("Oh,sorry forgot to wear it", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
else if (LinkBack == 3)
{
Text("Ok here we go , here you are my Price List", CSocket);
Text("\n 1 DragonBall Scroll to get your item to +10", CSocket);
Text("\n 3 DragonBall Scroll to get your item to +11", CSocket);
Text("\n 5 DragonBall Scroll to get your item to +12", CSocket);
Text("\n If you agree with that choose your item", CSocket);
Link("HeadGear", 31, CSocket);
Link("Nicklase/Bags", 32, CSocket);
Link("Armor/Coat", 33, CSocket);
Link("Weapons", 34, CSocket);
Link("Ring/Bracelete", 36, CSocket);
Link("Boots", 38, CSocket);
Link("Nevermind", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack > 30 && LinkBack < 40)
{
LinkBack -= 30;
if (CSocket.Client.Equipment.ContainsKey(LinkBack))
{
byte DBSNeeded = 0;
if (CSocket.Client.Equipment[LinkBack].Plus ==9) DBSNeeded = 1;
else if (CSocket.Client.Equipment[LinkBack].Plus == 10) DBSNeeded = 3;
else if (CSocket.Client.Equipment[LinkBack].Plus == 11) DBSNeeded = 5;
else if (CSocket.Client.Equipment[LinkBack].Plus < 9)
{
Text("You have to get your item to +9 first then come back here", CSocket);
Link("Damn,i was in hurry", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
if (DBSNeeded == 0)
{
Text("Oh sorry your item has reached the max bless i can give", CSocket);
Link("ok,bye ", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (DBSNeeded>0)
{
if (HasItem(720028, DBSNeeded, CSocket))
{
CSocket.Client.Equipment[LinkBack].Plus ++;
DeleteItem(720028, DBSNeeded, CSocket); int UId = CSocket.Client.Equipment[LinkBack].UID;
ItemUnequip(LinkBack, UId, CSocket);
ItemEquip(LinkBack, UId, CSocket);
Text("Congratulations your item has been upgraded", CSocket);
Link("Awesome, thanks man", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else
{
Text("Sorry you don't have enough DBScrolls, this items costs " + DBSNeeded + "DBScroll(s)", CSocket);
Link("Oh bye", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
}
else
{
Text("Are you joking,how will i upgrade a none existing item", CSocket);
Text("Please wear your item first", CSocket);
Link("Oh,sorry forgot to wear it", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
}
break;
}
#endregion
and for Ethereal you will need the Enchant packet (put it anywhere under Packets folder )
#region Solar Saint
case 3215://Enter Stage1
{
if (LinkBack == 0)
{
Text("Our ancestors exerted their utmost efforts and defeated the demons.", CSocket);
Text("\n Since then the world has been kept in peace for", CSocket);
Text("\n hundreds of years. Now the demons have come back and the world is getting into turbulence again.", CSocket);
Link("Would you tell me more?", 1, CSocket);
Link("I am here to drive away the evils!", 2, CSocket);
Link("I`d better leave.", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("The decisive battle between human and demon broke out here.", CSocket);
Text("\n The ferocious battle lasted for seven days and.", CSocket);
Text("\n nights. Countless heroes lost their lives. And the justise won.",CSocket);
Text("\n Afterwards we can live in peace for hundreds of years.", CSocket);
Link("And then?", 3,CSocket);
Link("Long story bye", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
if (Nano.DisCityTime)
{
Teleport(2021, 190, 340, 0, CSocket);
GiveExpBall(33, CSocket);
}
else
{
Text("I`m glad to see that you are such a knightly person.", CSocket);
Text("\n but it's not the right time, please come here at the r8 time.", CSocket);
Link("Ok,i'll come back at then", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
}
else if (LinkBack == 3)
{
Text("UltimatePluto, leader of the demons sworn to take revenge in one thousand years before he managed to run away. To",CSocket);
Text("\n prevent the demons coming back, I have been scouting their land cautiously. Yesterday I found something unwanted.",CSocket);
Text("\n It seems that UltimatePluto has come round to endanger humans again.",CSocket);
Link("What should we do?", 4,CSocket);
Link("I`d better leave.", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
else if (LinkBack == 4)
{
Text("Fortunately UltimatePluto is still unfledged. He must resort to a Battle Formation for the moment. So I am about",CSocket);
Text("to organize an army to infiltrate his land and destroy his formation before he becomes stronger.",CSocket);
Link("I`ll join you.", 2,CSocket);
Link("Sigh, I`m helpless.", 255,CSocket);
Face(89, CSocket);
End(CSocket);
}
break;
}
case 3213://To stage2
{
if (LinkBack == 0)
{
Text("Hello hero so did u collect the rquired souls?", CSocket);
Link("Yes,here you are", 1, CSocket);
Link("No,i'll be back", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (HasItem(723085, 5, CSocket))
{
DeleteItem(723085, 5, CSocket);
Teleport(2022, 240, 340, 0, CSocket);
GiveExpBall(66, CSocket);
}
else
{
Text("Sweety you have to collect at least 5 Soul Stones,try harder", CSocket);
Link("Ok,i'll try my best", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
}
break;
}
case 3214://ToStage3
{
if (LinkBack == 0)
{
short Required = 600; byte Class = (byte)CSocket.Client.Class;
if (Class < 16) Required = 800;
else if (Class > 19 && Class < 26) Required = 900;
else if (Class > 39 && Class < 46) Required = 1300;
else if (Class > 49 && Class < 56) Required = 800;
else if (Class > 139 && Class < 146) Required = 1000;
if (CSocket.Client.DisCityMobs >= Required)
{
Text("Great my hero u did a great fight there,choose your formation map", CSocket);
Link("Right", 1, CSocket);
Link("Left", 2, CSocket);
Face(89, CSocket);
End(CSocket);
}
else
{
Text("Ooh , tierd so fast ?!,get your ass back to the battle ", CSocket);
Text("\n you still need to kill " + (Required - CSocket.Client.DisCityMobs) + " more monsters", CSocket);
Link("kk, i'll go now master", 255, CSocket);
Face(89, CSocket);
End(CSocket);
}
}
else if (LinkBack == 1)
{
if (Nano.PlayersOnDisCity3 > 8)
TeleportAll(2021, 1020, 565, 565);
else if (Nano.PlayersOnDisCity3 > 15)
TeleportAll(2023, 2024, 150, 290);
Teleport(2023, 300, 660, 0, CSocket); Nano.PlayersOnDisCity3++;
GiveExpBall(100, CSocket);
}
break;
}
#endregion
and u will need this void also to give exp to players per stage
and this to teleport all players at some map to another
Code:
public static void TeleportAll(short From, short To, short X, short Y)
{
foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
{
ClientSocket CSocket = Clients.Value;
if ((short)CSocket.Client.Map == From) Teleport(To, X, Y, 0, CSocket);
}
}
now to get this work there are somethings to do
A- add a new variable at Character.cs called
Code:
public short DisCityMobs = 0;
B- add a new bool variable and byte variable at Nano.cs called
Code:
public static bool DisCityTime = false; public static byte PlayersOnDisCity3 = 0;
C-i guess u already have the globaltimer ,r8??
if not then u will need to figure a way to calac the DisCity time
or add this global timer at Nano.cs main definitions
Code:
public static System.Timers.Timer GlobalTimer = new System.Timers.Timer();
then at startserver void just be4 " ConsoleCommands();" add
you can use this global timer for many many things u can even use it to add stamina instead of timer for each player,u can also use it to calc the xp skill counter and many other things
then add at the end of it's delegate the next code
Code:
#region Check Events
//Saturday 20:30 to 21:10 Weekly PK war http://co.91.com/guide/quests/pkwar.shtml
//Class PK war http://co.91.com/guide/quests/propkwar.shtml
DateTime TimeNow = DateTime.Now; string Hours = TimeNow.TimeOfDay.ToString();
switch (TimeNow.DayOfWeek.ToString())
{
case "Saturday":
{
if (Hours.Remove(5) == "20:30") WeeklyPkWar = true;
else if (Hours.Remove(5) == "21:10")
{
WeeklyPkWar = false;
}
break;
}
case "Sunday":
{
if (Hours.Remove(5) == "20:00") PKTournament = true;
else if (Hours.Remove(5) == "20:59") PKTournament = false;
break;
}
case "Monday":
{
if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 10;
else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
break;
}
case "Tuesday":
{
if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 20;
else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
if (!DisCityTime)
{
if (Hours.Remove(4) == "8:55" || Hours.Remove(5) == "20:55")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "5 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:56" || Hours.Remove(5) == "20:56")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "4 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:57" || Hours.Remove(5) == "20:57")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "3 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:58" || Hours.Remove(5) == "20:58")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 2 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:59" || Hours.Remove(5) == "20:59")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 1 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "9:00" || Hours.Remove(5) == "21:00")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "DisCity quest starts now ,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
DisCityTime = true;
}
else if (Hours.Remove(4) == "9:59" || Hours.Remove(5) == "21:59")
{
DisCityTime = false;
}
}
break;
}
case "Wednesday":
{
if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 40;
else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
break;
}
case "Thursday":
{
if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 130;
else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
if (!DisCityTime)
{
if (Hours.Remove(4) == "8:55" || Hours.Remove(5) == "20:55")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "5 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:56" || Hours.Remove(5) == "20:56")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "4 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:57" || Hours.Remove(5) == "20:57")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "3 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:58" || Hours.Remove(5) == "20:58")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 2 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "8:59" || Hours.Remove(5) == "20:59")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 1 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
}
else if (Hours.Remove(4) == "9:00" || Hours.Remove(5) == "21:00")
{
ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "DisCity quest starts now ,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
DisCityTime = true;
}
else if (Hours.Remove(4) == "9:59" || Hours.Remove(5) == "21:59")
{
DisCityTime = false;
}
}
break;
}
case "Friday":
{
if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 50;
else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
break;
}
}
#endregion
of course u may need to change times as u want
D- find
Code:
AttackedMob.Die(CSocket.Client.ID);
r8 after it add
Code:
if ((int)CSocket.Client.Map == 2022)
{
if (AttackedMob.Info.Name == "HellTroll") CSocket.Client.DisCityMobs += 3;
else CSocket.Client.DisCityMobs++;
}
#region Lotto
case 923:// Lady Luck enter
{
if (LinkBack == 0)
{
Text("Welcome to the Lottery Center! There are meny LuckyBoxes which have innumerable treasure such as super gems,two-socket gears, up to 500,000,000 silvers etc. in them. If you are level 70 or above, you are allowed to enter the Lottery Center and try your luck at most ten times a day.", CSocket);
Text("And I charge you only 27 CPs for each admission.Come on, Try your luck right now!", CSocket);
Link("Wow, good deal!", 1, CSocket);
Link("May I know the rules first?", 2, CSocket);
Link("No Thanks!", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.Level >= 70)
{
if (CSocket.Client.Inventory.Count < 40)
{
if (CSocket.Client.CPs >= 27)
{
Teleport(700, 40, 50, 0, CSocket);
CPs(-27, CSocket); CSocket.Client.Lotto = true;
}
else
{
Text("I'm sorry you do not have the required CPs.", CSocket);
Link("Okay, I will be back when I have 27 CPs.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
}
else
{
Text("Please free one slot in your item box first", CSocket);
Link("Ah,ok be r8 back", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
}
else
{
Text("I'm sorry you do not have the required Level 70.", CSocket);
Link("Okay, I will be back when I have level 70.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
}
if (LinkBack == 2)
{
Text("you will be teleported to Lottery Center where there are menny LuckyBoxes after you pay me 27 CPs. You may choose one box to try your luck at your will.", CSocket);
Text(" Remeber you have only one chance to open a LuckyBox every time. If you want to open another box, you have to leave the room to re-enrol in Market.", CSocket);
Link("OK I see.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
break;
}
case 924: // LadyLuck
{
if (LinkBack == 0)
{
Text("Do you want to leave Lottery Center and go back to the Market?.", CSocket);
Link("Yes Please,", 1, CSocket);
Link("No Thank you I want to stay.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Teleport(1036, 220, 193, 0, CSocket);
}
break;
}
case 3952:
{
Text("Sorry, I'm off duty at the moment.", CSocket);
Link("Lazy son of a...", 255, CSocket);
End(CSocket);
break;
}
case 925:
case 926:
case 927:
case 928:
case 929:
case 930:
case 931:
case 932:
case 933:
case 934:
case 935:
case 936:
case 937:
case 938:
case 939:
case 940:
case 942:
case 943:
case 944:
case 945:
{
if (CSocket.Client.Lotto)
{
bool Found = false; short Chance = 0;string ItemName="";
while (!Found)
{
Chance = (short)Nano.Rand.Next(Nano.Lotto.Count);
if (Chance > 999) Chance = (short)Nano.Rand.Next(Nano.Lotto.Count);
if (Nano.Lotto.ContainsKey(Chance)) Found = true;
}
if (Found)
{
CSocket.Client.Lotto = false;
Struct.ItemInfo It = Nano.Lotto[Chance];
AddItem(It.ItemID, 0, It.Dura, 0, It.Plus, 0, 0, It.Soc1, It.Soc2, It.Color, CSocket,1);
if (It.ItemID.ToString().EndsWith("8"))
{
if (It.Soc1>0||It.Plus==8)
{
ItemName = "An Elite ";
if (It.Soc2 > 0) ItemName += "2 socket ";
else if (It.Soc1 > 0) ItemName += "one socket ";
else if (It.Plus == 8) ItemName += "+8 ";
}
}
else if (It.ItemID.ToString().EndsWith("9") && It.ItemID != 723719) ItemName = "A Super ";
if (Nano.Items.ContainsKey(It.ItemID)) ItemName += Nano.Items[It.ItemID].Name;
CSocket.Send(ConquerPacket.Chat(0, "System", "", "Congratz you have won " + ItemName, Struct.ChatType.Top));
if (Chance > 510) ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "All", CSocket.Client.Name + " was so lucky to won " + ItemName + " from lady luck at Market", Struct.ChatType.Yell), 0);
}
}
break;
}
#endregion
-Save and Go
Damn , it said the text is too long i couldn't add the Talismans here so c post 3
thanks for this... but i will ask for u something ....
how i can doo UltimatePluto born after the Syrens in Dis city.... and how to make the count in the 2nd stage..... i already done all Dis city npcs... the npc to enter is the same as real co...
and i make a comand to make the npc start too.... how i can make this things... iuf you know and if u can teach me... i will be very gratefull!
5-this step will be a problem coz we need to edit the ItemInfo packet and all of u have the packet as (item attributes) i have it as struct.iteminfo so u have two choice here
A-Add the socketprogress value for each iteminfo packet call u have (more than 30 lines i think
B-replace your iteminfo packet with mine and also u need to change every iteminfo call with the struct.iteminfo instead of item attributes as u like
6-at PacketProcessor.cs PacketType 1009 create a new subtyep with case 35 and add
Code:
#region Socket Talismans
case 35://Sockiting talis
{
int Tali = ReadLong(Data, 4);
int MinorID = ReadLong(Data, 8);
Struct.ItemInfo Talis = new Struct.ItemInfo();
int ProgressToAdd = (Calculation.SocketTalis(CSocket.Client.Inventory[MinorID]));
if (CSocket.Client.Equipment.ContainsKey(10) && CSocket.Client.Equipment[10].UID == Tali)
{
Talis = CSocket.Client.Equipment[10];
}
else if (CSocket.Client.Equipment.ContainsKey(11) && CSocket.Client.Equipment[11].UID == Tali)
{
Talis = CSocket.Client.Equipment[11];
}
else break;
Database.Database.DeleteItem(MinorID);
CSocket.Client.Inventory.Remove(MinorID);
CSocket.Send(ConquerPacket.ItemUsage(MinorID, 255, Struct.ItemUsage.RemoveItem));
Talis.SocketProgress += ProgressToAdd;
if (Talis.Soc1 == 0)
{
if (Talis.SocketProgress > 8000)
{
Talis.Soc1 = 255; Talis.SocketProgress = 0;
}
}
else
{
if (Talis.SocketProgress > 20000)
{
Talis.Soc2 = 255; Talis.SocketProgress = 0;
}
}
Handler.UpDateItem(Talis, CSocket);
break;
}
#endregion
7-Finally At Calculation folder at any class or add a new class and add
Code:
public static int SocketTalis(Structs.Struct.ItemInfo Item)
{
int Value = 0;
if (Nano.Items.ContainsKey(Item.ItemID))
{
if (Item.ItemID.ToString().EndsWith("9"))
{
Value += 1000;
if (Item.ItemID > 410000 && Item.ItemID < 700000)
{
if (Item.Soc2 > 0) Value += 960;
else if (Item.Soc1 > 0) Value += 160;
}
else
{
if (Item.Soc2 > 0) Value += 8000;
else if (Item.Soc1 > 0) Value += 2000;
}
}
else if (Item.ItemID.ToString().EndsWith("8"))
{
Value += 40;
if (Item.ItemID > 410000 && Item.ItemID < 700000)
{
if (Item.Soc2 > 0) Value += 960;
else if (Item.Soc1 > 0) Value += 160;
}
else
{
if (Item.Soc2 > 0) Value += 8000;
else if (Item.Soc1 > 0) Value += 2000;
}
}
else if (Item.ItemID.ToString().EndsWith("7")) Value += 10;
else if (Item.ItemID.ToString().EndsWith("6")) Value += 5;
if (Item.Plus == 1) Value += 6;
else if (Item.Plus == 2) Value += 30;
else if (Item.Plus == 3) Value += 80;
else if (Item.Plus == 4) Value += 240;
else if (Item.Plus == 5) Value += 740;
else if (Item.Plus == 6) Value += 2220;
else if (Item.Plus == 7) Value += 6660;
else if (Item.Plus == 8) Value += 20000;
else if (Item.Plus == 9) Value += 60000;
else if (Item.Plus == 10) Value += 62000;
else if (Item.Plus == 11) Value += 66000;
else if (Item.Plus == 12) Value += 72000;
}
else return 0;
return Value;
}
then add the case for it , if u don't have the Etirnity man then u need to add it to your data base or choose any NPC that u don't need and make it as the reborn npc
Code:
#region RebornMan //Etirnity At Market
case 436:
{
if (CSocket.Client.Reborn < 1)
{
bool CanReb=false;
if (((int)CSocket.Client.Class > 130 && (int)CSocket.Client.Class < 139) && CSocket.Client.Level > 109) CanReb = true;
else if (CSocket.Client.Level > 119) CanReb = true;
if (CanReb)
{
if (LinkBack == 0)
{
Text("Hey sweety, tired of ur boorin life i can give u another life to live", CSocket);
Text("so if u are pwoer enough and have a CelestialStone i'll do it", CSocket);
Link("Good deal", 1, CSocket);
Link("Nuh i enjoy my life", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (HasItem(721259, 1, CSocket))
{
Text("Cool now choose your reborn Gift ", CSocket);
Link("SuperGem", 2, CSocket);
Link("Bless Reborn", 3, CSocket);
End(CSocket);
}
else
{
Text("Sorry u dont have the stone i need", CSocket);
Link("Oh sorry be r8 back", 255, CSocket);
End(CSocket);
}
}
else if (LinkBack == 3)
{
CSocket.Client.LastClass = 0;
Text("So what do u wish your next life job to be ?", CSocket);
Link("Trojan", 31, CSocket);
Link("Archer", 32, CSocket);
Link("Worrior", 33, CSocket);
Link("FireTao", 34, CSocket);
Link("WaterTao", 35, CSocket);
Link("Ninja", 36, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
Text("Allright choose the Gem ", CSocket);
Link("Dragon", 21, CSocket);
Link("Phoenix", 22, CSocket);
Link("RainBow", 23, CSocket);
Link("Fury", 24, CSocket);
Link("Moon", 25, CSocket);
Link("Violet", 26, CSocket);
End(CSocket);
}
else if (LinkBack > 20 && LinkBack < 27)
{//Using the last class as a break point to determine the Gem
if (LinkBack == 21) CSocket.Client.LastClass = 13;
else if (LinkBack == 22) CSocket.Client.LastClass = 3;
else if (LinkBack == 23) CSocket.Client.LastClass = 33;
else if (LinkBack == 24) CSocket.Client.LastClass = 23;
else if (LinkBack == 25) CSocket.Client.LastClass = 63;
else if (LinkBack == 26) CSocket.Client.LastClass = 53;
Text("So what do u wish your next life job to be ?", CSocket);
Link("Trojan", 31, CSocket);
Link("Archer", 32, CSocket);
Link("Worrior", 33, CSocket);
Link("FireTao", 34, CSocket);
Link("WaterTao", 35, CSocket);
Link("Ninja", 36, CSocket);
End(CSocket);
}
else if (LinkBack > 30)
{
if (HasItem(721259, 1, CSocket))
{
DeleteItem(721259, 1, CSocket);
if (CSocket.Client.LastClass > 0) AddItem((700000 + CSocket.Client.LastClass), 0, 0, 0, 0, 0, 0, 0, 0,0,0, 0, CSocket, 1);
else PutBless(CSocket);
CSocket.Client.LastClass = (byte)CSocket.Client.Class;
#region Clear Skills and profs
CSocket.Client.Skills.Clear(); CSocket.Client.Profs.Clear();
MySql.Data.MySqlClient.MySqlCommand Cmd3 = new MySql.Data.MySqlClient.MySqlCommand("DELETE from `prof` WHERE `CharID` = " + CSocket.Client.ID + "", CoEmu_v2_GameServer.Database.DatabaseConnection.NewConnection());
Cmd3.ExecuteNonQuery();
Cmd3.Connection.Close();
Cmd3.Dispose();
MySql.Data.MySqlClient.MySqlCommand Cmd4 = new MySql.Data.MySqlClient.MySqlCommand("DELETE from `skills` WHERE `CharID` = " + CSocket.Client.ID + "", CoEmu_v2_GameServer.Database.DatabaseConnection.NewConnection());
Cmd4.ExecuteNonQuery();
Cmd4.Connection.Close();
Cmd4.Dispose();
#endregion
#region SendNewSkills
if (CSocket.Client.LastClass < 16)
{
if (LinkBack == 31) //To tro
{
LearnSkill((int)Struct.SkillIds.CruelShade, 0, CSocket);
}
LearnSkill((int)Struct.SkillIds.SpiritHealing, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Robot, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Cyclone, 0, CSocket);
}
else if (CSocket.Client.LastClass > 15 && CSocket.Client.LastClass < 26) //Was worrior
{
LearnSkill((int)Struct.SkillIds.Reflect, 0, CSocket);
if (LinkBack == 31||LinkBack==36) //To Trojan
{
LearnSkill((int)Struct.SkillIds.Roar, 0, CSocket);
LearnSkill((int)Struct.SkillIds.FlyingMoon, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Accuracy, 0, CSocket);
}
else if (LinkBack == 32)//To archer
{
LearnSkill((int)Struct.SkillIds.Roar, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Shield, 0, CSocket);
}
else if (LinkBack == 35)//To Water
{
LearnSkill((int)Struct.SkillIds.Roar, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Shield, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Cyclone, 0, CSocket);
}
else if (LinkBack == 34)//To Fire
{
LearnSkill((int)Struct.SkillIds.Roar, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Shield, 0, CSocket);
}
}
else if (CSocket.Client.LastClass > 35 && CSocket.Client.LastClass < 46) //Was an archer
{
}
else if (CSocket.Client.LastClass > 130 && CSocket.Client.LastClass < 136) //Was a Water
{
LearnSkill((int)Struct.SkillIds.Cure, 0, CSocket);
LearnSkill((int)Struct.SkillIds.StarofAccuracy, 0, CSocket);
LearnSkill((int)Struct.SkillIds.MagicShield, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Stigma, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Meditation, 0, CSocket);
if (LinkBack==35) LearnSkill((int)Struct.SkillIds.Pervade, 0, CSocket);
else if (LinkBack == 32) LearnSkill((int)Struct.SkillIds.Invisibility, 0, CSocket);
else if (LinkBack == 34) LearnSkill((int)Struct.SkillIds.Revive, 0, CSocket);
}
else if (CSocket.Client.LastClass > 140 && CSocket.Client.LastClass < 146) //Was a Fire
{
if (LinkBack == 34) LearnSkill((int)Struct.SkillIds.Dodge, 0, CSocket);
else if (LinkBack == 35) LearnSkill((int)Struct.SkillIds.FireCircle, 0, CSocket);
else
{
LearnSkill((int)Struct.SkillIds.Cure, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Thunder, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Fire, 0, CSocket);
LearnSkill((int)Struct.SkillIds.Meditation, 0, CSocket);
}
}
else if (CSocket.Client.LastClass > 140 && CSocket.Client.LastClass < 146) //Was a Ninja
{
LearnSkill((int)Struct.SkillIds.ToxicFog, 0, CSocket);
}
#endregion
#region Calculate Points after reb
byte AddPoints = 65;
if (CSocket.Client.LastClass > 130 && CSocket.Client.LastClass < 136)
{
switch (CSocket.Client.Level)
{
case 110:
case 111:
case 112:
{
AddPoints++;
break;
}
case 114:
case 115:
{
AddPoints += 3;
break;
}
case 116:
case 117:
{
AddPoints += 6;
break;
}
case 118:
case 119:
{
AddPoints += 10;
break;
}
case 120:
case 121: { AddPoints += 15; break; }
case 122:
case 123: { AddPoints += 21; break; }
case 124:
case 125: { AddPoints += 28; break; }
case 126:
case 127: { AddPoints += 36; break; }
case 128:
case 129: { AddPoints += 45; break; }
case 130: { AddPoints += 55; break; }
}
}
else
{
switch (CSocket.Client.Level)
{
case 121: { AddPoints += 1; break; }
case 122: { AddPoints += 3; break; }
case 123: { AddPoints += 6; break; }
case 144: { AddPoints += 10; break; }
case 125: { AddPoints += 15; break; }
case 126: { AddPoints += 21; break; }
case 127: { AddPoints += 28; break; }
case 128: { AddPoints += 36; break; }
case 129: { AddPoints += 45; break; }
case 130: { AddPoints += 55; break; }
}
}
#endregion
CSocket.Client.Dexterity = 2; CSocket.Client.Vitality = 5;
CSocket.Client.StatPoints = AddPoints; CSocket.Client.Level = 15; CSocket.Client.Exp = 0;
if (LinkBack == 34 || LinkBack == 35)
{
CSocket.Client.Strength = 0; CSocket.Client.Spirit = 3;
}
else
{
CSocket.Client.Strength = 3; CSocket.Client.Spirit = 0;
}
if (LinkBack == 31) CSocket.Client.Class = Struct.ClassType.Trojan;
if (LinkBack == 32) CSocket.Client.Class = Struct.ClassType.Archer;
if (LinkBack == 33) CSocket.Client.Class = Struct.ClassType.Warrior;
if (LinkBack == 34) CSocket.Client.Class = Struct.ClassType.FireTaoist;
if (LinkBack == 35) CSocket.Client.Class = Struct.ClassType.WaterTaoist;
if (LinkBack == 36) CSocket.Client.Class = Struct.ClassType.Ninja;
RebItems(CSocket);
RebClient(CSocket);
}
else
{
Text("Sorry u dont have the stone i need", CSocket);
Link("Oh sorry be r8 back", 255, CSocket);
End(CSocket);
}
}
}
else
{
Text("Sorry you are not pwoer enough yet , train harder", CSocket);
Link("Oh,bad ", 255, CSocket);
End(CSocket);
}
}
else
{
Text("Are u kidding you are reborned already", CSocket);
Link("k,never mind then", 255, CSocket);
End(CSocket);
}
break;
}
#endregion RebornMan
#region ShopBoy
case 10063:
{
if (LinkBack == 0)
{
Text("Our shop is famous for dyeing. If you want to have your",CSocket);
Text("equipment dyed, please wear them before enter.\nYou",CSocket);
Text("have a wide choice of colors. One meteor will be charged",CSocket);
Text("before you try the colors.\nDo you want a try?",CSocket);
Link("Yes, here is a meteor.", 1,CSocket);
Link("Can you dye my armor black?", 2,CSocket);
Link("Is there any good wine in the restaurant?", 3,CSocket);
Link("Just passing by", 255, CSocket);
Face(64, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (HasItem(1088001, 1, CSocket))
{
DeleteItem(1088001, 1, CSocket);
Teleport(1008, 23, 23, 0, CSocket);
}
else
{
Text("Sorry you don't have any meteors", CSocket);
Link("I'll be back", 255, CSocket);
Face(64, CSocket);
End(CSocket);
}
}
else if (LinkBack == 2)
{
Text("Sure. Once your armor is dyed black, it will never fade no",CSocket);
Text("matter how it is updated, unless Item dye it to other",CSocket);
Text("colors. Item will charge 1 dragonball to do it.",CSocket);
Link("Yes, here is a Dragonball.", 4,CSocket);
Link("Let me think it over.", 255,CSocket);
Face(64, CSocket);
End(CSocket);
}
else if (LinkBack == 3)
{
Text("There are all kinds of wines prepared for you in our",CSocket);
Text("FlyingwithMoon Restaurant. Would you like to have a try?",CSocket);
Link("Let me think it over.", 255, CSocket);
Face(64, CSocket);
End(CSocket);
}
else if (LinkBack == 4)
{
if (CSocket.Client.Equipment.ContainsKey(3))
{
if (HasItem(1088000, 1, CSocket))
{
DeleteItem(1088000, 1, CSocket);
CSocket.Client.Equipment[3].Color = 2;
UpDateItem(CSocket.Client.Equipment[3], CSocket);
}
else
{
Text("Sorry you don't have any Dragon Balls", CSocket);
Link("I'll be back", 255, CSocket);
Face(64, CSocket);
End(CSocket);
}
}
else
{
Text("Please put your dress on", CSocket);
Link("Oh forgot to do", 255, CSocket);
Face(64, CSocket);
End(CSocket);
}
}
break;
}
#endregion
Error 1 'CoEmu_v2_GameServer.Packets.ConquerPacket' does not contain a definition for 'Enchant' D:\CoEmu v2\CoEmu v2 GameServer\Handlers\NpcTalk.cs 1802 76 CoEmu v2 GameServer
Error 1 'CoEmu_v2_GameServer.Packets.ConquerPacket' does not contain a definition for 'Enchant' D:\CoEmu v2\CoEmu v2 GameServer\Handlers\NpcTalk.cs 1802 76 CoEmu v2 GameServer
Great job samehvan. I see your always helping people with coemuv2 source. Thats good. You give alot of codes to help others. Great job dude. Although i dont work with coemuv2 anymore these are great releases
Great job samehvan. I see your always helping people with coemuv2 source. Thats good. You give alot of codes to help others. Great job dude. Although i dont work with coemuv2 anymore these are great releases
not just coemu ,i have a complete thread about source 5017 using INI's, and anything i can help i wont be late to , coz i like to be helped when i need so why not , in the first place we are all here to to help and get helped
Oh. i havent been very active lately here on elitepvpers. I dont really know how to code but when i try to make something i just look at an example of something the same or very similar to what i want coded and it usually works. I am learning c# tho =]. i sorta have a teacher xD
[HELP]Error when doing stuff on server CoEmu V2 11/11/2009 - CO2 Private Server - 4 Replies hello i was wandering if anyone understands this problem. I had my friend go on after i added Shopping mall and it took the cps but didn't give him the +6 stone he tryed to buy. At the same time this error occurred.
http://img21.imageshack.us/img21/6930/errorline32 .jpg
all i have added to source from origional (by andyd123) was Wuxing oven with progress
http://www.elitepvpers.com/forum/co2-pserver-discu ssions-questions/260333-release-wuxing-oven.html
and shopping mall
...
[INFO NEEDED] Simple question but where can i find all the monsters in COEMU v2 06/24/2009 - CO2 Private Server - 4 Replies Question 1 :
It is simple yes but i know how to code but i just arent used to this source:P.
Info pls:P where are all the mobs located?
Question 2 :
Can someone pass me a lil sql file where WindSage is in? cuz i dont know how to work with my mysql that good i always screw up kthx:)
Is a website still needed for CoEmu v2 06/15/2009 - CO2 Private Server - 3 Replies Well, sorry for this useless post, but I dont want to waste any time of mine making a website for CoEmu v2 if there are already some decent ones out there. If I spend time making one I would like people to actually use it :P lol. Well, if someone needs a website just say so here, as well as some things you would like on the website that I will add.
[HELP WANTED] CoEmu V2 Partners Needed 06/05/2009 - CO2 Private Server - 0 Replies I got the source will have a host all i need is a few ppl to help me getting this going pm me if you want to help and meet a few requiremtents.
Requirements:
1. has to know a bit of coding using C# (cuz i know very little)
2. spend a decent amount of time online (not asking 24/7)
3. and has to be awesome lol.
CoEmu + all needed Files?? 10/14/2007 - Conquer Online 2 - 0 Replies Hi all,
I want to make my own private server with CoEmu - Now I tried every link at this forum and all!!! Links are dead.
PLS can someone upload this files all i need for CoEmu and CoEmu too?
THX4hrlp