Grab
Picks up the specified item and moves it into the character’s backpack. This is a convenience method that combines DragItem and DropItem into a single call.
ObjID — ID of the item to grab.
Count — number of items to pick up from the stack. Use 0 to grab the entire stack.
Returns True if the item was successfully moved, False otherwise.
Подбирает указанный предмет и перемещает его в рюкзак персонажа. Это удобный метод, объединяющий DragItem и DropItem в один вызов.
ObjID — ID предмета для подбора.
Count — количество предметов из стопки. 0 — забрать всю стопку.
Возвращает True, если предмет успешно перемещён, False — в противном случае.
function Grab(ObjID: Cardinal; Count: Integer): Boolean;
def Grab(item_id: int, count: int) -> bool: ...
begin
if FindType($0EED, Ground) > 0 then
begin
if Grab(FindItem, 0) then
AddToSystemJournal('Grabbed gold from the ground')
else
AddToSystemJournal('Failed to grab');
end;
end.
if FindType(0x0EED, Ground()) > 0:
if Grab(FindItem(), 0):
AddToSystemJournal('Grabbed gold from the ground')
else:
AddToSystemJournal('Failed to grab')