Register for your free account! | Forgot your password?

You last visited: Today at 04:41

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

 

[Release] Item lock for NewestCOServer

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2009
Posts: 744
Received Thanks: 539
[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, 544 views)



ImmuneOne is offline  
Thanks
32 Users
Old   #2
 
elite*gold: 0
Join Date: Jan 2010
Posts: 139
Received Thanks: 45
very useful thanks


QuickCo is offline  
Old   #3
 
elite*gold: 0
Join Date: Dec 2009
Posts: 36
Received Thanks: 1
Weeeeeeeeeeeeeee! Thaanks!
|_Beetle_| is offline  
Old   #4
 
elite*gold: 0
Join Date: Jan 2010
Posts: 43
Received Thanks: 4
good job buddy.


a7x. is offline  
Old   #5
 
elite*gold: 0
Join Date: Nov 2009
Posts: 744
Received Thanks: 539
IMPORTANT:

Change in ItemLock.cs
Quote:
case 1:
to:
Quote:
case 2:
ImmuneOne is offline  
Old   #6
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 489
i hate u
~Yuki~ is offline  
Old   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 220
Received Thanks: 145
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   #8
 
elite*gold: 0
Join Date: Oct 2009
Posts: 762
Received Thanks: 539
Then what's the use of having item lock? It was added to prevent hacking.
-impulse- is offline  
Old   #9
 
elite*gold: 0
Join Date: Nov 2009
Posts: 744
Received Thanks: 539
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   #10
 
elite*gold: 0
Join Date: Jan 2010
Posts: 74
Received Thanks: 18
good job yashi!
Metapod is offline  
Old   #11
 
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   #12
 
elite*gold: 0
Join Date: Nov 2009
Posts: 744
Received Thanks: 539
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   #13
 
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   #14
 
elite*gold: 20
Join Date: Jan 2006
Posts: 884
Received Thanks: 228
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   #15
 
elite*gold: 0
Join Date: Nov 2009
Posts: 744
Received Thanks: 539
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



« Previous Thread | Next Thread »

Similar Threads
[Release]Make the threading system better.[5165 NewestCOServer]
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 ...
10 Replies - CO2 PServer Guides & Releases
5165 Item lock, and item redeem.
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....
4 Replies - CO2 PServer - Discussions / Questions



All times are GMT +2. The time now is 04:41.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.