SRL Archive - First Scripts

Auto Sapphire Enchanter


isjusme

2008-04-20 20:47:23

**If you downloaded anything other than 1.3, please change!!!**
First off, this is my very first script and I is proud :D Ok but back to serious issues, I made this because I had 2k Sapphire Necklaces that I figured I could make a few more gp off of if I enchanted. I didn't want to do it so I figured I might as well learn how to use SCAR while I'm doing it. If you take the time to look at my script you will notice it to be very repititious. Any ideas on to shortening it would be helpful. You may also notice that at the end of the script acts like it will take another load out, but it won't. That was done on purpose. Not for antiban or anything, but I couldn't make it work in other way :P

Things I need:
-Help getting the progress report to work.
-Someone to tell me how to get AntiBan to work, I have the procedure set up, but I don't know where to put it.
-Help with the login, It tries to login, but it can't type because the title bar grays out.

I'm going to look back in the tutorial section to see if I can't find any help, but if you post it that is still helpful.

I may add more.

Features:
-Enchanting
-No color needed

Instructions:
-Setup Lines 16-19 and Line 26 NOT 27. Don't let those names fool you.
-Select Client
-Position Player in Varrok East Bank here:
-Until I get logged in fixed, start logged in.
-Play the Script
-report bugs

Notes:
-I am still testing.
-Any suggestions appreciated
-The antiban worked until I moved them after the Main procedure, but If I kept them there people would have to scroll through all of it to figure it out.


Special Thanks:
-Almost everyone in the beginner's Tutorials Section.
-People who don't leech ^.^

Future Updates:
-Multiplayer(even though I can't imagine why someone would have a lot of sapphire jewelry on more than one account.
-[SMART]
-SRL ID (I don't even know how to set an account up, so someone could also help me with that)
-The ability to enchant more than just Sapphire.

I should have fixed a bug that didn't let you withdraw from the bank.

Already had one update, fixed the Antirandoms ^.^

Zezi

2008-04-20 21:08:05

Wait(1000+random(200));
ClickMouse(252, 195,false);
Wait(1000+random(300));
MMouse(219, 238,2,2);
Wait(1050+random(300));


NOOO STOP DON'T USE THIS…
CLICK MOUSE = BANNAGE.

Caps for a reason, i know they're not allowed but to emphasise the fact that clickmouse = the devil.

isjusme

2008-04-20 21:13:38

What can i use then?
ClickMouseSpline?

skilld u

2008-04-20 21:17:36

use Mouse(x, y, 5, 5, true);

the 5, 5 is randomness.

isjusme

2008-04-20 21:31:09

ok so that is fixed.

Frederick

2008-04-21 08:58:14

Looks pretty good - ill test it sometime soon

Mark

2008-05-08 07:59:15

coul this scripit be easily modded to do all the gems in ur bank screen???

benjaa

2008-05-18 03:55:24

program AutoEnchanter;

{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}


var
Casts, ItemCol, ItemRow, CosmicRune, WaterRune : Integer;


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

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'sern';
Players[0].Pin := '0000'; //Pin, 0000 if none
Players[0].Active := True;
Players[0].Strings[0] := 'veb';//which bank you are in
Players[0].Integers[0] := 5; //casts (make sure you have enough supplies!!!!) <26

ItemCol := 1; //the item column of sapphire jewelry in the bank
ItemRow := 1; //the item row of sapphire jewelry in the bank
end;


procedure DeclareDTMs;
begin
CosmicRune := DTMFromString('78DA63B4626060686100036608C570FFAE340' +
'33F906684F2192D81442D116A7A08A83120C22E47FC6AFE030100' +
'D0591146');
WaterRune := DTMFromString('78DA638C63606058CE0006CC108A414472390' +
'33F906684F219416A361350130D24D61150930C24D6E356F31F08' +
'006A670BCE');
end;


procedure WithdrawSapphire;
begin
if (not LoggedIn) then exit;
if (not BankScreen) or (not PinScreen) then OpenBankFast(Players[CurrentPlayer].Strings[0]);
if (PinScreen) then InPin(Players[CurrentPlayer].Pin);
if (BankScreen) then
begin
FixBank;
Withdraw(ItemCol, ItemRow, Players[0].Integers[0]);
Wait(200+Random(100));
CloseBank;
end;
end;


procedure WithdrawRunes;
var
cx, cy, wx, wy : integer;
begin
if (not LoggedIn) then exit;
OpenBankFast(Players[CurrentPlayer].Strings[0]);
if (BankScreen) then
begin
DepositAll;
FixBank;
if FindDTM(CosmicRune, cx, cy, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(cx, cy, 5, 5, false);
Wait(Random(100));
ChooseOption('ll');
Wait(100+Random(100));
end else
begin
Writeln('[Error] Couldnt find Cosmic Runes');
CloseBank;
Logout;
TerminateScript;
end;
if FindDTM(WaterRune, wx, wy, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(wx, wy, 5, 5, false);
Wait(Random(100));
ChooseOption('ll');
Wait(100+Random(100));
end else
begin
Writeln('[Error] Couldnt find Water Runes');
CloseBank;
Logout;
TerminateScript;
end;
end;
end;


procedure EnchantSapphire;
var
s : integer;
begin
if (not LoggedIn) then exit;
if (bankscreen) then exit;
for s:=3 to 28 do
begin
GameTab(7);
CastSpell(7);
if (ExistsItem(s)) then
begin
MouseItem(s, true);
Casts := Casts + 1;
Wait(200+Random(100));
end else
break;
end;
end;


procedure DepositEnchanted;
begin
if (not LoggedIn) then exit;
OpenBankFast(Players[CurrentPlayer].Strings[0]);
if (BankScreen) then
begin
Deposit(3, 28, true);
end;
end;


procedure AntiRandoms;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
if FindFight then RunTo('N',True);
end;

procedure AntiBan;
begin
case random(33) of
0: AlmostLogout;
end;
end;


procedure Setup;
begin
SetupSRL;
DeclarePlayers;
DeclareDTMs;
ActivateClient;
LoginPlayer;
end;


Begin
Setup;
WithdrawRunes;
WithdrawSapphire;
EnchantSapphire;
DepositEnchanted;
end.

Start In Any Bank.
Fill In Form.
Select Client (Crosshair).
Have Sapphire in bank at ItemCol&ItemRow.
Have Cosmic and Water Runes in top screen of bank.

This script is really just a tutorial-type for IsJusMe. It wouldnt be too good for long shifts atm, but feel free to edit if you want, just credit where neccessary.

benjaa

2008-05-18 04:40:32

From: CRU1Z1N
coul this scripit be easily modded to do all the gems in ur bank screen???


Yes it could done quite easily through DTMs and case … of…


Sorry about the double post guys :P
But the other one was dedicated to the new script.

evert230

2008-05-18 04:49:58

pretty cool