I've written a few scripts that I want to work for a private server. I know what you're thinking, why does he want to auto on a private server? It's easy enough as is. This is a tough private server, pretty similar to RS and trust me I'm not going to try to convince you because I'll just end up losing. Anyway, the scripts compile and they always say "Script executed" but nothing happens…. It doesn't click on the client or anything. I use the find client tool and everything I just can't get it to work on the client I want. If anyone could help me I'd be VERY greatful, and if it's extended help i'd even be willing to compensate. I don't know if that's legal on here so if it's not disregard that. Please don't flame me on this, I understand it's not the best first post but you have to start somewhere… Thanks if you can help me, my MSN is [email]jazzyjay1231@live.com[/email]
Sir R. M8gic1an
2010-06-23 05:18:57
If you post the scripts maybe people will be able to help you..
~RM
Granted this was used on RS before, I had the version I edited to be usable on private servers but got frustrated and closed it out without saving… :\. Anyway here is the original saved version of the script. It's an auto fighter that I'd like to be able to use to fight monks and eventually maybe other monsters on a private server. I'd be grateful of any help. I don't need anything fancy on it, just for it to work on the private server client and be effective in eating and killing monsters of my choice. I'm not asking you to do it all for me, but I want to understand what you did and how you did it, because I'm new and would like to learn. Thanks again to anyone that decides to help.
program AutoFighter;
const
MonsterColor= 10989487;//replace with color of the creature to be fought
MonsterColor2= 9936542;
bmppickcolor= 11712699;
SkyColor= 3478561;
LowHealth= 255;
MedLowHealth= 2070783;
MedHighHealth= 65535;
var
x,y: integer;
procedure Login;
begin
if (findcolortolerance (x, y, SkyColor, 18, 17, 498, 327, 5)) then
begin
clickmouse(381, 183, true)
wait(1000+random(500))
sendkeys('new name')//replace username with your username
wait(1000+random(500))
clickmouse(370, 336, true)
wait(1000+random(500))
sendkeys('new pass')//replace password with your password
wait(1000+random(500))
clickmouse(380, 380, true)
wait(4000+random(500))
movemousesmooth(382, 353)
clickmouse(382, 353, true)
end
else
end;
procedure CheckHealth;
begin
if (findcolortolerance (x, y, MedLowHealth{adjust depending on monster}, 723, 26, 740, 38, 5)) then
begin
if (findcolortolerance (x, y, 5264753{put the food color here}, 558, 210, 730, 460, 5)) then
clickmouse(x, y, true);
end
else
end;
procedure FindAndAttackMonster;
begin
wait(2000+random(1000))
if (findcolortolerance (x, y, MonsterColor, 18, 17, 498, 327, 5)) or
(findcolortolerance (x, y, MonsterColor2, 18, 17, 498, 327, 5)) then
begin
clickmouse (x, y, true);
wait(7000+random(2000))//adjust the times as needed
sendarrowwait(0+random(4), 1150+random(950));
end
else
sendarrowwait(0+random(4), 700+random(850));
writeln('Could not Find')
wait(2000+random(1000))
findcolor(x, y, bmppickcolor, 577, 35, 693, 150);
end;
begin
Login;
wait(5000+random(1750))
repeat
CheckHealth;
FindAndAttackMonster;
until false
end.
Sir R. M8gic1an
2010-06-23 07:33:18
How about using ActivateClient?
~RM
I kind of have it working now, it'll recognize the client and everything, but I'm having trouble getting it to recognize the monster. It keeps saying "Could not find" and the mouse isn't moving at all. I designated for it to do that when it couldn't find the monster I was looking for. I changed it around to pick the color of the monk, but for some reason it still can't find it… help? :(
Sir R. M8gic1an
2010-06-23 07:56:37
Use the SRL include.
FindObjMultiCustom will be your new best friend ;)
~RM
I've never used includes before, how exactly would I put that into my script? I know it goes at the beginning… And what exactly does it do?
I can't find this in my SRL folder…which means I can't use it in my includes
So basically I take that, copy and paste it, save it as FindObjMultiCustom in my includes folder and type {.include SRL\FindObjMultiCustom.scar} at the top? What else would I have to change within my script for this to be effective, or is it just automatic? Sorry to make you work so hard but I'm new at this.
Sir R. M8gic1an
2010-06-23 08:24:30
Please read the tutorial I posted my friend, it will be much easier on you. You have to include SRL at the top of the script. Once you include SRL, all these functions will be available to you, and all you have to do is call them.
~RM
Yea, i did that. But I couldn't find the function within my SRL folder. I'm assuming that just because it isn't in the SRL folder it doesn't mean that it isn't within SRL itself? Thank you for your help. One last question. Is there any way to use S.M.A.R.T with a different client?
Sir R. M8gic1an
2010-06-23 08:33:01
Check out APPA by nielsie.
Scripts -> Test Corner -> (its a stickied thread).
The function will be in your SRL folder here:
SRL / SRL / core / Objects.scar
If it is not, then you do not have a propper copy of the SRL Include. Several tutorials will tell you how to get one.
~RM
I keep getting the error [Error] (330:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Core\Math.scar
Sir R. M8gic1an
2010-06-23 09:13:58
You didn't move your pluggins. Tutorial on how to setup SRL.
~RM
sylvawarrior
2010-06-23 13:15:03
From: Rasta Magician
You didn't move your pluggins. Tutorial on how to setup SRL.
~RM
I think what Rasta is trying to say without getting frustrated, is that you should make sure you have scar/simba properly set up with the appropriate includes and plugins before you try to compile and run any script. He has posted more than enough information and links to lead to to some very foolproof guides. Please utilize your resources ^_^