Phoenix13nl
2009-02-02 11:36:31
Yes, i know the name sucks, if anyone has suggestions, please tell me but i could think of anything better -.-
First of all i want to say that finaly back after 3 months, in the meanwhile i learned C# programming and im actualy realy good at it now :D i created 2d games, a 2d rpg engine with a realy cool map editor, a keylogger, my own chat server/clien, my own email receiver/sender/viewer (has trouble reading fully parsing a html decoded email though), my own webbrowser, which im using right now, a calculator, and way, way more :D
//That^ got a little longer as expected, sorry, back to the script.
The script attacks chickens and picks up their feathers, and repeats that.
Even though it's still the Beta version, i've tested it and it works realy well.
The only bug(s) i've found so far is that when you try to attack a chicken next to another fighting player/chicken, it has trouble noticing wether you're fighten it or not, and therfor it might count it as a kill why its not.
The script is Non-Smart, but can be 'Converted' to Smart simply by removing 3 '//' at the specified places.
Points that still require testing:
Switching player when reached a 'limit' (Amount of kills, Feathers, Time..);
TODO List:
1: Add support for ranging(Check Arrows, Pick up arrows);
2: Add the ability to gether and bury the bones;
3: Add the ability to switch between chickens/goblins
{
Ex: Players[0].Integers[#] = 1; // 0 = Chickens, 1 = Goblins
}
4: Do the same for cows as with the goblins, but also add the ability to gether the hides;
5: Add ability to eat (shouldnt realy be neccesary at these low level monsters, but would still be very nice i guess);
6: Banking for cowhides or other stuff;
7: DeathWalk to area of monster to fight(just in case)
Code:
Here are some of my 'proggies'
Edit* dam, i just died using my script and lost 1.4K feathers, i dont know the reason though… :(.
but the feathercount is still correct: -1120, i lost 1.4K, he has 280 in inventory by now.
Another Edit* i finaly learned how reflection works, should i make one that finds monsters by reflection?
please post your Tips/Bugs/Proggys :D
##
Non longer being updated, stopped with RS and scriping and back into creating games :), I was almost finished with a new cleaner version with reflection but im to lazy to finish it sorry, Nevertheless it should still work fine, have fun.
##
First of all i want to say that finaly back after 3 months, in the meanwhile i learned C# programming and im actualy realy good at it now :D i created 2d games, a 2d rpg engine with a realy cool map editor, a keylogger, my own chat server/clien, my own email receiver/sender/viewer (has trouble reading fully parsing a html decoded email though), my own webbrowser, which im using right now, a calculator, and way, way more :D
//That^ got a little longer as expected, sorry, back to the script.
The script attacks chickens and picks up their feathers, and repeats that.
Even though it's still the Beta version, i've tested it and it works realy well.
The only bug(s) i've found so far is that when you try to attack a chicken next to another fighting player/chicken, it has trouble noticing wether you're fighten it or not, and therfor it might count it as a kill why its not.
The script is Non-Smart, but can be 'Converted' to Smart simply by removing 3 '//' at the specified places.
Points that still require testing:
Switching player when reached a 'limit' (Amount of kills, Feathers, Time..);
TODO List:
1: Add support for ranging(Check Arrows, Pick up arrows);
2: Add the ability to gether and bury the bones;
3: Add the ability to switch between chickens/goblins
{
Ex: Players[0].Integers[#] = 1; // 0 = Chickens, 1 = Goblins
}
4: Do the same for cows as with the goblins, but also add the ability to gether the hides;
5: Add ability to eat (shouldnt realy be neccesary at these low level monsters, but would still be very nice i guess);
6: Banking for cowhides or other stuff;
7: DeathWalk to area of monster to fight(just in case)
Code:
//WARNING: BETA VERSION. IT MIGHT STILL CONTAIN SOME BUGS.
///////////////////////////////////////////////////////////////////
// //
// PPPPPP //
// PP PP HH HH OOOOOOO EEEEEE NNN NN II XX XX //
// PPPPPP HH HH OOO OOO EE NNNN NN II XX XX //
// PP HHHHHHH OO OO EEEEEE NN NN NN II XXX //
// PP HH HH OOO OOO EE NN NNNN II XX XX //
// PP HH HH OOOOOOO EEEEEE NN NNN II XX XX © //
// //
///////////////////////////////////////////////////////////////////
// **** DISCRIPTION **** //
// Something.................................................. //
// ........................................................... //
// ........................................................... //
// ........................................................... //
///////////////////////////////////////////////////////////////////
// Script created by: Phoenix13NL //
///////////////////////////////////////////////////////////////////
program ChickenFucker;
{.include srl/srl/misc/smart.scar}
//REMOVE THE '//' AT THE START OF THE ABOVE LINE TO ENABLE SMART, DO THE SAME AT BOTTOM OF SCRIPT! (1 of 3)
{.include SRL/SRL.scar}
Var x, y, World, KillCount, LastFeatherCount, FeatherCount, InvFeather : Integer;
SaveProggy : Boolean;
Const
ChickenColor1 = 1055878;
ChickenColor2 = 1652061;
ChickenColor3 = 1586263;
ChickenColor4 = 791907;
ChickenColor5 = 1055619;
ChickenColor6 = 726136;
ChickenColor7 = 594016;
ChickenColor8 = 528476;
ChickenColor9 = 1055351;
ChickenColor0 = 924015;
FeatherColor1 = 403204;
FeatherColor2 = 469253;
FeatherColor3 = 402948;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Current player
SaveProggy := True;
Players[0].Name := ''; //Username
Players[0].Pass := ''; //Password
Players[0].Nick := ''; //Nick (3-4 letters of your username)
Players[0].Active := True; //Is the player active?
Players[0].Integers[3] := -1; //Chickens to kill before switching to next player, -1 for Unlimited.
Players[0].Integers[4] := -1; //Feathers to pick before switching to next player, -1 for Unlimited.
Players[0].Integers[5] := -1; //Go to next player after ... minutes, -1 for Unlimited.
{Players[1].Name := ''; //Username
Players[1].Pass := ''; //Password
Players[1].Nick := ''; //Nick (3-4 letters of your username)
Players[1].Active := True; //Is the player active?
Players[1].Integers[3] := -1; //Chickens to kill before switching to next player, -1 for Unlimited.
Players[1].Integers[4] := -1; //Feathers to pick before switching to next player, -1 for Unlimited.
Players[1].Integers[5] := -1; //Go to next player after ... minutes, -1 for Unlimited.}
{Players[2].Name := ''; //Username
Players[2].Pass := ''; //Password
Players[2].Nick := ''; //Nick (3-4 letters of your username)
Players[2].Active := True; //Is the player active?
Players[2].Integers[3] := -1; //Chickens to kill before switching to next player, -1 for Unlimited.
Players[2].Integers[4] := -1; //Feathers to pick before switching to next player, -1 for Unlimited.
Players[2].Integers[5] := -1; //Go to next player after ... minutes, -1 for Unlimited.}
Mousespeed := 12;
World := 94; //Smart world number
end;
procedure AntiRandoms;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then Exit;
case random(10) of
0: PickUpMouse;
1: RandomMovement;
2: RandomRClick;
3: case random(4) of
0: HoverSkill('Fishing', false);
1: HoverSkill('Cooking', false);
2: HoverSkill('Woodcutting', false);
3: HoverSkill('Firemaking', false);
end;
end;
end;
Procedure PreparePlayer;
var Count, i : Integer;
begin
Writeln('Procedure: PreparePlayer');
Repeat
Wait(1000);
Inc(i);
If i > 20 then Exit;
Until LoggedIn;
if not LoggedIn then Exit;
InvFeather := DTMFromString('78DA6364656060106240038C482490E606120' +
'204D480CC1025A0860748481050C301246408A86107120A04D4B0' +
'10A1869508BBD808FB1D00D90F013F');
Count := ItemAmount('inv', 'dtm', InvFeather, []);
Players[CurrentPlayer].Integers[1] := Count;
Players[CurrentPlayer].Integers[6] := GetSystemTime;
LastFeatherCount := LastFeatherCount + FeatherCount;
writeln(inttostr(count));
SetRun(True);
SetAngle(True);
end;
Function FindChicken : Boolean;
begin
if not LoggedIn then Exit;
Result := FindObjCustom(x, y, ['Chicken', 'Chick'{:P}, 'icken'], [ChickenColor1, ChickenColor2,
ChickenColor3, ChickenColor4, ChickenColor5, ChickenColor6, ChickenColor7, ChickenColor8, ChickenColor9, ChickenColor0], 5);
if FindColorCircle(x, y, 65280, x, y, 5) or FindColorCircle(x, y, 255, x, y, 5) then
begin
Result := False;
end;
end;
Function Fighting(Loops : Integer) : Boolean;
Var c : integer;
begin
if not LoggedIn then Exit;
Result := false;
Repeat
if FindColor(x, y, 65280, 259, 159, 289, 179) or FindColor(x, y, 255, 259, 159, 289, 179) then
begin
Result := true;
break;
end;
Wait(500);
Inc(c);
if c > Loops then
begin
if FindColor(x, y, 65280, 229, 126, 267, 178) or FindColor(x, y, 255, 229, 126, 267, 178) then
begin
Result := true;
break;
end;
break;
end;
Until false;
end;
Function AttackChicken : Boolean;
begin
if not LoggedIn then Exit;
Mouse(x, y, 10, 10, false);
Result := ChooseOption('ttack');
end;
Procedure WaitFightOver;
begin
if not LoggedIn then Exit;
Repeat
Wait(500 + Random(250));
Until not Fighting(1);
end;
Procedure KillChickens;
Var Killed : Boolean;
StartTime, Elapsed : Integer;
begin
if not LoggedIn then Exit;
Killed := false;
StartTime := GetSystemTime;
Repeat
AntiRandoms;
Elapsed := GetSystemTime - StartTime;
if Elapsed > 10000 then
begin
exit;
end;
Repeat
Wait(500 + Random(250));
AntiRandoms;
Until FindChicken;
if AttackChicken then
begin
if Fighting(8) then
begin
WaitFightOver;
Killed := true;
Inc(KillCount);
Inc(Players[CurrentPlayer].Integers[0]);
end;
end;
Until Killed;
end;
Function FindFeather : Boolean;
begin
if not LoggedIn then Exit;
Result := FindObjCustom(x, y, ['eather'], [FeatherColor1, FeatherColor2, FeatherColor3], 10);
end;
Function PickFeather : Boolean;
begin
if not LoggedIn then Exit;
Mouse(x, y, 5, 5, false);
Result := ChooseOption('eather');
end;
Function GetPlayerFeatherCount : Integer;
Var Count : Integer;
begin
if not LoggedIn then Exit;
Count := ItemAmount('inv', 'dtm', InvFeather, []);
FeatherCount := Count - Players[CurrentPlayer].Integers[1];
Players[CurrentPlayer].Integers[2] := FeatherCount;
Result := FeatherCount;
end;
Procedure GrabFeathers;
begin
if not LoggedIn then Exit;
if FindFeather then PickFeather;
end;
Procedure GrabAllFeathers;
begin
if not LoggedIn then Exit;
Repeat
GrabFeathers;
Wait(1000 + Random(500));
Until not FindFeather;
GetPlayerFeatherCount;
end;
procedure SaveProgressReport;
var
List: TStringList;
i: Integer;
begin
List := TStringList.Create;
List.Add('//----------------------------------------\\');
List.Add('|| ChickenPlucker ||');
List.Add('||----------------------------------------||');
List.Add(Padr('|| Time Running: '+ TimeRunning, 42) + '||');
List.Add(Padr('|| Chickens Killed: '+ IntToStr(KillCount), 42) + '||');
List.Add(Padr('|| Feathers Picked: '+ IntToStr((LastFeatherCount + FeatherCount)), 42) + '||');
List.Add('||----------------------------------------||');
for i := 0 to HowManyPlayers - 1 do
begin
List.Add(Padr('||ID: '+ Players[i].Name+ ', Kills: '+ IntToStr(Players[i].Integers[0])+ ', Feathers: '+ IntToStr(Players[i].Integers[2]),42) + '||');
end;
List.Add('||----------------------------------------||');
List.Add('\\----------------------------------------//');
SaveToFile(List, AppPath + 'ProgressReport ' + TheDate(3) + '.txt');
end;
Procedure ReportProgress;
var i : Integer;
begin
ClearDebug;
Writeln('//------------------------------------------\\');
Writeln('|| ChickenPlucker ||');
Writeln('||------------------------------------------||');
Writeln(Padr('|| Time Running: '+ TimeRunning, 44) + '||');
Writeln(Padr('|| Chickens Killed: '+ IntToStr(KillCount), 44) + '||');
Writeln(Padr('|| Feathers Picked: '+ IntToStr((LastFeatherCount + FeatherCount)), 44) + '||');
Writeln('||------------------------------------------||');
for i := 0 To HowManyPlayers - 1 Do
begin
Writeln(Padr('|| '+ Players[i].Name+ ': Kills: '+ IntToStr(Players[i].Integers[0])+ ', Feathers: '+ IntToStr(Players[i].Integers[2]),44) + '||');
end;
Writeln('||------------------------------------------||');
Writeln('\\------------------------------------------//');
if SaveProggy Then SaveProgressReport;
end;
Function CheckLimit : Boolean;
begin
if Players[CurrentPlayer].Integers[3] > 0 then
begin
Result := Players[CurrentPlayer].Integers[0] > Players[CurrentPlayer].Integers[3];
end;
if Players[CurrentPlayer].Integers[4] > 0 then
begin
If not Result then Result := Players[CurrentPlayer].Integers[2] > Players[CurrentPlayer].Integers[4];
end;
if Players[CurrentPlayer].Integers[5] > 0 then
begin
If not Result then Result := (((GetSystemTime / 1000) / 60) > (((Players[CurrentPlayer].Integers[5] / 1000) / 60) - ((Players[CurrentPlayer].Integers[6] / 1000) / 60)));
end;
end;
Procedure MainLoop;
begin
Repeat
PreparePlayer;
Repeat
KillChickens;
GrabAllFeathers;
ReportProgress;
if not LoggedIn then Break;
if CheckLimit then break;
AntiRandoms;
AntiBan;
Until False;
NextPlayer(True);
Until False;
end;
begin
ClearDebug;
DeclarePlayers;
SmartSetupEx(World ,false, false, false); //REMOVE THE '//' AT THE START OF THE LINE TO ENABLE SMART! (2 of 3)
SetTargetDC(SmartGetDC); //REMOVE THE '//' AT THE START OF THE LINE TO ENABLE SMART! (3 of 3)
SetupSRL;
LampSkill := 'Rangin'; //Change into any skill you want.
Logout;
closefile(rewritefile('C:\WINDOWS\.jagex_cache_32\uid.dat',true));
LoginPlayer;
MainLoop;
end.
Here are some of my 'proggies'
//Short test,
//------------------------------------------\\
|| ChickenPlucker ||
||------------------------------------------||
|| Time Running: 20 Minutes and 7 Seconds ||
|| Chickens Killed: 48 ||
|| Feathers Picked: 300 ||
||------------------------------------------||
|| w4rr1or 34: Kills: 48, Feathers: 300 ||
||------------------------------------------||
\\------------------------------------------//
//Long test //Only met one random, and srl solved it succesfully :)
//------------------------------------------\\
|| ChickenPlucker ||
||------------------------------------------||
|| Time Running: 1 Hours, 40 Minutes and 33 Seconds||
|| Chickens Killed: 272 ||
|| Feathers Picked: 1910 ||
||------------------------------------------||
|| W4rr1or 34: Kills: 272, Feathers: 1910 ||
||------------------------------------------||
\\------------------------------------------//
Even though this is only a 300 lines script (for now) it took over 7 hours to create it :S and because i worked the whole night until 05:30 i only had 1.5 hours left to sleep and then wake up for school again :p realy, time flies when having fun at scripting :DEdit* dam, i just died using my script and lost 1.4K feathers, i dont know the reason though… :(.
but the feathercount is still correct: -1120, i lost 1.4K, he has 280 in inventory by now.
Another Edit* i finaly learned how reflection works, should i make one that finds monsters by reflection?
please post your Tips/Bugs/Proggys :D
##
Non longer being updated, stopped with RS and scriping and back into creating games :), I was almost finished with a new cleaner version with reflection but im to lazy to finish it sorry, Nevertheless it should still work fine, have fun.
##