SRL Archive - OSR Help

FindSymbol help...


Neznam

2012-05-08 00:32:27


if(FindSymbol(x, y, Symbol_Water))then
begin
Message('Found the water symbol', True);
break;
end;

I keep getting
Unknown identifier 'Symbol_Water' at line 647

Also if I try other Symbols, I get the same error.
Ex Symbol_Quest

bg5

2012-05-08 00:35:33

Click two times on function in function list ,scroll up and you will see list of proper names

Gucci

2012-05-08 00:37:12

Or just hold down co trol and click the FindSymbol all the names that you can use will be there most likely 'fountain' or something

Le Jingle

2012-05-08 00:54:46

Off topic : Are there no skill minimap icons added? (i.e. the symbol for a mining pickaxe, a woodcutting tree symbol, etc.)

On topic : just use 'water source' or 'water'

Abu

2012-05-08 01:09:01

They are Strings, they need to be put within quotation marks ''

Neznam

2012-05-08 01:15:25

Figured out what I was doing wrong
Forgot to add ' ' around the Symbol_water, gosh cant miss that…

EDIT: ninja'd
Thanks abu, trail and error and fixed it

Element17

2012-05-08 01:16:52

List of valid arguments.

Valid Arguments are:
- agility - furnace - rare trees, tree -windmill
- altar - gem stall - rest, resting spot
- anvil - guide - sandpit
- apothecary - hair dresser - saw mill
- archery shop - herbalist - scimitar shop
- arrow - house - shield
- axe shop - hunter store - shop, store
- bar - hunter training - short cut
- bank - jewelery - silk stall
- candle shop - kebab shop - silver stall
- lodestone
- churn - mace shop - slayer master
- clothes shop - magic shop - spice stall
- cookery shop - makeover mage - spinning wheel, spin
- cookery, cook - mill - staff shop
- crafing shop - minigame - summoning store
- dungeon - mining shop - summoning obelisk
- farming shop - pet shop - sword shop
- farming spot - platebody shop - tanner
- fishing shop, fish store - plateskirt shop - training dummy
- fishing spot, fish - portal (to player owned houses) - underground
- food shop - pottery, pot - water source, water
- fur trader - quest - weave

J J

2012-05-08 01:24:46

It's indeed a string. I've made my own custom function where you can edit the accuracy.

function FindPortalByArrow:Boolean;
var
A, X, Y, ArrowSymbol: Integer;
InputAcc, OutputAcc: Extended;

begin
ClickNorth(0);
A:=0;
WriteLn('Counted gray colors: '+IntToStr(CountColorTolerance(10798276, 173, 279, 352, 292, 1))+'');
WriteLn('Counted red colors: '+IntToStr(CountColorTolerance(204, 208, 208, 324, 220, 1))+'');
repeat
ArrowSymbol := BitmapFromString(7, 15, 'meJzT9AzXxEAaAWkCVz8gI5IFT31' +
'ARhBB/n3vkRHxgiCRpe+JRG7r7/HPfoeMgCJqPonI4hCRxnpRuDhc' +
'BIJUPOOAIkASLgIXh7MBQZeURw==');
InputAcc := 0.5;
FindDeformedBitmapToleranceIn(ArrowSymbol, X, Y, MMX1, MMY1, MMX2, MMY2, 75, 0, True, OutputAcc)
FreeBitmap(ArrowSymbol);
if (OutputAcc > InputAcc) then
begin
WriteLn('We found the flicker arrow symbol, walking there!');
MMouse(X + RandomRange(3, 8), Y + RandomRange(10, 20), 2, 2);
Wait(25 + Random(75));
ClickMouse2(1);
Wait(100 + Random(100));
repeat
Wait(50 + Random(50));
until (IsMoving=False);
Result:=True;
end else
begin;
WriteLn('We haven`t been able to detect the flickering arrow symbol.');
Result:=False;
Inc(A);
Wait(250 + Random(500));
end;
until (OutputAcc > InputAcc) or (A>9);
end;
It also has a repeat loop with a random waiting time, because it is used to find a flickering symbol at the Great Orb Project.

Just play with that function, edit the bitmap, the names, etc. :P