31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
///////////////////////////////////////////////////////////////////////////////////
|
|
// Real Time Strategy - NWN - Gloves of Weapon Stealing
|
|
//=================================================================================
|
|
// By Deva Bryson Winblood. 03/06/2003
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void main()
|
|
{
|
|
object oPC=GetItemActivator();
|
|
object oTarg=GetItemActivatedTarget();
|
|
object oWeapon;
|
|
object oNew;
|
|
effect eBeam=EffectBeam(VFX_BEAM_ODD,oPC,BODY_NODE_HAND,FALSE);
|
|
if (oTarg!=OBJECT_INVALID)
|
|
{ //!OI
|
|
oWeapon=GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oTarg);
|
|
if (oWeapon!=OBJECT_INVALID&&GetStringLeft(GetTag(oWeapon),3)!="rts")
|
|
{ // get the weapon
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarg,3.0);
|
|
oNew=CreateItemOnObject(GetResRef(oWeapon),oPC);
|
|
SetPlotFlag(oNew,TRUE); // don't want PCs selling this for cash
|
|
DestroyObject(oWeapon);
|
|
SetIsTemporaryEnemy(OBJECT_SELF,oTarg);
|
|
SetIsTemporaryEnemy(oTarg,OBJECT_SELF);
|
|
} // get the weapon
|
|
else
|
|
SendMessageToPC(oPC,"You cannot take what is there.");
|
|
} //!OI
|
|
}
|