SRL Archive - RS3 Help

Is anyone good at grabbing colors? Having some isssues.


trips

2015-05-21 19:35:23

Hello,

The past two days I have been having trouble with my Castle Wars script. It joins the Sara side and works great. But when it gets to Zammy and gets into game it won't climb the ladder because it can't find it for some reason.

There are A LOTTTT of similar colored objects in Zammy, such as the floor, other ladders, barricades, decorations, ETC.

I am having a lot of trouble grabbing colors good enough to find the object in game and making it climb the ladder.

Here's a screenshot of what it looks like. (Ignore the red boxes, they are for something else.)
[ATTACH=CONFIG]25992[/ATTACH]

I don't know much about ATPAs ATM, I might have to look into them as that might be a better option. I have only started to script 2 days ago so I'm very new to a lot of this.

I would really appreciate it if someone could help me out. :)


Thanks!

Citrus

2015-05-21 19:42:22

The bottom of the ladder seems like the best bet.


trips

2015-05-21 20:50:19

From: evilcitrus
The bottom of the ladder seems like the best bet.



That's what I came up with too, I noticed the bottom of the ladder is the best part and used the "mark best color" from different angles on the client and it was a pretty good match but off to the right, east of the respawn room you can see another ladder that leads downstairs. It catches that one too. I am thinking that is why it doesn't climb the ladder in respawn room.

When it is in Zammy respawn it just stands there and doesn't do anything, it spams "mouse over text" " " in my debug on Simba.

I don't know how to make it move the camera around untill it finds the right object. I figured the code I had now would work but I guess not.

Here's what I have:

procedure climbLadders();       //clicks sara/zammy ladders in respawn room
var
x, y: integer;
begin
if not isLoggedIn() then
exit;
minimap.setAngle(Random(360));
wait(randomRange(2000, 3000));
if mainscreen.findObject(x, y, 4411735, 4, colorSetting(2, 0.16, 0.28), mainscreen.playerPoint, 50, 30, 50, ['adder'], MOUSE_LEFT) then //sara ladder
exit()
else mainscreen.findObject(x, y, 3033169, 6, colorSetting(2, 0.11, 0.97), mainscreen.playerPoint, 50, 50, 10, ['imb', 'adder'], MOUSE_LEFT); //zammy ladder
end;

Citrus

2015-05-21 21:43:20

Read: https://villavu.com/forum/showthread.php?t=107757

trips

2015-05-21 21:47:59

From: evilcitrus
Read: https://villavu.com/forum/showthread.php?t=107757


Yeah that's my next step, I figured I would post here first and see if I could get some help and views from other people on my issue. I guess figuring out how to use ATPAs is what I have to do. :(

I'll keep checking this thread in the meantime while I'm trying to learn that.

StickToTheScript

2015-05-21 23:44:45

I would recommend trying the bottom of the ladder like evilcitrus recommended, and if you want to know how TPAs and ATPAs work, The Mayor does a really good explanation of them in his tutorial here: https://villavu.com/forum/showthread.php?t=107757

Just 'Ctrl' + 'F' and search for ATPA. They will help you out a lot with this situation.

Edit: Lol. Alright. Like it was stated above then.. We both posted the link…

Edit 2: This tutorial might be of use once you learn how TPAs and ATPAs work. https://villavu.com/forum/showthread.php?t=110546
Its a good tutorial by Camel.