Jump to content

SungmaHee Tower Official Servers (C++, Python)


Recommended Posts

  • 2 months later...
  • Premium

Thank you for contribution, I am in the range of the map and so on but when accessing from the panel I have this error.

WarpSet: cannot find map location index 0 x 996700 y 705000 name

░▒▓█►─═ Ⓕⓘⓖⓗⓣ ⓕⓞⓡ ⓨⓞⓤⓡ ⓓⓡⓔⓐⓜⓢ    ,⃝ ⓝⓔⓥⓔⓡ ⓢⓣⓞⓟ    .⃝ ═─◄█▓▒░

Link to comment
Share on other sites

  • 1 month later...
On 5/4/2024 at 1:54 AM, ?????? said:

Thank you for contribution, I am in the range of the map and so on but when accessing from the panel I have this error.

WarpSet: cannot find map location index 0 x 996700 y 705000 name

Modify this function like this:

 

	bool SmhT::Access(LPCHARACTER pChar)
	{
		if (!pChar)
			return false;

		long lNormalMapIndex = (long)MAP_INDEX;
		PIXEL_POSITION pos = GetXYZ(), posSub = GetSubXYZ();

		if (!pos.x)
		{
			LPSECTREE_MAP pkSectreeMap = SECTREE_MANAGER::instance().GetMap((long)(SungmaHeeTower::MAP_INDEX));
			if (pkSectreeMap)
				SetXYZ(pkSectreeMap->m_setting.iBaseX, pkSectreeMap->m_setting.iBaseY, 0);
		}
			
		if (!posSub.x)
		{
			LPSECTREE_MAP pkSectreeMap = SECTREE_MANAGER::instance().GetMap((long)(SungmaHeeTower::SUBMAP_INDEX));
			if (pkSectreeMap)
				SetSubXYZ(pkSectreeMap->m_setting.iBaseX, pkSectreeMap->m_setting.iBaseY, 0);
		}

		long lMapIndex = SECTREE_MANAGER::instance().CreatePrivateMap(lNormalMapIndex);

		if (!lMapIndex)
		{
			pChar->ChatPacket(CHAT_TYPE_INFO, "An error ocurred during map creation.");
			return false;
		}

		SmhTMap *pMap;

		pMap = M2_NEW SmhTMap(lMapIndex);

		if (pMap)
		{
			m_dwRegGroups.insert(std::make_pair(lMapIndex, pMap));

			PIXEL_POSITION mPos;
			if (!SECTREE_MANAGER::instance().GetRecallPositionByEmpire((int)(MAP_INDEX), 0, mPos))
			{
				pChar->ChatPacket(CHAT_TYPE_INFO, "Sectree Error get recall position.");
				return true;
			}

			if(pChar)
			{
				pChar->SaveExitLocation();
				// Calculate the correct warp coordinates
				int newX = 947200; // Correct X coordinate
				int newY = 614400; // Correct Y coordinate

				pChar->WarpSet(newX+403*100, newY+458*100, pMap->GetMapIndex());
			}

			return true;
		}
	}

That is what I did and it works perfectly.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.