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)

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #30 on: January 29, 2013, 08:15:50 am »
Hello everyone, it is possible to send messages by the AuthSocket :: _HandleRealmList () and intercept by the lua but it does not correspond to my needs. I'll have to return to the CharacterHandler.cpp for the future and try to delete a character that does not exist ...

PS:
Google translate is my friend.

Bonjour tout le monde, il est donc possible d'envoyer des messages par le AuthSocket::_HandleRealmList() et de les intercepter par le lua mais cela ne correspond pas à mes besoins. Je vais devoir retourner dans le CharacterHandler.cpp pour la suite et essayer d'effacer un personnage qui n'existe pas ...

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #31 on: February 09, 2013, 01:31:39 pm »
Hello everyone, the project is progressing in small steps but advance.
I can now delete my fictional character, is to correct some details. How we do when there are already 10 characters?

PS:
Google translate is my friend.

Bonjour tout le monde, le projet avance à petits pas mais il avance.
J'arrive maintenant à effacer mon personnage fictif, reste à corriger quelques détails. On fait comment quand il y a déjà 10 personnages?

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #32 on: February 09, 2013, 01:56:59 pm »
I guess, you can send the request anyway. Is it really blocked by the client?
« 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 #33 on: February 11, 2013, 08:16:40 am »
If I understand correctly, the client side, you can send a message to a character in the game by using its guid as a mailing address if not the message can not reach. Server side, except in the realm can send messages via chat procedures.
In character selection page, there is no character to choose and therefore no guid, there is just a guid used for the account.
I do not think it was intended client side to receive a chat message in the character selection page because it will not for a particular purpose.
But sure I can be wrong.

PS:
Google translate is my friend.

Si j'ai bien compris, coté client, on ne peut envoyer de message qu'à un personnage dans le jeu en se servant de son guid comme d'une adresse postale sinon le message ne peut pas aboutir. Coté serveur, hormis dans le realm on peut envoyer des messages par les procédures de chat.
Dans la page de selection des personnages, il n'y a aucun personnage de selectioner et donc pas de guid, il y a  juste un guid servant pour le compte.
Je ne pense pas qu'il ait été prévu coté client de recevoir un message de chat dans la page de selection des personnages car cela n'aurai pas d'utilité particulière.
Mais bien sure je peut me tromper.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #34 on: February 18, 2013, 08:15:00 am »
Hello everyone, after having solved a lot of small problems, I consider this part to be completed. Currently the server sends information to the client recovers, analysis and used as a key. The player includes code validation and after the client back to the server for analysis. Then the server responds favorably or not. After five unsuccessful attempts the client closes.
It remains for me to do some cleaning in the code to save the validation code in the db and I can move on.

PS:
Google translate is my friend.

Bonjour tout le monde, après avoir résolu pas mal de petits problèmes, je considère cette partie comme terminée. A l'heure actuelle le serveur envoie une information au client qui la récupère, l'analyse et l'utilise comme une clé. Le joueur compose son code et après validation le client la renvoie au serveur pour analyse. Ensuite le serveur répond favorablement ou pas. Après cinq essais infructueux le client se ferme.
Il ne me reste plus qu'a faire un peu de ménage dans le code, à enregistrer le code de validation dans la db et je pourrai passer à la suite.

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [LUA] [QUESTION] how send message to the server ...
« Reply #35 on: February 18, 2013, 07:32:25 pm »
Congratulations. :)
« 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 #36 on: February 19, 2013, 07:32:02 am »
Merci beaucoup stoneharry.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #37 on: February 22, 2013, 08:03:01 am »
Good day good people, putting some order in the lua code changes, I finally found what I was wanting to ask the server to update the list of characters instead of deleting them. This allows me to send a list of all information and then reapply the server the list of characters. In the server, simply place a flag that determines whether the information has been sent. This makes the code much simpler and avoids having to ask the server to delete one by one fictional characters supporting information.

PS:
Google translate is my friend.

Bien le bonjour brave gens, en mettant un peu d'ordre dans les modifications du code lua, j'ai fini par trouver ce qu'il me manquait pour demander au serveur de réactualiser la liste des personnages au lieu de les effacer. Ce qui me permet d'envoyer tout une liste d'informations et ensuite de redemander au serveur la liste des personnages. Dans le serveur, il suffit de placer un drapeau qui détermine si les informations ont été envoyées. Cela rend le code beaucoup plus simple et évite d'avoir à demander au serveur d'effacer un par un les personnages fictifs porteur des informations.

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #38 on: February 22, 2013, 08:50:15 am »
Mind sharing the code? For science and optimization?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #39 on: February 22, 2013, 01:26:54 pm »
Yes, but not almost. I would not do a tutorial for that because I happened to find on the net with the only modification the creator ... So without comment.
But since you helped me to better understand and guide my research, I will explain the principle of the forum, and for those who participated actively in MP if necessary.
In this way I share my general knowledge about the problem with the forum and the finer points with those who were willing to help me by participating in the discution in the discution actively..

PS:
Google translate is my friend.

Oui mais non, enfin presque. Je ne ferais pas de tutoriel pour ça car il m'est arrivé d'en retrouver sur le net avec comme seule modification le nom du créateur ...  sans commentaire donc.
Mais vu que vous m'avez aidé à mieux comprendre et orienter mes recherches, je vous en expliquerai le principe sur le forum, et pour ceux qui ont participés de façon active par MP si nécéssaire.
De cette façon je partagerai mes connaissances générales sur le problème avec le forum et les points plus délicats avec ceux qui ont bien voulu m'aider en participant à la discution de façon active.

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #40 on: February 24, 2013, 10:09:52 am »
Le niveau demandé est assez élevé alors lisez, lisez ...
Je n'aiderai pas plus que ça alors à vous de lire et de comprendre car j'y ai passé plus de six mois dessus pour comprendre le principe et l'experimenter afin d'obtenir un résultat trés interressant ... à vous de jouer maintenant.
Un grand merci à Alborq pour son aide ainsi qu'à stoneharry et schlumpf pour leurs participations.

The requested level is high enough then read, read ...
I do not help you more than that then you read and understand because I spent more than six months to understand the above principle and experiment to obtain a result very interresting ... your turn now.
A big thank you for helping to Alborq stoneharry as well as for their participation and schlumpf.



Well, here is an explanation of principle, I say.

MY initial idea:
Ask the player once logger, kindly enter the code hautentification.

The problem:
Client side, there is no messaging possible on the selection page of the characters, not sending or reception of message.
Server side, no particular problem since I work on the source.

Solutions:
The client sends and receives information such as the server, for short; during character creation ...

problems:
There is a control over the name that is made ​​by the customer during the character creation so it must remain standard but not the reception of the name.

Solution principle :
To send a message to the server, lua, I request the creation of a fictional character whose name contains my message.
To receive a message, the server sends a fictitious name with the message.

Some restrictions, however, messages must be received at the beginning of the creation of the character selection page, in my case this is quite what I'm looking, it will also delete these characters because they are fictitious and their name does not match nothing for the player.
No more than ten names if the customer does its job of blocking ...
For sending messages on the client side must remain standard if the client ...

As I try to send or receive MY message, I should be able to differentiate it from others, that I decided to use a header such as client side:

To send "MSG" header beginning and "W" end of message
In reception: "MSG_"

PS:
Google translate is my friend.

Bien, voici donc une explication de principe je dirai.

MON idée de départ :
Demander au joueur, une fois logger, de bien vouloir entrer un code d'hautentification.

Le problème :
Coté client, il n'y a pas de messagerie possible sur la page de selection des personnages, donc pas d'envoi ni de reception de message.
Coté serveur, pas de problème particulier puisque je travail sur le source.

Les solutions :
Le client envoie et reçoit des informations au serveur comme par exemple; pour faire plus court; lors de la création de personnages ...

Problèmes :
Il y a un controle sur le nom qui est fait par le client lors de la création du personnage donc il faut rester standard mais pas sur la reception du nom.

Solution de principe :
Pour envoyer un message au serveur, en lua, je demande la création d'un personnage fictif dont le nom contient mon message.
Pour recevoir un message, le serveur envoi un nom fictif contenant le message.

Quelques restrictions cependant, les messages doivent parvenir au début de la création de la page de selection des personnages, dans mon cas cela correspond tout à fait à ce que je recherche, il faudra aussi effacer ces personnages car ils sont fictifs et leur nom ne correspond à rien pour le joueur.
Pas plus de dix noms sinon le client fait son travail de blocage ...
Pour l'envoi de messages coté client il faut rester standard sinon le client ...

Comme je cherche à envoyer ou à recevoir MON message, je dois pouvoir le différencier des autres, pour cela je décide d'utiliser une entète comme par exemple coté client :

Pour l'envoie : "MSG" en entète de début et "W" en fin de message
En reception : "MSG_"

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #41 on: February 24, 2013, 10:13:51 pm »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #42 on: March 01, 2013, 09:34:56 pm »
I'm a little busy right now, but I think of you.

Je suis un peu occupé en ce moment, mais je pense à vous.

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #43 on: March 01, 2013, 10:06:05 pm »
Thanks for sharing the full process of how you achieved what you have implemented. ;)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [SOLVED] [LUA] [QUESTION] how send message to the server
« Reply #44 on: March 02, 2013, 11:36:30 pm »