TProgramming Forums

Full Version: Original post told it was spam.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I tried to post this:

Quote:/* All formulas take from http://tibia.wikia.com/wiki/Formulas */

#include <stdio.h>

int main()
{
float min, max, average;
int creature_atk,
shield,
total_armor,
shielding,
defense_factor,
atk_mode;

printf("Creature atk: ");
scanf("%5d", &creature_atk);

printf("Shield + modifier: ");
scanf("%2d", &shield);

printf("Total armor: ");
scanf("%2d", &total_armor);

printf("Shielding skill: ");
scanf("%3d", &shielding);

printf("Attacking mode: atk=0, bal=1, def=2: ");
scanf("%1d", &atk_mode);

switch(atk_mode)
{
case 0:
defense_factor = 5;
break;

case 1:
defense_factor = 7;
break;

case 2:
defense_factor = 10;
break;
}

min = total_armor * 0.475;
max = (total_armor * 0.95) - 1;

average = (float) creature_atk - (float) shield * ((float) shielding * (float) defense_factor / 100.0) - ((float) creature_atk / 100.0) * (float) total_armor;

printf("Min damage reduction: %.2f\n", min);
printf("Max damage reduction: %.2f\n", max);
printf("Average damage: %.2f\n", average);

return 0;
}

and got:

Quote:Akismet has detected that this is a spam message and will not be processed.
If you find this is in error please contact your forum administrator.

You may return to the thread here.
Alternatively, return to the forum.

Confused
I apologize for this. Your post has been restored, and I've disabled Akismet for the time being, as it has only caught valid posts and we haven't had any spam.
Thank you. I just posted to let you know, I'm not mad at all.

Skz
Reference URL's