Register for your free account! | Forgot your password?

You last visited: Today at 05:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Item Lock hhhh

Discussion on Item Lock hhhh within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
Ian*'s Avatar
 
elite*gold: 0
Join Date: Nov 2006
Posts: 805
Received Thanks: 464
Item Lock hhhh

You ppl need to be careful with pastebin code.

FULLY WORK!!!
FULLY WORK!!!
FULLY WORK!!!
FULLY WORK!!!
FULLY WORK!!!

Quote:
This is my Item Lock that NOONE has, so don't release it.

Search for:
public void Send(Main.GameClient GC, bool Stats)

Replace the whole void with:

public void Send(Main.GameClient GC, bool Stats)
{
if (HeadGear.ID != 0) GC.AddSend(Packets.AddItem(HeadGear, 1));
if (Necklace.ID != 0) GC.AddSend(Packets.AddItem(Necklace, 2));
if (Armor.ID != 0) GC.AddSend(Packets.AddItem(Armor, 3));
if (RightHand.ID != 0) GC.AddSend(Packets.AddItem(RightHand, 4));
if (LeftHand.ID != 0) GC.AddSend(Packets.AddItem(LeftHand, 5));
if (Ring.ID != 0) GC.AddSend(Packets.AddItem(Ring, 6));
if (Gourd.ID != 0) GC.AddSend(Packets.AddItem(Gourd, 7));
if (Boots.ID != 0) GC.AddSend(Packets.AddItem(Boots, 8));
if (Garment.ID != 0) GC.AddSend(Packets.AddItem(Garment, 9));
if (Fan.ID != 0) GC.AddSend(Packets.AddItem(Fan, 10));
if (Tower.ID != 0) GC.AddSend(Packets.AddItem(Tower, 11));
if (Steed.ID != 0) GC.AddSend(Packets.AddItem(Steed, 12));

if (HeadGear.ID != 0 && HeadGear.Locked == 2)
GC.AddSend(Packets.ItemLock(HeadGear.UID, 1, 2, HeadGear.LockedDays));
if (Necklace.ID != 0 && Necklace.Locked == 2)
GC.AddSend(Packets.ItemLock(Necklace.UID, 1, 2, Necklace.LockedDays));
if (Armor.ID != 0 && Armor.Locked == 2)
GC.AddSend(Packets.ItemLock(Armor.UID, 1, 2, Armor.LockedDays));
if (RightHand.ID != 0 && RightHand.Locked == 2)
GC.AddSend(Packets.ItemLock(RightHand.UID, 1, 2, RightHand.LockedDays));
if (LeftHand.ID != 0 && LeftHand.Locked == 2)
GC.AddSend(Packets.ItemLock(LeftHand.UID, 1, 2, LeftHand.LockedDays));
if (Ring.ID != 0 && Ring.Locked == 2)
GC.AddSend(Packets.ItemLock(Ring.UID, 1, 2, Ring.LockedDays));
if (Gourd.ID != 0 && Gourd.Locked == 2)
GC.AddSend(Packets.ItemLock(Gourd.UID, 1, 2, Gourd.LockedDays));
if (Boots.ID != 0 && Boots.Locked == 2)
GC.AddSend(Packets.ItemLock(Boots.UID, 1, 2, Boots.LockedDays));
if (Garment.ID != 0 && Garment.Locked == 2)
GC.AddSend(Packets.ItemLock(Garment.UID, 1, 2, Garment.LockedDays));
if (Fan.ID != 0 && Fan.Locked == 2)
GC.AddSend(Packets.ItemLock(Fan.UID, 1, 2, Fan.LockedDays));
if (Tower.ID != 0 && Tower.Locked == 2)
GC.AddSend(Packets.ItemLock(Tower.UID, 1, 2, Tower.LockedDays));
if (Steed.ID != 0 && Steed.Locked == 2)
GC.AddSend(Packets.ItemLock(Steed.UID, 1, 2, Steed.LockedDays));

if (Stats)
{
GC.MyChar.EquipStats(1, true);
GC.MyChar.EquipStats(2, true);
GC.MyChar.EquipStats(3, true);
GC.MyChar.EquipStats(4, true);
GC.MyChar.EquipStats(5, true);
GC.MyChar.EquipStats(6, true);
GC.MyChar.EquipStats(7, true);
GC.MyChar.EquipStats(8, true);
GC.MyChar.EquipStats(9, true);
GC.MyChar.EquipStats(10, true);
GC.MyChar.EquipStats(11, true);
GC.MyChar.EquipStats(12, true);
GC.MyChar.LoadedEquipmentHPAdd = true;
}
}

Search for:
public bool locked;

Replace that with:
public byte Locked;
public uint LockedDays;

Search for:
public static COPacket Movement(uint UID, byte Dir)
{
byte[] Packet = new byte[8 + 16];
COPacket P = new COPacket(Packet);

P.WriteInt16((ushort)(Packet.Length - 8));
P.WriteInt16((ushort)10005);
P.WriteInt32((byte)(Dir + 8 * Program.Rnd.Next(7)));
P.WriteInt32(UID);
P.WriteInt32((uint)Environment.TickCount);

return P;
}

Above that add:
public static COPacket ItemLock(uint ItemID, byte Value1, byte Value2, uint Value3)
{
byte[] Packet = new byte[8 + 16];
COPacket P = new COPacket(Packet);
P.WriteInt16((ushort)(Packet.Length - 8));
P.WriteInt16((ushort)2048);
P.WriteInt32(ItemID);
P.WriteByte(Value1);
P.WriteByte(Value2);
P.WriteInt32(Value3);
return P;
}
Search for:
case 2064:

Above that add:
case 2048:
{
uint UID;
fixed (byte* p = Data)
UID = *((uint*)(p + 4));
switch (Data[8])
{
case 0:
{
Item I = GC.MyChar.FindInvItem(UID);
if (I.ID != 0)
{
if (I.Locked != 1)
{
GC.MyChar.Inventory.Remove(I);
I.Locked = 1;
GC.AddSend(Packets.ItemLock(UID, 1, I.Locked, I.LockedDays));
GC.MyChar.Inventory.Add(I);
}
else
GC.LocalMessage(2005, "The item is already locked.");
}
break;
}
case 1:
{
Item I = GC.MyChar.FindInvItem(UID);
if (I.ID != 0)
{
if (I.Locked == 1)
{
GC.MyChar.Inventory.Remove(I);
DateTime datetounlock = DateTime.Now;
datetounlock = datetounlock.AddDays(7);
I.LockedDays = Convert.ToUInt32(datetounlock.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture) );
I.Locked = 2;
GC.AddSend(Packets.ItemLock(UID, 1, I.Locked, I.LockedDays));
GC.MyChar.Inventory.Add(I);
}
}
break;
}
}
break;
}

Last, replace your whole Teleport.cs with this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling
{
public class Teleport
{
public static void Handle(Main.GameClient GC, byte[] Data)
{
if (!GC.LoginDataSent)
{

GC.AddSend(Packets.Packet1012Time(GC.MyChar.Entity ID));
GC.AddSend(Packets.GeneralData(GC.MyChar.Loc.Map, GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x4a));
GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0xffffffff, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0x68));
if (GC.MyChar.Loc.Map == 1036)
GC.AddSend(Packets.MapStatus(GC.MyChar.Loc.Map, 30));
else
GC.AddSend(Packets.MapStatus(GC.MyChar.Loc.Map, 32));
foreach (Game.Item I in GC.MyChar.Inventory)
{
GC.AddSend(Packets.AddItem(I, 0));
if (I.Locked == 2)
GC.AddSend(Packets.ItemLock(I.UID, 1, 2, I.LockedDays));
}
GC.MyChar.Equips.Send(GC, true);

foreach (Game.Prof P in GC.MyChar.Profs.Values)
GC.AddSend(Packets.Prof(P));
foreach (Game.Skill S in GC.MyChar.Skills.Values)
GC.AddSend(Packets.Skill(S));
if (GC.MyChar.MyGuild != null)
{
GC.AddSend(Packets.GuildInfo(GC.MyChar.MyGuild, GC.MyChar));
GC.AddSend(Packets.String(GC.MyChar.MyGuild.GuildI D, (byte)Game.StringType.GuildName, GC.MyChar.MyGuild.GuildName));
}
foreach (Features.Guild G in Features.Guilds.AllTheGuilds.Values)
GC.AddSend(Packets.String(G.GuildID, (byte)Game.StringType.GuildName, G.GuildName));
GC.MyChar.PKPoints = GC.MyChar.PKPoints;
GC.MyChar.Nobility.Rank = GC.MyChar.Nobility.Rank;

GC.LocalMessage(2000, "Welcome to NewestCOServer");
GC.LocalMessage(2000, "Enjoy.");
if (Game.World.KOBoard[0].Name == GC.MyChar.Name)
GC.LocalMessage(2000, "You are the 1st place on the KO board, you gain 2 times more exp than others.");
if (Game.World.CurrentBC.Message != null)
GC.AddSend(Packets.ChatMessage(GC.MessageID, Game.World.CurrentBC.Name, "ALL", Game.World.CurrentBC.Message, 2500, 0));
}
}
}
}

Done.

Remember, do not release this.


hhhhhhhhhhhhhhhhhhhhhhhhh

have fun
Ian* is offline  
Thanks
2 Users
Old 09/17/2010, 09:00   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
That was justin's code afaik.
_DreadNought_ is offline  
Old 09/17/2010, 09:22   #3
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
I have it.. lol
and mine's more efficient!
But lol at you finding that on pastebin xP
-Fáng- is offline  
Old 09/17/2010, 09:22   #4
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
olollollololololo Ian, u made me laugh serious ^^
dowhatuwant is offline  
Old 09/17/2010, 20:19   #5
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Quote:
Originally Posted by ImmuneOne View Post
I don't think anyone cares.

/brag.

What's so funny?


Hello?
Agreed. Just letting people know. Lub yoo <3
_DreadNought_ is offline  
Old 09/17/2010, 22:14   #6
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Give credits to he who found it!!!!
-Arco
Arcо is offline  
Thanks
2 Users
Old 09/20/2010, 07:35   #7
 
salem rey's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
Is this really work? it will save ?
salem rey is offline  
Old 09/20/2010, 07:54   #8
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Yup yup.
Arcо is offline  
Old 09/20/2010, 12:02   #9
 
elite*gold: 0
Join Date: Dec 2009
Posts: 87
Received Thanks: 2
can you make Item Lock to my in my computer by teamviewer
alaa410 is offline  
Old 09/20/2010, 16:39   #10
 
CØĐ£Ř||Mã©hÍñє's Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 248
Received Thanks: 36
great keep going xD
CØĐ£Ř||Mã©hÍñє is offline  
Old 09/20/2010, 19:19   #11
 
ZeRo-ToLeRaNcE's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 544
Received Thanks: 655
error with bool to Byte??

i have add this guide and all is going good i think but i have an error, because it was an bool and now an byte. in packets.cs for example:

Code:
public static COPacket AddItem(Game.Item I, byte Pos)
        {
            byte[] Packet = new byte[8 + 48];
            COPacket P = new COPacket(Packet);
            try
            {
                P.WriteInt16((ushort)(Packet.Length - 8));
                P.WriteInt16((ushort)0x3f0);
                P.WriteInt32(I.UID);
                P.WriteInt32(I.ID);
                P.WriteInt16(I.CurDur);
                P.WriteInt16(I.MaxDur);
                P.WriteInt16(1);
                P.WriteInt16(Pos);
                P.WriteInt32(I.TalismanProgress);
                P.WriteByte((byte)I.Soc1);
                P.WriteByte((byte)I.Soc2);
                P.WriteInt16((ushort)I.Effect);
                P.WriteByte(I.Plus);
                P.WriteByte(I.Bless);
                if (I.FreeItem)
                    P.WriteByte(1);
                else
                    P.WriteByte(0);
                P.WriteByte(I.Enchant);
                P.Move(6);
                [COLOR="Red"]if (I.Locked)[/COLOR]
                  P.WriteInt16(3);
                else P.WriteInt16(0);
                if (I.Color == 0)
                    I.Color = (Game.Item.ArmorColor)new Random().Next(1, 9);
                P.WriteInt32((uint)I.Color);
                P.WriteInt32(I.Progress);
            }
            catch (Exception Exc) { Program.WriteLine(Exc); }
            return P;
        }
i think it has to be someting like : if (I.Locked == 1)

because i see he write an 1 for false and 2 for true if i have right.
but what i try to do in the packets, in the game it is going wrong if i want to lock it. it lock the item then he tell me to unlock and it is still unlocked etc.

and after an relog all settings are gone.

HELP HELP
ZeRo-ToLeRaNcE is offline  
Old 09/20/2010, 20:36   #12
 
elite*gold: 0
Join Date: Sep 2010
Posts: 90
Received Thanks: 26
It's pretty ****** he released this.
peterpiper99 is offline  
Old 09/20/2010, 21:18   #13
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Not really. It's a lesson to pastbiner's
_DreadNought_ is offline  
Thanks
1 User
Old 09/20/2010, 22:23   #14
 
elite*gold: 0
Join Date: Sep 2010
Posts: 90
Received Thanks: 26
He has no respect, he's a idiot.
peterpiper99 is offline  
Old 09/20/2010, 22:59   #15
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by peterpiper99 View Post
He has no respect, he's a idiot.
or maybe the one who gave him it is an idiot
Fish* is offline  
Reply


Similar Threads Similar Threads
[Question]Item Lock
03/18/2010 - CO2 Private Server - 0 Replies
does anyone know how to get rid of item lock on 5165 NewestCOServer or at least fix it so that it works cause its annoying when the item lock box opens up everytime i make some gear or do anything to my gear
5165 Item lock, and item redeem.
02/09/2010 - CO2 Private Server - 4 Replies
Anyone knows how to make the item lock and redeem items npc in 5165? Im not too good at that stuff, and it'll be great if someone could help me. :handsdown:
item lock
12/09/2009 - CO2 Private Server - 9 Replies
anyoen know where item lock it located? i wanna remove it fully from my source. i have tried searching itemlock, lockitem and lock and removed all that looked to be itemlock. Thanks to all help :)
[Help] Item Lock
07/21/2009 - CO2 Private Server - 1 Replies
How can i do item lock in LOTF?
Item Lock
08/05/2008 - Conquer Online 2 - 4 Replies
Is there any way around item lock so you can trade a locked item to whoever? Maybe through editting some files or something? Thanks.



All times are GMT +1. The time now is 05:30.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.