FO

Critical Attack(hit) Code 7.9 Ou 7.92

Por FoReVeR, 24 de fev. de 2007 em Linguagens de Programação

4
2k
FoReVeRF
24 de fevereiro de 2007 às 09:49

bom!

Para quem não sabe oque é critical, é um code para você dar hits maior que o normal ( somente quando você da critical ), a chance você poderá mudar no config.lua, quanto maior o seu skills, menor será seu damage de critical .

 

Funcionou 100% em todas as versões 7.9+ do evolution.

 

em weapons.cpp procure por:

int32_t maxDamage = Weapons::getMaxWeaponDamage(attackSkill, attackValue);

 

em baixo adicione:

#ifdef __CRITICAL_HIT__

if(random_range(0,100) < g_config.getNumber(ConfigManager::CRITICAL_HIT)){

if(attackSkill > 60){

maxDamage *= 2;

}

else if(attackSkill > 30){

maxDamage *= 3;

}

else {

maxDamage *= 4;

}

g_game.addAnimatedText(player->getPosition(), 906, "Critical!");

}

#endif

 

procure por:

int32_t maxDamage = Weapons::getMaxWeaponDamage(attackSkill, attackValue);

 

em baixo adicione:

if(random_range(0,100) < g_config.getNumber(ConfigManager::CRITICAL_HIT)){

if(attackSkill > 60){

maxDamage *= 2;

}

else if(attackSkill > 30){

maxDamage *= 3;

}

else {

maxDamage *= 4;

}

g_game.addAnimatedText(player->getPosition(), 906, "Critical!");

}

#endif

 

procure por:

int32_t maxDamage = Weapons::getMaxWeaponDamage(attackSkill, ammuAttackValue);

 

em baixo adicione:

ifdef __CRITICAL_HIT__

if(random_range(0,100) < g_config.getNumber(ConfigManager::CRITICAL_HIT)){

if(attackSkill > 60){

maxDamage *= 2;

}

else if(attackSkill > 30){

maxDamage *= 3;

}

else {

maxDamage *= 4;

}

g_game.addAnimatedText(player->getPosition(), 906, "Critical!");

}

#endif

 

Em CONFIGMANAGER.CPP adicione:

#ifdef __CRITICAL_HIT__

m_confInteger[CRITICAL_HIT] = getGlobalNumber(L, "criticalhit", 10);

#endif

 

Em CONFIGMANAGER.H adicione:

#ifdef __CRITICAL_HIT__

CRITICAL_HIT,

#endif

 

No config.lua Adicione:

-- chance to make a critical hit (10 = 10%)

criticalhit = 10

 

Creditos: Jackson Zani

Felipe MoraesF
24 de fevereiro de 2007 às 17:04

bem rox isso kra,parabens pelo tuto

1 mês depois...
JvchequerJ
10 de março de 2007 às 07:15

Isso é um Code, nao um Tutorial.

 

Movido.

1 ano depois...
1301
10 de julho de 2008 às 23:36

CARA melhor passa pronto naum deu aki naum se de pra me passa o link ou me add alex_ajteam@hotmail.com