code:
//::///////////////////////////////////////////////
//:: Name: returnweapon
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*This script is supposed to simulate returning throwing weapons by keeping a
//constant stack of 5.
//Place this script in the module OnHeartbeat Event.
//It is designed to take advantage of TagBased Scripting, so the weapons that are
//designed to use this script will have to have the tag set the same as whatever
//the script is compiled as.
*/
//:://////////////////////////////////////////////
//:: Created By: Robert the Bard
//:: Created On: 05, March, 2007
//:://////////////////////////////////////////////
void main()
{
object oReturn = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();
int nStack = (GetItemStackSize(oReturn));
if (GetBaseItemType(oReturn)== BASE_ITEM_DART || BASE_ITEM_THROWINGAXE ||
BASE_ITEM_SHURIKEN)
GetTag(oReturn);
{
if (GetTag(oReturn)!="returnweapon")
return;
else (GetItemStackSize(oReturn));
if (nStack <=4)
SetItemStackSize(oReturn, 5);
if (nStack >=6)
SetItemStackSize(oReturn, 5);
}
}
[/QUOTE]Hopefully it works here, but this will sort of overcome the issue of getting too many, and stacking of items, to some extent.