Major update
Fixed CCOH, Fixed starting GP, Fixed DMFI languages, Fix cep weapon appearances, Fixed new player start up system. Added PC deleter. Added ACP 4.1. Full compile. Updated release archive.
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
//OnClosed event of a <span class="highlight">barrel</span> or what is being used as a <span class="highlight">trash</span> can.
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
float fGold;
|
||||
int iGold2;
|
||||
//Go through all items in the container, destroying them as we find them.
|
||||
object oTrash = GetFirstItemInInventory();
|
||||
while (GetIsObjectValid(oTrash))
|
||||
{
|
||||
DestroyObject(oTrash);
|
||||
|
||||
// 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);
|
||||
|
||||
DestroyObject(oItem);
|
||||
oItem = GetNextItemInInventory(OBJECT_SELF);
|
||||
oTrash = GetNextItemInInventory();
|
||||
//If this next item is valid, meaning that there is another item in the
|
||||
//inventory, then the loop will go again.
|
||||
//Once the inventory has been sifted through, the loop exits and all
|
||||
//items are destroyed.
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user