2024-06-14 10:48:20 -04:00
|
|
|
void main()
|
|
|
|
{
|
2024-08-30 10:02:16 -04:00
|
|
|
object oPC = GetLastUsedBy();
|
|
|
|
float fGold;
|
|
|
|
int iGold2;
|
|
|
|
|
|
|
|
// item destruction loop
|
|
|
|
object oItem = GetFirstItemInInventory(OBJECT_SELF);
|
|
|
|
while (GetIsObjectValid(oItem) == TRUE)
|
|
|
|
{
|
|
|
|
// gives gold for item
|
|
|
|
fGold=IntToFloat(GetGoldPieceValue(oItem));
|
|
|
|
iGold2=FloatToInt(fGold * 0.30);
|
|
|
|
GiveGoldToCreature(oPC, iGold2);
|
2024-06-14 10:48:20 -04:00
|
|
|
|
2024-08-30 10:02:16 -04:00
|
|
|
DestroyObject(oItem);
|
|
|
|
oItem = GetNextItemInInventory(OBJECT_SELF);
|
2024-06-14 10:48:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|