SRL Archive - RS3 Outdated / Broken Scripts

Zammy wine grabber!


Feroc1ty

2010-12-20 16:08:24

Hey guys, I made a script for grabbing zammy wines and alching at the same time, it generally earns me around 60-70K mage exp and 150-250K coins an hour.

(you don't have to alch but why not… you're earning your money back anyways)

requirements: at least 37 magic for falador teleport, but if you don't have it you can edit the script a bit and the walking function will simply walk you back… but teleporting is awesome :D

I stopped using it so I really haven't shaped it up or added anything cool to it, if you want something added just ask and I'll try to add it…


How to set up the script… add a new constant for whatever item you're alching and add it to the PickAlchItem function, than set up your declare players.

How to set up the character… equip your guy with a ring of life and staff of fire, turn on auto retaliate(sometimes the character attempts to grab the wine, it's super rare but it happens,) grab law, air, water, and nature runes, a bunch of noted alch items and you're set… place the character anywhere between fally west bank and the chaos temple


I might be forgetting something so if I did point it out!

program ZamorakWine;

{$i SRL/SRL/Misc/SMART.scar }
{$i SRL/SRL.scar }
{$i reflection/reflection.simba }

function PtToBox(tile:TPoint;size:integer):TBox;
begin
Result.X1 := Round(tile.x - size/2);
Result.X2 := Round(tile.x + size/2);
Result.Y1 := Round(tile.y - size/2);
Result.Y2 := Round(tile.y + size/2);
end;

procedure MoveToBox(box:TBox);
var tpt:TPoint;
ttl:TTile;
begin
repeat
ttl := Tile(RandomRange(box.x1, box.x2),RandomRange(box.y1, box.y2));
sleep(500+random(300));
until TileOnMM(ttl);
tpt := TileToMM(ttl);
Mouse(tpt.x, tpt.y, 3, 3, true);
FindNormalRandoms;
end;

procedure fWalkPath(tpa:TPointArray;reverse:boolean);
var i:integer;
begin
if not reverse then
begin

for i := high(tpa) downto 0 do
begin
if TileOnMM(PointToTile(tpa[i])) then
break;
end;

for i := i to high(tpa) do
begin
MoveToBox(PtToBox(tpa[i],4));
end;

end else
begin

for i := 0 to high(tpa) do
begin
if TileOnMM(PointToTile(tpa[i])) then
break;
end;

for i := i downto 0 do
begin
MoveToBox(PtToBox(tpa[i],4));
end;

end;

R_FFlag(0);

end;

{F.A.Q.

Q. Why are your AntiRandom methods in the AlchItem function?
A. Most of this script runs in the magic tab, and FindNormalRandoms opens up
the inventory, which means if I placed it in the main loop after each alchemy
it would open up the inventory, and go back to magic tab.

}

const

// SMART client settings
CLIENT_MEMBERS = true;
CLIENT_SERVER = 60;
CLIENT_SIGNED = true;
CLIENT_DETAIL = false;

// Break time values in minutes
SCRIPT_ACTIVE_TIME = 120;
SCRIPT_ACTIVE_RANDOM = 30;

SCRIPT_BREAK_TIME = 10;
SCRIPT_BREAK_RANDOM = 20;

// Values for color sarching functins
GROUND_COLOR_WINE_GRAY = 7763580;

// Values of item ID's which may be used
YEW_LONGBOW = 856; // (noted) yew longbow(s)
RUNE_BRUTAL = 4803; // rune brutal arrow
MAPLE_LONGBOW_U = 63; // (noted) maple longbow(u)

var x,y,MSCheckWine,MSHighAlch:integer;
TelekineticGrab,HighAlchemy,TeleFalador,MonestarySpot:TBox;
AlchItem:TInvItem;
Monestary:TPointArray;
InveFull,Alch:boolean;
BreakTime:longint;

procedure DeclarePlayers;
begin
HowManyPlayers := 1; // How many players declared?
CurrentPlayer := 0; // Number of player to start with.
NumberOfPlayers(HowManyPlayers);
with Players[0] do
begin
Name := ''; // Characters full RS username.
Pass := ''; // Characters RS password.
Nick := ''; // 3 non-caps letters of char's RS username.
Member := true; // Is character a member?
Pin := ''; // Characters bank pin if one exists
Active := True;
end;
end;

procedure TakeBreak;
var r:integer;
begin
if GetSystemTime > breaktime then
begin
if breaktime = 0 then
begin
r := SCRIPT_ACTIVE_TIME + random(SCRIPT_ACTIVE_RANDOM);
breaktime := GetSystemTime + (r * 60000);
writeln('Next break coming in ' + inttostr(r) + ' minutes.');
exit;
end;
if random(1) = 0 then
Logout;
r := SCRIPT_BREAK_TIME + random(SCRIPT_BREAK_RANDOM);
writeln('Taking a break for ' + inttostr(r) + ' minutes.');
Sleep(r*60000);
r := SCRIPT_ACTIVE_TIME + random(SCRIPT_ACTIVE_RANDOM);
breaktime := GetSystemTime + (r * 60000);
writeln('Next break coming in ' + inttostr(r) + ' minutes.');
if not LoggedIn then
LoginPlayer;
end;
end;

procedure AntiBan;
begin
case Random(799) of
0: IdleTime(2000, 1000, 0.2);
1: HoverSkill('magic', False);
2: RandomRClick;
3: PickUpMouse;
4: RandomMovement;
5: BoredHuman;
6: MMouse(RandomRange(-100, 800), RandomRange(-100, 800), 0, 0);
7: SleepAndMoveMouse(2000+Random(1000));
end;
end;

function SearchForColorOnTile(var x,y:integer;tile:TTile;heigth,spread,color,tolerance,number:integer):boolean;
var pt:TPoint;
tpa:TPointArray;
begin
result := false;
if not TileOnMS(tile,heigth) then
begin
writeln('Attempting to search for color on a tile that''s outside the main screen!');
exit;
end;
pt := TileToMS(tile,heigth);
FindColorsTolerance(tpa, color, (pt.x - (spread/2)), (pt.y - (spread/2)), (pt.x + (spread/2)), (pt.y + (spread/2)), tolerance);
result := Length(tpa) >= number;
if result then
MiddleTPAEx(tpa, x, y);
end;

procedure ClickBox(box:TBox;left:boolean);
var x,y:integer;
begin
x := (box.x2 - box.x1)/2;
y := (box.y2 - box.y1)/2;
Mouse(box.x1 + x + Random(RandomRange(-x,x)), box.y1 + y + Random(RandomRange(-y,y)), 0, 0, left);
end;

procedure MoveBox(box:TBox);
var x,y:integer;
begin
x := (box.x2 - box.x1)/2;
y := (box.y2 - box.y1)/2;
MMouse(box.x1 + x + Random(RandomRange(-x,x)), box.y1 + y + Random(RandomRange(-y,y)), 0, 0);
end;

function PickAlchItem:boolean;
begin
result := false;
if R_ItemIDExists(AlchItem, YEW_LONGBOW) then
result := true;
if R_ItemIDExists(AlchItem, RUNE_BRUTAL) then
result := true;
if R_ItemIDExists(AlchItem, MAPLE_LONGBOW_U) then
result := true;
if result then
Alch := true
else
Alch := false;
end;

function HighAlch():boolean;
begin
if not Alch then exit;
result := true;
if MSHighAlch > 500 then
exit;
MSHighAlch := 2000;
if GetCurrentTab <> 28 then
GameTab(28);
ClickBox(HighAlchemy,true);
Sleep(300+random(150));
if not PickAlchItem then
begin
result := false;
exit;
end;
FindNormalRandoms;
InveFull := R_InvFull;
ClickBox(InvBox(AlchItem.slot),true);
Sleep(300+random(300));
end;

procedure TeleportFalador();
begin
Sleep(2000+random(500));
if GetCurrentTab <> 28 then
GameTab(28);
Sleep(2000+random(500));
ClickBox(TeleFalador,true);
Sleep(4000+random(1000));
end;

procedure CastTelegrabOn(uptext:TStringArray;x,y:integer);
begin
if GetCurrentTab <> 28 then
GameTab(28);
Sleep(100+random(100));
ClickBox(TelekineticGrab,true);
Sleep(200+random(100));
MMouse(x,y,3,3);
if r_WaitUpTextMulti(uptext, 300) then
begin
ClickMouse2(true);
end else
begin
ClickMouse2(false);
R_WaitOptionMulti(uptext, 300);
end;
Sleep(100+random(100));
end;

function IsThereWine(var x,y:integer):boolean;
begin
result := false;
if MSCheckWine > 0 then
exit;
result := SearchForColorOnTile(x, y, Tile(2931,3515), 80, 40, GROUND_COLOR_WINE_GRAY, 8, 10);
if result then
begin
CastTelegrabOn(['ine of'],x,y);
Sleep(300+random(300));
MSCheckWine := 1500;
end;
Sleep(100+random(100));
end;

function Box(x1,y1,x2,y2:integer):Tbox;
begin
result.x1 := x1;
result.y1 := y1;
result.x2 := x2;
result.y2 := y2;
end;


procedure Bank();
begin
repeat
Sleep(1500 + Random(random(500)));
until R_OpenBankBooth('fwb')
Wait(1000+Random(500));
if R_PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
Sleep(400+random(200));
end;

function DepositItems(id,amount:integer):boolean;
var item:TInvItem;
begin
if not R_BankScreen then exit;
result := false;
if R_ItemIDExists(item, id) then
result := true;
if result then
begin
result := false;
MoveBox(InvBox(item.slot));
ClickMouse2(amount = 1);
if (amount = 1) then
begin
result := true;
Wait(RandomRange(250, 550));
Exit;
end;

if (Amount = 0) then
Result := WaitOptionMulti(['Deposit-All', 'd-A'], 300)
else
Result := WaitOptionMulti(['Deposit-' + IntToStr(Amount), 'd-' + IntToStr(Amount)] , 300);

if (not (Result)) and (Amount > 0) then
begin
if WaitOptionMulti(['Deposit-X', 'd-X'], 500) then
begin
X := GetSystemTime + 10000;
while (X >= GetSystemTime) and (not (InRange(CountColor(0, 250, 396, 307, 410), 155, 165))) do
Wait(50);
Wait(RandomRange(75, 400));
TypeSend(IntToStr(Amount));
Result := True;
end;
end;
end;
end;

procedure Initialize;
begin

Smart_Members := CLIENT_MEMBERS;
Smart_Server := CLIENT_SERVER;
Smart_Signed := CLIENT_SIGNED;
Smart_SuperDetail := CLIENT_DETAIL;

SetupSRL;
SetupReflection;
ActivateClient;
DeclarePlayers;

breaktime := 0;

TelekineticGrab := Box(632,289,652,304);
HighAlchemy := Box(562,364,584,382);
TeleFalador := Box(686,293,704,311);
MonestarySpot := Box(2931,3513,2935,3517)
Monestary := [ Point(2945,3370), Point(2954,3381), Point(2965,3390), Point(2962,3404), Point(2958,3416),
Point(2951,3428), Point(2948,3438), Point(2944,3452), Point(2945,3468), Point(2943,3482),
Point(2941,3493), Point(2940,3501), Point(2939,3512), Point(2934,3515) ]
end;

begin

Initialize;

if not LoggedIn then
LoginPlayer;

SetAngle(true);

PickAlchItem;

if R_InvFull then
begin
Bank;
DepositItems(245,0);
end;

FindNormalRandoms;

repeat
SetRun(true);
fWalkPath(Monestary,false);
Sleep(2000+random(500));
repeat
Sleep(400+random(200));
if not PointInBox(GetMyPos(), MonestarySpot) then
begin
MoveToBox(MonestarySpot);
Sleep(5000+random(500));
end;
MSCheckWine := MSCheckWine - 500;
MSHighAlch := MSHighAlch - 500;
IsThereWine(x,y);
if not HighAlch then
begin
InveFull := R_InvFull;
FindNormalRandoms;
end;
Antiban;
until InveFull;
TeleportFalador;
fWalkPath(Monestary,true);
Bank;
DepositItems(245,0);
InveFull := false;
CloseBank;
TakeBreak;
until false

end.

Dervish

2010-12-22 12:33:40

Some of your standards are wrong, there should be an indentation after a repeat and such.

But those are minor details, standards don't have to be exactly like the original ones either.

I'll look into the script more in depth later when I have time.

kingarabian

2010-12-27 04:26:55

Well I ran it yesterday and nearly died twice. So I edited a lot of the script:

-I made it stop alching/tele grabbing if its in a fight. Reason is, because my account can take on those stupid monks, it doesnt really matter if they attack. However if it keeps alching and telegrabbing then it will take a lot of damage since its obviously taking a while to fight back.
-Made it withdraw and eat food if its HP is low when it banks.
-Made it wait an extra 2-3 seconds to cast telegrab whine. This eliminates it from misclicking the spell/wine.

Just some ideas, as this is a great script imo. Got 230k mage exp(ran out of alching supplys @ 3 hours) and 2m cash in 10 hours… Its probably one of the best money making scripts for Ftp.

Feroc1ty

2010-12-27 16:49:06

From: kingarabian
Well I ran it yesterday and nearly died twice. So I edited a lot of the script:

-I made it stop alching/tele grabbing if its in a fight. Reason is, because my account can take on those stupid monks, it doesnt really matter if they attack. However if it keeps alching and telegrabbing then it will take a lot of damage since its obviously taking a while to fight back.
-Made it withdraw and eat food if its HP is low when it banks.
-Made it wait an extra 2-3 seconds to cast telegrab whine. This eliminates it from misclicking the spell/wine.

Just some ideas, as this is a great script imo. Got 230k mage exp(ran out of alching supplys @ 3 hours) and 2m cash in 10 hours… Its probably one of the best money making scripts for Ftp.


Did you update the script to that or are they suggestions?

If it's updated could you PM or post the scripts so I can edit original post, and if they're suggestions I think they're great and I'll add them when I start using the script again (probably less than a week.)

Huthaifah

2010-12-27 17:18:36

He updated, :D, and it's professional, so far it's flawless, and if your wondering how I know, it's because hes my brother.

kingarabian

2010-12-28 00:07:47

@ferocity

Sure thing, just let me run the script a few more times before I make any conclusions.

Edit: HOLY CRAP its impossible to find an empty world in ftp.

Feroc1ty

2010-12-28 01:03:26

From: kingarabian
@ferocity

Sure thing, just let me run the script a few more times before I make any conclusions.

Edit: HOLY CRAP its impossible to find an empty world in ftp.


Yeah, I adjusted the code for like an hour straight to make the grabbing of wines as fast as possible since I originally made the script for p2p, and than started using it on my f2p character.

Bonfield

2010-12-28 01:11:25

are you sure the TBoxes for the spells are correct? i think it could be one spell to far as it keeps trying to cast the wrong spell, im guessing SRL's cast isnt working

i luffs yeww

2010-12-28 01:40:06

SRL's Cast() hasn't worked for.. quite awhile. Many many months.

Bonfield

2010-12-28 01:51:08

i was sure NCDS fixed it, i could be wrong

it work fine with igh level alchemy but it always left clicks the spell, looks pretty botty imo and telekinetic grab tries to cast low level alchemy

is there anything im members that would change the location of spells? because im pretty positive the TBoxes in this scrpt are out as it tries to cast chage water orb

i luffs yeww

2010-12-28 02:08:26

There is (afaik) some differences between f2p and p2p.

kingarabian

2010-12-28 02:30:25

Cast('telekinetic grab' false); works fine.

Bonfield

2010-12-28 02:43:01

why does it try to cast low level alchemy for me? it does this both with the normal client and smart

The Claw

2010-12-28 02:47:15

Your displayed spells might not be the same as the ones the OP used. Try changing that around. Find the selection which puts the right spells in the places it clicks. :)

Bonfield

2010-12-28 02:57:28

i have tried all of that, i have also debugged the TBoxes onto smart and nothing i could do made where the spell icon was and the TBox line up

EDIT: i just changed the TBoxes and everything woked fine

Feroc1ty

2010-12-28 17:36:43

There are differences between F2P and P2P, I'll change positions around when I get to fixing this which should be within a week, sorry for any inconvenience.

kingarabian

2010-12-29 18:49:33

Well since F2P is basically full with players I had to redo the tele grabbing. I've made it so fast all the legits are pissed rofl.

Well Ill post my version as soon as I clear all the bugs.

Furyan

2011-01-03 12:52:29

From: kingarabian
Well since F2P is basically full with players I had to redo the tele grabbing. I've made it so fast all the legits are pissed rofl.

Well Ill post my version as soon as I clear all the bugs.


Cool, really psyched about trying this script, hope the bugfixing goes quickly. :p