SRL Archive - First Scripts

Airbattlestaff crafter.


rol prodigy

2012-01-25 18:04:08

this is what I have so far… it's nothing great but it's a start need help implementing the bank pin function and also I would love for anyone to review it one problem I keep getting it when I click run it opens another tab called math and gives me a storm of errors.

//Script by rol Prodigy
//Version 1.0
program AirBattlestaffMaker;

//{.Include SRL\SRL\Misc\SMART.simba}
//remove the(//) if you want smart
{.include SRL/SRL.simba}

const
// ----------------SETUP-----------------------------
//For now you gotta be in swbank
loadcount= 1000 ; //how many cycles you need (14 to a cycle)
colb= 5 ; //Battlestaff col
rowb= 2 ; //Battlestaff Row
cola= 3 ; //AirOrb col
rowa= 2 ; //AirOrb row


bankty= 2 ;
//0 for any npc bank, 1 for specific bank, 2 for soul wars chest
specific='fwb' ; //some valed inputs are: 'veb', 'vwb' 'feb'


var
x, y: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //set username
Pass := ''; //set password
Pin := ''; //set pin
Active := True;
LampSkill := 'Crafting'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the Crafting skill
// ---------------END SETUP----------------------------------------
end;
end;


procedure AntiRandoms;
begin
ClickToContinue;
FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
end;

procedure Antiban;
begin
case Random(60) of // Random(60) generates a random integer from 0 to 59
10: RandomRClick;
20: HoverSkill('Fletching', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
end;
end;

function banksw: Boolean;

var
X, Y: Integer;
begin
FindNormalRandoms;
if (FindObjCustom(X, Y, ['Bank','nk ch','k che','chest'], [2963780,10724266,10000542,5592409], 3)) then
Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(300));
end;

Procedure MakeStaff;
begin
mousespeed:=(7+random(3));
wait(200);
if bankty=2 then
banksw;
wait(500+random(600))
depositall;
wait(800+random(300));
WithdrawEx(colb,rowb,14,[]);
wait(500+random(500));
withdraw(cola,rowa,0);
wait(500+random(1000));
closebank;
wait(1800+random(500));
invmouse((random(13)+1),1);
wait(700+random(300));
Invmouse((15+random(14)),1)
wait(1000+random(1000));
mmouse(359,408,200,200);
mmouse(259,408,30,30);
wait(100+random(200));
getmousepos(x,y);
begin
if ( WaitUpTextMulti(['Mak', 'tions'], 200) ) then
Mouse(x,y,1,1,true)else
exit;
end;
repeat
wait(1000);
Antirandoms;
until invcount=14
Antiban;
wait(random(5000));
if random(2)=1 then
begin
writeln('taking mini break');
wait(random(20000));
Antiban;
AntiRandoms;
end;
writeln('14 more staffs made');
end;

Procedure mainloop;
var
counter:integer;
begin
counter:=0;
repeat
counter:=1+counter;
findnormalrandoms;
MakeStaff;
writeln(loadcount-counter);
writeln('loads to go');
until counter=loadcount
writeln('Another set, problem free');
end;


Pin function need help implementing:

function CheckPin: Boolean;
begin
if(Players[CurrentPlayer].Pin = '')and(PinScreen)then
begin
Writeln('We are at the pin screen and you didn''t enter a pin');
TerminateScript;
end else
begin
if(PinScreen)then
begin
Writeln('Found Pin Screen');
InPin(Players[CurrentPlayer].Pin);
Writeln('Pin successfully entered');
Sleep(1000 + random(500));
if(BankScreen)then
begin
Result := true;
end;
end;
end;
end;

kevin33

2012-01-25 18:08:45

Glad to see you got it somewhat working.

rol prodigy

2012-01-25 18:10:00

yeah the only thing I need now is help implementing the pin procedure and

also with that math tab or wtv.

rol prodigy

2012-01-25 18:28:44

Now it won't open math but will open text and give me this


Error: Exception: You passed a wrong ye to a finder function: 475. The client has a height of 24, thus the ye is out of bounds. at line 557