SRL Archive - OSR Help

Castle Wars Banking chest


xtrapsp

2012-03-14 19:24:10

Hey guys, So I finally got round to making my scripts walk, however. It walks to far from the bank so heres my questions:

  1. How do I make it so it moves closer to the bank chest?
  2. The bank chest has all colours EXACTLY the same and a DTM would be no good because of camera angles..

HEEELP :P

i3egoHan

2012-03-14 20:00:01

1: Use better walking ( if its walking too far your walking is bad )
2: Walk to chest and use a FindColorsSpiralTolerance.

Im pretty sure SRL already deals with the castle wars chest in the OpenBankChest().. Constant is SRL_BANK_CW (i think)..

Sir Ducksworthy

2012-03-14 20:01:31

You can use
FindDTMRotated()
To find rotated DTM's on your mini map or main screen

Optionally the SPS Positioning system could be of some service

xtrapsp

2012-03-14 20:09:03

From: i3egoHan
1: Use better walking ( if its walking too far your walking is bad )
2: Walk to chest and use a FindColorsSpiralTolerance.

Im pretty sure SRL already deals with the castle wars chest in the OpenBankChest().. Constant is SRL_BANK_CW (i think)..


i looked in the openbankchest and it was missing CW :S but I'l have a go at that

and for the walking what do you suggest? because I don't click anywhere near where it ends up :P is it possible to make it click the $ icon on the minimap?

Nemesis3X

2012-03-14 20:11:51

From: i3egoHan
1: Use better walking ( if its walking too far your walking is bad )
2: Walk to chest and use a FindColorsSpiralTolerance.

Im pretty sure SRL already deals with the castle wars chest in the OpenBankChest().. Constant is SRL_BANK_CW (i think)..


He is totaly Right. If you got problem with Walking near the Chest, Your DTM isn't good Enought because I use a castle wars banking in my script and I got no problem.

2.Finding the chest a little bit more harder if you want to make your own method. You will need to use TPA, because there is a lot of the same color and things to confuse any kind of DTMOBJFinding in this place.

If you want to look at a reference. Download my Script and do CTRL + F than Type FindCas
You will find my function to find the Castle Wars Chest.

For the Walking, Type WalkToBank
The DTM for walking is under (WayOfBanking = 1)

Edit:
Save you a few time and try my Walking Procedure for fun. You will see it is posible. I don't care if you just decide to use it but give credit to me in your script.


WalkToTresor: Array[0..2] of Integer;
WalkToTresor[0] := DTMFromString('m1gAAAHic42JgYFjKxsAwB4h7gXgDEO8H4kNQvASIT0DxO6Dab0D8EIhvAvEzIGZiZGCQAWJZIOYH4o9AsYSEOIacHFUGF1MJhmgPBYasrAw4Bsml9xmAMT9QLTGYkUiMAACiBhgq');
WalkToTresor[1] := DTMFromString('maQEAAHicrc8xCwEBAIbhj12RQQb8gMtqkVxiw26iI3Rdl4mOpESKgRRSYjT6Cfw0b9dlMfLVM33TG5O0DEtj3AJXHLFFGy1YsLHHGXc88MQLuZDkwkENBjKIoo4q7ODfYIIZGijDxHDg+Jyu9dGspLRan+T0LJUKedWKCZnZuIx0RHNvpMXU0+Ww87n9jpL0/Cr0B197AyctJNA=');
WalkToTresor[2] := DTMFromString('mKgEAAHic42NgYFjOxMAwG4j3QPFJJLwCiFuhuB6IG4G4CYjXAbEAIwODFxB7ADEfEAsCsSEQuwFxOBDrArEmEKsBsT4QBwHxd6B9hXkZDNkZyQzpKfFg/Pb5NziuLS9hyExPZHCwtYSLNXdOBmMNoF5yMCOZGBUAAIafKEA=');

procedure WalkToBank;
begin
if FindDTMRotated(WalkToTresor[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
wait(1500 + random(1000));
end else
if FindDTMRotated(WalkToTresor[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
wait(1500 + random(1000));
end else
if FindDTMRotated(WalkToTresor[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
Mouse(x, y, 3, 3, True);
FFlag(6);
wait(1500 + random(1000));
end else
begin
terminatescript;
end;
end;

i3egoHan

2012-03-14 20:18:30

From: xtrapsp
i looked in the openbankchest and it was missing CW :S but I'l have a go at that

and for the walking what do you suggest? because I don't click anywhere near where it ends up :P is it possible to make it click the $ icon on the minimap?


update srl.. its there..

Can you make it click the $ icons… Of course… Search for the yellow color on the minimap only… (MMX1, MMY1…etc

be carefull thou because they change location significantly when you relog…

DTM's would be best solution if you cant work with SPS

Mr Stoj

2012-03-14 20:57:14

what i currently use

procedure MoveToBank;

begin
wait(randomrange(400,600));
AntiBan;
Writeln('Moving to wcbank')
MyPath := [Point(1606, 4304), Point(1609, 4317), Point(1615, 4321), Point(1620, 4331)];
SPS_WalkPath(myPath);
SPS_WalkPath(myPath);
While (IsMoving) do
begin
wait(50)
OpenBankChestEdge(SRL_BANK_CW);
end;

xtrapsp

2012-03-15 06:39:47

I feel… STOOPID haha thanks guys :)

Mr Stoj

2012-03-15 07:38:39

From: xtrapsp
I feel… STOOPID haha thanks guys :)



welcome anytime.
if u have done the fight kiln quest i have just got banking flawless there (10%) faster


. if your not sure of anything its always good just to search the function list,