Ir para conteúdo

Featured Replies

Postado
  • Autor

i make this. But have a problem, this values don´t is Int :( i need repair this code

 

This for Shield(Physical Defense)

if(damage >= 0)
        {
          if(combatType == COMBAT_PHYSICALDAMAGE)
          {         
           int32_t skillShield = getPlayer()->getSkill(SKILL_SHIELD, SKILL_LEVEL);  
            damage -= std::ceil(skillShield * 0.6 * damage / 100);  
            if (damage <= 0 ){
                  damage = 0;     
                  g_game.addAnimatedText(getPosition(), 138, "Miss!Noob!");
		          g_game.addMagicEffect(getPosition(), 32);
                       }
            addSkillAdvance(SKILL_SHIELD, 1);  
          }
        }      

 

This is for Energy(Spells Defence in my ot)

if(damage >= 0)
        {
          if(combatType == COMBAT_ENERGYDAMAGE)
          {
           int32_t skillFish = getPlayer()->getSkill(SKILL_FISH, SKILL_LEVEL);  
            damage -= std::ceil(skillFish * 0.6 * damage / 100);  
            if (damage <= 0 ){
                  damage = 0;   
                       	g_game.addAnimatedText(getPosition(), 138, "Miss!Noob!");
                        g_game.addMagicEffect(getPosition(), 32);

                       }
            addSkillAdvance(SKILL_FISH, 1);
          }
        } 
        if(damage >= 0)
        {
          if(combatType == COMBAT_DROWNDAMAGE)
          {
           int32_t skillFish = getPlayer()->getSkill(SKILL_FISH, SKILL_LEVEL);  
            damage -= std::ceil(skillFish * 0.6 * damage / 100);  
            if (damage <= 0 ){
                  damage = 0;   
                         g_game.addAnimatedText(getPosition(), 138, "Miss!Noob!");
                 	     g_game.addMagicEffect(getPosition(), 13);
                       }
            
            addSkillAdvance(SKILL_FISH, 1);
          }
        }    
	}

 

  • Respostas 10
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Try this   const SpectatorVec& list = getSpectators(targetPos); if(!target->isAttackable() || Combat::canDoCombat(attacker, target) != RET_NOERROR) { addMagicEffect(list, targetPo

  • bool Game::combatChangeHealth(CombatType_t combatType, Creature* attacker, Creature* target, int32_t healthChange, MagicEffect_t hitEffect/* = MAGIC_EFFECT_UNKNOWN*/, TextColor_t hitColor/* = TEXTCOL

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.9k

Informação Importante

Confirmação de Termo