I'm sorry if I'm a bit sloppy, this is my first script and I just started working on this today. I wanted to post this to get some feedback on how I'm doing in terms of functionality and sustainability. I know that I might have over complicated some of my procedures and any tips are much appreciated.
Firstly, I want to thank The Mayor for his tutorials, without them I'd be lost. I'd also like to thank and Apologize to Camel for not asking him first before using his Anti ban procedure, but I did/do not have the 10 posts required to send a PM. If you have any objections to my use of the procedure let me know, but your anti-ban was great from my perspective, so thank you.
Features:
Feathers arrow shafts into Headless Arrows
Uses keyboard to click action bar, with fail safe if keyboard stops working to use the mouse to click inventory slot
simple antiban during progress window, takes mini breaks 5-10 minutes as an antiban procedure every once in a while
Instructions:
1- fill out username and password
2- make sure your shafts are in inventory slot 1, and action bar slot 1
3- i suggest keeping an eye on the script while it works for now, because it hasn't had extensive testing
To-Do list:
1- add headless arrow to arrow functionality
a)make mode and arrowhead type by user input
b)make action bar and inventory slots by user input
c)have the script change the Mouse over text data according to user input
2- add breaks
3- add a proggy
Current issues (that i know of):
1- once the fail safe mouse mode is activated it stays in that mode, and doesn't check back for the keyboard after a while. (I'll probably work on this sometime this week, before moving on to my To-Do list) (added a random integer 100 that will exit the mouse repeat if it hits >95)
2- if the user has more shafts than feathers, it will get stuck on the production window, and keep trying to click start once out of feathers. (added a fail safe that will terminate the script if progress window doesn't open within 5 seconds of clicking start)
and now to the script!!
Simba Code:
program HeadlessArrowMaker;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'user';
password := 'password';
isActive := true;
isMember := false;
world := 61; //world selecter (0 for random, -1 for just play button, other for specific world)
end
currentPlayer := 0;
end;
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~//
// Big Thanks to //
// The Mayor for his tutorials! //
// Camel for the Antiban in his Aircrafter //
// //
////////////////////// DO NOT TOUCH BELOW THIS LINE!! ////////////////////////
////////////////////// DO NOT TOUCH BELOW THIS LINE!! ////////////////////////
///////////////// Only Edit if you know what you're doing!! //////////////////
///////////////// Only Edit if you know what you're doing!! //////////////////
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~//
procedure Antiban(); //Taken from Camel's Aircrafter + some customiation (credit to him for an amazing script)
var
i: integer;
begin
i := random(850);
if i < 90 then
begin
writeLn('Doing antiban');
case i of
1..6: begin
writeLn('Taking Mini-break');
wait(gaussRangeInt(300000,600000));
if not isLoggedIn() then
begin
players[currentPlayer].login();
wait(gaussRangeInt(300,2000));
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
closePollWindow();
end;
end;
7..11: mouseMovingObject();
12..30: sleepAndMoveMouse(randomRange(100,6000));
31..47: begin
mouseOffClient(Random(4));
Wait(gaussRangeInt(10000,15000));
end;
48..63: Wait(gaussRangeInt(15000,20000));
64..70: pickUpMouse();
71..90: SmallRandomMouse(10 + random(40));
end;
writeLn('Antiban done');
end;
if(i > 700) then
begin
mouseSpeed := gaussRangeInt(18,29);
writeLn('Changing mouse speed');
end;
end;
procedure keyboardHeadless();
begin
repeat
typeSend('1', false); // keyboard Actionbar slot 1 (Shafts)
if productionscreen.isopen(5000) then //i If productionScreen is open within 5 seconds
begin
productionScreen.clickStart(); // Click the start button
if progressScreen.isOpen(5000) then // if progressScreen is open within 5 seconds
begin
writeLn('Making headless arrows!');
AntiBan();
repeat
wait(500);
until (not progressScreen.isOpen()); // Repeat waiting 0.5 second until it's not open anymore
end else
terminateScript();
end else
begin
writeLn('Switching to mouse mode');
exit;
end;
wait(gaussRangeInt(100, 1000)); //waiting between 0.1-1 second to repeat
until false;
end;
procedure mouseHeadless();
var
a: integer;
begin
repeat
tabBackPack.mouseSlot(1, MOUSE_MOVE); //Move mouse to slot 1
if isMouseOverText(['eather Arrow shaft']) then
begin
fastClick(MOUSE_Left); // Left click(Shafts)
end else
terminateScript();
if productionScreen.isOpen(5000) then // If productionScreen is open within 5 seconds
begin
productionScreen.clickStart(); // Click the start button
if progressScreen.isOpen(5000) then // if progressScreen is open within 5 seconds
begin
writeLn('Making headless arrows using failsafe!');
AntiBan();
repeat
wait(500);
until (not progressScreen.isOpen()); // Repeat waiting 0.5 second until it's not open anymore
end else
exit;
end else
terminateScript();
wait(gaussRangeInt(100, 1000)); //waiting between 0.1-1 second to repeat
a := random(100);
until a > 95; //tries to use keyboard again when a is above 95.
writeLn('Trying keyboard Again');
end;
// main loop
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();
repeat
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitTreasure(); // Exit treasure hunter
minimap.clickCompass(); // Make compass north and angle high
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
keyboardHeadless();
mouseHeadless();
wait(gaussRangeInt(100, 1000)) //waiting between 0.1-1 seconds to repeat
until false;
end.
Any suggestions or problems are much appreciated