3Garrett3
2010-06-06 18:29:48
So I couldn't find anything in the include to help me find out the IDs and such of my inventory. I was encouraged to go on RSBot or find the GE ids, but I'm really lazy, and since there was a DumpNPCs function laying around, I've modified it to output the TInvItem record.
That should do the trick, no?
It outputs
[php]
Slot: 1
Name: Coins
ID: 995
Actions: ['Drop', 'Examine']
StackSize: 92123
Slot: 2
Name: Fishing rod
ID: 307
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 3
Name: Fishing bait
ID: 313
Actions: ['Drop', 'Examine']
StackSize: 400
Slot: 4
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 5
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 6
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 7
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 8
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 9
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 10
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 11
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 12
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 13
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 14
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 15
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 16
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 17
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 18
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 19
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 20
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 21
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 22
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 23
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 24
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 25
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 26
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 27
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 28
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
[/php]
After my fishing script has done its job. So it seems to work to me.
Procedure DumpInv;
var
i : Integer;
Inv : TInvItem;
begin
for i := 1 to 28 do
begin
if R_ItemExists(i) then
begin
Inv := GetInvItemAt(i);
Writeln('Slot: '+ ToStr(i));
Writeln(' '+'Name: '+Inv.Name);
Writeln(' '+'ID: '+ToStr(Inv.ID));
Writeln(' '+'Actions: '+ ToStr(Inv.Actions));
Writeln(' '+'StackSize: '+ ToStr(Inv.StackSize));
end;
end;
end;
That should do the trick, no?
It outputs
[php]
Slot: 1
Name: Coins
ID: 995
Actions: ['Drop', 'Examine']
StackSize: 92123
Slot: 2
Name: Fishing rod
ID: 307
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 3
Name: Fishing bait
ID: 313
Actions: ['Drop', 'Examine']
StackSize: 400
Slot: 4
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 5
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 6
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 7
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 8
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 9
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 10
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 11
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 12
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 13
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 14
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 15
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 16
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 17
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 18
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 19
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 20
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 21
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 22
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 23
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 24
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 25
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 26
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 27
Name: Raw herring
ID: 345
Actions: ['Drop', 'Examine']
StackSize: 1
Slot: 28
Name: Raw sardine
ID: 327
Actions: ['Drop', 'Examine']
StackSize: 1
[/php]
After my fishing script has done its job. So it seems to work to me.