danrox2004
03-01-2007, 12:02 PM
Ok this is my first tutorial =) Its on walking, using symbols, colours (for example of trees) and radial road walk.
When walking from place to place you can combine all three methods. You could walk from a bank to a tree, then to a mining symbol and follow a road for example.
First, Walking with symbols
In Core/Symbols.scar there are a few useful functions - GetSymbolColor, FindSymbol and FindSymbolColorIfNeeded.
In this tutorial i am going to teach you how to use FindSymbol to do your symbol walking.
FindSymbol:
function FindSymbol(var rx, ry: Integer; Name: String): Boolean;
rx and ry are the x, y coordinated of the symbol, the name is the name. The different symbols available are:
- bank
- mining site, mining spot
- transportation
- magic shop
- water source, water
- furnace
- anvil
- rare trees, tree
- fishing spot, fish
- cookery, cook
- quest
- mill
- weave
- pottery, pot
- spinning wheel, spin
- guide
- shop, store
- shield
- altar
- arrow
- bar
- dungeon
- churn
- house
- Axe Shop
- Cookery Shop
- Windmill
- minigame
- fur trader
- Archery Shop
- staff Shop
- clothes shop
- farming spot
- apothecary
- Sword shop
- platebody shop
- scimitar shop
- gem stall
- silk stall
- plateskirt shop
- agility
- training dummy
- food shop/food store
- fishing shop/fish store
- Jewelery
- Crafing shop
- portal (to player owned houses)
- Makeover Mage
- Mace Shop
- Hair Dresser
- Mining Shop
- silver stall
- spice stall
- farming shop
- slayer master
- herbalist
- candle shop
- Saw Mill
- Kebab shop
- Short cut
- hunter store
- hunter training
To use just put the name in Name, for example:
if(FindSymbol(x, y, "altar")) then
begin
end
Next we are going to make a simple function to repeat until it finds a symbol, or the time limit is exceeded, then click on the symbol and wait for the flag to dissapear.
To do this we repeat until it finds the symbol, then click on it and wait for the flag to disappear, then we will add in failsafes.
function FindAndClickSymbol(SymbolName: String): Boolean;
begin
repeat
Wait(50+random(100))
until(FindSymbol(x, y, SymbolName)) //Repeats until find symbol
Mouse(x, y, 5, 5, true) //Clicks on symbol
Flag; //Waits for flag to dissapear
Result:=True; //Returns True
end;
Now we will add some failsafes.
function FindAndClickSymbol(SymbolName: String): Boolean;
var
Start: Integer;
begin
MarkTime(Start); //Marks Time
repeat
Wait(50+random(100))
until((FindSymbol(x, y, SymbolName)) or (TimeFromMark(Start)>=15000)) //Repeats until find symbol or if function took more then 15 seconds
if(TimeFromMark(Start)>=15000) then
Result:=False; //Returns False
DoLogoutProcedure; //Logs out or whatever
else
begin
Mouse(x, y, 5, 5, true) //Clicks on symbol
Flag; //Waits for flag to dissapear
Result:=True; //Returns True
end
end;
Now to use that we use FindAndClickSymbol(Symbol).
Using Colours to walk
Using colours to walk is fairly simple, we just need a colour. Im not going to go over Automatically selecting colours yet so for now just manually define them.
Now when would you want to use colours to walk?
You would use colours to walk if there are no roads or symbols in sight, as this is probarbly the worst method of walking.
In this tutorial i will show you how to use the colour of trees to walk, and this can be adapted for other colours and objects.
I cant go on runescape right now so there wont be any pics yet. Notice on trees how it is all mostly one colour, then near the top center the colour is lighter? Thats what we will be using to walk (Sorry WT-Fawaki, got this off one of your scripts...) First you need to get that colour. Only use this method if it is the only colour on the minimap, as it may click the wrong colour. This is really easy, all we do is use Stupid's procedure ClickMMColorTol. This will click on the colour, then we use Flag to wait until it walks to the colour. And example is:
procedure ClickMMColorTol(color, tol: Integer);
ClickMMColorTol(TreeColour, 10)
Flag;
All this does is click on the colour with a tolerance of 10, then waits until it has walked there.
Radial Road Walking (RRW)
I havent got very much experience with RRW as i havent really needed to use it, but apparently it works VERY well. It will automatically detect new road colours as it walks.
For help using RRW there is a tutorial here:
http://www.villavu.com/forum/showthread.php?t=372
by WT-FAWAKI.
However, i will try to explain it quite simply here.
What radial road walk does is it looks for the road colour, starting at a specified radius and working inwards. It also starts at an angle and ends at an angle. I am unsure of how to explain this without the aid of diagrams so i wont :S
Basically to use just follow the tutorial at:
http://www.villavu.com/forum/showthread.php?t=372
An example of use is:
RadialWalk(TheColor,320,400,40,xmod,ymod)
An example of this all together is
RadialWalk(TheColor,320,400,40,xmod,ymod) //Walks the road colour from northeast to northwest.
RadialWalk(TheColor,320,400,40,xmod,ymod) //Same again
ClickMMColorTol(TreeColour, 10) //Clicks on a tree
Flag;
FindAndClickSymbol('bank'); //Clicks on the bank
ToBankers(BankColor,Adjustx,Adjusty); //Walks to bankers
OpenBank; //Opens Bank
FixBank; //Scrolls bank screen to top
DepositAll; //Deposits all items in inventory
Withdraw(5,3,20); //Withdraws 20 of the item in col 5 row 3
CloseBank; //Closes the bank screen
Logout; //Logs out player;
Will finish this later, got to go sorry.
When walking from place to place you can combine all three methods. You could walk from a bank to a tree, then to a mining symbol and follow a road for example.
First, Walking with symbols
In Core/Symbols.scar there are a few useful functions - GetSymbolColor, FindSymbol and FindSymbolColorIfNeeded.
In this tutorial i am going to teach you how to use FindSymbol to do your symbol walking.
FindSymbol:
function FindSymbol(var rx, ry: Integer; Name: String): Boolean;
rx and ry are the x, y coordinated of the symbol, the name is the name. The different symbols available are:
- bank
- mining site, mining spot
- transportation
- magic shop
- water source, water
- furnace
- anvil
- rare trees, tree
- fishing spot, fish
- cookery, cook
- quest
- mill
- weave
- pottery, pot
- spinning wheel, spin
- guide
- shop, store
- shield
- altar
- arrow
- bar
- dungeon
- churn
- house
- Axe Shop
- Cookery Shop
- Windmill
- minigame
- fur trader
- Archery Shop
- staff Shop
- clothes shop
- farming spot
- apothecary
- Sword shop
- platebody shop
- scimitar shop
- gem stall
- silk stall
- plateskirt shop
- agility
- training dummy
- food shop/food store
- fishing shop/fish store
- Jewelery
- Crafing shop
- portal (to player owned houses)
- Makeover Mage
- Mace Shop
- Hair Dresser
- Mining Shop
- silver stall
- spice stall
- farming shop
- slayer master
- herbalist
- candle shop
- Saw Mill
- Kebab shop
- Short cut
- hunter store
- hunter training
To use just put the name in Name, for example:
if(FindSymbol(x, y, "altar")) then
begin
end
Next we are going to make a simple function to repeat until it finds a symbol, or the time limit is exceeded, then click on the symbol and wait for the flag to dissapear.
To do this we repeat until it finds the symbol, then click on it and wait for the flag to disappear, then we will add in failsafes.
function FindAndClickSymbol(SymbolName: String): Boolean;
begin
repeat
Wait(50+random(100))
until(FindSymbol(x, y, SymbolName)) //Repeats until find symbol
Mouse(x, y, 5, 5, true) //Clicks on symbol
Flag; //Waits for flag to dissapear
Result:=True; //Returns True
end;
Now we will add some failsafes.
function FindAndClickSymbol(SymbolName: String): Boolean;
var
Start: Integer;
begin
MarkTime(Start); //Marks Time
repeat
Wait(50+random(100))
until((FindSymbol(x, y, SymbolName)) or (TimeFromMark(Start)>=15000)) //Repeats until find symbol or if function took more then 15 seconds
if(TimeFromMark(Start)>=15000) then
Result:=False; //Returns False
DoLogoutProcedure; //Logs out or whatever
else
begin
Mouse(x, y, 5, 5, true) //Clicks on symbol
Flag; //Waits for flag to dissapear
Result:=True; //Returns True
end
end;
Now to use that we use FindAndClickSymbol(Symbol).
Using Colours to walk
Using colours to walk is fairly simple, we just need a colour. Im not going to go over Automatically selecting colours yet so for now just manually define them.
Now when would you want to use colours to walk?
You would use colours to walk if there are no roads or symbols in sight, as this is probarbly the worst method of walking.
In this tutorial i will show you how to use the colour of trees to walk, and this can be adapted for other colours and objects.
I cant go on runescape right now so there wont be any pics yet. Notice on trees how it is all mostly one colour, then near the top center the colour is lighter? Thats what we will be using to walk (Sorry WT-Fawaki, got this off one of your scripts...) First you need to get that colour. Only use this method if it is the only colour on the minimap, as it may click the wrong colour. This is really easy, all we do is use Stupid's procedure ClickMMColorTol. This will click on the colour, then we use Flag to wait until it walks to the colour. And example is:
procedure ClickMMColorTol(color, tol: Integer);
ClickMMColorTol(TreeColour, 10)
Flag;
All this does is click on the colour with a tolerance of 10, then waits until it has walked there.
Radial Road Walking (RRW)
I havent got very much experience with RRW as i havent really needed to use it, but apparently it works VERY well. It will automatically detect new road colours as it walks.
For help using RRW there is a tutorial here:
http://www.villavu.com/forum/showthread.php?t=372
by WT-FAWAKI.
However, i will try to explain it quite simply here.
What radial road walk does is it looks for the road colour, starting at a specified radius and working inwards. It also starts at an angle and ends at an angle. I am unsure of how to explain this without the aid of diagrams so i wont :S
Basically to use just follow the tutorial at:
http://www.villavu.com/forum/showthread.php?t=372
An example of use is:
RadialWalk(TheColor,320,400,40,xmod,ymod)
An example of this all together is
RadialWalk(TheColor,320,400,40,xmod,ymod) //Walks the road colour from northeast to northwest.
RadialWalk(TheColor,320,400,40,xmod,ymod) //Same again
ClickMMColorTol(TreeColour, 10) //Clicks on a tree
Flag;
FindAndClickSymbol('bank'); //Clicks on the bank
ToBankers(BankColor,Adjustx,Adjusty); //Walks to bankers
OpenBank; //Opens Bank
FixBank; //Scrolls bank screen to top
DepositAll; //Deposits all items in inventory
Withdraw(5,3,20); //Withdraws 20 of the item in col 5 row 3
CloseBank; //Closes the bank screen
Logout; //Logs out player;
Will finish this later, got to go sorry.