Dungeon Teleport Handler

All Helbreath Server Source Discussion here.
Post Reply
omar_omiez
Loyal fan
Posts: 235
Joined: Mon Jul 12, 2004 9:36 am

Post by omar_omiez »

void CGame::D2TeleportHandler(int iClientH,int iMapName,char * pString)
{
int  i, iNum, iRet, iEraseReq;
char  * cp, cData[256], cItemName[21];
class CItem * pItem;
DWORD * dwp;
short * sp;
WORD  * wp;

if (m_pClientList[iClientH] == NULL) return;
if (m_pClientList[iClientH]->m_cSide == 0) return;


switch(iMapName) {
// Dungeon Level 2
case 400: //Aresden Tp
        if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2  ", "dglv2", 263, 258);
    }
case 401: //Elvine Tp
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2  ", "dglv2", 209, 258);
    }
  break;

// MiddleLand
case 403: //Aresden ML TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2  ", "middleland", 300, 400);}
case 404: //Elvine ML TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2  ", "middleland", 200, 400);}
 
  break;



//BattleField
case 405: //Aresden BF Tp
if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2  ", "BTfield", 100, 200); }
case 406: //Elvine BF TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2  ", "BTfield", 100, 200); }

  break;


}

and

case MSGID_REQUEST_CITYHALLTELEPORT:
    RequestD2TeleportHandler(iClientH, pData, dwMsgSize);
    break;





there u go. haha. maybe its wrong, but gives u smth to think about. ahahahahahahaha. i modified zabuza's get hero mantle handler in 2.24b sources.
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
Ice-T
Loyal fan
Posts: 262
Joined: Sat Oct 18, 2003 8:51 am
Location: nowere

Post by Ice-T »

if this was the desired effect, then ur way off :P
Image
<img src='http://www.prism.gatech.edu/~gtg818f/basesig.gif' border='0' alt='user posted image' /><br><img src='http://img228.imageshack.us/img228/439/steam1tf.gif' border='0' alt='user posted image' />
omar_omiez
Loyal fan
Posts: 235
Joined: Mon Jul 12, 2004 9:36 am

Post by omar_omiez »

yes, thats the desired efect. and not bad for a 3 day old coding apperentice isnt it. :P

ice-t, teach me how to code like htat. teach pls. where should i start lookign to edit first? i want code it myself. thx t.
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
molo
Member
Posts: 140
Joined: Mon Jan 17, 2005 1:19 am

Post by molo »

Ice-T wrote: if this was the desired effect, then ur way off :P
Image
yes.... i want to do same thing but how do i do it ?
please dont say C++ cuz i dont know :( if it is can u or some one send me :P
and one more thing can i change it on my HGserver ?
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

hahahah I LOVE YOU !!!!!!!! TYTYTYTtTYTYTYTYTYYTTYYTYTYTYYTYTYT

<span style='font-size:21pt;line-height:100%'>:*</span>
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

omar_omiez wrote:
void CGame::D2TeleportHandler(int iClientH,int iMapName,char * pString)
{
int   i, iNum, iRet, iEraseReq;
char  * cp, cData[256], cItemName[21];
class CItem * pItem;
DWORD * dwp;
short * sp;
WORD  * wp;

if (m_pClientList[iClientH] == NULL) return;
if (m_pClientList[iClientH]->m_cSide == 0) return;


switch(iMapName) {
// Dungeon Level 2
case 400: //Aresden Tp
        if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "dglv2", 263, 258);
    }
case 401: //Elvine Tp
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "dglv2", 209, 258);
    }
  break;

// MiddleLand
case 403: //Aresden ML TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "middleland", 300, 400);}
case 404: //Elvine ML TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "middleland", 200, 400);}
 
  break;



//BattleField
case 405: //Aresden BF Tp
if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "BTfield", 100, 200); }
case 406: //Elvine BF TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "BTfield", 100, 200); }

  break;


}

and

case MSGID_REQUEST_CITYHALLTELEPORT:
    RequestD2TeleportHandler(iClientH, pData, dwMsgSize);
    break;





there u go. haha. maybe its wrong, but gives u smth to think about. ahahahahahahaha. i modified zabuza's get hero mantle handler in 2.24b sources.
This let you...choose where to tele? <_< thats what it looks likes...
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>
omar_omiez
Loyal fan
Posts: 235
Joined: Mon Jul 12, 2004 9:36 am

Post by omar_omiez »

locobans wrote:
omar_omiez wrote:
void CGame::D2TeleportHandler(int iClientH,int iMapName,char * pString)
{
int   i, iNum, iRet, iEraseReq;
char  * cp, cData[256], cItemName[21];
class CItem * pItem;
DWORD * dwp;
short * sp;
WORD  * wp;

if (m_pClientList[iClientH] == NULL) return;
if (m_pClientList[iClientH]->m_cSide == 0) return;


switch(iMapName) {
// Dungeon Level 2
case 400: //Aresden Tp
        if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "dglv2", 263, 258);
    }
case 401: //Elvine Tp
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "dglv2", 209, 258);
    }
  break;

// MiddleLand
case 403: //Aresden ML TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "middleland", 300, 400);}
case 404: //Elvine ML TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "middleland", 200, 400);}
 
  break;



//BattleField
case 405: //Aresden BF Tp
if (memcmp(m_pClientList[iClientH]->m_cLocation, "aresden",7) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "BTfield", 100, 200); }
case 406: //Elvine BF TP
if (memcmp(m_pClientList[iClientH]->m_cLocation, "elvine",6) == 0 ) {
RequestTeleportHandler(iClientH, "2   ", "BTfield", 100, 200); }

  break;


}

and

case MSGID_REQUEST_CITYHALLTELEPORT:
    RequestD2TeleportHandler(iClientH, pData, dwMsgSize);
    break;





there u go. haha. maybe its wrong, but gives u smth to think about. ahahahahahahaha. i modified zabuza's get hero mantle handler in 2.24b sources.
This let you...choose where to tele? <_< thats what it looks likes...
thast what i mean it to be.

tahts why i edited teh hero set thingy.

that window allows u to select which item u want, and then if u click u get a function after it. like for hero hauberk its smth like

if(ek < 100) return null;

and so on.

so if i edited the thing and added the request teleport handler, it weould still let u choose and still do the function, which teleports u to the specified location.
- Tbone<br><a href="http://cyborg.namedecoder.com"><br><img src="http://cyborg.namedecoder.com/webimages ... ng"<br></a>
Post Reply