Also! How do I make an on text appears if the PC is one of several alignments? (NG, CN, and LE for example sake)
Modifié par Kingdom_Of_Hearts, 05 novembre 2013 - 09:01 .
Modifié par Kingdom_Of_Hearts, 05 novembre 2013 - 09:01 .
// Counts the number of items with sTag that oCreature possesses
// Will NOT count items equipped
int CountItem(object oCreature, string sTag)
{
// Tracker variable
int nCount;
// Loop through inventory
object oItem = GetFirstItemInInventory(oCreature);
while (GetIsObjectValid(oItem))
{
// Do the tags match?
if (GetTag(oItem) == sTag)
{
// Increase the tracker by the stack size
nCount += GetItemStackSize(oItem);
}
oItem = GetNextItemInInventory(oCreature);
}
// Return the tracker
return nCount;
}int x; x = CountItem(oPC, "potion3");