Login&Account System?

Posted By: Leonardo

Login&Account System? - 06/15/08 09:36

Hi, I haven't been in this forum for a long time, as I understand some of the old topics have been deleted, because I cannot find my previous post about such a system, so I'm making a new one.
All I need, is for someone to explain me how to create such a system, to be more specific - when should I create the invisible entity, so the server sends messages to only one client, when should I collect the Username&Password data, how should I send it? A basic step-by-step post, explaining this would be awesome smile
Right now, I have an MS Access Database (just for testing, because I don't want to install MySQL right now), with columns:
ID Username Password etc. The problem is, that I want the entities unique ID to be the same as the user's ID in the database, but I'm stuck on this and don't know a way to do this...

So, I have another question... Is there a way I can create the invisible entity and parse all the data (strings, variables, etc.) from the client to him, because that would mean, that the entities function would do all the checking, etc. and when the data should be sent from the server back to the client, I could just write send_string_to(MY,message_str);

I hope you understood what I'm after smile
Posted By: fastlane69

Re: Login&Account System? - 06/15/08 17:58

Quote:
All I need, is for someone to explain me how to create such a system, [...]A basic step-by-step post, explaining this would be awesome


That would be nice, wouldn't it? laugh
Unfortunately that post would be miles long for this is a non trivial task you are asking, especially since you want to use MS Access when MySQL is more used and thus better supported by this community.

Your best bet is asking questions and us answering them. I don't think anyone is going to do a step-by-step for you... and if they do, god bless them!!!

Quote:
The problem is, that I want the entities unique ID to be the same as the user's ID in the database, but I'm stuck on this and don't know a way to do this...


Simply pull the entities unique ID from either it's handle or client number and use that in the database.

Quote:
Is there a way I can create the invisible entity and parse all the data (strings, variables, etc.) from the client to him


No. An entity only received skills to be used in it's actions. An entity does not recieve strings and thus can't parse them. Your idea however is sound if you take away the entity. With the new Client Number, you no longer need to create a separate, invisible entity to reference your client; the client receives a unique identifier the second it connects to the server. Thus all you have to do is send_string_to(client_number, message_str); and then have the parsing function in the STRING HANDLER, not the entity.
Posted By: Leonardo

Re: Login&Account System? - 06/15/08 18:16

Hmm.... Would you explain the last part of your post, about the STRING HANDLER and send_string_to(client_number,string), a bit more clearly? smile I probably didn't understand it correctly...
how can you have a client_number as a parameter in the send_string_to function, when it should be an entity? I believe there is no other way to send data to a specific client, if he doesn't create an entity... of course you can send the data to all of the clients, and have them check if they are the right one, but that is just a terrible waste of bandwith :p
Posted By: fastlane69

Re: Login&Account System? - 06/15/08 20:43

Rather than explain these basic GS scripting concepts, why don't you look them up in the manual and THEN ask questions? wink

Look under "events" and "client_id"...
Posted By: Leonardo

Re: Login&Account System? - 06/16/08 05:08

I'm not using A7 smile I tried the free Lite-C version, but I hate it, don't know why... and, of course, I need to learn Lite-C, because that is the only way I can use the client_id wink
Any more ideas? smile
Posted By: fastlane69

Re: Login&Account System? - 06/16/08 21:49

Quote:
Any more ideas?


With A6, you are left with what I said before about entities and strings. As well, there you have a very robust MySQL plugin thus I would mess with that if you want more support from people here (I've never heard of anyone using MS access for MP).

And BTW, since any MP effort is a months long, if not years long, project, it is not wise to learn on the un-supported A6. Best switch up to A7 where you can still do A6-like networking, but at least get support from Conitec and us as well as easy access to lite-c.
Posted By: PrenceOfDarkness

Re: Login&Account System? - 06/17/08 04:34

fastlane69 is right. I spent months doing something with A6. When A7 came out, alot of the stuff I had wasted my time doing was being already done for me. But hey, everyone is different. You might be a C guru. It's the age old battle: time vs money. A7 is much better for MP.

With A6 I did what your doing... create an entity on the client side, and simply sent information to that entity always using a string (personally I think it's not to bad for some of the simply things you might do early on, but it's not very effective for many other things you might wanna do later). GL
Posted By: Leonardo

Re: Login&Account System? - 06/17/08 13:51

I'm grown to the sweet ol' A6... laugh
Well, at least now I have a working account system.. I created the unique ID client-side (by using player_name, which is always unique, and then clipping 6 characters to form a number). And, of course I'm using an entity.
Speaking about MySQL, you should read posts more carefully....
Quote:
Right now, I have an MS Access Database (just for testing, because I don't want to install MySQL right now)


That means that I'm just testing some of the parts using Access... of course I'm going to use MySQL laugh
Posted By: fastlane69

Re: Login&Account System? - 06/17/08 16:27

Quote:
you should read posts more carefully....


Or maybe I shouldn't read them at all... sleep
© 2024 lite-C Forums