SRL Archive - First Scripts

Edgeville yew and banker-not working


shaman

2010-01-20 04:56:43

This is the beginnings of my edgeville yew cutter and banker. I am having problems with it finding the DTM that i used for the tree. Instead of clicking on the tree it will click randomly around. I no its basic, thats because ive just started it. If anyone knows how to fix the problem somehow can you please explain how to.

Simtoon

2010-01-20 05:05:19

Ok, in FindDTM you should use SRLs Cords.. MMX1, MMY1, MMX1, MMY2

[php]
{ const MMX1, MMY1, MMX2, MMY2;
Description: MiniMap Edge Points. }
const
MMX1 = 550;
MMY1 = 8;
MMX2 = 703;
MMY2 = 161;

{ const MMCX, MMCY;
Description: MiniMap Centre Point. }
const
MMCX = 627;
MMCY = 85;

{ const MSX1, MSY1, MSX2, MSY2;
Description: Main Screen EdgePoints. }
const
MSX1 = 4;
MSY1 = 4;
MSX2 = 516;
MSY2 = 338;

{ const MSCX, MSCY;
Description: Main Screen Centre Points. }
const
MSCX = 259;
MSCY = 170;

{ const MIX1, MIY1, MIX2, MIY2;
Description: Inventory EdgePoints. }
const
MIX1 = 547;
MIY1 = 202;
MIX2 = 737;
MIY2 = 466;

{ const MICX, MICY;
Description: Inventory Centre Points. }
const
MICX = 642;
MICY = 334;

{ const MCX1, MCY1, MCX2, MCY2;
Description: Chat Screen EdgePoints. }
const
MCX1 = 4;
MCY1 = 342;
MCX2 = 514;
MCY2 = 475;

{ const MCCX, MCCY;
Description: Chat Screen Centre Points. }
const
MCCX = 250;
MCCY = 401;

{ const MBX1, MBY1, MBX2, MBY2;
Description: BankScreen EdgePoints (where you click the items, does not include tabs). }
const
MBX1 = 26;
MBY1 = 84;
MBX2 = 480;
MBY2 = 292;
[/php]

these are the cords so in your FindDTM you should try

[php]
FindDTM(DTM, x, y, MMX1, MMY2, MMX1, MMY2)
[/php]



Edit: Also you left your pass in there,
Edit: i changed it and im pming your pass to you now
Edit: Pmed

shaman

2010-01-20 05:12:47

i should hav mentioned that the DTM is of part of the tree not the symbol for it. When i did change the DTM to teh symbol it still clicked randomly

Simtoon

2010-01-20 05:26:33

why are you using a dtm to find the tree?

shaman

2010-01-20 06:07:56

They seemed easiest lol. I tried using a colour but it kept clicking the colour if it was on the ground somewhere.

Simtoon

2010-01-20 06:25:36

Got an example of the colour procedure you made?

shaman

2010-01-20 06:27:31

if FindColorTolerance(x,y,Yew,MSX1, MSY1, MSX2, MSY2,50)

thats an edited one that ive just tried

Bad Boy JH

2010-01-20 07:35:12

You obviously need a way to confirm what you moved your mouse over is the tree…

IsUpText('yew')

Would return true, if the tree is yew, and false if not, assuming the mouse is over it…

Heavenguard

2010-01-20 17:07:08

Don't use a DTM for tree cutting, or mining. Use Simple FindColor Functions. // Edit i See you did that. :P
Also - For The Value set for yew, make it, Yew := FindTreeColor; if you didnt already , As far as I know that autocolor still works fine.

You could use TPA's as well if you wanted to, but if your just starting to script, don't worry about it :P
The Uptext suggestion that BadBoy recommended is definetly something to use, it basically checks the uptext [words/characters on the top left side of the MainScreen] for the letters/characters you put in. [Letters should be 3-4 letters not capitilized, like 'ree' for Tree.]

shaman

2010-01-20 21:39:33

Ok so i did a bit of editing replacing the DTM with find colour tolerence, changed the Yew value to FindTreeColour, hopefully put the IsUpText in the right spot. Im fairly sure ive got it right this time though for me it hasnt all the way through to banking yet so i'm crossing my fingers on that.

TRiLeZ

2010-01-21 00:37:54

You need to put IsUpText after you make the mouse move over the tree…

It's gonna be hard making an Edgeville yew chopper and banker so why don't you read up on some tutorials? I have a tutorial which will be very useful for you… Click Here.

Bad Boy JH

2010-01-22 05:43:10

assuming that "FindColorSpiralTolerance" starts searching from the centre of the box try this… it should find the CLOSEST tree and chops it…

begin
FindColorSpiralTolerance(x, y, findtreecolor, MSX1, MSY1, MSX2, MSY2, 5)
MMouse(x, y, 5, 5)
if isuptext('yew') then
begin
getmousepos(x, y)
Mouse(x, y, 0, 0 true) //yes i know, no randomness, but it would look weird moving the mouse again wouldn't it?
repeat
Someantiban
Wait(sometime)
until(notchopping) //setup something here, we can't keep checking uptext, because the character may have moved,
//which would get rid of the uptext
end;
end.

that would be a good procedure, and easily modifiable into a boolean function…