Resultados 1 a 3 de 3
  1. #1
    Membro Schimidt's Avatar
    Data de Ingresso
    Sep 2014
    Posts
    134
    Thanks Thanks Given 
    6
    Thanks Thanks Received 
    5
    Thanked in
    2 Posts
    Mencionado
    10 Post(s)
    MEU HUMOR
    Scared

    Reset tabelado - SOurce

    Bom, nunca fui bom com reset tabelado, alguém poderia me ajudar?
    abaixo o codigo do meu sistema de reset


    Código PHP:
    #include "StdAfx.h"
    void Reset(int aIndexint Tipo)
    {
        if(
    GS.Func_Reset_Ativado == 0)
        {
            if(
    Tipo == 0NpcChat("Função desabilitada."gObjCustom[aIndex].UltimoNpcIndexaIndex);
            return;
        }

        if(
    gObj(aIndex)->MySelfDefenseTime 0)
        {
            if(
    Tipo == 0NpcChat("SelfDefense ativado, relogue por favor!"gObjCustom[aIndex].UltimoNpcIndexaIndex);
            return;
        }
        
        
    int Pontos;
        
    int LevelReset;
        
    int PontosIniciais;

        if(
    gObjCustom[aIndex].Vip == 0)
        {
            
    LevelReset            GS.Func_Reset_Level_Free;
            
    PontosIniciais        GS.Func_Reset_PontosIni_Free;
            
    Pontos                GS.Func_Reset_Pontos_Free;
        }
        else
        {
            
    LevelReset            GS.Func_Reset_Level_Vip;
            
    PontosIniciais        GS.Func_Reset_PontosIni_Vip;
            
    Pontos                GS.Func_Reset_Pontos_Vip;
        }

        if(
    gObj(aIndex)->Level LevelReset)
        {
            
    char levelmsg[100];
            if(
    Tipo == 0
            {
                
    sprintf(levelmsg,"Level necessário: %d."LevelReset);
                
    NpcChat(levelmsggObjCustom[aIndex].UltimoNpcIndexaIndex);
            }else
            {
                
    sprintf(levelmsg,"[Reset] Level necessário: %d."LevelReset);
                
    MsgParaJogador(levelmsgaIndex);
            }
            return;
        }

        
    int Custo;
        if(
    gObjCustom[aIndex].Vip == 0Custo GS.Func_Reset_Custo;
        if(
    gObjCustom[aIndex].Vip == 1Custo GS.Func_Reset_Custo_Vip;

        if(
    gObj(aIndex)->Money Custo)
        {
            
    char Msg[100];
            if(
    Tipo == 0
            {
                
    sprintf(Msg"Necessário %d zen."Custo);
                
    NpcChat(MsggObjCustom[aIndex].UltimoNpcIndexaIndex);
            }else
            {
                
    sprintf(Msg"[Reset] Necessário %d zen."Custo);
                
    MsgParaJogador(Msg,aIndex);
            }
            return;
        }
        if(
    VerificarGM(gObjCustom[aIndex].CtlCode))
        {
            if(
    Tipo == 0NpcChat("GameMaster não pode resetar."gObjCustom[aIndex].UltimoNpcIndexaIndex);
            if(
    Tipo == 1MsgParaJogador("[Reset] GameMaster não pode resetar."aIndex);
            return;
        }

        if(
    GS.Func_Reset_Limite 0)
        {
            if(
    gObjCustom[aIndex].Resets >= GS.Func_Reset_Limite)
            {
                if(
    Tipo == 0NpcChat("Você chegou no Limite de Resets!"gObjCustom[aIndex].UltimoNpcIndexaIndex);
                if(
    Tipo == 1MsgParaJogador("[Reset] Você chegou no Limite de Resets!"aIndex);
                return;
            }
        }

        
    gObjCustom[aIndex].Resets  += 1;
        
    gObj(aIndex)->Level            1;
        
    gObj(aIndex)->Experience    0;
        
    gObj(aIndex)->Money           -= Custo;
        
    GCMoneySend(aIndexgObj(aIndex)->Money);

        if(
    GS.Func_Reset_Tipo == 0)
        {
            
    gObj(aIndex)->Strength        PontosIniciais;
            
    gObj(aIndex)->Dexterity        PontosIniciais;
            
    gObj(aIndex)->Vitality        PontosIniciais;
            
    gObj(aIndex)->Energy        PontosIniciais;
            
    gObj(aIndex)->Leadership    PontosIniciais;
            
    gObj(aIndex)->LevelUpPoint    gObjCustom[aIndex].Resets*Pontos;
        }

        
    Mssql_Atualiza(aIndex1);
        
        if(
    gObj(aIndex)->Class == CLASS_ELF
        {
            
    gObjTeleport(aIndex317187);
        }else
        {
            if(
    gObj(aIndex)->MapNumber != 0gObjTeleport(aIndex0140135);
        }

        
    GCLevelUpMsgSend(aIndex1);
        
    Atualizar_Personagem(aIndex);
        
    GJSetCharacterInfo(gObj(aIndex), aIndex0);

        
    char MsgRstInfo[128];
        if(
    gObjCustom[aIndex].Resets == 1sprintf_s(MsgRstInfo"Agora Você tem %d Reset!"gObjCustom[aIndex].Resets);
        if(
    gObjCustom[aIndex].Resets 1sprintf_s(MsgRstInfo"Agora Você tem %d Reset's!"gObjCustom[aIndex].Resets);
        
    MsgParaJogador(MsgRstInfoaIndex);


  2. #2
    Developer C++ s00x's Avatar

    Data de Ingresso
    Jan 2015
    Posts
    373
    Thanks Thanks Given 
    75
    Thanks Thanks Received 
    146
    Thanked in
    24 Posts
    Mencionado
    63 Post(s)
    MEU HUMOR
    Cheerful
    País
    United States
    Teoricamente ta certo cara, chega a efetuar algum dos passos ?
    A Unica diferença do Acumulativo para o Pontuativo é retornar os pontos e a Experiencia aos valores iniciais, se o pontuativo não esta funcionando seu acumulativo provavelmente também não deve estar .
    Last edited by s00x; 20/07/2015 at 03:43 PM.

  3. #3
    Membro Schimidt's Avatar
    Data de Ingresso
    Sep 2014
    Posts
    134
    Thanks Thanks Given 
    6
    Thanks Thanks Received 
    5
    Thanked in
    2 Posts
    Mencionado
    10 Post(s)
    MEU HUMOR
    Scared
    @[Somente membros podem ver os links. ]
    Sim, agora eu quero fazer o tabelado, eu nao tenho noção de como sera feito isso.... tendeu ?

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • You may not post Resposta(s)
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •  
Sobre nós
Somos uma comunidade em atividade a 8 anos que aborda assuntos relacionados a games em geral, principalmente games MMORPG. e que busca sempre ajudar os membros através de conteúdos, tutoriais e suporte...
Nossos anunciantes
Hinetworks
VelozHost
InovHost
Rede Sociais