51 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#include "prc_x2_itemprop"
 | 
						|
#include "mn_inc_weaptypes"
 | 
						|
 | 
						|
effect eEffect;
 | 
						|
object oTarget;
 | 
						|
/*   Script generated by
 | 
						|
Lilac Soul's NWN Script Generator, v. 2.0
 | 
						|
 | 
						|
For download info, please visit:
 | 
						|
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625    */
 | 
						|
 | 
						|
void main()
 | 
						|
{
 | 
						|
object oPC;
 | 
						|
 | 
						|
oPC = GetItemActivator();
 | 
						|
 | 
						|
   // Potion automatically enchants weapon in main-slot
 | 
						|
   oTarget = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
 | 
						|
 | 
						|
   if ( GetBow( oTarget ) )
 | 
						|
   {
 | 
						|
      // Enchant pilene, ikke buen
 | 
						|
      oTarget = GetItemInSlot( INVENTORY_SLOT_ARROWS, oPC );
 | 
						|
   }
 | 
						|
 | 
						|
   if ( GetCrossbow( oTarget ) )
 | 
						|
   {
 | 
						|
      // Enchant boltsne, ikke amrbroesten
 | 
						|
      oTarget = GetItemInSlot( INVENTORY_SLOT_BOLTS, oPC );
 | 
						|
   }
 | 
						|
 | 
						|
 | 
						|
   if ( !( oTarget == OBJECT_INVALID) && GetPiercingWeapon( oTarget ) )
 | 
						|
   {
 | 
						|
      itemproperty ipEffect=ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_PIERCING, IP_CONST_DAMAGEBONUS_10);
 | 
						|
 | 
						|
      IPSafeAddItemProperty( oTarget, ipEffect, 300.0f);
 | 
						|
 | 
						|
/*
 | 
						|
      eEffect = EffectDamageIncrease(DAMAGE_BONUS_10, DAMAGE_TYPE_BLUDGEONING);
 | 
						|
      ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
 | 
						|
*/
 | 
						|
   }
 | 
						|
   else
 | 
						|
   {
 | 
						|
      FloatingTextStringOnCreature( "The oil has no effect", oPC, FALSE );
 | 
						|
   }
 | 
						|
}
 | 
						|
 |