/* DataAccess.cpp */ char *CDataAccess::GetSiegeInfo(char *nombredelclan, int *impchaos, int *impshop, int *impland) { cmd->setCommandText("SELECT OWNER_GUILD as Clan,TAX_RATE_CHAOS as Goblin, TAX_RATE_STORE as Shop, TAX_HUNT_ZONE as Land FROM MuCastle_DATA"); cmd->Execute(); if(cmd->isResultSet()) { while(cmd->FetchNext()) { strcpy(nombredelclan, cmd->Field("Clan").asString()); *impchaos = cmd->Field("Goblin").asLong(); *impshop = cmd->Field("Shop").asLong(); *impland = cmd->Field("Land").asLong(); } } return nombredelclan; } /* DataAccess.h */ char *CDataAccess::GetSiegeInfo(char *nombredelclan, int *impchaos, int *impshop, int *impland); /* WzAG.cpp */ /* Aca es lo que no tengo idea como hacer, algo tipo */ /* Currect Taxes: 3% on Goblin, 3% on Shops, Land entrance Feed: 300K */ BYTE cnTT2[]="/siege_info"; if (memcmp( &pProtocol[0X0D], cnTT2, 11) == 0 ) { char cTtText [0x20] ; char pepe[255]; int impchaos, impshop, impland = 0; BYTE cTtTextSend [0x36]={0xC1,0x36,0x02}; db.GetSiegeInfo(pepe, &impchaos, &impshop, &impland); // sprintf(cTtText, "Current Siege Owner: %s Currect Taxes: %d\% on Goblin, %d\% on Shops, Land entrance Feed: %dK", pepe, impchaos, impshop, impland); GetPlayerName( &cTtTextSend[0x03],PlayerID ) ; memcpy ( &cTtTextSend [0x0D],cTtText,0x21 ); GsDataSendFunc (PlayerID,(PBYTE)cTtTextSend , 0x36) ; }