Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 18:43

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

Advertisement



[Problem] Item Lock 5165

Discussion on [Problem] Item Lock 5165 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Jay10291's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 143
Received Thanks: 155
[Problem] Item Lock 5165

I added item lock to my server and I'm getting the same error 3 times. I don't know what it means, I even google'd it >.>

Quote:
cannot implicitly convert type 'byte' to 'bool'
1.
Code:
P.WriteByte(I.Enchant);
            P.Move(6);
            if [COLOR="Red"][U](I.Locked)[/U][/COLOR]
            {
                P.WriteInt16(3);
            }
2.
Code:
P.WriteByte(I.Enchant);
                P.Move(6);
                if [U][COLOR="Red"](I.Locked)[/COLOR][/U]
                    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);
3.
Code:
P.WriteByte(I.Enchant);
                P.Move(6);
                if [U][COLOR="Red"](I.Locked)[/COLOR][/U]
                    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);
Changing "public byte Locked = 0;" to "public bool Locked = 0;" just made more errors.
Jay10291 is offline  
Old 06/09/2010, 00:17   #2
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by Jay10291 View Post
I added item lock to my server and I'm getting the same error 3 times. I don't know what it means, I even google'd it >.>


1.
Code:
P.WriteByte(I.Enchant);
            P.Move(6);
            if [COLOR="Red"][U](I.Locked)[/U][/COLOR]
            {
                P.WriteInt16(3);
            }
2.
Code:
P.WriteByte(I.Enchant);
                P.Move(6);
                if [U][COLOR="Red"](I.Locked)[/COLOR][/U]
                    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);
3.
Code:
P.WriteByte(I.Enchant);
                P.Move(6);
                if [U][COLOR="Red"](I.Locked)[/COLOR][/U]
                    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);
Changing "public byte Locked = 0;" to "public bool Locked = 0;" just made more errors.
Code:
if(I.Locked) to if (I.Locked == 1) // true
if (!I.Locked) to if(I.Locked == 0) // false
ImmuneOne is offline  
Old 06/09/2010, 00:20   #3
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Actually, you should read some tutorials about basic defining. How could a bool be used as a integral type?
ImmuneOne is offline  
Old 06/09/2010, 07:10   #4
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
I gave up on item locking since if you do item locking, you'd have to do trade partners. What I did to get through all this is just make every character a merchant. By doing this it doesn't ***** about item lock nor will it ***** about the "cant drop this because its the highest bp blah blah".
dragon89928 is offline  
Old 06/09/2010, 22:36   #5
 
Jay10291's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 143
Received Thanks: 155
When I change (I.Locked) to (I.Locked == 1) it gets rid of the erros I was having but when I log into the game I get an error in the console and Item Lock still doesnt work.
Error- Unable to read beyond the end of the stream.
character.cs line 1226
database.cs line 911

@dragon89928
Did you make it so all new characters are automatically merchants? If you did, can you tell m how you did it? PM me =p
Jay10291 is offline  
Old 06/10/2010, 00:34   #6
 
elite*gold: 0
Join Date: Apr 2006
Posts: 55
Received Thanks: 12
We would have to see honestly what line 1226 in character.cs is and what is kind of around it and what is database line 911 and what it pertains to for what database function like save char etc.... or is it a get function
joshvette001 is offline  
Reply


Similar Threads Similar Threads
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 +2. The time now is 18:43.


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.