View Single Post
Old 03-06-2007, 04:23 PM   #10
robertthebard
Xanathar Thieves Guild
 

Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 62
Posts: 4,537
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.
__________________
To those we have lost; May your spirits fly free.
Interesting read, one of my blogs.
robertthebard is offline   Reply With Quote