View Full Version : Private Server Fighter
hogan
01-01-2012, 05:12 PM
I am trying to make a private server fighter but am completely lost;
All i want it to do is Attack something wait until it is dead and then pick up its 100% drop...
Edit:
Current script;
Problem;
doesnt do anything, only slowly moves mouse in a direction across the screen
program Yakkiller;
{$i SRL/SRL.scar}
var
x,y:Integer;
const
Monster = 2699326;
Monster1 = 2568773;
Monster2 = 3489360;
AttTime = 1500;
XpCounter = 65860;
BlueCharm = 344244;
Procedure AttackYak;
begin
if FindObjCustom(x, y, ['Yak', 'ak'], [monster, monster1, monster2], 7) then
begin
Mouse(x, y, 3, 3, True);
repeat
wait(500)
until
(FindColorSpiralTolerance(x, y, XpCounter, msx1, msy1, msx2, msy2, 25)) = false
end;
end;
Procedure Pickupdrop;
begin
if(FindColorSpiralTolerance(x, y, BlueCharm, MSX1, MSY1, MSX2, MSY2, 5))then
begin
Mouse(x, y, 5, 5, true); //If found will Left-Click on the x, y coordinates with a randomness between 5 pixelend
end;
end;
Begin
Repeat
AttackYak;
Pickupdrop;
until(false)
end.
Failure
01-01-2012, 05:22 PM
And on what part you're exactly lost?
hogan
01-01-2012, 05:25 PM
Just in general, i mean every time i try to make a script i get errors, but first off i am confused on how to say, Attack Yak, wait until dead, pickup 100% drop, if yak is already being attacked attack a different one
Remember it is a private server so default commands dont work
Failure
01-01-2012, 05:27 PM
Attacking Yak would be easy... Wait till it dies, ehh I once found a good thing for itbut I forgot. Picking up the drop I think you're going for the Blue Charms if this is Soulsplit? You could use the Hit/Defence Splashes as a check if it's being attack or not.
hogan
01-01-2012, 05:30 PM
Yupp that is the server aha
hogan
01-01-2012, 06:29 PM
So this is what i have so far except it runs for like 1 second and quits and i still dont even know where to start for picking up a dropped item.
I want to use the xp counter number as it show the xp coming down as a check for being (in combat)
Remember its a private server
program Yakkiller;
{$i SRL/SRL.scar}
begin
SetUpSRL;
ActivateClient;
end.
var
x,y:Integer;
const
Monster = 2699326;
Monster1 = 2568773;
Monster2 = 3489360;
AttTime = 1500;
XpCounter = 65860;
Procedure Attack Yak;
if FindObjCustom(x, y, ['Yak', 'ak'], [monster, monster1, monster2], 7) then
begin
Mouse(x, y, 3, 3, True);
repeat
wait(500)
until
(FindColorSpiralTolerance(x, y, XpCounter, msx1, msy1, msx2, msy2, 25)) = false
end;
end;
begin
ClearDebug;
SetUpSrl;
ActivateClient;
repeat
Attack Yak;
until(false)
end.
PatDuffy
01-01-2012, 06:31 PM
You have 2 mainloops. Either change the name of the first begin -end yoy be a procedure,then call it in your bottom loop. Or delete it and add that code into the bottom main segment.
For picking the item up just seartch for the color of the charm and use
mouse(x,y,0,0,true); to click it
And like what duffy said
Make a new
procedure main;
Begin
Repeat
Attackyak;
Pickupdrop;
Until(killed-so-many-yaks)
End;
and add you procedures so you have one main loop and don't forget to failsafe it so it doesn't keeps trying for eva when it can't find anything
hogan
01-01-2012, 06:45 PM
I understand now that I had 2 loops but not really sure what you mean on where to add it, i tried just deleting all together but then i get errors for things that i know that there is nothing wrong with.
For eg.
telling me to add a ; where there already is one
PatDuffy
01-01-2012, 06:57 PM
I understand now that I had 2 loops but not really sure what you mean on where to add it, i tried just deleting all together but then i get errors for things that i know that there is nothing wrong with.
For eg.
telling me to add a ; where there already is one
Usually in most programs when your coding, for error messages the actual error is sometimes on the line above or several lines above. For ; it's usually the line above.
hogan
01-01-2012, 07:21 PM
Alright thanks Im going to post an updated version of what i have done here in a sec
Here it is, also up top:
program Yakkiller;
{$i SRL/SRL.scar}
var
x,y:Integer;
const
Monster = 2699326;
Monster1 = 2568773;
Monster2 = 3489360;
AttTime = 1500;
XpCounter = 65860;
BlueCharm = 344244;
Procedure AttackYak;
begin
if FindObjCustom(x, y, ['Yak', 'ak'], [monster, monster1, monster2], 7) then
begin
Mouse(x, y, 3, 3, True);
repeat
wait(500)
until
(FindColorSpiralTolerance(x, y, XpCounter, msx1, msy1, msx2, msy2, 25)) = false
end;
end;
Procedure Pickupdrop;
if(FindColorSpiralTolerance(x, y, BlueCharm, MSX1, MSY1, MSX2, MSY2, 5))then
begin
Mouse(x, y, 5, 5, true); //If found will Left-Click on the x, y coordinates with a randomness between 5 pixelend
end;
begin
ClearDebug;
SetUpSrl;
ActivateClient;
repeat
Begin
Repeat
AttackYak;
Pickupdrop;
end;
until(false)
end.
I will be on my computer shortly but I just noticed you have a space in your procedures name
Procedure Attack Yak;
And it should be
Procedure AttackYak;
hogan
01-01-2012, 07:49 PM
thanks again for the help dude. And alright i see that now, ill try again
edit:
found a couple more errors posted most recent up top
here you go buddy compare mine to yours.
I have shown you where the main procedure would go
in you pickupdrop procedure you tried to find the color before you called the begining of the script :D anyway i hope i helped let me know if you have any more problems
program Yakkiller;
{$i SRL/SRL.scar}
var
x,y:Integer;
const
Monster = 2699326;
Monster1 = 2568773;
Monster2 = 3489360;
AttTime = 1500;
XpCounter = 65860;
BlueCharm = 344244;
Procedure AttackYak;
begin
if FindObjCustom(x, y, ['Yak', 'ak'], [monster, monster1, monster2], 7) then
begin
Mouse(x, y, 3, 3, True);
repeat
wait(500)
until
(FindColorSpiralTolerance(x, y, XpCounter, msx1, msy1, msx2, msy2, 25)) = false
end;
end;
Procedure Pickupdrop;
begin
if(FindColorSpiralTolerance(x, y, BlueCharm, MSX1, MSY1, MSX2, MSY2, 5))then
begin
Mouse(x, y, 5, 5, true); //If found will Left-Click on the x, y coordinates with a randomness between 5 pixelend
end;
end;
procedure main;
begin
repeat
AttackYak;
Pickupdrop;
until(false)
end;
begin
ClearDebug;
SetUpSrl;
ActivateClient;
main;
end.
Failure
01-02-2012, 06:54 AM
Also can I say, the FindObj wont work due the font? :o
hogan
01-02-2012, 03:36 PM
is there any way to change the font?
Try finding out what version the server is running and post asking if anybody knows
I don't have a clue myself
hogan
01-02-2012, 04:19 PM
It is a 317 server, the one thing im wonder is if it is possible to check for combat using the hp bars in a certain area, like your character is in combat if there is 2hp bars right at the center of the screen basically
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.