CO Private Server

06/17/2006 18:16 xprincex#616
hey does anyone know how to like add codes i have some codes from like a few freinds said i could use em on my gmae sever and i tried adding them where they said but it comes up with an error? dont know why pm if u can hlep
06/17/2006 19:06 shmoogle#617
Has anyone tryed actualy changeing the packet stuff so it work with patch 4313? right now im trying to fix it.

and i also am working on some npc stuff i have a basic idea of how it might work but not sure yet. :P

well actualy im just rewriteing the whole thing lol... and porting it to mysql (which my bro is sorting out :P )

if i ever get any of this working ill share the code with ya ^^
06/17/2006 22:39 xprincex#618
kool think you could share yur npc code with us i will be happy to test it and if it works can i use it.... of courese giving you gull credit to it as i am sure u would want
06/18/2006 00:50 andyd123#619
Titanium,
Yes I know. Im trying to say is that, if modified, this might be able to work with CO.
06/18/2006 01:54 xprincex#620
hey can anyone help me get some items goin i got XeroFaits World.cs and other files but i still dont seem to get and items and dont know why if some one could help me with that would be appreciated
.... Tahnks XeroFait lol ur + Karma for that
06/18/2006 02:51 andyd123#621
To add items (this IS client side ONLY)
You would need to use the SQL query back some pages, that would create the items table.
After that, you would need to download the item.dat gen, and use the sql.txt it creates as a SQL query on the items table.
Then, you would need to use Hybris' item command, located at ideolab.be
-Andy
06/18/2006 03:26 Xerofait#622
To use my files, you need the itemid of the item you want to add. you CANNOT use the item name. For example, you can do "/give armor 137310" and it will give you a GMRobe in your armor slot.

I have it working with item names too I just havent uploaded that version.
06/18/2006 03:40 xprincex#623
hey i did taht and i still dont have the gm robe
hmm


EDIT: do i need to add anyhing to my BackEndDB.cs file i was told i do i dint add anyhing to that yet so if someone could answer that mby wy i dont have items
06/18/2006 07:43 andyd123#624
No, nothing needs to be added there.
Im wondering, did you follow my instruction, or no?
06/18/2006 10:17 aidas2004#625
andyd123> dont waste u'r time with this n00b =]
just ignore him...
coz 1) he's got no fuckin idea wtf he is doing.
2) if he can't fallow the notes and make simple/basic things i dont think that he will lucky to make something good for our dev.
3) the shit fuck leeches information from other sites. He claims it as his own...

Yes iam about fuckin n00b - xprincex

EDIT: Sorry for double-post but i think information below will be needed for u ->
06/18/2006 14:45 aidas2004#626
I remember i promised to post my scripts, so here we go...

All scripts are for UCCO Old Server
& All Credits of scripts content goes to me - IDEO (aidas2004)
so if u going to post them somewhere please put Credits at the end.


Some Script usage/ideas are taken from [Only registered and activated users can see links. Click Here To Register...] so if u think that in credits must be added the person of script ideas please Contact me.


1) Adding commands to: World.cs


* Will edit your current job
if (Splitter[0] == "/JOB" || Splitter[0] == "/Job" || Splitter[0] == "/job")
{
byte[] SpawnData = PacketBuilder.SpawnEntity(Client.Char);
string Class_S = Splitter[1];
if (Class_S == "10") { Client.Char.Class = ClassType.InternTrojan; }
else if (Class_S == "11") { Client.Char.Class = ClassType.Trojan; }
else if (Class_S == "12") { Client.Char.Class = ClassType.VeteranTrojan; }
else if (Class_S == "13") { Client.Char.Class = ClassType.TigerTrojan; }
else if (Class_S == "14") { Client.Char.Class = ClassType.DragonTrojan; }
else if (Class_S == "15") { Client.Char.Class = ClassType.TrojanMaster; }
else if (Class_S == "20") { Client.Char.Class = ClassType.InternWarrior; }
else if (Class_S == "21") { Client.Char.Class = ClassType.Warrior; }
else if (Class_S == "22") { Client.Char.Class = ClassType.BrassWarrior; }
else if (Class_S == "23") { Client.Char.Class = ClassType.SilverWarrior; }
else if (Class_S == "24") { Client.Char.Class = ClassType.GoldWarrior; }
else if (Class_S == "25") { Client.Char.Class = ClassType.WarriorMaster; }
else if (Class_S == "40") { Client.Char.Class = ClassType.InternArcher; }
else if (Class_S == "41") { Client.Char.Class = ClassType.Archer; }
else if (Class_S == "42") { Client.Char.Class = ClassType.EagleArcher; }
else if (Class_S == "43") { Client.Char.Class = ClassType.TigerArcher; }
else if (Class_S == "45") { Client.Char.Class = ClassType.ArcherMaster; }
else if (Class_S == "100") { Client.Char.Class = ClassType.InternTaoist; }
else if (Class_S == "101") { Client.Char.Class = ClassType.Taoist; }
else if (Class_S == "132") { Client.Char.Class = ClassType.WaterTaoist; }
else if (Class_S == "133") { Client.Char.Class = ClassType.WaterWizard; }
else if (Class_S == "134") { Client.Char.Class = ClassType.WaterMaster; }
else if (Class_S == "135") { Client.Char.Class = ClassType.WaterSaint; }
else if (Class_S == "142") { Client.Char.Class = ClassType.FireTaoist; }
else if (Class_S == "143") { Client.Char.Class = ClassType.FireWizard; }
else if (Class_S == "144") { Client.Char.Class = ClassType.FireMaster; }
else if (Class_S == "145") { Client.Char.Class = ClassType.FireSaint; }
else { Client.SendData(PacketBuilder.Message(Client.Messa geID, "SYSTEM", Client.Char.Name, "Usage: /job ClassID | (look in ProfessionalName.ini for numbers)", ChatType.Talk)); }
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

* Will change your name
if (Splitter[0] == "/CHANGENAME" || Splitter[0] == "/ChangeName" || Splitter[0] == "/changename")
{
string Name = Splitter[1];
Client.Char.Name = Name;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
BackendDB.SynchronizeCharacter(Client.Char);
}

* Will exit from the the game and go to Server Select Screen
if (Splitter[0] == "/EXIT" || Splitter[0] == "/Exit" || Splitter[0] == "/exit")
{
BackendDB.SynchronizeCharacter(Client.Char); // saving chars info
World.DropClient(Client, "Closing the client"); // & closing the client
}

* Will edit your money amount
if (Splitter[0] == "/Gold" || Splitter[0] == "/gold")
{
string Money_S = Splitter[1];
int Money_I = Convert.ToInt32(Money_S);
Client.Char.Money = Money_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

* Will edit your current level
if (Splitter[0] == "/Level" || Splitter[0] == "/level")
{
string Level_S = Splitter[1];
int Level_I = Convert.ToInt32(Level_S);
Client.Char.Level = Level_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

* Will change your mode for attacking
if (Splitter[0] == "/pk")
{
Client.SendData(PacketBuilder.SetPKMode(0, Client.Char.CharID, PKMode.PK));
}

if (Splitter[0] == "/peace")
{
Client.SendData(PacketBuilder.SetPKMode(0, Client.Char.CharID, PKMode.Peace));
}

if (Splitter[0] == "/team")
{
Client.SendData(PacketBuilder.SetPKMode(0, Client.Char.CharID, PKMode.Team));
}

if (Splitter[0] == "/capture")
{
Client.SendData(PacketBuilder.SetPKMode(0, Client.Char.CharID, PKMode.Capture));
}

* Will edit your stats
if (Splitter[0] == "/STR" || Splitter[0] == "/Str" || Splitter[0] == "/str")
{
string Str_S = Splitter[1];
int Str_I = Convert.ToInt32(Str_S);
Client.Char.Strength = Str_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

if (Splitter[0] == "/AGI" || Splitter[0] == "/Agi" || Splitter[0] == "/agi")
{
string Dex_S = Splitter[1];
int Dex_I = Convert.ToInt32(Dex_S);
Client.Char.Dexterity = Dex_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

if (Splitter[0] == "/VIT" || Splitter[0] == "/Vit" || Splitter[0] == "/vit")
{
string Vit_S = Splitter[1];
int Vit_I = Convert.ToInt32(Vit_S);
Client.Char.Vitality = Vit_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

if (Splitter[0] == "/SPI" || Splitter[0] == "/Spi" || Splitter[0] == "/spi")
{
string Man_S = Splitter[1];
int Man_I = Convert.ToInt32(Man_S);
Client.Char.Mana = Man_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

* Will edit your model. Be carefully with this, becouse if u will enter incorrect model number you will get error & your client will be disconnected
if (Splitter[0] == "/TYPE" || Splitter[0] == "/Type" || Splitter[0] == "/type")
{
string Model_S = Splitter[1];
int Model_I = Convert.ToInt32(Model_S);
Client.Char.Model = Model_I;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}

* Will edit your model. The same as /type just this are used for chars & /type are used to change model as you choose like monster model, npcs...
if (Splitter[0] == "/MODEL" || Splitter[0] == "/Model" || Splitter[0] == "/model")
{
if (Splitter[1] == "SMALE" || Splitter[1] == "Smale" || Splitter[1] == "smale")
{
Client.Char.Model = 671003;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}
else if (Splitter[1] == "LMALE" || Splitter[1] == "Lmale" || Splitter[1] == "lmale")
{;
Client.Char.Model = 671004;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}
else if (Splitter[1] == "SFEMALE" || Splitter[1] == "Sfemale" || Splitter[1] == "sfemale")
{
Client.Char.Model = 2012001;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}
else if (Splitter[1] == "LFEMALE" || Splitter[1] == "Lfemale" || Splitter[1] == "lfemale")
{
Client.Char.Model = 2012002;
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
}
else { Client.SendData(PacketBuilder.Message(Client.Messa geID, "SYSTEM", Client.Char.Name, "Usage: /model <Size & Sex> | Size & Sex: smale, lmale, sfemale, lfemale", ChatType.Talk)); }
}

* Will give you full stamina
if (Splitter[0] == "/stamina")
{
Client.SendData(PacketBuilder.Vital(Client.Char.Ch arID, Vitals.Stamina, 100));
}

* Will teleport you to specifed place. Usage: /mm Map_ID Cordinate_X Cordinate_Y
if (Splitter[0] == "/MM" || Splitter[0] == "/Mm" || Splitter[0] == "/mm")
{
Client.SendData(PacketBuilder.CharacterInfo(Client .Char));
Character Char = Client.Char;
ArrayList[,] Target;
byte[] SpawnData = PacketBuilder.SpawnEntity(Char);
Target = TCLocHash;
string X_S = Splitter[2];
int X_I = Convert.ToInt32(X_S);
string Y_S = Splitter[3];
int Y_I = Convert.ToInt32(Y_S);
Char.CurrentLoc = new Location(X_I, Y_I);
string Maps_S = Splitter[1];
uint Maps_I = Convert.ToUInt32(Maps_S);
Char.Map = (World.Maps)Maps_I;
Target[X_I, Y_I].Add(Client);
World.SpawnCharacter(Client);
Client.SendData(PacketBuilder.Message(Client.Messa geID, "SYSTEM",
}

* Will add specifed weapon proficiency. Usage: /prof Skill_ID Skill_Level
if (Splitter[0] == "/PROF" || Splitter[0] == "/Prof" || Splitter[0] == "/prof")
{
string SkillType_S = Splitter[1];
int SkillType_I = Convert.ToInt32(SkillType_S);
string SkillLevel_S = Splitter[2];
int SkillLevel_I = Convert.ToInt32(SkillLevel_S);
Client.SendData(PacketBuilder.Skill(SkillType_I, SkillLevel_I));
}

* Will spawn NPC/Monster to specifed location. For TEST purpose. Usage /spawn id model cordinate_x cordinate_y
* Spawned mobs ID's must be different.
* If u look in the code - i made this to spawn Guard, his Model: 900 But you can use this command to spawn mob/npc whatever u whant.
* I Personaly tested this command with guards!
if (Splitter[0] == "/spawn")
{
string Guard_ID_S = Splitter[1];
int Guard_ID_I = Convert.ToInt32(Guard_ID_S);
string Guard_Model_S = Splitter[2];
int Guard_Model_I = Convert.ToInt32(Guard_Model_S);
string Guard_x_S = Splitter[3];
int Guard_x_I = Convert.ToInt32(Guard_x_S);
string Guard_y_S = Splitter[4];
int Guard_y_I = Convert.ToInt32(Guard_y_S);
Client.SendData(PacketBuilder.SpawnGuard(Guard_ID_ I, Guard_Model_I, Guard_x_I, Guard_y_I));
}


2) Adding packets to: PacketBuilder.cs


* Packet for /spawn command
public static byte[] SpawnGuard(int Guard_ID, int Guard_Model, int Guard_x, int Guard_y)
{
byte[] PacketData = new byte[0x3f];
PacketData[0x0] = 0x3f;
PacketData[0x1] = 0x00;
PacketData[0x2] = 0xf6;
PacketData[0x3] = 0x03;
PacketData[0x4] = (byte)(Guard_ID & 0xff);//id
PacketData[0x5] = (byte)((Guard_ID >> 8) & 0xff);//id Old Guard ID: 617478
PacketData[0x6] = (byte)((Guard_ID >> 16) & 0xff);//id
PacketData[0x7] = (byte)((Guard_ID >> 24) & 0xff);//id
PacketData[0x8] = (byte)(Guard_Model & 0xff);//Model
PacketData[0x9] = (byte)((Guard_Model >> 8) & 0xff);//Old Guard Model: 900
PacketData[0xa] = (byte)((Guard_Model >> 16) & 0xff);//Model
PacketData[0xb] = (byte)((Guard_Model >> 24) & 0xff);//Model
PacketData[0xc] = 0x00;
PacketData[0xd] = 0x00;
PacketData[0xe] = 0x00;
PacketData[0xf] = 0x00;
PacketData[0x10] = 0x00;
PacketData[0x11] = 0x00;
PacketData[0x12] = 0x00;
PacketData[0x13] = 0x00;
PacketData[0x14] = 0x00;
PacketData[0x15] = 0x00;
PacketData[0x16] = 0x00;
PacketData[0x17] = 0x00;
PacketData[0x18] = 0x00;
PacketData[0x19] = 0x00;
PacketData[0x1a] = 0x00;
PacketData[0x1b] = 0x00;
PacketData[0x1c] = 0x00;
PacketData[0x1d] = 0x00;
PacketData[0x1e] = 0x00;
PacketData[0x1f] = 0x00;
PacketData[0x20] = 0x00;
PacketData[0x21] = 0x00;
PacketData[0x22] = 0x00;
PacketData[0x23] = 0x00;
PacketData[0x24] = 0x00;
PacketData[0x25] = 0x00;
PacketData[0x26] = 0x00;
PacketData[0x27] = 0x00;
PacketData[0x28] = 0x50;
PacketData[0x29] = 0xc3;
PacketData[0x2a] = 0xc8;
PacketData[0x2b] = 0x00;
PacketData[0x2c] = (byte)(Guard_x & 0xff); // Guard Spawn x Location
PacketData[0x2d] = (byte)((Guard_x >> 8) & 0xff); // '
PacketData[0x2e] = (byte)(Guard_y & 0xff); // Guard Spawn y Location
PacketData[0x2f] = (byte)((Guard_y >> 8) & 0xff); // '
PacketData[0x30] = 0x00;
PacketData[0x31] = 0x00;
PacketData[0x32] = 0x00;
PacketData[0x33] = 0x64; //unknown (0x00)
PacketData[0x34] = 0x01;
PacketData[0x35] = 0x05;
PacketData[0x36] = 0x47;
PacketData[0x37] = 0x75;
PacketData[0x38] = 0x61;
PacketData[0x39] = 0x72;
PacketData[0x3a] = 0x64;
PacketData[0x3b] = 0x00;
PacketData[0x3c] = 0x00;
PacketData[0x3d] = 0x00;
return PacketData;
}

* Packet for /prof command
public static byte[] Skill(int SkillType, int SkillLevel)
{
byte[] PacketData = new byte[0x10];
PacketData[0] = 0x10;
PacketData[1] = 0x00;
PacketData[2] = 0x01;
PacketData[3] = 0x04;
PacketData[4] = (byte)(SkillType & 0xff);
PacketData[5] = (byte)((SkillType >> 8) & 0xff);
PacketData[6] = 0x00;
PacketData[7] = 0x00;
PacketData[8] = (byte)(SkillLevel & 0xff);
PacketData[9] = (byte)((SkillLevel >> 8) & 0xff);
PacketData[0x0a] = 0x00;
PacketData[0x0b] = 0x00;
PacketData[0x0c] = 0xd3;
PacketData[0x0d] = 0xc0;
PacketData[0x0e] = 0x0b;
PacketData[0x0f] = 0x00;
return PacketData;
}

Thats all what i wanted to post =]
The End.

As you know this are not all my scripts. (I didn't posted all coz some similar scripts already posted Hybris) I think u learned something from this tutorial & now u are able to make some other commands by u'rself
06/18/2006 16:02 xprincex#627
hey yea i followed the rules from andy and still got no items for some reason lol lil help

Addias> hey i said i made a mistake and all so back and i say back the fuck up and grow i think i got far as jsut gettin my sever running and all and i got a few simple codes in on my own so back the fuck up on me and grow the hell up noob!!!!
06/18/2006 16:41 Titanium#628
TNX adidas / ideo, ure the man!!!
06/18/2006 23:22 andyd123#629
Ideo, I love you bro.
Lol, thanks so much man.
06/19/2006 01:20 xprincex#630
lol and addias srry for the bash and all its jsut i said i made a mistake and all but anyway nice coodes and all keep up yur great work