case 2611:
{
int Alignment = GetAlignment();
int ilosc = item->GetValue(1);
int szansa = item->GetValue(2);
if (Alignment < -1)
{
ChatPacket(CHAT_TYPE_INFO, "minusowa_ranga");
return false;
}
int MaxAlignment = 30000000;
if (Alignment >= MaxAlignment)
{
ChatPacket(CHAT_TYPE_INFO, "limit_rangi");
return false;
}
if (MaxAlignment - Alignment < ilosc * 10)
{
ilosc = (MaxAlignment - Alignment) / 10;
}
if (Alignment < 500000)
{
if (number(1, 100) <= (szansa))
{
UpdateAlignment(ilosc * 10);
ChatPacket(CHAT_TYPE_INFO, "twoja ranga wzrosla o %d punktow.", ilosc);
item->SetCount(item->GetCount() - 1);
}
else
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ranga_nie_wzrosla"));
item->SetCount(item->GetCount() - 1);
}
}
else
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("nie_ta_micha_mordo"));
}
}
break;
Paste Hosted With By Wklejamy.pl