49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
void main()
|
|
{
|
|
object oAtt = GetLastDamager();
|
|
int iDmg = GetDamageDealtByType(DAMAGE_TYPE_BLUDGEONING) + GetDamageDealtByType(DAMAGE_TYPE_PIERCING) + GetDamageDealtByType(DAMAGE_TYPE_SLASHING) ;
|
|
iDmg += d10(1);
|
|
object oWp = GetItemInSlot (INVENTORY_SLOT_RIGHTHAND, oAtt);
|
|
if (GetBaseItemType(oWp) == BASE_ITEM_LIGHTCROSSBOW ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_HEAVYCROSSBOW ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_LONGBOW ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_SHORTBOW ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_DART ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_SHURIKEN ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_THROWINGAXE ||
|
|
GetBaseItemType(oWp) == BASE_ITEM_SLING)
|
|
{
|
|
|
|
if (iDmg == 0)
|
|
{
|
|
ActionSpeakString ("Miss ... Need Glasses?");
|
|
return;
|
|
}
|
|
else if (iDmg <= 5)
|
|
{
|
|
ActionSpeakString ("Hit ... Outer ring");
|
|
return;
|
|
}
|
|
else if (iDmg <= 10)
|
|
{
|
|
ActionSpeakString ("Hit ... Middle ring");
|
|
return;
|
|
}
|
|
else if (iDmg <= 15 )
|
|
{
|
|
ActionSpeakString ("Hit ... Nearly Bulls-Eye");
|
|
return;
|
|
}
|
|
else if (iDmg <25 )
|
|
{
|
|
ActionSpeakString ("Hit ... Bulls eye!!!");
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|