This is a small project in NewestCOServer.
Why this?
To make a better NewestCOServer source.
Ive deleted alot things so far and started building things up.
I will work on this time after time, untill it will be good
Hope you find this useful
NPC Scripting:
Right now the NPC Scripting is the same as others.
There is a folder in the source called "NPC".
It will be for the NPC Dialogs soon. Im still working on it.
Download: (v1.0.0)
Version 1.0.0:
The first version is very very basic and dosn't contains alot of things.
The things will come with time
All NPC's deleted and some made again
Goodluck
Features so far:
PHP Code:
-BanSystem (/ban charname)
-No SpawnKill
-Unique PK/Jail System
-Other NPCScripting (Working on)
-Load All DMaps
-More will come
-Version 5165
I will work on this everyday, so please don't start flame already
Setup:
Just extract source folder to any places on your pc.
Extract OldCODB in C:\
Unless you are going to rewrite the source (the socket system) and others than this will just be another "fail" source. Only reason I say this is because everything that I can tell you have done (Delete the NPCs) can be done by anyone and replaced with all the NPCs on epvpers. I am guessing you are gonna copy and paste everything you can from epvpers :S
I would definatly suggest rewriting the socket system as this sucks!
Also if you could clean up the messy code this would help make this release alot better than any out there already.
This is not a flame just my thoughts and some helpful comments
I've known you for a while, probably as of you joined this forum, I've read a lot of your 'promises', and you never actually do what you're trying.
Sorry to be this so rude, but I really believe this will never really reach anything to be proud of, and I also believe this won't be a stable (or increasing the current stability) release.
@smythe
Cuz I always ends up gets flamed
And last time I actually did it.
Also with the unbco source, i did release it
Ban: (I dont take credits for it)
Go to GameWorker.cs
Search for:
Code:
GC.Soc = StO.Sock;
Under that put:
Code:
if (GC.AuthInfo.LogonType == 3)
{
GC.AddSend(Packets.SystemMessage(GC.MessageID, "MOTHERFUCKER YOU ARE BANNED, HAHAHAHAHA!!!!"));//You can edit the text to what u want
}
Now in Database.cs put:
Code:
public static void AddBan(string Name)
{
if (!File.Exists(@"C:\OldCODB\banname.txt"))
{
File.AppendAllText(@"C:\OldCODB\banname.txt", Name + "\r\n");
}
else
{
if (!CheckBan(Name))
{
File.AppendAllText(@"C:\OldCODB\banname.txt", Name + "\r\n");
}
}
}
public static bool CheckBan(string Name)
{
if (File.Exists(@"C:\OldCODB\banname.txt"))
{
string[] Lines = File.ReadAllLines(@"C:\OldCODB\banname.txt");
foreach (string line in Lines)
{
if (line.Contains(Name))
return true;
}
}
return false;
}
Now search for:
Code:
public static Main.AuthWorker.AuthInfo Authenticate(string User, string Password)
Replace the whole code with:
Code:
public static Main.AuthWorker.AuthInfo Authenticate(string User, string Password)
{
Main.AuthWorker.AuthInfo Info = new COEmulator.Main.AuthWorker.AuthInfo();
Info.Account = User;
try
{
while (File.Exists(@"C:\OldCODB\Users\" + User + ".usr"))
{
FileStream FS = new FileStream(@"C:\OldCODB\Users\" + User + ".usr", FileMode.Open);
BinaryReader BR = new BinaryReader(FS);
string RealPassword = Main.PassCrypto.EncryptPassword(Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte())));
string[] FileCaseSensitive = Directory.GetFiles(@"C:\OldCODB\Users\", User + ".usr");
string RealAccount = Path.GetFileNameWithoutExtension(FileCaseSensitive[0]);
if (RealPassword == Password && RealAccount == User)
{
Info.Status = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
Info.Character = "";
if (BR.BaseStream.Position != BR.BaseStream.Length)
{
byte len = BR.ReadByte();
Info.Character = Encoding.ASCII.GetString(BR.ReadBytes(len));
}
if (Info.Character == "")
Info.LogonType = 2;
else
Info.LogonType = 1;
if (CheckBan(RealAccount))
Info.LogonType = 3;
}
else
Info.LogonType = 255;
BR.Close();
FS.Close();
return Info;
}
Info.LogonType = 255;
}
catch (Exception Exc) { Console.WriteLine(Exc); }
return Info;
}
In Chat.cs find:
Code:
under it put:
Code:
if (Cmd[0] == "/ban" && GC.MyChar.MyClient.AuthInfo.Status == "[PM]" || Cmd[0] == "/ban" && GC.MyChar.MyClient.AuthInfo.Status == "[GM]")
{
foreach (Character C in World.H_Chars.Values)
{
if (Cmd[1] == C.Name)
{
C.MyClient.Soc.Disconnect(false);
Database.AddBan(C.MyClient.AuthInfo.Account);
C.MyClient.Disconnect();
Game.World.SendMsgToAll(GC.MyChar.Name, C.Name + " have been banned by " + GC.MyChar.Name, 2011, 0);//Fixed
}
}
}
Now create a textfile in OldCODB named banname.txt
Done
copy paste? did u even see this yet? in the top spoiler
This is a small project in NewestCOServer.
Why this?
To make a better NewestCOServer source. Ive deleted alot things so far and started building things up. I will work on this time after time, untill it will be good
Hope you find this useful
Okay, I'm in DEV with this and will release my updates (and eventually the whole source) I will be cleaning it, socket system will be swapped to hybrids.
What I have done so far, Chat.cs commanding alot simpler:
Replace the whole chat.cs with this (NOTE: I cleaned it.)
Code:
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;
using COEmulator.Game;
namespace COEmulator.PacketHandling
{
public class Chat
{
public static void Handle(Main.GameClient GC, byte[] Data)
{
MemoryStream MS = new MemoryStream(Data);
BinaryReader BR = new BinaryReader(MS);
BR.ReadBytes(8);
ushort ChatType = (ushort)BR.ReadUInt32();
BR.ReadBytes(13);
string From = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
string To = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
BR.ReadByte();
string Message = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
BR.Close();
MS.Close();
#region BadWords
Message = Message.Replace("nigga", "*****");
Message = Message.Replace("paki", "****");
#endregion
if (ChatType == 2104 && GC.MyChar.MyShop != null)
GC.MyChar.MyShop.Hawk = Message;
try
{
if (Message.StartsWith("@"))
{
string[] Input = Message.Split(' ');
{
#region GM/PM
if (GC.GM)
{
switch (Input[0])
{
#region Scroll commands
case "scroll":
{
switch (Input[1])
{
case "tc":
GC.MyChar.Teleport(1002, 429, 378);
break;
case "dc":
GC.MyChar.Teleport(1000, 499, 650);
break;
case "pc":
GC.MyChar.Teleport(1011, 232, 260);
break;
case "bi":
GC.MyChar.Teleport(1015, 717, 576);
break;
case "am":
GC.MyChar.Teleport(1015, 717, 576);
break;
}
break;
}
#endregion
case "@life":
{
GC.MyChar.CurHP = GC.MyChar.MaxHP;
GC.MyChar.CurMP = GC.MyChar.CurMP;
break;
}
case "@cps":
{
GC.MyChar.CPs = 999999999;
break;
}
case "@silvers":
{
GC.MyChar.Silvers = 999999999;
break;
}
case "@level":
{
byte level = GC.MyChar.Level;
byte.TryParse(Input[1], out level);
level = Math.Min((byte)137, Math.Max((byte)1, level));
GC.MyChar.Level = level;
break;
}
case "@playercount":
{
GC.LocalMessage(2000, "Players Online: " + Game.World.H_Chars.Count);
break;
}
case "@c":
{
Game.World.SendMsgToAll(GC.MyChar.Name, Message.Substring(Input[1].Length + 1), 2011, GC.MyChar.Mesh);
break;
}
case "@dc":
{
GC.Disconnect();
break;
}
}
}
else //LEAVE THIS
#endregion
#region Players
{
switch (Input[0])
{
case "@dc":
{
GC.Disconnect();
break;
}
case "@playercount":
{
GC.LocalMessage(2000, "Players Online: " + Game.World.H_Chars.Count);
break;
}
}
}
#endregion
}
}
}
catch { }
}
}
}
will only be working on this tonight untill I lose motivation.
[Release] WarRock Emulator ServerFile Source 03/19/2012 - WarRock - 41 Replies Hey Community,
da ich sehr wenig, bzw inaktiv an den WarRock ServerFiles arbeite und ich sehe das noch immer keiner es geschafft hat einen WarRock Server, oder teilweise etwas davon zu programmieren, release ich hiermit die Basis meines WarRock Emulators.
Meine allererste Version war in VB.Net, meine zweite in C#. Bei der 2. Version hatte ich sogut wie alle Funktionen in der Lobby funktionstüchtig. Da ich aber ein paar leichte Mängel in der Core des Servers entdeckte(aufgrund meiner...
drop cps for 5165 conquer-sx's source 06/01/2011 - CO2 PServer Guides & Releases - 10 Replies first:
open database
alert config table
add a column name is "AutoEmoney"
second:
open conquer-sx source
go to Game/Mob.cs
open that
and find 44 row!
[RELEASE] My 5165 Source 02/09/2010 - CO2 PServer Guides & Releases - 4 Replies Hello
This is my 5165 source
I added a few things but some things were already added, so credits to the people who added the things i didn't, xD
Features:
I hope you press thanks!
Download HERE