[REL] ItemLock Saving/Loading

03/28/2010 21:32 -NewDawn-#16
Give Credit to teroareboss1.
[Only registered and activated users can see links. Click Here To Register...]

This isn't your release at all.
You're just leaching.

BTW- we already discussed this. This code doesn't work. It's going to mess up new characters while they're made. If you want to save it then save it using another mean.
[Only registered and activated users can see links. Click Here To Register...]

This code will mess up all items and then mess with the friend's list so that the character cannot load.
Notice how my new character has nothing equipped and no potions in his inventory.
03/28/2010 22:52 ImmuneOne#17
I didn't create this save method? Think twice before you throw some bullshit on the forums, I didn't even bother to check that thread. Anyway how could I 'steal' a save method if there is no other way around ?
03/29/2010 08:51 -NewDawn-#18
Quote:
Originally Posted by ImmuneOne View Post
I didn't create this save method? Think twice before you throw some bullshit on the forums, I didn't even bother to check that thread. Anyway how could I 'steal' a save method if there is no other way around ?
First, I'm not flaming at you. I'm saying that it's exactly like the one that other guy posted and you should give him credit. I'm not thanking you for this.
03/29/2010 09:34 salem rey#19
Quote:
Originally Posted by -NewDawn- View Post
First, I'm not flaming at you. I'm saying that it's exactly like the one that other guy posted and you should give him credit. I'm not thanking you for this.



#reported
and read my comment again - "WHILE THEY ARE BEING MADE" as in I created a new character and it still doesn't work.
Poor English and reading skills bugs me soooo much.
hey impulse is the one who release the item lock, then why you shit em?
03/29/2010 09:53 -impulse-#20
Quote:
Originally Posted by salem rey View Post
hey impulse is the one who release the item lock, then why you shit em?
I'm not the one that released it, I'm just the first one who got the item lock working exactly like on CO(on my server if you want to unlock an item, just unlock it,disconnect and login, it will be unlocked. It's because I didn't add trade partner, though I'll add it today
03/29/2010 11:48 PeTe Ninja#21
new dawn.. they released it you used it. its your fault for it failing. you don't have to use everything people release.. andreaco taught some noob lotf users last year or so when she released a command that deleted all the characters... people did use it.. do you want us to do that? I mean I could make you the sweetest things ever and just have it deleting everything.
03/29/2010 15:30 -NewDawn-#22
#reported for flaming.

On Topic: If this truly is your release then tell me why my characters get like that ImmuneOne because atm, i'm really starting to doubt that this is your release. I'm sure that the item lock is yours but not the save.
03/29/2010 17:48 Paralyzer[GM]#23
There is no Reason to #Report PeTe for something that ur trowing a temper about

On topic:
03/29/2010 18:27 ImmuneOne#24
Quote:
Originally Posted by -NewDawn- View Post
#reported for flaming.

On Topic: If this truly is your release then tell me why my characters get like that ImmuneOne because atm, i'm really starting to doubt that this is your release. I'm sure that the item lock is yours but not the save.
How hard is it to understand that if it hasn't been saved before it won't load correctly? Create a new account and character.

#EDIT
By the way this just proves your moronic brains wrong;
Quote:
Locked = I.ReadByte();
Posted by teroareboss1

Quote:
Locked = I.ReadInt32();
Posted by me.
03/29/2010 21:52 lupe350#25
Quote:
Originally Posted by -NewDawn- View Post
#reported for flaming.

On Topic: If this truly is your release then tell me why my characters get like that ImmuneOne because atm, i'm really starting to doubt that this is your release. I'm sure that the item lock is yours but not the save.
you cant say this is someone elses code because it looks somewhat the same, ImmuneOne wrote the bulk of the feature & your accusing him of being a leacher cos the save/load method looks simular.

Lols o and remember when u had a topic about u losing your data?
u replied to me "Thats why u aint got a gf"
But wait look at you flaming everyones post and tryna correct people when ur wrong rofl ur funny.

And i like how u always try banned people.. well guess what?
#Banned UR FACE!

and who was the one who got 245 post in 1 month + i thought u said u was gonna quit the forum? LOOL tbh nice life (y)
03/30/2010 04:25 kamote#26
Quote:
Originally Posted by -Shunsui- View Post
why make a new file?

ex this is what i did in database.cs
Code:
 public class Database
    {
        public const string USER_NAME = "root";
        public static string PASSWORD = "";
        public const string SERVER = "";
        public const string DATA_BASE = "";
        static MySqlConnection conn = new MySqlConnection("Server=" + SERVER + ";Database='" + DATA_BASE + "';Username='" [B][COLOR="Red"]+ USER_NAME +[/COLOR][/B] "';Password='" [COLOR="Red"][B]+ PASSWORD +[/B][/COLOR] "'");
        static bool did = false;
        public static MySqlConnection Connection
        {
            get
            {
                if (!did)
                { conn.Open(); did = true; conn.StateChange += new System.Data.StateChangeEventHandler(conn_StateChange); }
                return conn;
            }
        }
        static void conn_StateChange(object sender, System.Data.StateChangeEventArgs e)
        {
            if (e.CurrentState == System.Data.ConnectionState.Closed || e.CurrentState == System.Data.ConnectionState.Broken)
            {
                conn.Dispose();
                conn = new MySqlConnection("Server=" + SERVER + ";Database='" + DATA_BASE + "';Username='" + USER_NAME + "';Password='" + PASSWORD + "'");
                conn.Open();
                conn.StateChange += new System.Data.StateChangeEventHandler(conn_StateChange);
            }
        }
code in red are vulnerable!...careful with sql-injection guys...
03/30/2010 09:47 Paralyzer[GM]#27
Guys tell ya what I will make a thread for MySql

EDIT: Thread link [Only registered and activated users can see links. Click Here To Register...]
03/31/2010 15:18 -NewDawn-#28
Quote:
Originally Posted by ImmuneOne View Post
How hard is it to understand that if it hasn't been saved before it won't load correctly? Create a new account and character.

#EDIT
By the way this just proves your moronic brains wrong;
Can you please get a hold of your anger management problems for just a second? I'm not a moron and I have created a new account and character and I'm telling you that I'm getting that problem. As I said, I'm not flaming at you- so show some respect. Treat others as you'd like to be treated. If I really wanted to I could level down to your level and start calling people morons because it doesn't work for some people. This isn't a hate thread, plus I'm 99% sure that I did everything right.

And to everyone else, control yourselves too. I'm really tired of seeing so many stupid comments of people trying to get back at each other. I'm not naming anyone... but it's just pathetic. This is a community thread, not a flame thread- and lets keep it that way.

This is the code that I have:
Code:
public void WriteThis(System.IO.BinaryWriter I)
        {
            if (ID != 0 && UID == 0) UID = (uint)Program.Rnd.Next(10000000);
            if (ID != 0 && UID == 0) UID = (uint)World.Rnd.Next(10000000);

            I.Write((byte)25);
            I.Write(UID);
            I.Write(ID);
            I.Write(Plus);
            I.Write(Bless);
            I.Write(Enchant);
            I.Write((byte)Soc1);
            I.Write((byte)Soc2);
            I.Write(MaxDur);
            I.Write(CurDur);
            I.Write(FreeItem);
            I.Write(TalismanProgress);
            I.Write(Progress);
            I.Write((byte)Color);
            [COLOR="Red"]I.Write(Locked);[/COLOR]
        }
Code:
if (Database.DatabaseItems.Contains(ID))
                {
                    Plus = I.ReadByte();
                    Bless = I.ReadByte();
                    Enchant = I.ReadByte();
                    Soc1 = (Gem)I.ReadByte();
                    Soc2 = (Gem)I.ReadByte();
                    MaxDur = I.ReadUInt16();
                    CurDur = I.ReadUInt16();
                    FreeItem = I.ReadBoolean();
                    TalismanProgress = I.ReadUInt32();
                    Progress = I.ReadUInt16();
                    Color = (ArmorColor)I.ReadByte();
                    [COLOR="Red"]Locked = I.ReadInt32();[/COLOR]
                }
That's the end of the save code 'you' coded. I'm not saying that you didn't put thought into it... I mean, maybe you did code it completely without looking at it- but at least give him some credit.

Yes, I've followed the [Only registered and activated users can see links. Click Here To Register...] guide. It locks it just like it should. I can't unlock it but we'll save that error for later. I can probably fix it.

So you released it. If you think I did something wrong then take a look.
Tell me what I did wrong because i'm not seeing it.