SRL Archive - RS3 Help

emailmarker


vvarfare

2014-09-22 16:38:00


program PERFECTvial;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I Socks.Simba}

///////////////MAKE SURE YOU HAVE A STEAM STAFF EQUIPED AND ON LUNARS/////////////////////////////////
//////////////YOUR PRESET SHOULD BE 5 ASTRALS 1ST SLOT AND THE REST CLAY//////////////////////////////
///////////////MAKE SURE YOU HAVE YOU FAVORITE WORLD SET WOULD RECOMEND SHANTAY PASS W100//////////////
//////////////I HAVE THE BANKING SET UP ZOOMED IN ALL THE WAY IN CAN BE CHANGED BY CHANGING THE CORDS//
/////////////BANK IS SET TO SHANTAY CAN BE CHANGED, CORDS AND TEXT/////////////////////////////////////
/////////////BUTTON PRESET CAN BE CHANGED EITHER ONE OR 2//////////////////////////////////////////////
///////HIGHLY RECOMMEND YOU CHANGIG SOME OF THE DELAYS A BIT JUST TO GIVE SOME ANTIBAN RANDOM VALUES///
//IF YOU ARE USING THIS SCRIPT SELL CLAY FOR MID PRICE IF IT DROPS, ITS BAD FOR ALL OF US//////////////


//************=======================
//************=========================
//************=======================
//************======================
//===================================
//==================================
//=================================
//==================================
//=================================


var
timesCasted: integer;
xpGained: integer;
clayMade: integer;
timeRan: TTimeMarker;


const
EMAIL_ALERTS = true;

EMAIL_USERNAME = 'asdadalt';
EMAIL_PASSWORD = 'asdasd';
EMAIL_SEND = '1234567890@tmomail.net'; //The email that you want to receive the text about
EMAIL_FREQUENCY = 0.1; //In hours


procedure declarePlayers();
begin
setLength(players, 1);
currentPlayer := 0;
with players[0] do
begin
isActive := true;
loginName := 'adsad'; //ENTER YOUR USERNAME
password := 'asdada'; //ENTER YOUR PASSWORD
bankpin := 'adsasda'; //BANK PIN
world := 100; //PICK A WORLD ON YOUR FAVORITES
isMember := true;
end;
end;



procedure ANGLE_HIGH();
begin
mainScreen.setAngle(MS_ANGLE_HIGH); //SETS ANGLE CAN BE CHANGED ASWELL
wait(2000);
minimap.setAngle(MM_DIRECTION_NORTH); //ANGLE DIRECTION CAN BE CHANGED
end;


procedure Bank();
begin
MouseOval(385,216,30,30,Mouse_Move); //CORDS FOR SHANTAY BANK
if IsMouseOverText(['pen', 'hantay', 'hest'], 15000) then //SHANTAY BANK YOU CAN CHANGE THIS DEPENDING ON BANK YOU ARE USING
fastclick(mouse_left);
_waitBankOrPinscreen(4550);
wait(1350);
bankScreen.clickButton(BANK_BUTTON_PRESET_2); //PRESETS YOU CAN CHANGE THIS EITHER ONE OR 2
wait(1200+random(200));

begin
if not tabBackpack.isFull then
begin
writeln('Out of supplies');
players[currentPlayer].logout();
terminateScript();
end;
end;
If PinScreen.IsOpen Then /// BANKPIN STUFF
PinScreen.Enter(Players[CurrentPlayer].BankPin); /// ^ ^
end;

procedure CastHumidify;
begin
wait(100);
typesend('1',false); ///CHANGE THIS THAT WHAT KEYBIND YOU HAVE HUMIDFY IN///
timesCasted := timesCasted + 1;
xpGained := xpGained + 65;
clayMade := clayMade +27;
wait(5200);
end;


procedure Report();
begin
writeLn('|***********--------------PERFECTclay|');
writeLn('|***********----------------TIMER RAN|'+ timeRunning(TIME_BARE));
writeLn('|***********---------------------CASTS: ' + intToStr(timesCasted));
writeLn('|-----------------------------------XP: ' + intToStr(xpGained));
writeLn('|--------------------------------COUNT: ' + intToStr(clayMade));
writeLn('|-------------------------------------|');
writeLn('|-------------------------------------|');
writeLn('|-------------------------------------|');
end;
var
MS:Mail

procedure composeMessage;
var
s:String;
begin
s :='Time Running: ' + timeRunning(TIME_BARE) + ', CASTS ' + intToStr(timesCasted) + ',xpGained ' + intToStr(xpGained) + ' clayMade' + intToStr(clayMade);
MS.Create('smtp.gmail.com', 465, EMAIL_USERNAME, EMAIL_PASSWORD, EMAIL_SEND, 'PERFECTvials');
MS.SetMessage(s);
MS.SetFromName('Default');
MS.SetToName('Default');
MS.SendMail;
MS.Free;
end;
var
loop:Integer;
emailMarker:TTimeMarker;

begin
clearDebug();
disableSrlDebug := false;
smartPlugins := ['openGl32.dll']; ///CHANGE THIS TO d3d9.dll for directX
setupSRL();
declarePlayers();
emailMarker.start();
if not isLoggedIn() then
begin
players[currentPlayer].login();
wait(Randomrange(4000, 6000));
mainscreen.setAngle(MS_ANGLE_HIGH);
end;
exitTreasure();
ANGLE_HIGH()



repeat
begin
if emailMarker.getTime() > (60000) then
composeMessage;
emailMarker.reset();
emailMarker.start();
end;



repeat
clearDebug();
Report();
Bank();
CastHumidify();
until (false);

until not IsLoggedIn;



end.
]


Im trying to get sms notifications, i can get it send properly but once i ask it to repeat and get the time, it doesnt do anything any advice?

bonsai

2014-09-22 17:29:56

Looks like you got a begin/end pasted up wrong. that's one of the reasons everyone is always saying to indent your code properly, it makes it easier to spot these things.

The way you had it, after getTime() passed 60000 it would only do the composeMessage(). Then, EVERY TIME, not just when the timer was too big, it would reset the timer.

Which makes the timer small and it never gets to 60000!



repeat
if emailMarker.getTime() > (60000) then
begin
composeMessage;
emailMarker.reset();
emailMarker.start();
end;

repeat
clearDebug();
Report();
Bank();
CastHumidify();
until (false);
until not IsLoggedIn;

vvarfare

2014-09-22 17:55:13

From: bonsai
Looks like you got a begin/end pasted up wrong. that's one of the reasons everyone is always saying to indent your code properly, it makes it easier to spot these things.

The way you had it, after getTime() passed 60000 it would only do the composeMessage(). Then, EVERY TIME, not just when the timer was too big, it would reset the timer.

Which makes the timer small and it never gets to 60000!



repeat
if emailMarker.getTime() > (60000) then
begin
composeMessage;
emailMarker.reset();
emailMarker.start();
end;

repeat
clearDebug();
Report();
Bank();
CastHumidify();
until (false);
until not IsLoggedIn;



I got it working shortly after posting the only thing i did was ,i removed "until (false);" and it works fine

But yeah this is my first script, is there a proper indentation process?

Lipcot

2014-09-22 18:02:37

From: vvarfare
I got it working shortly after posting the only thing i did was ,i removed "until (false);" and it works fine

But yeah this is my first script, is there a proper indentation process?


yup, check mayors scripting tutorials, and there is a part that teacheas you how to indent properly