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

Alpha Servers
Resultados 1 a 7 de 7

Visão do Encadeamento

  1. #1

    Avatar de crazy_digital
    Data de Ingresso
    Sep 2012
    Localização
    em casa
    Idade
    33
    Posts
    60
    Agradecido
    16
    Agradeceu
    9
    Peso da Avaliação
    12

    Padrão GS 96.40T ACTeaM Inventory PlusItem :)

    Achei esse comando bacana resolvi postar para vocês,
    o comando está com os valores dos item para 97d mas podem ser mudado para qualquer versão mudando de 32 para 512.

    //===================================
    //-- Video do sistema
    //===================================



    //===================================
    //--Definições GS 97D
    //===================================
    #define GCItemListSend ((void(*)(int aIndex)) 0x00411010)
    #define gObjInventoryDeleteItem ((void(*)(int,int)) 0x00402383)
    #define GCInventoryItemDeleteSend ((void(*)(int,int,unsigned char)) 0x0040201D)



    //===================================
    //-- GetInventoryItemCount
    //===================================
    int GetInventoryItemCount(int aIndex, int Type, int Level)
    {
    OBJECTSTRUCT *gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);


    int count = 0;
    for(unsigned i = 12; i < 76; i++)
    {
    if(gObj->pInventory[i].m_Type == Type)
    {
    if(Level != -1)
    {
    if(!gObj->pInventory[i].m_Level == Level)
    {
    continue;
    }
    }
    count++;
    }
    }
    return count;
    }

    //===================================
    //-- gObjDeleteItemsCount
    //===================================
    int gObjDeleteItemsCount(int gObjId, short Type, short Level, int Count)
    {
    int count = 0;
    for(int i = 12; i < 76; i++)
    {
    OBJECTSTRUCT *gObj = (OBJECTSTRUCT*)OBJECT_POINTER(gObjId);
    if(gObj->pInventory[i].m_Type == Type && gObj->pInventory[i].m_Level == Level)
    {
    gObjInventoryDeleteItem(gObjId, i);
    GCInventoryItemDeleteSend(gObjId, i, 1);
    count++;


    if(Count == count)
    break;
    }
    }
    return count;
    }

    //===================================
    //-- PlusItem Command By Mr.Haziel 23/06/2013
    //===================================
    void PlusItemCommand(int aIndex,char *ChatMSG)
    {
    OBJECTSTRUCT *lpObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);

    if(lpObj->pTransaction == 1)
    {
    MsgOutput(aIndex,"%s Feche o Trade Para Usar o Comando!",lpObj->Name);
    return;
    }
    if(lpObj->m_IfState.use == 1 && lpObj->m_IfState.type == 7 )
    {
    MsgOutput(aIndex,"%s Feche o ChaosBox Para Usar o Comando!",lpObj->Name);
    return;
    }
    if(lpObj->WarehouseSave >= 1 )
    {
    MsgOutput(aIndex,"%s Feche o Baú Para Usar o Comando!",lpObj->Name);
    return;
    }

    BYTE PlusCode = {0};
    BYTE Buff = {0};

    sscanf(ChatMSG,"%d",&PlusCode);

    //-- Jewel's
    INT Bless_ID = 0x1CD; // Item jewel of Bless
    INT Soul_ID = 0x1CE; // Item jewel of Soul
    INT Chaos_ID = 0x18F; // Item jewel of Chaos

    //-- Inventory Item Count
    INT Bless = GetInventoryItemCount(aIndex,Bless_ID,0);
    INT Soul = GetInventoryItemCount(aIndex,Soul_ID ,0);
    INT Chaos = GetInventoryItemCount(aIndex,Chaos_ID,0);


    switch(PlusCode)
    {
    case 12:
    if(Bless >= 3 && Soul >= 3 && Chaos >= 1)
    {
    for(int i = 12; i < 76; i++)
    {
    OBJECTSTRUCT *ItObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
    if(ItObj->pInventory[i].m_Level == 11)
    {
    Buff++;
    if(Buff == 1) /* FIX MAX BUFFER OVER */
    {
    ItObj->pInventory[i].m_Level += 1;
    GCItemListSend(aIndex);
    gObjDeleteItemsCount(aIndex,Bless_ID, 0, 3);
    gObjDeleteItemsCount(aIndex,Soul_ID, 0, 3);
    gObjDeleteItemsCount(aIndex,Chaos_ID, 0, 1);
    MsgOutput(aIndex,"Parabéns Item +12 Mixado com Sucesso !!");
    break;
    }
    }
    }
    }
    else
    {
    MsgOutput(aIndex,"Itens Incorretos para Combinação !!");
    }
    break;
    case 13:
    if(Bless >= 4 && Soul >= 4 && Chaos >= 1)
    {
    for(int i = 12; i < 76; i++)
    {
    OBJECTSTRUCT *ItObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
    if(ItObj->pInventory[i].m_Level == 12)
    {
    Buff++;
    if(Buff == 1) /* FIX MAX BUFFER OVER */
    {
    ItObj->pInventory[i].m_Level += 1;
    GCItemListSend(aIndex);
    gObjDeleteItemsCount(aIndex,Bless_ID, 0, 4);
    gObjDeleteItemsCount(aIndex,Soul_ID, 0, 4);
    gObjDeleteItemsCount(aIndex,Chaos_ID, 0, 1);
    MsgOutput(aIndex,"Parabéns Item +13 Mixado com Sucesso !!");
    break;
    }
    }
    }
    }
    else
    {
    MsgOutput(aIndex,"Itens Incorretos para Combinação!!");
    }
    break;
    case 14:
    if(Bless >= 5 && Soul >= 5 && Chaos >= 1)
    {
    for(int i = 12; i < 76; i++)
    {
    OBJECTSTRUCT *ItObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
    if(ItObj->pInventory[i].m_Level == 13)
    {
    Buff++;
    if(Buff == 1) /* FIX MAX BUFFER OVER */
    {
    ItObj->pInventory[i].m_Level += 1;
    GCItemListSend(aIndex);
    gObjDeleteItemsCount(aIndex,Bless_ID, 0, 5);
    gObjDeleteItemsCount(aIndex,Soul_ID, 0, 5);
    gObjDeleteItemsCount(aIndex,Chaos_ID, 0, 1);
    MsgOutput(aIndex,"Parabéns Item +14 Mixado com Sucesso !!");
    break;
    }
    }
    }
    }
    else
    {
    MsgOutput(aIndex,"Itens Incorretos para Combinação!!");
    }
    break;
    case 15:
    if(Bless >= 6 && Soul >= 6 && Chaos >= 1)
    {
    for(int i = 12; i < 76; i++)
    {
    OBJECTSTRUCT *ItObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
    if(ItObj->pInventory[i].m_Level == 14)
    {
    Buff++;
    if(Buff == 1) /* FIX MAX BUFFER OVER */
    {
    ItObj->pInventory[i].m_Level += 1;
    GCItemListSend(aIndex);
    gObjDeleteItemsCount(aIndex,Bless_ID, 0, 6);
    gObjDeleteItemsCount(aIndex,Soul_ID, 0, 6);
    gObjDeleteItemsCount(aIndex,Chaos_ID, 0, 1);
    MsgOutput(aIndex,"Parabéns Item +15 Mixado com Sucesso !!");
    break;
    }
    }
    }
    }
    else
    {
    MsgOutput(aIndex,"Itens Incorretos para Combinação!!");
    }
    break;
    }
    }

    OBS: O código pode ser melhorado só incluir a parte da falha do mix, agora só brincar !!


    Creditos Mr.Haziel Developer
    Creditos Mr.Haziel Developer
    Última edição por crazy_digital; 07-08-2013 às 11:12 AM.
    "A vingança nunca é plena, mata a alma e envenena"Hidden Content

 

 

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. |Dúvida| Season 2.5 ACTeaM
    Por CroSS_ADM no fórum Dúvidas
    Respostas: 7
    Último Post: 26-01-2015, 08:57 AM
  2. |Dúvida| Season 2.5 ACTeaM
    Por CroSS_ADM no fórum Dúvidas
    Respostas: 5
    Último Post: 24-08-2014, 05:55 PM
  3. |Desenvolvimento| ACTeaM Classic Titans v2 Informations
    Por Haziel no fórum Servers
    Respostas: 13
    Último Post: 17-10-2012, 01:49 PM
  4. |Desenvolvimento| GS 0.99.60T (VTN) + Plugin ACTeam Resurfaced the Darkness
    Por Haziel no fórum Servers
    Respostas: 8
    Último Post: 16-11-2011, 10:34 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
  •