SRL Archive - First Scripts

SW-Humidify - bank location and pin support


elfiik

2012-01-26 03:57:47

Hey guys, i need help with better sw bank location and need pin support.
May me any help. thx elf
program SoulWarsHumidify;//
{$DEFINE SMART}
//{$DEFINE CRASHSMART}
{$DEFINE SRL5}
{$i srl/srl.simba}
//{$i SRL\SRL\Misc\stats.simba}

const
SRLStats_Username = '';// SRL Stats ID
SRLStats_Password = '';// SRL Stats Pass
HowManyToFill = 10000;// to the number of items you want filled.


var
CPH, Loads, FilledItem, Casts, Bank : Integer;
EXP, aFound : Extended;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Nick :=''; // 3-4 lower case letters of your character's name
Pin :=''; // NO PIN SUPPORT.
Member := true;
Active := true;
end;
end;


Procedure CheckStats;//SRL Stats

begin
if ((SRLStats_Username = '') And (SRLStats_Password = '')) then
begin
case MessageBox('No Stats account entered, would you like to set one up?','SRL Stats',mbYesNoCancel) of
mrYes:
begin
OpenWebPage('http://stats.villavu.com/register');
TerminateScript;
end;
mrNo:
begin
SetupSRLStats(399,'Anonymous','anon1337');
Exit;
end;
mrCancel: TerminateScript;
end;
end else
SetupSRLStats(399,SRLStats_Username,SRLStats_Password);
end;


procedure BankChest(PX:Integer; Click: Boolean);//credits to Demise for her guide :)
var
x, y : Integer;

begin
Bank := DTMFromString('m1gAAAHic42IAAkYGhi9AihNI/wLSHED6P5D+AWX/BikB0peA9DEgPgrF56D0RSC+BsXXgTgp3JuhLDOaIS3aj6EoLYKhJD2SIS8phKEgJYzBx9mKIdzPmSHUx5GBFagWhvlxYFaI84jCCAAASX8YHQ==');


if FindDTMRotated(PX, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(x, y, 0, 0);
GetMousePos(x, y);

if (WaitUpText('se Bank', 200)) then
begin
Writeln('Opening bank.');
ClickMouse2(True);
Wait(500);

if (BankScreen) then
begin
Writeln('Bank Opened.');
FreeDTM(Bank);
Exit;
end;
end;
end;
end;


procedure SetUp;
begin
MakeCompass('S');
SetAngle(SRL_ANGLE_HIGH);
Writeln('Thanks for using! Have a nice day :) ');
Wait(500);
end;


procedure HandleItem;
begin
BankChest(Bank, True);

if (BankScreen) then
begin
Writeln('Depositing.');
Deposit(4, 28, true);
IncEx(Loads, 1);
Wait(200);
Writeln('Withdrawing.');
Withdraw(0, 0, 28);
CloseBank;
Wait(300+Random(300));
Exit;
end else

if not (BankScreen) then
begin
repeat
BankChest(Bank, True);
until(BankScreen);
HandleItem;
end;
end;


procedure ClickSpell;
var
x, y : Integer;
Humidify : Integer;

begin
GameTab(Tab_Magic);

Humidify := DTMFromString('mwQAAAHic42RgYOACYn4gFgZiMSAWAGJmBgjggmIOIOaDYhCfBYjZgJgbiHmhamXzVgNJRgKYMCBkAoopAAspAgo=');

If FindDTM(Humidify, X, Y, MIX1, MIY1, MIX2, MIY2) Then
begin
Writeln('Casting Humidify.');
Mouse (x, y, 0, 0, true);
FreeDTM(Humidify);
SleepAndMoveMouse(3500);
IncEx(FilledItem, 27);//Modify if you aren't using a steam staff.....
IncEx(Casts, 1);
end;
end;


procedure ProgressReport;//Thanks to King Kong and Camaro' for their input on this.
begin
EXP := 65;
CPH := Round((Casts * 3600) / (GetTimeRunning / 1000));
ClearDebug;
Writeln('=======================================================');
Writeln(' Soul Wars Humidifier V2');
Writeln(' Time running: '+TimeRunning+'');
Writeln(' Items filled: '+ToStr(FilledItem)+'');
Writeln(' Casts done: '+ToStr(Casts)+'');
Writeln(' Casts per hour: '+ToStr(CPH)+'');
Writeln(' Amount left: '+ToStr(HowManyToFill - FilledItem)+'');
Writeln(' Exp gained: ' + FloatToStr(Loads * EXP) + '');
Writeln('=======================================================');
stats_IncVariable('Magic EXP (Gained)', 65);
stats_Commit;
end;


begin
Smart_Server := 9;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
ActivateClient;
DeclarePlayers;
CheckStats;
LogInPlayer;
SetUp;
repeat
if not LoggedIn then TerminateScript;
//BankChest(Bank, True);
HandleItem;
ClickSpell;
ProgressReport;
until(FilledItem=HowManyToFill);
if (FilledItem=HowManyToFill) then
LogOut;
TerminateScript;
end.

Caotom

2012-01-26 04:43:41

Looks like a fairly solid script…
You may want to consider adding a few things such as:

In either the bank chest or the handle item you may want to consider adding a failsafe that logs you out after a certain number of failures (quite easy to do, even just add an integer that counts up each time it loops and logs you out when it hits 20 or 50 or 100…) Example from my powerminer:
repeat
Wait(200+random(100));
Tries := Tries + 1;
if(Tries = 150)then
begin
Writeln('Failed to find rocks 150 times');
Logout;
TerminateScript;

Anti randoms, even just a
FindNormalRandoms
inside the main loop would work (I know that many of the randoms don't work, but they will be fixed soon)

Anti-Ban, just a simple antiban procedure such as:

Procedure Antiban;                   //Partial credit to YoHoJo
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
Case Random(AntibanFrequencey) Of
0:
begin
StatsGuise('Antiban');
GameTab(tab_Stats) HoverSkill('Mining', False);
Wait(400 + Random(450));
GameTab(tab_Inv);
end;
1:
begin
StatsGuise('Antiban');
GameTab(tab_Inv);
ExamineInv;
end;
2:
begin
StatsGuise('Antiban');
SleepAndMoveMouse(3500 + Random(600));
end;
3:
begin
StatsGuise('Antiban');
GameTab(Tab_Stats);
Wait(3000 + Random(1500));
GameTab(tab_Inv);
end;
4:
begin
StatsGuise('Antiban');
HoverSkill('random', False);
Wait(1000 + Random(500));
GameTab(tab_Inv);
end;
5:
begin
StatsGuise('Antiban');
PickUpMouse;
end;
6:
begin
StatsGuise('Antiban');
BoredHuman;
end;
end;
end;


Hope this helped :)
~Caotom

Press Play

2012-01-26 04:56:51

First off, you shouldn't use DTMs for things that are on the Runescape mainscreen such as the bank chest! This is because you are always changing angles and the colours will always be changing etc. Instead, you could use SRL's bankchest function: OpenBankChest(SRL_BANK_SW); (see here)

As for Pin handling, that's fairly easy. You just need to insert (once again from SRL):
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
Putting it all together you get: (just your HandleItem; procedure)
procedure HandleItem;
begin
OpenBankChest(SRL_BANK_SW);

if PinScreen then
InPin(Players[CurrentPlayer].Pin);

if (BankScreen) then
begin
Writeln('Depositing.');
Deposit(4, 28, true);
IncEx(Loads, 1);
Wait(200);
Writeln('Withdrawing.');
Withdraw(0, 0, 28);
CloseBank;
Wait(300+Random(300));
Exit;
end else

if not (BankScreen) then
begin
repeat
BankChest(Bank, True);
until(BankScreen);
HandleItem;
end;
end;
You should also add in failsafes where I haven't but I hope this clears a few things up and teaches you a few thing :)

VillaVuFTW

2012-01-26 15:32:53

Wow nice credits.. Me and Hero developed this.. well he developed barebones and I had him update his post with my updated script.. NO CREDIt = FAG

elfiik

2012-01-27 01:07:26

From: VillaVuFTW
Wow nice credits.. Me and Hero developed this.. well he developed barebones and I had him update his post with my updated script.. NO CREDIt = FAG


heyo,i no say it me script i say i need help with complete this script …btw :)

Hero

2012-01-27 03:24:50

Is this the latest crappiest version?

VillaVuFTW

2012-01-27 06:55:49

I love how he can't speak any english, but he can create such a script?.. Yeh Hero we got a leecher trying to take credit >.>