SRL Archive - Reflection Development

some procedures that need fixing (at least for me)


fre

2010-06-05 14:46:17

Procedure Drop;
begin
R_DropItemsButNameEx(['Rune pickaxe', 'Diamond']);
end;


All it does is drop my rune pick…


But after i changed this it worked

[php]
{*******************************************************************************
procedure R_DropItemsButNameEx(Names: TStringArray);
By: Drags111
Description: Drops all items in the inventory except those w/ the specified Names.
*******************************************************************************}
procedure R_DropItemsButNameEx(Names: TStringArray);
var
i, z: integer;
begin
for i := 1 to 28 do
for z := 0 to High(Names) do
if (Pos(Trim(Lowercase(Names[z])), Trim(Lowercase(GetItemNameAt(i)))) > 0)then
R_DropItemsButSlot(i); //instead of R_DropItem(i);
end;

Procedure Drop;
begin
R_DropItemsButNameEx(['Rune pickaxe', 'Diamond']);
end;
[/php]

[php]
R_ChooseOption('Mine Rocks');
[/php]

It examines the Rock instead of mining.

Drakan

2010-06-05 18:01:24

From: fre
Procedure Drop;
begin
R_DropItemsButNameEx(['Rune pickaxe', 'Diamond']);
end;


All it does is drop my rune pick…


But after i changed this it worked

[php]
{*******************************************************************************
procedure R_DropItemsButNameEx(Names: TStringArray);
By: Drags111
Description: Drops all items in the inventory except those w/ the specified Names.
*******************************************************************************}
procedure R_DropItemsButNameEx(Names: TStringArray);
var
i, z: integer;
begin
for i := 1 to 28 do
for z := 0 to High(Names) do
if (Pos(Trim(Lowercase(Names[z])), Trim(Lowercase(GetItemNameAt(i)))) > 0)then
R_DropItemsButSlot(i); //instead of R_DropItem(i);
end;

Procedure Drop;
begin
R_DropItemsButNameEx(['Rune pickaxe', 'Diamond']);
end;
[/php]

[php]
R_ChooseOption('Mine Rocks');
[/php]

It examines the Rock instead of mining.


For the R_ChooseOption, try to use just "Mine" ;)

And thanks ill fix the R_Drop one.

fre

2010-06-06 04:05:45

From: drags111
For the R_ChooseOption, try to use just "Mine" ;)

And thanks ill fix the R_Drop one.


I tried "Mine" at the first place…