Jump to content

SeySayux

Members
  • Posts

    22
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by SeySayux

  1. Hello,

    As I'm planning to write my own MMO (just as a challenge, nothing big), I'm very intrested in how the internal handling of the distinction between login and game server works for MaNGOS.

    As the login and game servers are two separate servers, there has to be a way for them to communicate.

    This is how I visualize the login process:

    1) Enter nick/pass

    2) realmd authentificates nick/pass

    3) get realm list + character list from realmd

    4) Select realm and character

    5) Drop connection to realmd

    6) Connect to correct mangosd with selected character.

    Now, my question is about the transition between steps 5 and 6. Obviously, the server has to know that you are authentificated to log in with a certain character. How does that happen? I can think of a few solutions...

    1) Make some kind of hash key with player name and IP. Realmd has to send that to the client and to mangosd. Mangosd will need this hash to log in.

    2) Tell mangosd that a client from IP XYZ is going to log in with character ABC.

    Because the source code is quite complicated to read, and the protocol isn't well documented, I'd like to ask here if someone has some expertise with the login protocol.

    Thank you for your attention,

    - SeySayux

  2. Since this is a very common problem, I'm going to make this clear once and for all.

    You need to apply some SQL updates.

    "SQL updates? What's that? Never heard of those? Could you explain?"

    I'm glad you asked. Since the mangos db is huge, it would be a terrible pain in the backside to make a new full db dump with each revision. Therefore, they release a full database only so often, and you have to apply patches to make it up to date yourself.

    "Okay, makes sense. But where do I download those updates?"

    You probably already have them! They're in the sql/updates folder of your mangos checkout.. There are quite a lot of them, so you can't miss them. They're all in the form of rXXXX_NN_database_table.sql, where XXXX is a revision number, NN is the number of the update for that revision, database is a database (duh), table is the table they update, and sql is well... the extension of the file.

    "Whoa, that's monstrous! Do I need to apply all those?"

    No, not at all. You only need to apply updates with a version number higher than the current version of the db. Everything else is already just fine.

    "Yes, that makes sense too. But what version of DB am I using? Not the right one, it seems."

    That's where your error message can help you.

    ERROR:Table `db_version` have field `required_XXXX_01_(etc)` but expected `required_YYYY_01_(etc)`! Not all sql updates applied?
    

    Here is YYYY your current running revision, or the latest sql update for this revision. XXXX is the revision that's currently in your db. You need to update from XXXX to latest..

    "Okay, but that's still a lot. How am I ever going to do that?"

    That's where scripting comes in handy. In the examples below, substitute <username> for your mysql username, and <password> for your mysql password.

    First, copy all updates you need to a serperate folder. Next, open a shell and run the following script (depending on your OS):

    Windows:

    (I'm going to assume mysql is in your path. Also, you'll need Windows PowerShell. No, I'm not going to do a cmd.exe one. Ever.)

    foreach($table in "mangos characters realmd") {
       foreach($x in ls *$table*.sql) {
           mysql -u<username> -p<password> -e "source $x"
       }
    }
    

    Mac OS X, Linux, or anything that uses bash:

    for table in 'mangos characters realmd'; do
       for x in *$table*.sql; do
           mysql -u<username> -p<password> < $x
       done
    done
    

    "Whoa, great, everything worked! You saved my day! Thanks man! :cool:"

    No problem. You're welcome. :)

    "Erm... I'm getting a lot of errors. It still doesn't work."

    Try checking and double-checking if you did everything right. If you are sure, but I mean really sure you did everything right, open a new topic. If you did something wrong which was obviously explained in this FAQ, you'll be the laughing stack of the week. So you better be darn sure.

    If you have comments on how to improve this guide, please post!

    Note to mods: could this be stickied?

  3. You obviously missed all the other threads about the same thing, and oh yes, the FAQ thread.

    Seriously, could some admin make that one flash in red on the top of the board?

    EDIT: Seems you did find the theads and the FAQ. My apologies.

    The updates you're looking for are in the <mangos root>/sql/updates folder. Apply all updates with a revision above your current. Copy them to a serperate folder or such.

    To apply a patch, use:

    mysql -u<username> -p<password> <database> < patch.sql

    Where <username> is your sql username, <password> is your sql password, and <database> is mangos, realmd or characters depending on the second word of the patch.

    If you can use a Linux shell I'm sure you can work out a for with file globbing.

    If not, here's the solution:

    for table in 'mangos characters realmd'; do
    for x in *$table*.sql; do
    mysql -u<username> -p<password> $table < $x; 
    done; done

    That should do it :)

  4. 2. Read the "installation" guides in the SD2 forum to see if you have missed something.

    Check and double-check

    3. Have you really compiled mangos and SD2 correctly (check no. 2)?

    I assume so. I followed the instructions.

    4. Have you created the scriptdev2 database and applied the correct sql updates (check no. 2)?

    Yes.

    5. Have you applied the SD2 sql updates to the mangos database (check no. 2)?

    Check and double-check.

    6. Have you copied the scriptdev2.conf to the correct place?

    /opt/mangos/etc/, I suppose.

    7. What/How exactly did you update your server?

    git pull/svn up, applied all sql patches with release number higher than my running release, applied scriptdev2 sql stuff (the full.sqls), applied sd2 patch to mangos, autoreconf -ivf && make.

  5. do a ".se in" command in the server and will tell you what scripting library you using

    mangos>se in

    CLI command under processing...

    MaNGOS/0.16.0 (* * Revision 9796 - *) for Linux_x32 (little-endian)

    Using script library: ScriptDev2 (for MaNGOS 9641+) Revision [1679] 2010-04-24 20:42:21 (Unix)

    Using World DB: UDB 0.12.0 (388) for MaNGOS 9582 with SD2 SQL for rev. 1639

    Using creature EventAI: ACID 3.0.4 - Final Release for Mangos (3.3.2 Client)

    Online players: 0 (max: 1) Queued players: 0 (max: 0)

    Server uptime: 1 Hour(s) 52 Minute(s) 34 Second(s).

  6. Hi, I've some problems with my server. After an upgrade, I noticed my dungeons and creatures were suddenly scripted worse than before. So I descided to see what went wrong....

    Problem: Talking to guards don't give directions. Dungeons are unscripted.

    Likely Cause: ScriptDev2 wasn't properly installed.

    -> Check for ScriptDev2 installation: ScriptDev2 not correctly added to build system.

    Possible Solution: Apply ScriptDev2 patch.

    Result Guards still don't give directions.

    Likely cause: ScriptDev2 still not properly installed.

    -> Check if ScriptDev2 was properly installed: Build time took long enough. Messages about ScriptDev2 being compiled came over the screen. Copied compiled libmangosscript.so.0.0.0 manually to lib folder.

    Result: Guards still don't give directions.

    Likely Cause: Specific version of mangos is broken.

    Possible solution: Upgrade mangos and ScriptDev2

    Result: Guards still don't give directions.

    I'm using:

    Mangos r9796

    ScriptDev2 r1679

    Debian Linux 5.0 kernel 2.6.26-2 i586

    I'm at the end of my wits now. Could anyone tell me where I should look next?

    - SeySayux

    UPDATE: Using Playerbot patch.

  7. Hi,

    When using the GM .hover command, or the priest's levitate spell, the animation itself looks right when standing still, however, when moving, it looks like I'm running 30 cm above the ground (i.e. not 'floating' or something like that). I was wondering if this was a known bug, and what could be done about it.

    I've been digging somewhat in the code. I believe that the server notifies the client which animation to play using the MoveFlag enum. So, it should tell the client not to use the walking animation when running, but always use the hover animation if hover is activated. I tried removing all the MoveFlags and adding MOVEFLAG_HOVERING and MOVEFLAG_LEVITATE, but without success. Does anyone now more about this?

    - SeySayux

  8. Hi,

    Your using the wrong repository. We have been using git://github.com/blueboy/mangos.git since December last yesr. I have just updated it the be compatible with the latest MaNGOS[9573]

    Hope this helps

    I was thinking something like that (i.e. I was using the wrong repo). Anyways, thanks, I'll try this and see if it helps

  9. Hi, I just downloaded this patch. However, it seems it is terribly outdated (as in, lots of merge conflicts, using ints where enums should be, method names that have changed, etc...). As it's still actively developed, I'm quite sure I've done something wrong and/or downloaded a wrong revision. I'm using MaNGOS revision 9502. Can someone confirm this is still the correct source? git://github.com/playerbot/mangos.git

    - SeySayux

  10. ok so you can download the lastest mangos reversion

    here are some steps that might help you:

    1.Get git from http://git-scm.com/download if you have the windows version download it from the Win line

    2.After you install git make a directory somewere you want, for example i use : "mangos core" as my core directory

    3.After you create that directory right click on it and click GIT BASH here

    4.A console should open .After that you type this line there : "git clone git://github.com/mangos/mangos.git" without the "

    5.ok you now have the lastest mangos version , but you still need to compile it so if you have c++ installed (wich you should) just go into the win/mangosdVC90.sln

    6.When you are in you should select Release on the solution configuration up in the toolbar

    7.you are done.. compiling the last reversion

    NOTE: you don't scriptdev2 installed

    Traduction:

    Tu dois telecharger la version de mangos la plus recente. Voici les instructions:

    1) telechargez git de http://git-scm.com/download

    2) après que t'as installé git, crée un répertoire quelque place, par example "mangos core"

    3) apres que t'as créé ce répertoire, clicke-y la bouton droite et selectionne "GIT BASH"

    4) Une console se ouvre. Type-y "git clone git://github.com/mangos/mangos.git" sans les guillemets

    5) T'as la version de mangos le plus recente maintenant, mais tu dois le compiler encore, quand t'as installé MS C++, viens à win/mangosdVC90.sln

    6) Selectionne 'Release' sur la configuration de solution sur le barre d'outils

    7) Le dernier version commence a compiler maintenant. T'as fini.

    Notice: tu n'as pas scriptdev2 maintentant.

  11. Okay, let's start with making a scheme...

    1) You talk -- okay, that's possible right now :P

    2) Client registers speech through microphone -- that's client stuff (I don't know anything about hardware anyways)

    3) Client sends through voice in some codec -- Which one (speex, or another such as ogg)? What kind of protocol? Is the protocol similar to the normal protocol or an entirely different one?

    4) Server gets voice data -- that's where we kick in

    5) Server descides which clients get voice data -- distance between client locations?

    6) Voice data (loudness, ...) is modified according to relative position of clients. I guess this uses/could use OpenAL. Does this happen client-side (i.e. full voice data+location is send through) or server-side?

    7) Voice data is send through -- again, protocol?

    8) You can hear the voice if your speakers are turned up. -- client stuff again.

    So the main problems now are 2), 6), and 7). I'd need more info about that before I can start hacking. If there's someone that knows about/has already tried implementing voice chat, I'd be nice if I could contact him/her.

    - SeySayux

  12. Hi,

    Does anyone know if a patch has been made to implement voice chat already? If not, is information available about how it works (so I may attempt to write a patch myself)? Or a packet analyzer, etc... ?

    Status MaNGOS:

    Second menu is named "Sound". No options for Voice chat

    Status blizz:

    Second menu is named "Sound & Voice". On the left hand side there's a second tab for Voice that allows you to configure voice chat.

    Thanks,

    - SeySayux

  13. Hi,

    I'd like to create some new spells on my server. After digging in the source code, I found out that spells are listed in a DBC file. However, is it actually possible to add new spells without modifying the DBC file client-wise too? Do I need to do something else except for modifying the DBC file?

    In case it's not possible or otherwise very difficult to create new spells, is it possible to trigger the animation a spell uses? I.e. make a new dot-command that just plays the animation on your character and applies the effect of the spell, and put that in a macro.

    PS. I tried searching the forums, but I found nothing. If you have any intresting topics, please link :). Oh yes, I'm quite fluent in C++, MySQL, et. al. so that shouldn't be a problem.

    Thanks for your attention,

    - SeySayux

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use