SRL Archive - OSR Crafting

Craft Dragonhide Bodies


Pinoobio

2013-04-11 11:51:42

First script ever, learnt everything today.

Please note: I HAVE taken bits and pieces out of other peoples scripts but HAVE mentioned their names (correct me if I have done the wrong thing), mainly anti-ban.

You will need to setup Smart8 and SRL-OSR, please don't post asking how, use the forums to find out yourself.

To run script:
1) Go to Pest Control Bank
2) Place tanned leather in first bank slot.
3) Place needle in first bag position.
4) Place thread in second bag position.
5) Enter the amount of hides you have in the script.

Logs out if no hides are available or all hides are done.

Enjoy

program CraftBodies;

//(1) Go to Pest Control Island. (Scipt was made for ONLY this bank).
//(2) Place tanned dragon hide in first bank slot.
//(3) Place needle in first position (bag).
//(4) Place thread in second position (bag).
//(5) Enter how many hides you have below.

{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}

var
hides, bodies, count:integer;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

hides := 0; //ENTER HOW MANY HIDES
if hides <= 0 then
begin
writeln('You have not entered how many hides.');
TerminateScript();
end;
bodies := (hides/3);

End;

procedure Open;
var x, y: integer;
begin
Repeat
If FindObj(x, y, 'Bank booth', 5599869, 10) Then
begin
Mouse(RandomRange(X - 5, x + 5), RandomRange(Y - 5, Y + 5), random(3), random(3), false);
ChooseOptionMulti(['Bank']);
end
else
begin;
MakeCompass(randomrange(25, 35));
end;
wait(randomrange(700, 1000));
until(BankScreen)
end;

Procedure Antiban; //Credit to Vusn
Begin

Case Random(100) Of
1: HoverSkill('crafting', False);
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('magic', False);
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
end;

procedure Craft;
var x, y: integer;
begin
//Body position
x := 105;
y := 400;
MMouse(580, 225, 5, 5); //Move to needle
clickmouse2(mouse_left);
wait(randomrange(700, 1000));
MMouse(660, 225, 5, 5); //Move to dhide
clickmouse2(mouse_left);
wait(randomrange(700, 1000));
MMouse(x, y, 10, 10);
clickmouse2(mouse_right);
wait(randomrange(700, 1000));
MMouse(RandomRange(X - 5, x + 5), ((RandomRange(Y - 3, Y + 3) + 53)), 0, 0);
wait(randomrange(700, 1000));
clickmouse2(mouse_left);
wait(randomrange(7500, 8000));
Antiban;
wait(randomrange(7500, 8000));
end;


Procedure LogPlayerOut; //Credit to Vusn
begin
MMouse(RandomRange(643 - 5, 643 + 5), RandomRange(484 - 5, 484 + 5), 0, 0);
wait(randomrange(1000, 1200));
clickmouse2(mouse_left);
MMouse(RandomRange(643 - 20, 643 + 20), RandomRange(375 - 5, 375 + 5), 0, 0);
wait(randomrange(500, 1000));
clickmouse2(mouse_left);
end;

Procedure MiniBreaker; //Credit to Solidone40
Begin

Case Random (300) Of
1: Wait(20000 + random(7400));
2: Wait(14500 + random(8550));
3: Wait(30040 + random(6759));
4: Wait(10400 + random(2549));
end;
end;

begin
SetupSRL();
DeclarePlayers;
SetScreenName(Players[CurrentPlayer].Nick);
ActivateClient;
MakeCompass('N');
count := 0;
repeat
Open;
Deposit(3,24,true);
if (not (WithdrawEx(0, 0, 28, ['reen', 'lue', 'ed', 'lack']))) then
begin
writeln('No leather in first bank slot remaining.');
CloseBank;
wait(randomrange(15000, 16000));
LogPlayerOut;
terminatescript;
end;
CloseBank;
Craft;
MiniBreaker;
FindMod;
count := count + 1;
until (count >= bodies)
LogPlayerOut;

end.

djm995

2013-04-11 14:03:26

I'll put this in the script directory, please let me know next time you make a script as it makes it easier for others to find your script :)

Kyle

2013-04-11 14:07:39

Not being a jerk at all, just trying to help you out, but this entire script is relying on static coords. Not only does that mean it is easily detectable but if theres a lag spike or anything happens, there isn't any failsafes. Great start to scripting though! Just keep improving!

Pinoobio

2013-04-11 14:37:18

From: elfyyy
Not being a jerk at all, just trying to help you out, but this entire script is relying on static coords. Not only does that mean it is easily detectable but if theres a lag spike or anything happens, there isn't any failsafes. Great start to scripting though! Just keep improving!


I didn't think that they were static otherwise I wouldn't have used, doesn't MMouse infer a random co-od from x,y with the 3rd and 4th attribute? If there is any lag it would simply miss a cycle at the moment, you are correct. There is a lot more I could add to this but wanted something out there for people to use asap. It logs if no hides are available, logs if mods are detected, has random breaks and an anti-ban that I leeched from Vusn to do things whilst waiting to craft such as checking stats. If you feel it is not safe for people to use please let me know.

I do appreciate any feedback.

Hoodz

2013-04-11 14:41:52

pinoobio maybe you can use dtm's here?

Kyle

2013-04-11 14:47:43

From: Pinoobio
I didn't think that they were static otherwise I wouldn't have used, doesn't MMouse infer a random co-od from x,y with the 3rd and 4th attribute?

I do appreciate any feedback.


Yeah, not static as in theres not variance, there is! But your coord clicking which is dangerous to do as if something goes wrong, your always clicking, no matter what is there. I agree with hoodz definitely, read some tutorials on using DTM's there awesome in inventories and banks!

Pinoobio

2013-04-11 20:43:42

I wanted an interface if I was going to implement DTM's, for now this works.

iTimmy

2013-05-13 00:46:39

Does this scirpt work as of today?

rallostar

2013-07-03 09:21:12

From: iTimmy
Does this scirpt work as of today?


^
|

mrkeen1

2014-03-31 13:59:04

sweet thanks man

jsand

2015-05-12 08:13:54

A little rough around the edges but still works.