[CODE] Pits en MiniMap
Author Message Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17#1 Subject: [CODE] Pits en MiniMap 4/3/2017, 1:12 am Este código permite mostrar los Pits en el Mapa maximizado, todo se realiza desde el cliente..
En la función
Code: CGame::DrawDialogBox_GuideMap
Buscamos
Code: if( (m_dwCurTime - m_dwMonsterEventTime) < 30000 ) { if( (m_dwCurTime%500)< 370 ) { if( m_sEventX >= shX && m_sEventX <= shX+128 && m_sEventY >= shY && m_sEventY <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + m_sEventX - shX, sY + m_sEventY -shY, m_sMonsterID, m_dwCurTime); } }else { m_dwMonsterEventTime = 0; m_sMonsterID = 0; }
Y abajo agregamos
Code: if( m_cMapIndex == 11 ) { // Aresden // Slime if ( 141 >= shX && 141 <= shX+128 && 240 >= shY && 240 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 141 - shX, sY + 240 - shY, 10, m_dwCurTime); if ( 253 >= shX && 253 <= shX+128 && 203 >= shY && 203 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 253 - shX, sY + 203 - shY, 10, m_dwCurTime); if ( 43 >= shX && 43 <= shX+128 && 182 >= shY && 182 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 43 - shX, sY + 182 - shY, 10, m_dwCurTime); if ( 122 >= shX && 122 <= shX+128 && 50 >= shY && 50 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 122 - shX, sY + 50 - shY, 10, m_dwCurTime); // Snake if ( 203 >= shX && 203 <= shX+128 && 236 >= shY && 236 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 203 - shX, sY + 236 - shY, 22, m_dwCurTime); // Scorpion if ( 102 >= shX && 102 <= shX+128 && 36 >= shY && 36 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 102 - shX, sY + 36 - shY, 17, m_dwCurTime); } else if( m_cMapIndex == 3 ) { // Elvine // Slime if ( 154 >= shX && 154 <= shX+128 && 38 >= shY && 38 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 154 - shX, sY + 38 - shY, 10, m_dwCurTime); if ( 54 >= shX && 54 <= shX+128 && 65 >= shY && 65 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 54 - shX, sY + 65 - shY, 10, m_dwCurTime); if ( 135 >= shX && 135 <= shX+128 && 248 >= shY && 248 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 135 - shX, sY + 248 - shY, 10, m_dwCurTime); if ( 240 >= shX && 240 <= shX+128 && 214 >= shY && 214 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 240 - shX, sY + 214 - shY, 10, m_dwCurTime); if ( 260 >= shX && 260 <= shX+128 && 184 >= shY && 184 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 260 - shX, sY + 184 - shY, 10, m_dwCurTime); // Snake if ( 48 >= shX && 48 <= shX+128 && 202 >= shY && 202 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 48 - shX, sY + 202 - shY, 22, m_dwCurTime); // Scorpion if ( 127 >= shX && 127 <= shX+128 && 34 >= shY && 34 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 127 - shX, sY + 34 - shY, 17, m_dwCurTime); }
Más abajo buscamos:
Code: if( (G_dwGlobalTime - m_dwMonsterEventTime) < 30000 ) { if( (m_dwCurTime%500)< 370 ) { shX = (m_sEventX*128)/(m_pMapData->m_sMapSizeX); shY = (m_sEventY*128)/(m_pMapData->m_sMapSizeX); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + shX, sY + shY, m_sMonsterID, m_dwCurTime); } }else { m_dwMonsterEventTime = 0; m_sMonsterID = 0; }
Y abajo de eso agregamos:
Code: if( m_cMapIndex == 11 ) { // Aresden // Slime m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((141*128)/m_pMapData->m_sMapSizeX), sY + ((240*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((253*128)/m_pMapData->m_sMapSizeX), sY + ((203*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((43*128)/m_pMapData->m_sMapSizeX), sY + ((182*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((122*128)/m_pMapData->m_sMapSizeX), sY + ((50*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); // Snake m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((203*128)/m_pMapData->m_sMapSizeX), sY + ((236*128)/m_pMapData->m_sMapSizeX), 22, m_dwCurTime); // Scorpion m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((102*128)/m_pMapData->m_sMapSizeX), sY + ((36*128)/m_pMapData->m_sMapSizeX), 17, m_dwCurTime); } else if( m_cMapIndex == 3 ) { // Elvine // Slime m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((154*128)/m_pMapData->m_sMapSizeX), sY + ((38*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((54*128)/m_pMapData->m_sMapSizeX), sY + ((65*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((135*128)/m_pMapData->m_sMapSizeX), sY + ((248*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((240*128)/m_pMapData->m_sMapSizeX), sY + ((214*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((260*128)/m_pMapData->m_sMapSizeX), sY + ((184*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); // Snake m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((48*128)/m_pMapData->m_sMapSizeX), sY + ((202*128)/m_pMapData->m_sMapSizeX), 22, m_dwCurTime); // Scorpion m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((127*128)/m_pMapData->m_sMapSizeX), sY + ((34*128)/m_pMapData->m_sMapSizeX), 17, m_dwCurTime); }
Tanto minimizado como maximizado se verían los pits en el mini mapa
Paso a explicar detalladamente:
Code: m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((141*128)/m_pMapData->m_sMapSizeX), sY + ((240*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime);
Code: 141 = coordenada X 240 = coordenada Y 10 = ID npc
Para cambiar el tipo de NPC para mostrar cambian el ID (ver NPC.cfg)
Las coordenadas (X, Y) son las del mapa en general, por ejemplo, en la imagen estoy parado en (100, 48), sería exactamente donde se mostraría el Pit en el mapa.
Para agregar más mapas solo tienen que mirar el 'm_cMapIndex'
Code: 11 = Aresden 3 = Elvine etc...
De esta función sacan el valor numérico de los mapas
Code: CGame::GetOfficialMapName
Bueno, espero que les sirva.
Saludos.
Last edited by Centuu.- on 4/7/2017, 3:12 am; edited 1 time in total
LifeX
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 26#2 Subject: Re: [CODE] Pits en MiniMap 4/5/2017, 2:49 am This is very nice add-on indeed. Thanks Centuu-
Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17#3 Subject: Re: [CODE] Pits en MiniMap 4/5/2017, 6:54 pm Thanks to you. I've already fixed it to show pits minimized and maximized. Later i'm going to post the complete code.
Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17#4 Subject: Re: [CODE] Pits en MiniMap 4/7/2017, 3:13 am Updated , shows pits maximized and minimized!
Roa
Diamond 1
Earned by having 144 posts & comments.
10th Anniversary
Earned after being a member for 10 years.
Moderator
Earned by becoming a board moderator.
Likes : 26#5 Subject: Re: [CODE] Pits en MiniMap 4/10/2017, 7:37 am
KenZoB
Silver 1
Earned by having 48 posts & comments.
Civilian
Granted to members for high engagement.
Likes : 9#6 Subject: Re: [CODE] Pits en MiniMap 4/10/2017, 10:31 pm fijate que cuando maximizas el mapa aparecen los npc en el minimap! tienes que fixiar esa parte
Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17#7 Subject: Re: [CODE] Pits en MiniMap 4/10/2017, 11:20 pm Es raro que te aparezca así! Fijate tus MapIndex que coincidan con tus mapas... Yo lo tengo agregado y no me sale de esa manera.
Centuu.-
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Full Hero
Granted to members for great contributions.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 17#8 Subject: Re: [CODE] Pits en MiniMap 4/11/2017, 1:43 am Te dejo la función para que compares:
Code: void CGame::DrawDialogBox_GuideMap(short msX, short msY, char cLB) {int m_iMaxMapIndex = DEF_SPRID_INTERFACE_GUIDEMAP + m_cMapIndex +1; int m_iMinMapIndex = DEF_SPRID_INTERFACE_GUIDEMAP; int m_iMinMapSquare = m_cMapIndex ; int i; //telescope.pak: frames 1..31 <=> DEF_SPRID_INTERFACE_GUIDEMAP +1...+31 <=> m_cMapIndex 0..30 //telescope1.pak: frames 1..3 <=> DEF_SPRID_INTERFACE_GUIDEMAP +36..+38 <=> m_cMapIndex 35..37 et + if( m_cMapIndex < 0 ) return; if (m_cMapIndex >= 35) { m_iMaxMapIndex = DEF_SPRID_INTERFACE_GUIDEMAP + m_cMapIndex +1; m_iMinMapIndex = DEF_SPRID_INTERFACE_GUIDEMAP + 35; m_iMinMapSquare = m_cMapIndex - 35; } short sX, sY, shX, shY, szX, szY; sX = m_stDialogBoxInfo[9].sX; sY = m_stDialogBoxInfo[9].sY; szX = m_stDialogBoxInfo[9].sSizeX; szY = m_stDialogBoxInfo[9].sSizeY; if( sX < 20 ) sX = 0; if( sY < 20 ) sY = 0; #ifdef res if( sX > 800-128-20 ) sX = 800-128; if( sY > 527-128-20 ) sY = 527-128; #else if( sX > 640-128-20 ) sX = 640-128; if( sY > 427-128-20 ) sY = 427-128; #endif for( shX=-2 ; shX<130 ; shX++ ) { m_DDraw.PutPixel( sX+shX, sY-2 , 50,50,50); m_DDraw.PutPixel( sX+shX, sY-1 , 50,50,50); m_DDraw.PutPixel( sX+shX, sY+128, 50,50,50); m_DDraw.PutPixel( sX+shX, sY+129, 50,50,50); } for( shY=-2 ; shY<130 ; shY++ ) { m_DDraw.PutPixel( sX-2 , sY+shY, 50,50,50); m_DDraw.PutPixel( sX-1 , sY+shY, 50,50,50); m_DDraw.PutPixel( sX+128, sY+shY, 50,50,50); m_DDraw.PutPixel( sX+129, sY+shY, 50,50,50); } if( m_bZoomMap ) { shX = m_sPlayerX-64; shY = m_sPlayerY-64; if( shX < 0 ) shX = 0; if( shY < 0 ) shY = 0; if( shX > m_pMapData->m_sMapSizeX-128 ) shX = m_pMapData->m_sMapSizeX-128; if( shY > m_pMapData->m_sMapSizeY-128 ) shY = m_pMapData->m_sMapSizeY-128; if (m_bDialogTrans) m_pSprite[m_iMaxMapIndex]->PutShiftTransSprite2(sX, sY, shX, shY, 0, m_dwCurTime ); else m_pSprite[m_iMaxMapIndex]->PutShiftSpriteFast(sX, sY, shX, shY, 0, m_dwCurTime ); if (m_iPartyStatus != NULL) { for (i = 0; i <= DEF_MAXPARTYMEMBERS; i++) { if (strlen(m_stPartyMemberNameList[i].cName) != 0) if (memcmp(PartyMapName[i], m_cMapName, 12) == 0) if (memcmp(m_stPartyMemberNameList[i].cName, m_cPlayerName, 12) == 0) m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX - shX + m_sPlayerX, sY - shY + m_sPlayerY, 37, m_dwCurTime); else if( iParty_sX[i] >= shX && iParty_sX[i] <= shX+128 && iParty_sY[i] >= shY && iParty_sY[i] <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX - shX + iParty_sX[i], sY - shY + iParty_sY[i], 38, m_dwCurTime); } } else m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX - shX + m_sPlayerX, sY - shY + m_sPlayerY, 37, m_dwCurTime); if( (m_dwCurTime - m_dwMonsterEventTime) < 30000 ) { if( (m_dwCurTime%500)< 370 ) { if( m_sEventX >= shX && m_sEventX <= shX+128 && m_sEventY >= shY && m_sEventY <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + m_sEventX - shX, sY + m_sEventY -shY, m_sMonsterID, m_dwCurTime); } }else { m_dwMonsterEventTime = 0; m_sMonsterID = 0; } // centuu - mostrar pits en mapa CHICO if( m_cMapIndex == 11 ) { // Aresden // Slime if ( 141 >= shX && 141 <= shX+128 && 240 >= shY && 240 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 141 - shX, sY + 240 - shY, 10, m_dwCurTime); if ( 253 >= shX && 253 <= shX+128 && 203 >= shY && 203 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 253 - shX, sY + 203 - shY, 10, m_dwCurTime); if ( 43 >= shX && 43 <= shX+128 && 182 >= shY && 182 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 43 - shX, sY + 182 - shY, 10, m_dwCurTime); if ( 122 >= shX && 122 <= shX+128 && 50 >= shY && 50 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 122 - shX, sY + 50 - shY, 10, m_dwCurTime); // Snake if ( 203 >= shX && 203 <= shX+128 && 236 >= shY && 236 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 203 - shX, sY + 236 - shY, 22, m_dwCurTime); // Scorpion if ( 102 >= shX && 102 <= shX+128 && 36 >= shY && 36 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 102 - shX, sY + 36 - shY, 17, m_dwCurTime); } else if( m_cMapIndex == 3 ) { // Elvine // Slime if ( 154 >= shX && 154 <= shX+128 && 38 >= shY && 38 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 154 - shX, sY + 38 - shY, 10, m_dwCurTime); if ( 54 >= shX && 54 <= shX+128 && 65 >= shY && 65 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 54 - shX, sY + 65 - shY, 10, m_dwCurTime); if ( 135 >= shX && 135 <= shX+128 && 248 >= shY && 248 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 135 - shX, sY + 248 - shY, 10, m_dwCurTime); if ( 240 >= shX && 240 <= shX+128 && 214 >= shY && 214 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 240 - shX, sY + 214 - shY, 10, m_dwCurTime); if ( 260 >= shX && 260 <= shX+128 && 184 >= shY && 184 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 260 - shX, sY + 184 - shY, 10, m_dwCurTime); // Snake if ( 48 >= shX && 48 <= shX+128 && 202 >= shY && 202 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 48 - shX, sY + 202 - shY, 22, m_dwCurTime); // Scorpion if ( 127 >= shX && 127 <= shX+128 && 34 >= shY && 34 <= shY+128 ) m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + 127 - shX, sY + 34 - shY, 17, m_dwCurTime); } }else // Sans zoom { if (m_bDialogTrans) m_pSprite[m_iMinMapIndex]->PutTransSprite2(sX, sY, m_iMinMapSquare, m_dwCurTime); else m_pSprite[m_iMinMapIndex]->PutSpriteFastNoColorKey(sX, sY, m_iMinMapSquare, m_dwCurTime); shX = (m_sPlayerX*128)/(m_pMapData->m_sMapSizeX); shY = (m_sPlayerY*128)/(m_pMapData->m_sMapSizeX); if (m_iPartyStatus != NULL) { for (i = 0; i <= DEF_MAXPARTYMEMBERS; i++) { if (strlen(m_stPartyMemberNameList[i].cName) != 0) { if (memcmp(PartyMapName[i], m_cMapName, 12) == 0) { if (i > 1) m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX + shX, sY + shY, 37, m_dwCurTime); else { shX = (iParty_sX[i]*128)/(m_pMapData->m_sMapSizeX); shY = (iParty_sY[i]*128)/(m_pMapData->m_sMapSizeX); if (memcmp(m_stPartyMemberNameList[i].cName, m_cPlayerName, 12) == 0) m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX + shX, sY + shY, 37, m_dwCurTime); else m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX + shX, sY + shY, 38, m_dwCurTime); } } } } } else m_pSprite[DEF_SPRID_INTERFACE_ND_CRUSADE]->PutSpriteFast(sX + shX, sY + shY, 37, m_dwCurTime); if( (G_dwGlobalTime - m_dwMonsterEventTime) < 30000 ) { if( (m_dwCurTime%500)< 370 ) { shX = (m_sEventX*128)/(m_pMapData->m_sMapSizeX); shY = (m_sEventY*128)/(m_pMapData->m_sMapSizeX); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + shX, sY + shY, m_sMonsterID, m_dwCurTime); } }else { m_dwMonsterEventTime = 0; m_sMonsterID = 0; } // centuu - mostrar pits en mapa GRANDE if( m_cMapIndex == 11 ) { // Aresden // Slime m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((141*128)/m_pMapData->m_sMapSizeX), sY + ((240*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((253*128)/m_pMapData->m_sMapSizeX), sY + ((203*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((43*128)/m_pMapData->m_sMapSizeX), sY + ((182*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((122*128)/m_pMapData->m_sMapSizeX), sY + ((50*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); // Snake m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((203*128)/m_pMapData->m_sMapSizeX), sY + ((236*128)/m_pMapData->m_sMapSizeX), 22, m_dwCurTime); // Scorpion m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((102*128)/m_pMapData->m_sMapSizeX), sY + ((36*128)/m_pMapData->m_sMapSizeX), 17, m_dwCurTime); } else if( m_cMapIndex == 3 ) { // Elvine // Slime m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((154*128)/m_pMapData->m_sMapSizeX), sY + ((38*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((54*128)/m_pMapData->m_sMapSizeX), sY + ((65*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((135*128)/m_pMapData->m_sMapSizeX), sY + ((248*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((240*128)/m_pMapData->m_sMapSizeX), sY + ((214*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((260*128)/m_pMapData->m_sMapSizeX), sY + ((184*128)/m_pMapData->m_sMapSizeX), 10, m_dwCurTime); // Snake m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((48*128)/m_pMapData->m_sMapSizeX), sY + ((202*128)/m_pMapData->m_sMapSizeX), 22, m_dwCurTime); // Scorpion m_pSprite[DEF_SPRID_INTERFACE_MONSTER]->PutSpriteFast(sX + ((127*128)/m_pMapData->m_sMapSizeX), sY + ((34*128)/m_pMapData->m_sMapSizeX), 17, m_dwCurTime); } } if( cLB != 0 ) return; if( msX >= sX && msX < sX+szY && msY >= sY && msY < sY+szY ) { if( sY > 213 ) shY = sY - 17; else shY = sY + szY + 4; if( m_bZoomMap ) PutString( sX, shY, DEF_MSG_GUIDEMAP_MIN, RGB(200, 200, 120) );//"(-) else PutString( sX, shY, DEF_MSG_GUIDEMAP_MAX, RGB(200, 200, 120) );//"(+) if( m_bZoomMap ) { shX = m_sPlayerX-64; shY = m_sPlayerY-64; if( shX < 0 ) shX = 0; if( shY < 0 ) shY = 0; if( shX > m_pMapData->m_sMapSizeX-128 ) shX = m_pMapData->m_sMapSizeX-128; if( shY > m_pMapData->m_sMapSizeY-128 ) shY = m_pMapData->m_sMapSizeY-128; shX += msX - sX; shY += msY - sY; }else { shX = (msX-sX)*m_pMapData->m_sMapSizeX/128; shY = (msY-sY)*m_pMapData->m_sMapSizeX/128; } wsprintf( G_cTxt, "%d, %d", shX, shY ); if( m_cMapIndex == 11 ) // Aresden: Fixed by Snoopy for v3.51 maps { if( shX > 46 && shX < 66 && shY > 107 && shY < 127 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_MAGICTOWER ); else if( shX > 103 && shX < 123 && shY > 86 && shY < 116 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_GUILDHALL ); else if( shX > 176 && shX < 196 && shY > 62 && shY < 82 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_CATH ); else if( shX > 135 && shX < 155 && shY > 113 && shY < 133 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_CITYHALL ); else if( shX > 97 && shX < 117 && shY > 175 && shY < 195 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_WAREHOUSE ); else if( shX > 223 && shX < 243 && shY > 124 && shY < 144 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_WAREHOUSE ); else if( shX > 118 && shX < 138 && shY > 157 && shY < 177 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_SHOP ); else if( shX > 148 && shX < 178 && shY > 188 && shY < 208 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_BLACKSMITH ); else if( shX > 69 && shX < 89 && shY > 199 && shY < 219 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_DUNGEON ); else if( shX > 21 && shX < 41 && shY > 266 && shY < 286 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_HUNT); else if( shX > 20 && shX < 40 && shY > 13 && shY < 33 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_ML ); else if( shX > 246 && shX < 266 && shY > 16 && shY < 36 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_ML ); else if( shX > 265 && shX < 285 && shY > 195 && shY < 215 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_FARM); else if( shX > 88 && shX < 108 && shY > 150 && shY < 170 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_CMDHALL ); }else if( m_cMapIndex == 3 ) // Elvine: Fixed by Snoopy for v3.51 maps { if( shX > 170 && shX < 190 && shY > 65 && shY < 85 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_MAGICTOWER ); else if( shX > 67 && shX < 87 && shY > 130 && shY < 150 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_GUILDHALL ); else if( shX > 121 && shX < 141 && shY > 66 && shY < 86 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_CATH ); else if( shX > 135 && shX < 155 && shY > 117 && shY < 137 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_CITYHALL ); else if( shX > 190 && shX < 213 && shY > 118 && shY < 138 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_WAREHOUSE ); else if( shX > 73 && shX < 103 && shY > 165 && shY < 185 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_WAREHOUSE ); else if( shX > 217 && shX < 237 && shY > 142 && shY < 162 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_SHOP ); else if( shX > 216 && shX < 256 && shY > 99 && shY < 119 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_BLACKSMITH ); else if( shX > 251 && shX < 271 && shY > 73 && shY < 93 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_DUNGEON ); else if( shX > 212 && shX < 232 && shY > 13 && shY < 33 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_HUNT); else if( shX > 16 && shX < 36 && shY > 262 && shY < 282 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_ML ); else if( shX > 244 && shX < 264 && shY > 248 && shY < 268 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_ML ); else if( shX > 264 && shX < 284 && shY > 177 && shY < 207 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_FARM); else if( shX > 207 && shX < 227 && shY > 79 && shY < 99 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_CMDHALL ); } else if( m_cMapIndex == 5 ) // Elvine Farm: Fixed by Snoopy for v3.51 maps { if( shX > 62 && shX < 82 && shY > 187 && shY < 207 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_WAREHOUSE ); else if( shX > 81 && shX < 101 && shY > 169 && shY < 189 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_SHOP ); else if( shX > 101 && shX < 131 && shY > 180 && shY < 200 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_BLACKSMITH ); else if( shX > 130 && shX < 150 && shY > 195 && shY < 215 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_DUNGEON ); else if( shX > 86 && shX < 106 && shY > 139 && shY < 159 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_BARRACK ); } else if( m_cMapIndex == 6 ) // Areden's Farm: Fixed by Snoopy for v3.51 maps { if( shX > 30 && shX < 50 && shY > 80 && shY < 100 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_WAREHOUSE ); else if( shX > 55 && shX < 85 && shY > 80 && shY < 100 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_BLACKSMITH ); else if( shX > 52 && shX < 72 && shY > 80 && shY < 100 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_SHOP ); else if( shX > 70 && shX < 90 && shY > 60 && shY < 80 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_DUNGEON ); else if( shX > 45 && shX < 65 && shY > 123 && shY < 143 ) strcpy( G_cTxt, DEF_MSG_MAPNAME_BARRACK ); } if (m_iPartyStatus != NULL) { for (i = 0; i <= DEF_MAXPARTYMEMBERS; i++) { if (strlen(m_stPartyMemberNameList[i].cName) != 0) if (memcmp(PartyMapName[i], m_cMapName, 12) == 0) if( shX > iParty_sX[i]-5 && shX < iParty_sX[i]+5 && shY > iParty_sY[i]-5 && shY < iParty_sY[i]+5 ) strcpy( G_cTxt, m_stPartyMemberNameList[i].cName ); } } PutString( msX-10, msY-13, G_cTxt, RGB(200, 200, 120) ); } }
LifeX
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 26#9 Subject: Re: [CODE] Pits en MiniMap 4/11/2017, 2:29 am The code works with no issue.
ailyn
Silver 4
Earned by having 12 posts & comments.
Likes : 7#10 Subject: Re: [CODE] Pits en MiniMap 4/29/2017, 3:31 am muestra de que si funciona el código ;)
me gustaría saber si es posible hacer que el código llame directamente a los " .txt " de los mapas? via un message el HG???? seria posible eso o no?
LifeX
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 26#11 Subject: Re: [CODE] Pits en MiniMap 4/29/2017, 5:20 am I won't recommend it for several reasons. 1. The amount of data flow from hgserver to client on each map, and each mobs is too heavy for hgserver to send every 1 milisecond someone opens the map. And when ever you open the map it needs to send a response to hgserver to send over the data. Imagine you have 10 maps wih 10 mobs each and for 20 players. 2. All this is client base, so there is no resource hog into server. Everytime u open map is just a command for client to do so, and having the images to draw into the dialogbox of guide map was done when you do loading also doesnt hog your CPu resources to render the image back to you again everytime you open the map. 3. Not all mobs are included in the monster.pak to show all mobs, only several. and if you ask HGServer to send data type of npcid towards client to read, if somehow you didnt put a NULL in client, it also will crash the client as it doesnt recognise it. So what centuu did was the best of it already. If possible, all addons shouldn't add too much data flow between server and client. If you are running text based and not sql based, this will also hog the resources as well. Too much things for a 2mb application hgserver to process. But this is just my opinion. :-)
ailyn
Silver 4
Earned by having 12 posts & comments.
Likes : 7#12 Subject: Re: [CODE] Pits en MiniMap 4/29/2017, 10:54 am LifeX wrote: I won't recommend it for several reasons. 1. The amount of data flow from hgserver to client on each map, and each mobs is too heavy for hgserver to send every 1 milisecond someone opens the map. And when ever you open the map it needs to send a response to hgserver to send over the data. Imagine you have 10 maps wih 10 mobs each and for 20 players. 2. All this is client base, so there is no resource hog into server. Everytime u open map is just a command for client to do so, and having the images to draw into the dialogbox of guide map was done when you do loading also doesnt hog your CPu resources to render the image back to you again everytime you open the map. 3. Not all mobs are included in the monster.pak to show all mobs, only several. and if you ask HGServer to send data type of npcid towards client to read, if somehow you didnt put a NULL in client, it also will crash the client as it doesnt recognise it. So what centuu did was the best of it already. If possible, all addons shouldn't add too much data flow between server and client. If you are running text based and not sql based, this will also hog the resources as well. Too much things for a 2mb application hgserver to process. But this is just my opinion. :-) Okey, thanks LifeX
KenZoB
Silver 1
Earned by having 48 posts & comments.
Civilian
Granted to members for high engagement.
Likes : 9#13 Subject: Re: [CODE] Pits en MiniMap 6/15/2020, 10:12 pm porque si intento agregaro mas de 7 pits en el minimap no me salen los NPC en el minimap en las coord que lo pongo
LifeX
Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.
Likes : 26#14 Subject: Re: [CODE] Pits en MiniMap 6/16/2020, 1:51 am I wont matter on how many pits, you can enter my server and see my Highland maps have over 14 pits, with images, all no problem. Items not the amount of cords. And also as mention above, not all maps have a NPC icon, check monster.pak and you can only put those npc.
Sponsored content
#15 Subject: Re: [CODE] Pits en MiniMap
[CODE] Pits en MiniMap
Similar topics
Permissions in this forum: You cannot reply to topics in this forum
Latest topics »
Helbreath Sources 10/13/2024, 9:22 pm by
Genesis »
[CODE] Fix Windows 8 - 10 9/18/2024, 10:07 pm by
Celestials »
New Helbreath 3D Project-HB: Reigns of Middleland 8/28/2024, 9:19 pm by
Roa »
Crear una nueva magia 8/9/2024, 9:21 am by
nicoprs »
Helbreath Clients to Download 7/26/2024, 8:54 pm by
Sabrina »
Files Src etc Helbreath Argentina 7/23/2024, 4:21 am by
nicoprs »
Problemas con el Visual C++ 6.0 en windows 7 x64 7/22/2024, 4:45 pm by
Sabrina »
Helbreath Korea 7/22/2024, 2:21 pm by
Sabrina »
Como banear cuenta / jugadores 7/22/2024, 8:29 am by
nicoprs »
Helbreath Ant Files + Src 7/21/2024, 7:47 am by
nicoprs
Marketplace recent topics 50 $ HB Necklace Of …
8/28/2024, 10:57 pm
GM4
Donation helbreath adven…
8/19/2020, 11:52 am
Apocalipsi
100 $ New Atribute
5/17/2020, 3:47 am
KenZoB
250 $ Teams vs Team E…
5/17/2020, 3:41 am
KenZoB
100 $ Stacked Items
4/9/2020, 3:41 pm
sleeq
100 $ Battlestaff
4/9/2020, 3:31 pm
sleeq
200 $ Linear spell da…
12/27/2019, 5:39 am
sleeq
500 $ Item grid sour…
12/17/2019, 2:58 pm
skyddr8512
888 $ New ~ Riding …
12/17/2019, 2:58 pm
skyddr8512
980 $ Hello ~ Riding…
12/13/2019, 4:32 pm
skyddr8512
Add an ad
View all ads