Помощь по скриптам | Помощь по коду
Помощь по коду Ребят короче начал я
делать пятый скил на бт.
Который не был прописан.
Работало только 4. Так
вот. Прописал. Но почему
здоровье не прибавляет когда срабатывает
вампирзм. Вот сам код.
Посмотри че не правильно.
if($a_5 == true) {
$dmg += round(($hp / 100) * $a_5_bonus);
}
$dmg -= round(rand(($opponent['hp']/12),($opponent['hp']/7)));
if($dmg < 0) {
$dmg = 0;
}
делать пятый скил на бт.
Который не был прописан.
Работало только 4. Так
вот. Прописал. Но почему
здоровье не прибавляет когда срабатывает
вампирзм. Вот сам код.
Посмотри че не правильно.
if($a_5 == true) {
$dmg += round(($hp / 100) * $a_5_bonus);
}
$dmg -= round(rand(($opponent['hp']/12),($opponent['hp']/7)));
if($dmg < 0) {
$dmg = 0;
}
потому что херню написал.
mr_esk , Поясни. Я и прошу помощи
TJeesy , Я не знаю как прописать правильно
TJeesy ,
if($user['ability_5'] > 0) {
switch($user['ability_']) {
case 0:
$a_5_bonus = 25;
$a_5_chanse = 5;
break;
case 1:
$a_5_bonus = 25;
$a_5_chanse = 5;
break;
case 2:
$a_5_bonus = 30;
$a_5_chanse = 5;
break;
case 3:
$a_5_bonus = 35;
$a_5_chanse = 5;
break;
case 4:
$a_5_bonus = 40;
$a_5_chanse = 5;
break;
case 5:
$a_5_bonus = 45;
$a_5_chanse = 5;
break;
case 6:
$a_5_bonus = 45;
$a_5_chanse = 8;
break;
case 7:
$a_5_bonus = 50;
$a_5_chanse = 8;
break;
case 8:
$a_5_bonus = 55;
$a_5_chanse = 8;
break;
case 9:
$a_5_bonus = 60;
$a_5_chanse = 8;
break;
case 10:
$a_5_bonus = 65;
$a_5_chanse = 8;
break;
case 11:
$a_5_bonus = 65;
$a_5_chanse = 11;
break;
case 12:
$a_5_bonus = 70;
$a_5_chanse = 11;
break;
case 13:
$a_5_bonus = 75;
$a_5_chanse = 11;
break;
case 14:
$a_5_bonus = 80;
$a_5_chanse = 11;
break;
case 15:
$a_5_bonus = 85;
$a_5_chanse = 11;
break;
case 16:
$a_5_bonus = 85;
$a_5_chanse = 14;
break;
case 17:
$a_5_bonus = 90;
$a_5_chanse = 14;
break;
case 18:
$a_5_bonus = 95;
$a_5_chanse = 14;
break;
case 19:
$a_5_bonus = 100;
$a_5_chanse = 14;
break;
case 20:
$a_5_bonus = 105;
$a_5_chanse = 14;
break;
case 21:
$a_5_bonus = 105;
$a_5_chanse = 17;
break;
case 22:
$a_5_bonus = 145;
$a_5_chanse = 20;
break;
case 23:
$a_5_bonus = 165;
$a_5_chanse = 23;
break;
case 24:
$a_5_bonus = 165;
$a_5_chanse = 23;
break;
}
if(mt_rand(0, 100) <= $a_5_chanse) {
$a_5 = true;
}
}
$dmg +=round(rand(($user['str']/6),($user['str']/4)));
if($a_5 == true) {
$dmg += round(($hp / 100) * $a_5_bonus);
}
$dmg -= round(rand(($opponent['hp']/12),($opponent['hp']/7)));
if($dmg < 0) {
$dmg = 0;
}
if($user['ability_5'] > 0) {
switch($user['ability_']) {
case 0:
$a_5_bonus = 25;
$a_5_chanse = 5;
break;
case 1:
$a_5_bonus = 25;
$a_5_chanse = 5;
break;
case 2:
$a_5_bonus = 30;
$a_5_chanse = 5;
break;
case 3:
$a_5_bonus = 35;
$a_5_chanse = 5;
break;
case 4:
$a_5_bonus = 40;
$a_5_chanse = 5;
break;
case 5:
$a_5_bonus = 45;
$a_5_chanse = 5;
break;
case 6:
$a_5_bonus = 45;
$a_5_chanse = 8;
break;
case 7:
$a_5_bonus = 50;
$a_5_chanse = 8;
break;
case 8:
$a_5_bonus = 55;
$a_5_chanse = 8;
break;
case 9:
$a_5_bonus = 60;
$a_5_chanse = 8;
break;
case 10:
$a_5_bonus = 65;
$a_5_chanse = 8;
break;
case 11:
$a_5_bonus = 65;
$a_5_chanse = 11;
break;
case 12:
$a_5_bonus = 70;
$a_5_chanse = 11;
break;
case 13:
$a_5_bonus = 75;
$a_5_chanse = 11;
break;
case 14:
$a_5_bonus = 80;
$a_5_chanse = 11;
break;
case 15:
$a_5_bonus = 85;
$a_5_chanse = 11;
break;
case 16:
$a_5_bonus = 85;
$a_5_chanse = 14;
break;
case 17:
$a_5_bonus = 90;
$a_5_chanse = 14;
break;
case 18:
$a_5_bonus = 95;
$a_5_chanse = 14;
break;
case 19:
$a_5_bonus = 100;
$a_5_chanse = 14;
break;
case 20:
$a_5_bonus = 105;
$a_5_chanse = 14;
break;
case 21:
$a_5_bonus = 105;
$a_5_chanse = 17;
break;
case 22:
$a_5_bonus = 145;
$a_5_chanse = 20;
break;
case 23:
$a_5_bonus = 165;
$a_5_chanse = 23;
break;
case 24:
$a_5_bonus = 165;
$a_5_chanse = 23;
break;
}
if(mt_rand(0, 100) <= $a_5_chanse) {
$a_5 = true;
}
}
$dmg +=round(rand(($user['str']/6),($user['str']/4)));
if($a_5 == true) {
$dmg += round(($hp / 100) * $a_5_bonus);
}
$dmg -= round(rand(($opponent['hp']/12),($opponent['hp']/7)));
if($dmg < 0) {
$dmg = 0;
}
DESANT , Фуфуфу говнокод, "с всякого на всякого", тьфу холера
нафиг перепиши код
нафиг перепиши код
TJeesy , Если смог бы то переписал . Пока увы не могу. Мозгов малова то. Только учу PHP
DESANT , я те говорю, код - хуже говна
Стр.: 1, 2