View Full Version : want to bank at a chest
tk8878
11-20-2011, 04:52 PM
I want to make my bot bank at a chest in soulwars I can only get it to bank at a npc.
Why not make a FindObj function like this for finding the chest?:
function FindChest: Boolean;
var mX, mY, Tries : Integer;
begin
if (not(LoggedIn)) then Exit;
FindNormalRandoms;
if FindObjEx(mX, mY, ['ank', 'hest'], ['0000000', '0000000'], 0, 50, MSX1,
MSY1, MSX2, MSY2) then
begin
Mouse(mX, mY, 0, 0, True);
Wait(Random(1000));
// Add more stuff here like checking for the bank screen and such:
end;
end;
It's extremely basic and I honestly suggest you learn about ACA and TPAs instead of doing that. But this would be good to start with and build from.
[Nathan]
11-20-2011, 06:15 PM
TPAs are nice and all, and definitely have a useful purpose, but for something as static as a chest, completely unnecessary. i've used something similar to what you've posted for ~ 30 hours (not in a single run) without a single messup of the openBank method. Just because something is simple doesn't make it bad. Though I tend to feel an anti-simple sentiment on these forums...
I don't agree. I believe that if you understand something more advanced than what you previously knew, why not use it to your advantage? Practice makes perfect.
Yes, sometimes simplicity is better. But TPAs are just more accurate and efficient than normal methods. But to each their own, I suppose.
Thank you for sharing your opinion.
;847206']TPAs are nice and all, and definitely have a useful purpose, but for something as static as a chest, completely unnecessary. i've used something similar to what you've posted for ~ 30 hours (not in a single run) without a single messup of the openBank method. Just because something is simple doesn't make it bad. Though I tend to feel an anti-simple sentiment on these forums...
[Nathan]
11-20-2011, 06:51 PM
I don't agree. I believe that if you understand something more advanced than what you previously knew, why not use it to your advantage? Practice makes perfect.
Yes, sometimes simplicity is better. But TPAs are just more accurate and efficient than normal methods. But to each their own, I suppose.
Thank you for sharing your opinion.
Accurate, yes, efficient, no. If a color is nearly static and the object is not moving, findcolor will be much more efficient than comparing multiple TPAs to determine where you want to click.
In this case, the soul wars bank the colors are so different and unique that finding the chest is very easy with a simple FindColorTolerance and manipulating the results that it will be 99% successful on the first color it tries.
You are right about the first part though, I agree with that, using more advanced coding will make a better scripter by practice.
My main point was that one thing (i.e TPAs) aren't a one sized fit solution for everything. If we were looking for a mining vein or tree or something that is less static, I would agree, TPAs are 100% the way to go. But for this specific example, using something simpler might be the better solution
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.