Divinity-X / Echeloned WoW .GPS System / Core? menu

User Tag List

Results 1 to 9 of 9
  1. #1
    Dridon's Avatar Member
    Reputation
    3
    Join Date
    Jan 2010
    Posts
    16
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Divinity-X / Echeloned WoW .GPS System / Core?

    When the old All-GM / Sandbox Building server Divinty-X / Echeloned WoW was still running they had a system where you could build stuff using a rock gameobject (a light-gray rectangle shaped rock) and by using .gps you could maneuver it perfectly, basically if you wanted to place 2 blocks on top of eachother you'd place a block, then use .gps 0 0 1.475 (with .gm fly on) and you'd spawn in perfect height to place another block exactly on top of the other, and then while still having fly on you could use .gps 0 -2.11 0 to go 1 block-size to the right and place another block. Basically what this allowed you to do was build perfectly aligned stuff using this block.

    My first question is: Does anyone know what gameobject I am talking about - was it a custom object or does it exist in for example TrinityCore?

    The second, and more important question is: Would it be possible to replicate this command somehow in TrinityCore, and if so, is anyone willing to point me in the right direction to do this? It would be really awesome to be able to use this system to build custom things on a trinity server.
    I know that there already is a .gps command in TrinityCore but it does not work the same way it did on this server.

    Basically I'm guessing to create this in Trinity you'd make a custom command which gets player X, Y, Z, MapID and stuff and then adds the values you enter with the command to that and then uses .go xyz or something.

    Here are all the commands (found in my old macros-cache.txt)

    Code:
    Rock Block: .go spa 526129 1
    Forward: .gps 3.17 0 0
    Backwards: .gps -3.17 0 0
    Down: .gps 0 0 -1.475
    Up: .gps 0 0 1.475
    Right: .gps 0 -2.11 0
    Left: .gps 0 2.11 0
    Basically, you insert values into the .gps (which in this case are the measurements of the Rock block) and it allows you to build with perfect measurements.

    Divinity-X / Echeloned WoW .GPS System / Core?
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    So the X Y Z axis in WoW works like this:



    O stands for orientation and is the way you are facing. O is a radian based system, so 2*Math.PI = 360 degrees.

    Your custom command just needs to get the nearest object to the player with a specified ID, check the range, and move it by some coordinates. You could even do this with Lua, if you are using the Eluna engine.

    TrinityCore is .go x y z mapid

    ArcEmu was (past-tense as it's dead): .go map x y z

    With some clever spell work (and/or memory editing) you can change the mouse cursor to show as a specific gameobject, then when the player left clicks it will send the exact coordinates and orientation he clicked at to the server. This requires client modifications though and is significantly more complicated.

    While I can't provide detailed guides for any of this, I can point you in the right direction: https://trinitycore.atlassian.net/wi...c/CustomScript

    I'm sure the specific model you are looking for exists somewhere but finding the specific display ID would be hard. I do not know which one you refer to from memory.
    Last edited by stoneharry; 06-10-2016 at 01:29 PM.

  3. #3
    Dridon's Avatar Member
    Reputation
    3
    Join Date
    Jan 2010
    Posts
    16
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Harry,

    I actually found the object and it turns out it's RedRidgeBuildBrick.m2 which is not standard in Trinity but I downloaded the "All Models to GameObjects" patch from here which is where the file exists (I am guessing that's what Divinity used).

    I think what you're trying to do is slightly more complicated than what I meant.

    Basically, what they had was a .gps command that you could enter whatever numbers you wanted. As so, typing .gps 5 0 0 would move you 5 coordinates north. Basically the commands I've written up (.gps 0 0 1.475 etc) are the commands that someone figured out is the measurements of this RedRidgeBridgeBlock.

    So what I did was just make a few custom commands that uses Trinity's TeleportTo and just add the measurements. Like this:
    Code:
    player->TeleportTo(player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()+1.475, player->GetOrientation());
    Seemed like the most simple solution for the time being. I'll see if I can come up with something better though, but this is what I'm going to be trying for now.

    Thanks for the reply anyway

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Dridon's Avatar Member
    Reputation
    3
    Join Date
    Jan 2010
    Posts
    16
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    Ah yes, that's way more complicated than what I was looking for. Well I've imported the 29k objects now so I'm going to go in-game and see if the coordinates are the same for these bricks in Trinity as it was on Divinity-X.

    Cheers!

    The only difference I know immediately is that I BELIEVE that using .gps 0 0 0 wasn't x y z but instead forward/backward, left/right and up/down. Basically, your orientation played a role in it since .gps 1 0 0 would ALWAYS bring you 1 cordinate forward (not north on the map, but always forward from your orientation), so you'd have to keep track of the orientation you had when you began building.
    Last edited by Dridon; 06-10-2016 at 01:24 PM.

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Dridon View Post
    Ah yes, that's way more complicated than what I was looking for. Well I've imported the 29k objects now so I'm going to go in-game and see if the coordinates are the same for these bricks in Trinity as it was on Divinity-X.

    Cheers!

    The only difference I know immediately is that I BELIEVE that using .gps 0 0 0 wasn't x y z but instead forward/backward, left/right and up/down. Basically, your orientation played a role in it since .gps 1 0 0 would ALWAYS bring you 1 cordinate forward (not north on the map, but always forward from your orientation), so you'd have to keep track of the orientation you had when you began building.
    You can change it to behave like that very easily, or you can create a new command to carry out that functionality.

  7. #7
    Dridon's Avatar Member
    Reputation
    3
    Join Date
    Jan 2010
    Posts
    16
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    You can change it to behave like that very easily, or you can create a new command to carry out that functionality.
    Any pointers how to do it?

    Currently like I said I got this:
    Code:
    static bool HandleBuildNorthCommand(ChatHandler* handler, char const* args)
    	{
    		Player* player = handler->GetSession()->GetPlayer();
    
    		// Cancel if in flight
    		if (player->IsInFlight())
    		{
    			handler->PSendSysMessage("You cannot use this command while on a flight path.");
    			return true;
    		}
    		// uint32 mapid, floatx, floatz, floaty, floato, 
    		player->TeleportTo(player->GetMapId(), player->GetPositionX()+3.17, player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
    		return true;
    	}
    and repeat the code for west, south, east, up and down obviously.

    However I'm not sure how to get my orientation to be exactly 0, because if I use .gps to figure out my coordinates, then teleport to those exact coordinates but setting the orientation to 0, it never actually is 0, I get stuff like 0,04 and 0,037 but not 0. Which kinda makes it hard to build. (Temporarily fixed this by making a .build reset command that set my orientation to 0, not sure why that works when it doesn't work from in-game but it does).


    I would want to create something like what Divinity had though, so that instead of always having to be 0 orientation, you could just make sure you always start at the same orientation, would make it alot easier.



    It works really well so far
    Last edited by Dridon; 06-10-2016 at 01:40 PM.

  8. #8
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    cs_go.cpp
    Code:
       //teleport at coordinates, including Z and orientation
        static bool HandleGoXYZCommand(ChatHandler* handler, char const* args)
        {
            if (!*args)
                return false;
    
            Player* player = handler->GetSession()->GetPlayer();
    
            char* goX = strtok((char*)args, " ");
            char* goY = strtok(NULL, " ");
            char* goZ = strtok(NULL, " ");
            char* id = strtok(NULL, " ");
            char* port = strtok(NULL, " ");
    
            if (!goX || !goY)
                return false;
    
            float x = (float)atof(goX);
            float y = (float)atof(goY);
            float z;
            float ort = port ? (float)atof(port) : player->GetOrientation();
            uint32 mapId = id ? (uint32)atoi(id) : player->GetMapId();
    
            if (goZ)
            {
                z = (float)atof(goZ);
                if (!MapManager::IsValidMapCoord(mapId, x, y, z))
                {
                    handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
                    handler->SetSentErrorMessage(true);
                    return false;
                }
            }
            else
            {
                if (!MapManager::IsValidMapCoord(mapId, x, y))
                {
                    handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
                    handler->SetSentErrorMessage(true);
                    return false;
                }
                Map const* map = sMapMgr->CreateBaseMap(mapId);
                z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
            }
    
            // stop flight if need
            if (player->IsInFlight())
            {
                player->GetMotionMaster()->MovementExpired();
                player->CleanupAfterTaxiFlight();
            }
            // save only in non-flight case
            else
                player->SaveRecallPosition();
    
            player->TeleportTo(mapId, x, y, z, ort);
            return true;
        }
    So maybe this would work for example:

    Code:
        //teleport at coordinates, including Z and orientation
        static bool HandleGoXYZCommand(ChatHandler* handler, char const* args)
        {
            if (!*args)
                return false;
    
            Player* player = handler->GetSession()->GetPlayer();
    
            char* goX = strtok((char*)args, " ");
            char* goY = strtok(NULL, " ");
            char* goZ = strtok(NULL, " ");
            char* id = strtok(NULL, " ");
            char* port = strtok(NULL, " ");
    
            if (!goX || !goY)
                return false;
    
            float x = (float)atof(goX);
            float y = (float)atof(goY);
            float z = (float)atof(goZ);
            float ort = port ? (float)atof(port) : player->GetOrientation();
            uint32 mapId = id ? (uint32)atoi(id) : player->GetMapId();
    
            // stop flight if need
            if (player->IsInFlight())
            {
                player->GetMotionMaster()->MovementExpired();
                player->CleanupAfterTaxiFlight();
            }
            // save only in non-flight case
            else
                player->SaveRecallPosition();
    
            player->TeleportTo(mapId, player->GetPositionX() + x, player->GetPositionY() + y, player->GetPositionZ() + z, ort);
            return true;
        }
    Untested. But you save the X, Y, and Z that has been input through the chat, then when you teleport the player send them to their current location plus those input values. Orientation I made it go to what you set rather than adding to it.

    Orientation works in radians, so it will always look like weird values looking at the raw number. Degree to Radian comparison:



    Also every value is a float, and floats can never be exactly zero due to how it works (I think from memory).

    A float is made up of a mantissa and exponent, in a two's complement form. The mantissa is multiplied by the exponent from memory.

    This diagram makes things clearer:

    Last edited by stoneharry; 06-10-2016 at 01:49 PM.

  9. #9
    Dridon's Avatar Member
    Reputation
    3
    Join Date
    Jan 2010
    Posts
    16
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems that atleast using my command I can get exactly 0 orientation.


    Anyway, adapting your edited cs_go.cpp command and making it a new command just called .xyz instead (because I don't want to mess around with existing code atm), basically it works the same as my .build north/south/west/east/up/down except the fact that you can put your own coordinates. So basically, it's nice. Now the only thing I need to figure out is if it's possible to have it always add the x/y/z to your current orientation. Basically, if you're facing south and type .xyz 5 0 0, instead of going 5 coordinates north, you would go 5 coordinates forward (south).

    Basically, instead of xyz I need forward/backward, left/right, up/down

Similar Threads

  1. Emerald dream on echeloned wow-3.2.2a
    By Naxxar26 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 11-23-2009, 09:11 AM
  2. Make WoW uses all Cores Intel Quad Core Support
    By deinvaddha in forum World of Warcraft Guides
    Replies: 4
    Last Post: 05-20-2009, 10:07 AM
  3. WoW Achievement System Unveiled
    By Billy in forum World of Warcraft General
    Replies: 0
    Last Post: 07-18-2008, 12:36 PM
  4. How to get more Performance In WoW (For Dual Core Processors)
    By xibus in forum World of Warcraft Guides
    Replies: 8
    Last Post: 03-04-2008, 07:19 AM
  5. [Video Guide] how to get around wow afk system FUNNY WAY
    By InternetExplorer in forum World of Warcraft Guides
    Replies: 12
    Last Post: 02-18-2008, 10:29 PM
All times are GMT -5. The time now is 05:17 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search