A script that kills yaks?
I'm rather worried about this..
Printable View
A script that kills yaks?
I'm rather worried about this..
Waiting time after killing the yak seems to be even longer than killing the yak. Also it could be better if the bot does "Randoms" like opening prayer tab or checking experience while its fighting. I wont run this bot over night today but Ill try it as soon as it gets a lil bit faster :)
Edit:
Also I got reported some many times using this bot so its better for me not to bot this so much
People can also use a regen brace which heals you quite quickly + good strength bonus. It's also quite cheap if I remember right.
180k or so but its down to like 125k atm i think =)
I always use when i afk train on bandits.
yea fixing that up a bit now.. one of the big problems is the 'infight' function that checks if we're in combat waits for the players health bar to disappear.. which adds quite a bit of time
the boss of the yaks!!!! we'll need strength potions guys!
really like the script no need for ought fancy when yaks r gr8 exp... but like u said already. u probz need speed up the interval between fights
yes speed it up plz
and it get lots of hide for me...
the pickin up of hides doesnt really matter eventually ure inv will fill with hides and ure remaining food, dont see it making any difference to hwo the script runs
yea I wasn't worried about that, mis-clicking is going to happen.. it'd only slow it down if I took time to drop the hides
going to upload a slightly faster version in a few mins
new version on OP version 0.3
takes out boredhuman antiban and adds some different ones that are quicker
testing it, it seems pretty fast.. one of the major speed issues is - the infight waits till our players life bar is gone before it starts to look for another yak.. so I'll definitely fix that so it looks for our life bar + enemies life bar.. and if enemies isn't there then it searches for a yak, should be quite a bit faster
im currently gettin in excess of 70-80k an hour exp =)
With the changes i self implemented onto this script.
Works wonderfully now, as it did before just now though it allows me to get more exp per hour.
ahh, sorry.
Its just simple but i will post it =)
program YakAttack;
{$DEFINE SMART}{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SRL/SRL/skill/fighting.scar}
///////////////////////////////////
//start setup
///////////////////////////////////
const
//change to the smart world you want. Having the same world in all your scripts allows you to change scripts without smart restarting.
SWorld = 15;
//Speed of your mouse, default is good!
MSpeed = 13;
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;
End;
///////////////////////////////////
//end setup
///////////////////////////////////
procedure SetupChar;
begin
SetAngle(True);
MakeCompass('N');
Retaliate(True);
end;
procedure MSI_RandomFKey;
var
i, randInt, randKey, currTab: Integer;
keys: array[0..4] of Word;
begin
currTab := GetCurrentTab(); // Get the current tab player is on
keys[0] := VK_F1;
keys[1] := VK_F2;
keys[2] := VK_F3;
keys[3] := VK_F4;
keys[4] := VK_F5;
randInt := Random(6);
case randInt of
0..4:
begin
KeyDown(keys[randInt]);
wait(35+random(85));
KeyUp(keys[randInt]);
end;
else
for i := 1 to 3 do
begin
randKey := Random(5);
KeyDown(keys[randKey]);
wait(35+random(85));
KeyUp(keys[randKey]);
end;
end;
wait(75+random(100));
GameTab(currTab); // Reset to starting tab
end;
//random antibans to use
procedure GAntiBan;
begin
writeln('Choosing random antiban');
case random(10) of
0 : begin
writeln('Random click selected');
RandomRClick;
end;
1 : begin
writeln('Random movement selected');
RandomMovement;
end;
2 : begin
writeln('Bored human selected');
BoredHuman;
end;
3 : begin
writeln('Prayer tab selected');
GameTab(27);
Wait(randomrange(100,300));
end;
4 : begin
writeln('Random Angle selected');
RandomAngle(True);
end;
5 : begin
writeln('Random Fkey selected');
MSI_RandomFKey;
end;
6 : begin
writeln('Hover Skill (HP) selected');
HoverSkill(skill_hitpoints,false);
Wait(randomrange(100,300));
end;
7 : begin
writeln('Game Tab selected');
GameTab(21);
end;
8 : begin
writeln('Pickup Mouse selected');
PickUpMouse;
end;
9 : begin
writeln('Random wait selected');
Wait(randomrange(100,200));
end;
end;
Wait(randomrange(100,200));
end;
//thanks flight! and home!
Function Eat(What: String): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPPercent < 50) then
If InvEmpty then Logout
else
for i := 1 to 28 do
begin
InvMouse(I, 3);
if IsUpText(What) then
begin
ClickMouse2(True);
Wait(RandomRange(150, 225));
Result := True;
Exit;
end else
Continue;
end;
end;
//from flight, thanks!
Function FindObjSimple_F(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 0 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 15, 15);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;
MiddleTPAEx(ATPA[0], x, y);
if (TimeFromMark(T) > 3000) then
Exit;
MMouse(x, y, 10, 10);
Wait(randomrange(115,225));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(True);
if DidRedClick then
begin
Result := True;
Break;
end;
end;
Until(Result)
end;
//used to add chatbox text after 'someone else is fighting that' so it doesn't loop
procedure GetOutF;
begin
case random(2) of
0 : begin
KeyDown(VK_Tab);
wait(35+random(100));
wait(35+random(100));
KeyUp(VK_Tab);
wait(25+random(70));
wait(35+random(100));
end;
1 : begin
ExamineInv;
end;
end;
end;
//Less likely to use one of the GAntiBan's
Procedure RAntiBan;
begin
case random(4) of
0 : begin
writeln('Random Wait AntiBan');
Wait(randomrange(100,300));
end;
1 : begin
GAntiBan;
end;
2 : begin
writeln('Pickup mouse random wait');
Wait(randomrange(100,300));
PickUpMouse;
Wait(randomrange(100,250));
end;
3 : begin
writeln('Pickup mouse multi');
Wait(randomrange(100,300));
PickUpMouse;
Wait(randomrange(100,300));
PickUpMouse;
Wait(randomrange(100,300));
end;
end;
end;
//finding and killing yaks
procedure KillYak;
var
sX,sY: Integer;
label
fighting;
begin
if FindObjSimple_F([1053721, 6777452], ['ttck','ak'], MSCX, MSCY) then
writeln('Attacking Yak!');
fighting:
While IsMoving do
wait(1);
wait(randomrange(100,300));
if FindBlackChatMessage('omeone else is fighting') then
begin
writeln('Someone else is controlling the population of this yak!');
case random(4) of
0 : begin
sX := MSX1;
sY := MSY1;
end;
1 : begin
sX := MSX1;
sY := MSY2;
end;
2 : begin
sX := MSX2;
sY := MSY1;
end;
3 : begin
sX := MSX2;
sY := MSY2;
end;
end;
if FindObjSimple_F([4869718, 1908774], ['ttck','ak'], sX, sY) then
GetOutF;
goto fighting;
end else
begin
if InFight then
begin
repeat
FindNormalRandoms;
writeln('fighting...');
Wait(randomrange(100,200));
Eat('Eat');
until (not InFight) or (Not LoggedIn)
end;
writeln('Another Yak down, billions to go');
wait(randomrange(100,200));
end;
end;
//script startup
procedure Startup;
begin
Smart_Server := SWorld;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LogInPlayer;
MouseSpeed := MSpeed;
wait(100+random(100));
end;
begin
Startup;
SetupChar;
repeat
KillYak;
findnormalrandoms;
until not LoggedIn
writeln('stopping script');
TerminateScript;
end.
making the waits shorter doesn't speed it up that much.. I had to increase them to speed it up - less long antibans
that's why I'm taking out things like boredhuman
hope this change can be implemented if its succesful
btw is there no way to code for the bot to attack once the character stops animating?
yeah its sped it up more than enough from 55k an hour to 75k an hour exp. 20k an hour exp difference.
your shorter wait version is giving me about half the exp I get with 0.3
by shortening the wait, you increase the amount of antibans.. which actually makes the waits a lot longer
redownload 0.3, I just changed 2 lines real fast
I'll add some stuff later this week so it instantly starts attacking a yak once it's done fighting
thanks a lot man, ill try it now
yeah , it was eating lobs on me after every kill =/
V0.3 i mean.
Back to my edited version for now.
what? nothing changed for eating
post the debug box plz? I can't reproduce your error
i used the new version im not sure if its quicker or not as it still waits for ure health bar to disappear, perhaps it is now quicker in its reaction time afterwards, it seems so
checking if infight without checking for an hp bar seems to be the main thing slowing down the xp/hour. Its effective, but could be more efficient. I am not sure how well Scar is at detecting animations. possibly something to do with pixelshifting, but I'm mostly talking out my ass lol. Looks like a promising script though, would someone please inform me where yaks are, so that I may test it out? I've never found them lol
http://runescape.wikia.com/wiki/Neitiznot
that's where yaks are
when this script gets put in the real scripts section (once I add more stuff) I'll have a tutorial on how to get there etc
I'm planning on doing something that like.. detects your HP bar and the closest one to you, and if yours is the only one that appears then it'll return false so it starts looking for a new target to attack.. instead of only looking at your hp bar
Damn havent dont fremenick isles lol. I'll look into it. That is a brilliant work around though! Kind of the way a miner detects the nearest ore, and when it attemts to detect and its no longer present, then it selects a new ore, your script would select a new yak. Idk if that might make it easier for you to implement to base it on a method such as that, but hopefully my input helps :)
fremmy isles doesnt need to be completed just started to the point where u speak to the king of jatizo. dnt bother gettin the stuff he wants just leave jatz and go to neitz
Grats, this script is pretty sweet. I'm working on a new barrows pure so I may give this a try . Thanks bud. :)
Ran for an hour, 50k ish exp, was pretty smooth no problems so far.
@grats
You can snag my fighting stuff from Fast Fighter / NAF for InFight, IsFightAt and FightOnScreen I would suggest. :)
Make sure you find the TBox that I use with it.
Hey, I've used it for a few mins and noticed that it will pick up yak hair and hide quite frequently. About 15 minutes in, about 14 yak hides/hairs in invent. Otherwise, good script; nice work and thanks.
This is just because the colours that the bot looks for on yaks are simmilar to those of the hairs / hides. You can safely edit the colours (play around with them) until the bot only clicks yaks. However jagex seems to be changing the colours in-game so you might have to re-do this process every now and then.
*btw OP. I love your script. It's got me about 3m xp so far, I've made a few tweaks since the day you posted it, and am working on making a GDK with your script as the skeleton! Trials has probably mentioned it somewhere.
for antibans, All you need to do with them in my opinion is make them occur far less and you'll be fine. As too much anti-ban isn't human :)
I'll post up a stolen procedure from narcle's fast-fighter to help with the infight.
As a small proggy type thing, The most I've ran it for so far, is about 16 hours with the modded {CRASHSMART} .Bat file, It works amazingly. Thankyou.
I've been using this script and its very useful, I've just upgraded to bandos chestplate/tassets and berserker helm using whip. When I run the script now it just constantly clicks my armour and whip thinking its fighting? Other than that it runs fine. I guess its to do with similar colours, but is there a fix?
Pretty much the same, glad schools done today! got 1 online test to take and I'll be done! I love the slow down
will have my new computer up so you'll see me on IM again lol
yea something I did in 0.3 is reduced them a LOT, but they'll get reduced more in up coming versions!
that's a misclick of a yak sometimes.. it's really something I'll probably never fix since the colors are so similar, it doesn't have a negative effect at all
it clicks your whip? I've used a whip for 30+ hours never seen that
does it actually click, or does it just mouse over? thanks
this might be one of the stupidest questions you've ever seen, but which one of the attachments is the most recent version, the first or the second?
yea the 3,0 one is the most recent
the other one is the first time I did it, that one sucks lol
thank ye!
I'll be getting 99 range and strength hopefully in a few days with this (:
some suggestions :
faster attack time between yaks
make it stop attacking other people's yaks
it tries to pick up yak hairs sometimes
other than these minor issues (which shouldn't pose a problem anytime soon), this script is great!