Noob King
10-05-2014, 07:41 PM
I needed to see what herbs were taking up space in my bank so I made this real quick. Nothing fancy but I figured someone else might find a use for it.
program HerbIdentifier;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
function identifyHerb(x: integer): string;
begin
case (x) of
200..201: Result := 'Guam';
202..203: Result := 'Marr';
204..205: Result := 'Tarr';
206..207: Result := 'Harr';
208..209: Result := 'Ran';
210..211: Result := 'Irit';
212..213: Result := 'Avan';
214..215: Result := 'Kwuarm';
216..217: Result := 'Cadan';
218..219: Result := 'Dwarf';
220..221: Result := 'Tors';
2486..2487: Result := 'Lant';
2999..3051: Result := 'Toad';
end;
end;
procedure paintHerbs;
var
herbs: TInventoryItemArray;
i: integer;
inv: Tbox;
begin
herbs := R_GetInventoryItems;
for i := 0 to High(herbs) do
begin
if herbs[i].ID > 0 then
begin
inv := InvBox(herbs[i].Slot);
Smart_DrawTextEx(false, inv.X1, inv.Y1 + 5, 'UpChars07', (identifyHerb(herbs[i].ID)), clwhite);
end;
end;
end;
begin
SetupSRL;
SetupReflection;
AddOnTerminate('Smart_ClearCanvas');
repeat
Smart_ClearCanvas;
paintHerbs;
Wait(2000);
until not Loggedin;
end.
program HerbIdentifier;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/Reflection/Reflection.simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
function identifyHerb(x: integer): string;
begin
case (x) of
200..201: Result := 'Guam';
202..203: Result := 'Marr';
204..205: Result := 'Tarr';
206..207: Result := 'Harr';
208..209: Result := 'Ran';
210..211: Result := 'Irit';
212..213: Result := 'Avan';
214..215: Result := 'Kwuarm';
216..217: Result := 'Cadan';
218..219: Result := 'Dwarf';
220..221: Result := 'Tors';
2486..2487: Result := 'Lant';
2999..3051: Result := 'Toad';
end;
end;
procedure paintHerbs;
var
herbs: TInventoryItemArray;
i: integer;
inv: Tbox;
begin
herbs := R_GetInventoryItems;
for i := 0 to High(herbs) do
begin
if herbs[i].ID > 0 then
begin
inv := InvBox(herbs[i].Slot);
Smart_DrawTextEx(false, inv.X1, inv.Y1 + 5, 'UpChars07', (identifyHerb(herbs[i].ID)), clwhite);
end;
end;
end;
begin
SetupSRL;
SetupReflection;
AddOnTerminate('Smart_ClearCanvas');
repeat
Smart_ClearCanvas;
paintHerbs;
Wait(2000);
until not Loggedin;
end.