blob: 4b3990b74cef913e41593913ce91d539db93b072 (
plain) (
tree)
|
|
// Evol functions.
// Author:
// Reid
// Description:
// Check if the player have enough place on his inventory to accept new items.
// Variables:
// @item = Item ID.
// @count = Number of items.
// @iteminfo = Item information type. (See doc for list of item's types)
// @countitem = Count item's number.
function script InventoryPlace {
getinventorylist;
set @iteminfo, getiteminfo(@item,2);
set @countitem, countitem(@item);
if (checkweight(@item, @count) == 0) goto l_Warn;
if ((@iteminfo < 4) && (@countitem == 0) && (@inventorylist_count < 100)) return;
if ((@iteminfo < 4) && (@countitem > 0)) return;
if (@inventorylist_count + @count <= 100) return;
l_Warm:
mesn "Narrator";
mes col(l("It looks like you can't carry anything else for now."), 9);
next;
mes col(l("You should come back when you'll have some free space."), 9);
close;
}
|