This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [SOLVED] [LUA] [QUESTION] how send message to the server ...  (Read 13765 times)

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #15 on: December 13, 2012, 12:07:02 am »
Stoneharry: The client does some kind of validation itself. The same as for guild bank tabs, arena team, guilds and pet names.

Your string needs to pass SUniConvertUTF8to16 (converting between UTF8 and Unicode-16).
You should set the cvar forceEnglishNames to false, at least temporary.
Names are validated with charsetMask = -1, thus each character needs to fulfill either IsAlphaLatin1, IsAlphaEnglish, IsAlphaRussian, IsAlphaKorean or IsAlphaChinese.
You need to not match any of reservedNameTokens, chatProfanityTokens or profanityTokens, which are defined in a DBC, thus can just be all removed.

To my information, you can send up to 0x2F bytes of information. You could also send up to 0x3A bytes by setting stuff like selectedClassID.
You could also add additional info by choosing CGlueMgr::RaceChange, ::FactionChange, ::CustomizeCharacter or ::CreateCharacter, adding another two bit (four values).

In the end, just send alpha characters only, while taking advantage of sending Unicode alpha characters as well.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #16 on: December 13, 2012, 11:02:37 pm »
Thank you for all this information. I still have a few issues regarding this understanding to translation and technical side of things but overall it's okay.
When I use CreateCharacter a warning window appears which makes its use a bit tricky because you have to validate every time. I'll try to neutralize the famous window that seems difficult but not impossible.

Stoneharry:
Before CreateCharacter execute () must initialize the data on a new character by ResetCharCustomize () otherwise the crash.

PS:
Google translate is my friend.

Merci pour toutes ces indications. J'ai malgré tout quelques difficultées de compréhension dû à la traduction et au coté technique de la chose mais dans l'ensemble ça va.
Lorsque j'utilise CreateCharacter une fenêtre d'avertissement apparait ce qui rend son utilisation un peu délicate car il faut la valider à chaque fois. Je vais donc essayer de neutraliser cette fameuse fenêtre ce qui me parait difficile mais pas impossible.

Stoneharry:
Avant d'executer CreateCharacter() il faut initialiser les données relative à un nouveau personnage par ResetCharCustomize() sinon c'est le crash.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #18 on: December 15, 2012, 12:23:54 pm »
Quote from: "noc"
When I use CreateCharacter a warning window appears which makes its use a bit tricky because you have to validate every time. I'll try to neutralize the famous window that seems difficult but not impossible.

PS:
Google translate is my friend.

Lorsque j'utilise CreateCharacter une fenêtre d'avertissement apparait ce qui rend son utilisation un peu délicate car il faut la valider à chaque fois. Je vais donc essayer de neutraliser cette fameuse fenêtre ce qui me parait difficile mais pas impossible.

Yeah, well, I'm definitely an idiot ... as you see ... this famous window is simply the client waits for the response from the server during the creation of the personage, snif, sorry, snif ... I will never again ... until next time.
It remains only to send him a positive response to see more ... the next episode.

PS:
Google translate is my friend.

Oui, et bien,  je suis définitivement idiot ... car voyez vous ... cette fameuse fenêtre c'est tout simplement le client qui attend la réponse du serveur lors de la creation du personage, snif, désolé, snif ... je ne recommencerai plus ... jusqu'à la prochaine fois.
Il ne reste plus qu'à lui renvoyer une reponse positive pour voir la suite ... au prochain épisode.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #19 on: December 16, 2012, 01:30:40 am »
Good news, server-side reception works, the answer too. Client side, sending works, the window is "neutralized."
Remains to be seen: Sending information to the client. Next episode ...


PS:
Google translate is my friend.

Bonnes nouvelles, coté serveur la reception fonctionne, la réponse aussi. Coté client, l'envoi fonctionne, la fenêtre est "neutralisée".
Reste à voir : Envoi d'informations vers le client. Suite au prochain épisode ...

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #20 on: December 21, 2012, 12:44:58 am »
Hi,
For my project, I have not find another solution for sending information to add a fictional character whose name serves me a message. Remains off the list because there is no place.
I would have preferred to use GetRealmInfo but I do not know ... after take
If someone has another idea I'm interested.

PS:
Google translate is my friend.

Bonsoir,
Pour mon projet, je n'ai pas trouvé d'autre solution pour envoyer des informations que de rajouter un personnage fictif dont le nom me sert de message. Reste à l'enlever de la liste car il n'y a pas sa place.
J'aurai préféré utiliser le GetRealmInfo mais je ne sais pas par bout le prendre ...
Si quelqu'un a une autre idée je suis preneur.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #21 on: December 31, 2012, 08:51:59 pm »
Good evening everyone, two new small way. The first is that it is long, very very long unfortunately. I have not been able to understand how the server sends the client realmlist. The second is that you can send to the client names a length greater than 12 characters.

PS:
Google translate is my friend.

Bonsoir tout le monde, deux petites nouvelles en passant. La première c'est que c'est long, trés trés long hélas. Je n'ai pas réussi à comprendre comment le serveur envoie la realmlist au client. La deuxième c'est que l'on peut envoyer au client des noms d'une longueur supèrieur à 12 caractères.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #22 on: January 16, 2013, 11:39:40 pm »
Hello everyone, I'm a little busy right now, so I will take the matter a little later by a week, two at most.

PS:
Google translate is my friend.

Bonsoir tout le monde, je suis un peu occupé en ce moment, aussi je reprendrai le sujet un peu plus tard d'ici une semaine, deux au plus.

detonatorss

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 233
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #23 on: January 17, 2013, 11:20:03 am »
noc how do you make the security question in screen?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Desktop


Laptop

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #24 on: January 17, 2013, 11:27:28 am »
On the security one: Why not use the matrix from Blizzard?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #25 on: January 17, 2013, 12:59:45 pm »
Quote from: "schlumpf"
On the security one: Why not use the matrix from Blizzard?

Context:
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #26 on: January 17, 2013, 10:19:00 pm »
Quote from: "detonatorss"
noc how do you make the security question in screen?


As you can see, there's no secret question.
When the player registers, he gave his login, password and a code of between 4 and 6 figures will be asked by the server. Logged after the server sends a series of values ​​corresponding to the keys of a keyboard, obviously random values​​, then just copy the code after confirmation will be sent to the server that will control ...
It is a bit like a authentificator fixed value, but who knows if ...

PS:
Google translate is my friend.


Comme vous pouvez le voir, il n'y a pas de question secrete.
Lorsque le joueur s'inscrit, il donne son login, son mot de passe et un code compris entre 4 et 6 chiffres qui lui sera demandé par le serveur. Après s'être logué le serveur envoie une serie de valeurs correspondant aux touches d'un clavier, valeurs aléatoires evidemment, ensuite il suffit de reproduire le code qui après validation sera envoyé au serveur qui le controlera ...
C'est un peu comme un authentificator à valeur fixe, mais qui sait si ...

Quote from: "schlumpf"
On the security one: Why not use the matrix from Blizzard?

Because it already exists, and it does not match what I want to do, quite simply.

PS:
Google translate is my friend.

Parce que cela existe déjà, et que cela ne correspond pas à ce que je cherche à faire, tout simplement.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #27 on: January 25, 2013, 10:38:09 am »
Good day to you all, a few new way.
The track realmlist seems to be a good solution for now. I could divert AuthSocket.cpp two routines for sending the message, but the client hangs when loading the list of characters. The routine seems to work but the client crashes, I probably lack of information ... case to be continued.

PS:
Google translate is my friend.

Bien le bonjour à toutes et à tous, quelques petites nouvelles en passant.
La piste du realmlist semble etre la bonne solution pour l'instant. J'ai pu détourner deux routines du AuthSocket.cpp pour l'envoie du message mais le client se bloque au chargement de la liste des personnages. La routine semble fonctionner mais le client se bloque, il me manque sans doute des informations ... affaire à suivre donc.

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #28 on: January 25, 2013, 02:52:09 pm »
Quote from: "noc"
Good day to you all, a few new way.
The track realmlist seems to be a good solution for now. I could divert AuthSocket.cpp two routines for sending the message, but the client hangs when loading the list of characters. The routine seems to work but the client crashes, I probably lack of information ... case to be continued.

PS:
Google translate is my friend.

Bien le bonjour à toutes et à tous, quelques petites nouvelles en passant.
La piste du realmlist semble etre la bonne solution pour l'instant. J'ai pu détourner deux routines du AuthSocket.cpp pour l'envoie du message mais le client se bloque au chargement de la liste des personnages. La routine semble fonctionner mais le client se bloque, il me manque sans doute des informations ... affaire à suivre donc.

You can communicate on the login screen by attempting to login with certain usernames, and the server response is which error code. Hide this from the client.

E.g: http://pastebin.com/Cgdpt8Py
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #29 on: January 26, 2013, 08:05:49 am »
Thank you for this information, superb your code.
I noticed that you can send to the client names longer than expected, the problem is that they appear in the list of characters. For they do not appear in the list, simply intercept, then they should simply remove from the list. Personally I'm looking for something more flexible because if I can find I could send information or other guild.

PS:
Google translate is my friend.

Merci pour ces informations, superbe votre code.
J'avais remarqué que l'on pouvez envoyer au client des noms plus long que prévu, le problème c'est qu'ils apparaissent dans la liste des personnages. Pour qu'ils n'apparaissent pas dans la liste, il suffit de les intercepter, ensuite il faut les suprimer de la liste. Personnellement je recherche quelque chose de plus souple car si j'arrive à trouver je pourrais envoyer des informations de guilde ou autres.