Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 06:46

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

Advertisement



[Release] Item lock for NewestCOServer

Discussion on [Release] Item lock for NewestCOServer within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
[Release] Item lock for NewestCOServer

Search for;
Quote:
case 2064:
Add above;
Code:
                        case 2048:
                            {
                                PacketHandling.ItemLock.Handle(GC, Data);
                                break;
                            }
Search for;
Quote:
public bool Locked;
Change, and add;
Code:
        public int Locked;
        public uint LockedDays;
Then the last thing, add the attached file to the packethandling folder.

note; There are gonna be some errors and I'm not gonna correct them for you, besides I will just show how to solve them.

Quote:
if (Item.Locked) will be if (Item.Locked == 1)
if (Item.Locked == false) will be if (Item.Locked == 0)
I WILL NOT HELP YOU SAVING IT.

Big mistake, forgot the packet:

Code:
        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;
        }
Attached Files
File Type: zip ItemLock.zip (695 Bytes, 556 views)
ImmuneOne is offline  
Thanks
32 Users
Old 02/06/2010, 16:28   #2
 
QuickCo's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
very useful thanks
QuickCo is offline  
Old 02/06/2010, 16:49   #3
 
elite*gold: 0
Join Date: Dec 2009
Posts: 36
Received Thanks: 1
Weeeeeeeeeeeeeee! Thaanks!
|_Beetle_| is offline  
Old 02/06/2010, 16:58   #4
 
a7x.'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 43
Received Thanks: 4
good job buddy.
a7x. is offline  
Old 02/06/2010, 16:59   #5
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
IMPORTANT:

Change in ItemLock.cs
Quote:
case 1:
to:
Quote:
case 2:
ImmuneOne is offline  
Old 02/06/2010, 17:37   #6
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
i hate u
~Yuki~ is offline  
Old 02/06/2010, 17:52   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 259
Received Thanks: 159
to be whitout time

change case 0: and case 1: in
Quote:
case 0:
{
if (Item.Locked == 0 || Item.Locked == 2)
{ Item.Locked = 1; }

Database.SaveCharacter(GC.MyChar, GC.MyChar.Name);
GC.AddSend(Packets.ItemLock(Itemuid, LockType, 1, 0));
GC.AddSend(Packets.UpdateItem(Item, 0));
if (Item.Locked == 2)
{ GC.AddSend(Packets.UpdateItem(Item, 0)); GC.AddSend(Packets.ItemLock(Item.UID, 1, 3, 0)); }
return;
}
case 1:
{
// DateTime datetounlock = DateTime.Now;
// datetounlock = datetounlock.AddDays(5);
//Item.LockedDays = Convert.ToUInt32(datetounlock.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture) );
Item.Locked = 0;
GC.AddSend(Packets.UpdateItem(Item, 0));
if (Item.Locked == 2)
{ GC.AddSend(Packets.UpdateItem(Item, 0)); GC.AddSend(Packets.ItemLock(Item.UID, 1, 3, 0)); }
break;
}
and new change
Quote:
public int Locked;
in
Quote:
public byte Locked = 0;
and pakect.cs were you see

Quote:
if (I.Locked)
P.WriteInt16(3);
else P.WriteInt16(0);
replace in
Quote:
if (I.Locked == 1)
P.WriteInt16(1);
else P.WriteInt16(0);
teroareboss1 is offline  
Thanks
4 Users
Old 02/06/2010, 18:01   #8
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Then what's the use of having item lock? It was added to prevent hacking.
-impulse- is offline  
Old 02/06/2010, 18:45   #9
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by ~Yuki~ View Post
i hate u
Just because I helped the community out with something simple that anyone can perfom? Nice concept of thinking.
ImmuneOne is offline  
Thanks
4 Users
Old 02/06/2010, 19:03   #10
 
elite*gold: 0
Join Date: Jan 2010
Posts: 74
Received Thanks: 18
good job yashi!
Metapod is offline  
Old 02/06/2010, 20:03   #11
 
WHITELIONX's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 532
Received Thanks: 66
NewestCoServer.Packets does not contain a definition for itemlock ItemLock.cs >.< Can somebody give me an example of a definition please
WHITELIONX is offline  
Old 02/06/2010, 20:07   #12
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by WHITELIONX View Post
NewestCoServer.Packets does not contain a definition for itemlock ItemLock.cs >.<
Exactly, an example of people on elitepvpers what's the big problem that's causing people not being able to read the whole thread? I posted the **** packet.
ImmuneOne is offline  
Old 02/06/2010, 20:09   #13
 
WHITELIONX's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 532
Received Thanks: 66
Probably because some of us do not have the advantage of knowing the language properly

Hehehehe I got it working
WHITELIONX is offline  
Old 02/06/2010, 20:37   #14
 
lostsolder05's Avatar
 
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 240
Quote:
Originally Posted by ImmuneOne View Post
Just because I helped the community out with something simple that anyone can perfom? Nice concept of thinking.
congratulations you can leech. anyways, so this doesn't seem like im trying to flame you or anything nice release i suppose.
lostsolder05 is offline  
Old 02/06/2010, 20:50   #15
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by lostsolder05 View Post
congratulations you can leech. anyways, so this doesn't seem like im trying to flame you or anything nice release i suppose.
Congratulations, you just took your moronic brain level even higher. I never took credit for anything, I only took credits for converting from something impulse made, so basicly you got no saying in this at all. Oh, and this was on request but okay figures idiots can't read the forums well.
ImmuneOne is offline  
Closed Thread


Similar Threads Similar Threads
[Release]Make the threading system better.[5165 NewestCOServer]
09/13/2010 - CO2 PServer Guides & Releases - 10 Replies
Okay so, I was bored so I thought I would release some easy shiz. Credits to Impulse for his Thread.cs :) Goto Program.cs find Console.WriteLine("The server is ready for connections."); abit under that is the threading system. It's like
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:



All times are GMT +1. The time now is 06:46.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.