• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    Server 10.98

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1Server 10.98 Empty Server 10.98 Mar Feb 06, 2018 11:08 pm

    Raken Stroyer

    Raken Stroyer
    Miembro
    Miembro
    Hola gente hoy les vengo a pedir ayuda con mi ot
    tengo un otx 10.98 y le que quiero ponerle fastattak a mi server y le cambio el attackspeed a la vocations.xml y la pongo en 200 y cuando entro al server el player no ataka rapido solo lo hace si el player se pone a caminar si el player no se mueve ataka normal y ya no se que hacer creo que tengo que hacer cambios en las sourcer pero no se que cambios tengo que hacer espero que alguien me ayude

    2 participantes

    2Server 10.98 Empty Re: Server 10.98 Mar Feb 06, 2018 11:24 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    busque esta linea en player.cpp
    Código:
    void Player::doAttacking(uint32_t)

    y busque abajo de ella al final quite OTSYS_TIME()

    Código:
    void Player::doAttacking(uint32_t)
    {
       if (lastAttack == 0) {
          lastAttack = OTSYS_TIME() - getAttackSpeed() - 1;
       }

       if (hasCondition(CONDITION_PACIFIED)) {
          return;
       }

       if ((OTSYS_TIME() - lastAttack) >= getAttackSpeed()) {
          bool result = false;

          Item* tool = getWeapon();
          const Weapon* weapon = g_weapons->getWeapon(tool);
          if (weapon) {
             if (!weapon->interruptSwing()) {
                result = weapon->useWeapon(this, tool, attackedCreature);
             } else if (!canDoAction()) {
                uint32_t delay = getNextActionTime();
                SchedulerTask* task = createSchedulerTask(delay, std::bind(&Game::checkCreatureAttack,
                                      &g_game, getID()));
                setNextActionTask(task);
             } else {
                result = weapon->useWeapon(this, tool, attackedCreature);
             }
          } else {
             result = Weapon::useFist(this, attackedCreature);
          }

          if (result) {
             lastAttack = OTSYS_TIME();
          }
       }
    }


    bueno le quedaria asi

    Código:
    void Player::doAttacking(uint32_t)
    {
        if (lastAttack == 0) {
            lastAttack =  - getAttackSpeed() - 1;
        }
     
        if (hasCondition(CONDITION_PACIFIED)) {
            return;
        }
     
        if ((getAttackSpeed() - lastAttack) >= getAttackSpeed()) {
            bool result = false;
     
            Item* tool = getWeapon();
            const Weapon* weapon = g_weapons->getWeapon(tool);
            if (weapon) {
                result = weapon->useWeapon(this, tool, attackedCreature);
                SchedulerTask* task = createSchedulerTask(getAttackSpeed(), std::bind(&Game::checkCreatureAttack, &g_game, getID()));
                setNextActionTask(task);
            } else {
                result = Weapon::useFist(this, attackedCreature);
                SchedulerTask* task = createSchedulerTask(getAttackSpeed(), std::bind(&Game::checkCreatureAttack, &g_game, getID()));
                setNextActionTask(task);
            }
     
            if (result) {
                lastAttack = getAttackSpeed();
            }
        }
    }



    Server 10.98 YNU5B25
    2 participantes
    http://www.tibiaface.com

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).