Siga-nos em...
Follow us on Twitter Follow us on Facebook Watch us on YouTube
Registro

Alpha Servers
Resultados 1 a 10 de 27

Visão do Encadeamento

  1. #1

    Avatar de Maykon
    Data de Ingresso
    Apr 2014
    Localização
    Imperyus Games
    Idade
    30
    Posts
    124
    Agradecido
    302
    Agradeceu
    80
    Peso da Avaliação
    12

    Padrão Função player refresh

    Bom meu amigo antonio pediu pra mim fazer a postagem aqui

    STRUCTS:

    Código:
    struct PMSG_CHARMAPJOINRESULT
    {
    	// static data ------------------------------------
    
    	// non-static data --------------------------------
    	/*<thisrel this+0x0>*/ /*|0x3|*/ struct PBMSG_HEAD h;
    	/*<thisrel this+0x3>*/ /*|0x1|*/ unsigned char subcode;
    	/*<thisrel this+0x4>*/ /*|0x1|*/ unsigned char MapX;
    	/*<thisrel this+0x5>*/ /*|0x1|*/ unsigned char MapY;
    	/*<thisrel this+0x6>*/ /*|0x1|*/ unsigned char MapNumber;
    	/*<thisrel this+0x7>*/ /*|0x1|*/ unsigned char Dir;
    	/*<thisrel this+0x8>*/ /*|0x4|*/ unsigned long Exp;
    	/*<thisrel this+0xc>*/ /*|0x4|*/ unsigned long NextExp;
    	/*<thisrel this+0x10>*/ /*|0x2|*/ unsigned short LevelUpPoint;
    	/*<thisrel this+0x12>*/ /*|0x2|*/ unsigned short Str;
    	/*<thisrel this+0x14>*/ /*|0x2|*/ unsigned short Dex;
    	/*<thisrel this+0x16>*/ /*|0x2|*/ unsigned short Vit;
    	/*<thisrel this+0x18>*/ /*|0x2|*/ unsigned short Energy;
    	/*<thisrel this+0x1a>*/ /*|0x2|*/ unsigned short Life;
    	/*<thisrel this+0x1c>*/ /*|0x2|*/ unsigned short MaxLife;
    	/*<thisrel this+0x1e>*/ /*|0x2|*/ unsigned short Mana;
    	/*<thisrel this+0x20>*/ /*|0x2|*/ unsigned short MaxMana;
    	/*<thisrel this+0x22>*/ /*|0x2|*/ unsigned short BP;
    	/*<thisrel this+0x24>*/ /*|0x2|*/ unsigned short MaxBP;
    	/*<thisrel this+0x28>*/ /*|0x4|*/ int Money;
    	/*<thisrel this+0x2c>*/ /*|0x1|*/ unsigned char PkLevel;
    	/*<thisrel this+0x2d>*/ /*|0x1|*/ unsigned char CtlCode;
    	/*<thisrel this+0x2e>*/ /*|0x2|*/ short AddPoint;
    	/*<thisrel this+0x30>*/ /*|0x2|*/ short MaxAddPoint;
    
    	// base classes -----------------------------------
    
    	// friends ----------------------------------------
    
    	// static functions -------------------------------
    
    	// non-virtual functions --------------------------
    
    	// virtual functions ------------------------------
    };
    
    struct PMSG_CHARREGEN
    {
    	PBMSG_HEAD h;
    	char subcode;
    	char MapX;
    	char MapY;
    	char MapNumber;
    	char Dir;
    	unsigned short Life;
    	unsigned short Mana;
    	unsigned short BP;
    	unsigned int Exp;
    	unsigned int Money;
    };
    FUNÇÃO:

    Código:
    void Functions::PlayerRefresh(DWORD aIndex)
    {	
    	//------------------------------------------------------------
    	// CHAR MAP JOIN - SEND [CREATE]
    	//------------------------------------------------------------
    	PMSG_CHARMAPJOINRESULT lpMsg;
    	lpMsg.h.c = 0xC3;
    	lpMsg.h.head = 0xF3;
    	lpMsg.h.size = 0x33;
    	lpMsg.subcode = 0x03;
    	lpMsg.MapX = lpObj[aIndex].X;
    	lpMsg.MapY = lpObj[aIndex].Y;
    	lpMsg.MapNumber = lpObj[aIndex].MapNumber;
    	lpMsg.Dir = lpObj[aIndex].Dir;
    	lpMsg.Exp = lpObj[aIndex].Experience;
    	lpMsg.NextExp = lpObj[aIndex].NextExp;
    	lpMsg.LevelUpPoint = lpObj[aIndex].LevelUpPoints;
    	lpMsg.Str = lpObj[aIndex].Strength;
    	lpMsg.Dex = lpObj[aIndex].Dexterity;
    	lpMsg.Vit = lpObj[aIndex].Vitality;
    	lpMsg.Energy = lpObj[aIndex].Energy;
    	lpMsg.Money = lpObj[aIndex].Money;
    	lpMsg.PkLevel = lpObj[aIndex].PK_Level;
    	lpMsg.Life = (short)lpObj[aIndex].Life;
    	lpMsg.MaxLife = (short)((double)lpObj[aIndex].AddLife + lpObj[aIndex].MaxLife);
    	lpMsg.Mana = (short)lpObj[aIndex].Mana;
    	lpMsg.MaxMana = (short)((double)lpObj[aIndex].AddMana + lpObj[aIndex].MaxMana);
    	lpMsg.CtlCode = (short)lpObj[aIndex].Authority;
    	lpMsg.BP = lpObj[aIndex].BP;
    	lpMsg.MaxBP = lpObj[aIndex].AddBP + lpObj[aIndex].MaxBP;
    	DataSend(aIndex, &lpMsg.h.c, (DWORD)lpMsg.h.size);
    
    	//------------------------------------------------------------
    	// CHAR REGEN - SEND [DESTROY]
    	//------------------------------------------------------------
    	PMSG_CHARREGEN pMsg; 
    	pMsg.h.c = 0xC1;
    	pMsg.h.head = 0xF3;
    	pMsg.h.size = 0x24;
    	pMsg.subcode = 0x04;
    	pMsg.Dir = lpObj[aIndex].Dir;
    	pMsg.MapX = LOBYTE(lpObj[aIndex].X);
    	pMsg.MapY = LOBYTE(lpObj[aIndex].Y);
    	pMsg.Life = (float)lpObj[aIndex].Life;
    	pMsg.Mana = (float)lpObj[aIndex].Mana;
    	pMsg.Exp = lpObj[aIndex].Experience;
    	pMsg.MapNumber = lpObj[aIndex].MapNumber;
    	pMsg.Money = lpObj[aIndex].Money;
    	pMsg.BP = LOWORD(lpObj[aIndex].BP);
    	pObj[aIndex].PathCount = 0;
    	DataSend(aIndex, &pMsg.h.c, (DWORD)pMsg.h.size);
    
    	gObjTeleport(aIndex,lpObj[aIndex].MapNumber,lpObj[aIndex].X,lpObj[aIndex].Y);
    	GCItemListSend(aIndex);
    	CGRequestQuestInfo(aIndex); 
    	DGGuildMemberInfoRequest(aIndex);
    }
    DEFINES:

    Código:
    #define GCItemListSend				     ((void(*)(int aIndex))0x00411010)  
    #define CGRequestQuestInfo			     ((void(*)(int aIndex))0x0042A7C0)
    #define DGGuildMemberInfoRequest		     ((void(*)(int aIndex))0x0042C460)
    Créditos: antonio.fr
    Última edição por Maykon; 22-07-2015 às 04:42 PM.

  2. Os Seguintes 8 Usuários Agradeceram você Maykon Por este Post Útil:


 

 

Informações de Tópico

Usuários Navegando neste Tópico

Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)

Tópicos Similares

  1. |Suporte| Função C++
    Por Lucas S. no fórum C++
    Respostas: 2
    Último Post: 05-01-2017, 02:37 AM
  2. |Suporte| Função c++ GS.90
    Por gokuka no fórum C++
    Respostas: 2
    Último Post: 27-02-2014, 12:53 AM
  3. |Avaliação| Entrada | Refresh Modificado | Fórum | Shop IMAGENS \o/
    Por stefano.aguiar no fórum Avaliações
    Respostas: 4
    Último Post: 04-05-2012, 10:22 PM
  4. |Dúvida| Função de uma DLL
    Por João Neto no fórum Dúvidas
    Respostas: 6
    Último Post: 31-01-2012, 01:03 AM
  5. |Pedido| WebSite Antiga - Semelhante a Refresh LD
    Por MrFischer no fórum Dúvidas|Pedidos
    Respostas: 1
    Último Post: 24-03-2011, 09:51 PM

Marcadores

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • Você não pode enviar respostas
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •