Recall In Source!
Look at this func in game.cpp
RequestTeleportHandler
RequestTeleportHandler
Code: Select all
switch (pData[0]) {
case '0':
case '1':
ZeroMemory(cTempMapName, sizeof(cTempMapName));
if (m_pClientList[iClientH]->m_cSide == 0) {
strcpy(cTempMapName, "default");
}
else if (m_pClientList[iClientH]->m_iLevel > 80) {
if (m_pClientList[iClientH]->m_cSide == 1) {
strcpy(cTempMapName, "aresden");
}
else {
strcpy(cTempMapName, "elvine");
}
}
else if (m_pClientList[iClientH]->m_cSide == 1) {
strcpy(cTempMapName, "arefarm");
}
else {
strcpy(cTempMapName, "elvfarm");
}
if ((strcmp(m_pClientList[iClientH]->m_cLockedMapName, "NONE") != 0) && (m_pClientList[iClientH]->m_iLockedMapTime > 0)) {
bIsLockedMapNotify = TRUE;
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, m_pClientList[iClientH]->m_cLockedMapName);
}
for (i = 0; i < DEF_MAXMAPS; i++) {
if ((m_pMapList[i] != NULL) && (memcmp(m_pMapList[i]->m_cName, cTempMapName, 10) == 0)) {
GetMapInitialPoint(i, &m_pClientList[iClientH]->m_sX, &m_pClientList[iClientH]->m_sY, m_pClientList[iClientH]->m_cLocation);
m_pClientList[iClientH]->m_cMapIndex = i;
ZeroMemory(m_pClientList[iClientH]->m_cMapName, sizeof(m_pClientList[iClientH]->m_cMapName));
memcpy(m_pClientList[iClientH]->m_cMapName, m_pMapList[i]->m_cName, 10);
goto RTH_NEXTSTEP;
}
}
m_pClientList[iClientH]->m_sX = -1;
m_pClientList[iClientH]->m_sY = -1;
ZeroMemory(m_pClientList[iClientH]->m_cMapName, sizeof(m_pClientList[iClientH]->m_cMapName));
memcpy(m_pClientList[iClientH]->m_cMapName, cTempMapName, 10);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_MAGICEFFECTOFF, DEF_MAGICTYPE_CONFUSE, m_pClientList[iClientH]->m_cMagicEffectStatus[DEF_MAGICTYPE_CONFUSE], NULL, NULL);
SetSlateFlag(iClientH, DEF_NOTIFY_SLATECLEAR, FALSE);
bSendMsgToLS(MSGID_REQUEST_SAVEPLAYERDATA_REPLY, iClientH, FALSE, FALSE);
m_pClientList[iClientH]->m_bIsOnServerChange = TRUE;
m_pClientList[iClientH]->m_bIsOnWaitingProcess = TRUE;
return;
case '2':
if ((strcmp(m_pClientList[iClientH]->m_cLockedMapName, "NONE") != 0) &&
(m_pClientList[iClientH]->m_iLockedMapTime > 0) &&
(memcmp(cMapName, "resurr", 6) != 0)) {
dX = -1;
dY = -1;
bIsLockedMapNotify = TRUE;
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, m_pClientList[iClientH]->m_cLockedMapName);
}
else {
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, cMapName);
}
cMapIndex = iGetMapIndex(cTempMapName);
if (cMapIndex == -1) {
m_pClientList[iClientH]->m_sX = dX;
m_pClientList[iClientH]->m_sY = dY;
ZeroMemory(m_pClientList[iClientH]->m_cMapName, sizeof(m_pClientList[iClientH]->m_cMapName));
memcpy(m_pClientList[iClientH]->m_cMapName, cTempMapName, 10);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_MAGICEFFECTOFF, DEF_MAGICTYPE_CONFUSE, m_pClientList[iClientH]->m_cMagicEffectStatus[DEF_MAGICTYPE_CONFUSE], NULL, NULL);
SetSlateFlag(iClientH, DEF_NOTIFY_SLATECLEAR, FALSE);
bSendMsgToLS(MSGID_REQUEST_SAVEPLAYERDATA_REPLY, iClientH, FALSE);
m_pClientList[iClientH]->m_bIsOnServerChange = TRUE;
m_pClientList[iClientH]->m_bIsOnWaitingProcess = TRUE;
return;
}
m_pClientList[iClientH]->m_sX = dX;
m_pClientList[iClientH]->m_sY = dY;
m_pClientList[iClientH]->m_cMapIndex = cMapIndex;
ZeroMemory(m_pClientList[iClientH]->m_cMapName, sizeof(m_pClientList[iClientH]->m_cMapName));
memcpy(m_pClientList[iClientH]->m_cMapName, m_pMapList[cMapIndex]->m_cName, 10);
goto RTH_NEXTSTEP;
case '3':
if ((strcmp(m_pClientList[iClientH]->m_cLockedMapName, "NONE") != 0) &&
(m_pClientList[iClientH]->m_iLockedMapTime > 0) &&
(memcmp(cMapName, "resurr", 6) != 0)) {
dX = -1;
dY = -1;
bIsLockedMapNotify = TRUE;
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, m_pClientList[iClientH]->m_cLockedMapName);
}
else {
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, cMapName);
}
cMapIndex = iGetMapIndex(cTempMapName);
if (cMapIndex == -1) {
m_pClientList[iClientH]->m_sX = dX;
m_pClientList[iClientH]->m_sY = dY;
ZeroMemory(m_pClientList[iClientH]->m_cMapName, sizeof(m_pClientList[iClientH]->m_cMapName));
memcpy(m_pClientList[iClientH]->m_cMapName, cTempMapName, 10);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_MAGICEFFECTOFF, DEF_MAGICTYPE_CONFUSE, m_pClientList[iClientH]->m_cMagicEffectStatus[DEF_MAGICTYPE_CONFUSE], NULL, NULL);
SetSlateFlag(iClientH, DEF_NOTIFY_SLATECLEAR, FALSE);
bSendMsgToLS(MSGID_REQUEST_SAVEPLAYERDATA_REPLY, iClientH, FALSE);
m_pClientList[iClientH]->m_bIsOnServerChange = TRUE;
m_pClientList[iClientH]->m_bIsOnWaitingProcess = TRUE;
return;
}
m_pClientList[iClientH]->m_sX = dX;
m_pClientList[iClientH]->m_sY = dY;
m_pClientList[iClientH]->m_cMapIndex = cMapIndex;
ZeroMemory(m_pClientList[iClientH]->m_cMapName, sizeof(m_pClientList[iClientH]->m_cMapName));
memcpy(m_pClientList[iClientH]->m_cMapName, m_pMapList[cMapIndex]->m_cName, 10);
goto RTH_NEXTSTEP;
}
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
If the modification worked why not add it to the Sources Codes Submission B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Well thats pretty easy and self explanatory, in the code that diu posted - >
You guys gotta remember, if people ask a queston be as explanatory as you can, some people dont know much about reading code.
highlighted in blue, This is your X,Y Respectivlycase '3':
if ((strcmp(m_pClientList[iClientH]->m_cLockedMapName, "NONE") != 0) &&
(m_pClientList[iClientH]->m_iLockedMapTime > 0) &&
(memcmp(cMapName, "resurr", 6) != 0)) {
dX = -1;
dY = -1;
bIsLockedMapNotify = TRUE;
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, m_pClientList[iClientH]->m_cLockedMapName);
}
else {
ZeroMemory(cTempMapName, sizeof(cTempMapName));
strcpy(cTempMapName, cMapName);
}
cMapIndex = iGetMapIndex(cTempMapName);
if (cMapIndex == -1) {
<span style='color:blue'> m_pClientList[iClientH]->m_sX = dX;
m_pClientList[iClientH]->m_sY = dY;</span>
You guys gotta remember, if people ask a queston be as explanatory as you can, some people dont know much about reading code.
<b>-<span style='color:green'>ACiD-x </span><span style='color:red'> Owning PCs Since 1987</span><br><img src='http://img204.imageshack.us/img204/2245/hackertf5.gif' border='0' alt='user posted image' /><br><img src='http://img509.imageshack.us/img509/6697 ... 4sc4ed.png' border='0' alt='user posted image' /><br><span style='color:orange'>i am Pwn NetGAYLORDS !</span></b><br><span style='color:blue'><br>I Pwn HBUSA =)</span>