Initial commit
Initial commit.
This commit is contained in:
34
_module/nss/use_archery_targ.nss
Normal file
34
_module/nss/use_archery_targ.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
void main()
|
||||
{
|
||||
int iDamage = GetDamageDealtByType(DAMAGE_TYPE_BASE_WEAPON);
|
||||
object oPC = GetLastDamager(OBJECT_SELF);
|
||||
object oWep = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
|
||||
int iType = GetBaseItemType(oWep);
|
||||
if (iType == BASE_ITEM_DART || iType == BASE_ITEM_GRENADE || iType == BASE_ITEM_HEAVYCROSSBOW || iType == BASE_ITEM_LIGHTCROSSBOW
|
||||
|| iType == BASE_ITEM_LONGBOW || iType == BASE_ITEM_SHORTBOW || iType == BASE_ITEM_SHURIKEN || iType == BASE_ITEM_SLING || iType == BASE_ITEM_THROWINGAXE)
|
||||
{
|
||||
|
||||
GiveXPToCreature(oPC,iDamage);
|
||||
string sDamage = IntToString(iDamage);
|
||||
|
||||
if (iDamage >= 15)
|
||||
{
|
||||
FloatingTextStringOnCreature("Nice shot. "+sDamage+" XP awarded. 50 XP bonus awarded.",oPC);
|
||||
GiveXPToCreature(oPC,50);
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature(sDamage+" XP awarded.",oPC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("This is for use with ranged weapons.",oPC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user