Teleport from the Arena to Lorenchia constantly

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts

    Question Teleport from the Arena to Lorenchia constantly

    Hello, friends!
    I am use this server file, source codes: IGCN - MuEmu Server Season 12 ep 2 + Sources
    In general, I reached the settlement of the arena, filled up to half, and I can’t do the second half because it constantly teleports me to Lorencia. But before that, he throws back a couple of times to the initial position. I understand that somewhere there is a check for speed-hack, but so far I have not been able to once-in-law. My friends I ask you for help from the jack of the Ragezone club

    PS: I apologize for my English. For the translation, I took advantage of Translate.google.com

    - - - Updated - - -

    I launched into debugging and finally found it, tell me how to fix pliz.

    GameServer->user.cpp->BOOL gObjCheckXYMapTile(LPOBJ lpObj, int iDbgName);
    Code:
    ...
        BYTE attr = MapC[mapnumber].GetAttr(x, y);
    
        if ( (attr&4) == 4 || (attr&8) == 8 )
        {
            BYTE attr2 = MapC[mapnumber].GetAttr(x+2, y);
            BYTE attr3 = MapC[mapnumber].GetAttr(x, y+2);
            BYTE attr4 = MapC[mapnumber].GetAttr(x-2, y);
            BYTE attr5 = MapC[mapnumber].GetAttr(x, y-2);
    
            if ( attr2 > 1 && attr3 > 1 && attr4 > 1 && attr5 > 1 )
            {
    g_Log.Add("[ CHECK POSITION ] DbgName[%d] [%s][%s] Map[%d]-(%d,%d) Invalid location causes to force to move",iDbgName,lpObj->AccountID, lpObj->Name, lpObj->MapNumber, lpObj->X, lpObj->Y);
                
                PMSG_TELEPORT pMsg;
    
                if (IT_MAP_RANGE(lpObj->MapNumber))
                {
                    if (g_IT_Event.GetIllusionTempleState(lpObj->MapNumber) == 2)
                    {
                        BYTE btTeam = g_IT_Event.GetUserTeam(lpObj->MapNumber, lpObj->m_Index);
    
                        if (btTeam == 0xFF)
                        {
                            pMsg.MoveNumber = 17;
                        }
    
                        else if (btTeam == 1)
                        {
                            pMsg.MoveNumber = lpObj->MapNumber + 109;
                        }
    
                        else if (btTeam == 0)
                        {
                            pMsg.MoveNumber = lpObj->MapNumber + 103;
                        }
    
                        else
                        {
                            pMsg.MoveNumber = 17;
                        }
                    }
    
                    else
                    {
                        pMsg.MoveNumber = 17;
                    }
    
                    gObjMoveGate(lpObj->m_Index, pMsg.MoveNumber);
                    return TRUE;
                }
    
                else if (lpObj->MapNumber == MAP_INDEX_DEVILSQUARE_FINAL && g_DevilSquareFinal.m_btDSFCurState == 2)
                {
                    if (g_DevilSquareFinal.GetUserTeam(lpObj->m_Index) == -1)
                    {
                        pMsg.MoveNumber = 17;
                    }
    
                    else
                    {
                        pMsg.MoveNumber = 474;
                    }
    
                    gObjMoveGate(lpObj->m_Index, pMsg.MoveNumber);
                    return TRUE;
                }
    
                else
                {
                    gObjMoveGate(lpObj->m_Index, 17);
                    return TRUE;
                }
            }
    }
      return TRUE;

    Code:
    gObjMoveGate(lpObj->m_Index, pMsg.MoveNumber); // this is  move my to lorencia ))
    return TRUE;


  2. #2
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts
    The problem can actually be from the terrain file. You are using the same terrain file in the server and client? Both have to be the same, otherwise the server can't calculate the "geodata" of the map. By bad position or missing tiles in Terrain file, the server side calculation can trigger the "Safe Teleporting" mechanism just to prevent players not getting stuck or abuse such locations. That's why you are getting teleported.

    In the client/Data folder, search for the World folder of specific map and copy and replace the .att file from the server. (Terrain7.att I think is for Arena, but not sure).

  3. #3
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts
    Quote Originally Posted by zipper20032 View Post
    The problem can actually be from the terrain file. You are using the same terrain file in the server and client? Both have to be the same, otherwise the server can't calculate the "geodata" of the map. By bad position or missing tiles in Terrain file, the server side calculation can trigger the "Safe Teleporting" mechanism just to prevent players not getting stuck or abuse such locations. That's why you are getting teleported.

    In the client/Data folder, search for the World folder of specific map and copy and replace the .att file from the server. (Terrain7.att I think is for Arena, but not sure).
    Thanks for the answer!
    Do you mean to take this file from the client and insert into the server with a replacement?
    Is everything right? - But in the client, if I am not mistaken, the name of the files goes, the server_mar +1 will need to be renamed in accordance with server names or their names are identical?

    SERVER SIDE




    CLIENT SIDE
    I apologize for annoyance

    - - - Updated - - -

    I fulfilled your recommendation, unfortunately did not help.
    So far I have made a crutch
    Code:
        if ((attr & 4) == 4 || (attr & 8) == 8)
        {
            BYTE attr2 = MapC[mapnumber].GetAttr(x + 2, y);
            BYTE attr3 = MapC[mapnumber].GetAttr(x, y + 2);
            BYTE attr4 = MapC[mapnumber].GetAttr(x - 2, y);
            BYTE attr5 = MapC[mapnumber].GetAttr(x, y - 2);
    
            if (lpObj->MapNumber == 6) { //My Crutch
    
                return FALSE;
            }
    Last edited by Dezi; 21-08-22 at 02:09 PM.

  4. #4
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts
    Yes, you can do that bypass in the source, but not sure if it's gonna have consequences.

    Try testing the map with 2-3 characters at once.

  5. #5
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts
    Quote Originally Posted by zipper20032 View Post
    Yes, you can do that bypass in the source, but not sure if it's gonna have consequences.

    Try testing the map with 2-3 characters at once.
    Thank you, I'll try it! How will the result be published

  6. #6
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts
    Quote Originally Posted by zipper20032 View Post
    Yes, you can do that bypass in the source, but not sure if it's gonna have consequences.

    Try testing the map with 2-3 characters at once.
    In general, as you described the Church. I will listen to the advice to resolve this issue

  7. #7
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts
    Sorry, I have no idea what you tried to say there xD. What's the "Church"?
    You meant "source"?

  8. #8
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts
    i am soryy!
    I meant your advice, by solving my problem! Google translation works miracles)

  9. #9
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts
    Got it xD no worries. I hope it works.

  10. #10
    i am not sure i understand right but if in your files in arena map you get randomly teleported to other maps it should usually something be in gate.txt / gate file about arena coords line that u must remove, but we need more screenshots to see where exactly u get the issue or a simple video. Other than that u get any error in gameserver?

  11. #11
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts
    Quote Originally Posted by KarLi View Post
    i am not sure i understand right but if in your files in arena map you get randomly teleported to other maps it should usually something be in gate.txt / gate file about arena coords line that u must remove, but we need more screenshots to see where exactly u get the issue or a simple video. Other than that u get any error in gameserver?
    Here's a video


    - - - Updated - - -

    Gate.txt extract from Lang.mpr
    Attached Files Attached Files
    Last edited by Dezi; 24-08-22 at 09:57 AM.

  12. #12
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts
    Interesting. I saw the video, and there's a problem, because the C1 5 ... error is a client to server data packet which maybe doesn't exist. Not sure why it would send that because I expected to see the CHECK POSITION error, but I will try to take a look to see what's with that packet.

    The second error (CHECK POSITION error) is indeed something regarding the position calculation from the terrain file (Terrain .ATT file). The attributes (attr2,3,4,5) are probably the map tiles at your character position cause I think it needs to load the map tiles in all direction.

    I've seen the Gate.txt and other files you've attached and seems that these are correctly configured.

    So, yes, I think the problem is in your Arena's Terrain ATT map file.
    There are 2 files in your client. It's EncTerrain and Terrain.

    Try these:
    First, try to replace Terrain7 (server) with EncTerrain (rename it to Terrain7). If GS is not opening, then go for the second.
    Second, try to replace Terrain7 (server) with Terrain7 from the client. Make sure you make back-ups for your files.

    And add a log below: "g_Log.Add("[CHECK POSITION]"....)"
    Code:
    g_Log.Add("[ CHECK ATTR2,3,4,5] Attr2:%d - Attr3:%d - Attr4:%d - Attr5:%d", attr2, attr3, attr4, attr5);
    



    Last edited by zipper20032; 23-08-22 at 02:05 PM.

  13. #13
    Enthusiast Dezi is offline
    MemberRank
    Jun 2016 Join Date
    Кишинёв,Location
    33Posts
    Did all your actions! In the first two replacements, I was teleporter from the first step in Lorenicia, and when I hoped it from the server to the client with the renaming of the file, the problem again became the same



  14. #14
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    663Posts
    Can you try a different arena map files from other client and replace the Terrain again for the map in the server? It could be something wrong with the map itself.

  15. #15
    what it looks like its that terrain server side.att and client side are not matching, so it gives that error when it moves u to lorencia @Dezi you have to convert arena encterrain7.att to server side with number 6 map and save it to .att then add in your igcdata,terrain folder as 00_lorencia.att ore lorencia.att (replace the existing file) then restart the server and client and recheck. Alternatively if there is config to switch 'check position' of player it should be somewhere in the files, like AntiHack.cfg in data for example or IGC_Common.cfg

    for example in antihack cfg try change

    ; MOVING MAP HACK CHECK

    MovingHackCheck = 1
    MovingHackDistance = 15

    disable it to 0 and restart gs to see if thats the config make u move to lore (because ur server/client terrain dont match)
    Last edited by KarLi; 24-08-22 at 12:00 AM.



Page 1 of 2 12 LastLast

Advertisement