SRL Archive - Non-RuneScape Scripts

Near Reality Thieving


Sean

2012-04-13 20:35:51

Hello! This is my first post and Ive been reading alot of the help threads on making my own scripts aswell as botting real runescape to try others. Well Im more into making my own scripts (public/private) both to support the community and myself. Im starting out very basic before moving on into Runescape so I started on Private servers :p. Well this is my Thieving script Ive put together so far and since Im very new it took me about 2-3 hours (Couldnt figure out the right click button) but I finally found out some small problems myself but I figure I did get the script to work pretty decent for about 30 mins I would like some feedback Good/Bad (wont take any to offense) and any ideas to make it better.

Ive currently failed at Right clicking and trying to select a text so I just did cords to complete my basic script lol.

I surely dont take all the credit!
Heres some credit that helped me make my very first basic script.

http://docs.villavu.com/simba/scriptref/dtm.html
YoHoJo - Great TuTs Ive been watching them.


program TheivingNearReality;

Procedure StartTheiving;

var
x, y:Integer;

begin
if FindColorSpiralTolerance(x, y, 4196694, 144, 118, 229, 187, 5) then
begin
MoveMouse(x, y); //Moves to Silk Stall
ClickMouse(x, y, 0);
MoveMouse(189, 193);
ClickMouse(189, 193, 1);
Wait(1750);
MoveMouse(581, 227); // Moves to Invy
Wait(1500);
ClickMouse(581, 227, 0); //Right clicks first Item in invy
Wait(1250);
MoveMouse(574, 270);
ClickMouse(574, 270, 1); //Drops First Item in Invy
MoveMouse(x, y);
Wait(1000);
end;
end;
begin
StartTheiving;
repeat
StartTheiving;
until(false);
end.



This code here is to ONLY test the droping method.
Alright, Making progress. It will now click
Green = Will Drop if in that spot
Red = Wont drop if in that spot
XXXX
XXXX
XXXX
XXXX
XXXX
XXXX
XXXX

program OreDTM;

Var
Ore, X, Y: Integer;
DropCopper, A, B: Integer;

procedure FreDTM;
begin
FreeDTM(Ore);
FreeDTM(DropCopper);
end;

begin
Ore := DTMFromString('m1gAAAHic42JgYBAEYiYGCOAEYn4glgBiWSCWBGJeIGaD0iB5Yai4NBCLAjE3ELNA9bMDsY+eEpBkJIj/MxAHCJsEwQgAAHEBAs0=');
DropCopper := DTMFromString('mFQEAAHic42VgYJABYlUglgRicSAWAGJOIGZlQAXMUHUaQMwGxFxQzIfE5oLqZUHSxwjETAz4wf///1EwJYCRDIwCAHL5DUQ=');

if FindDTM(Ore, X, Y, 553, 208, 736, 462) Then
WriteLn('Found the ore yay!');
MoveMouse(X, Y);
ClickMouse(X, Y, 0);
Wait(3000);
if FindDTM(DropCopper, A, B, 553, 208, 736, 462) then
begin
WriteLn('Found the drop yay!');
MoveMouse(A, B);
Wait(2000);
ClickMouse(A, B, 1);
end;

FreeDTM(Ore);
FreeDTM(DropCopper);

end.

This is a Mining/Dropping Copper code .. It did work but then it stop finding the ore on the screen? can anyone help?
program NRCopperMining;
Var
Ore, X, Y: Integer;
DropCopper, A, B: Integer;

procedure DroppingCopper;
begin
Ore := DTMFromString('m1gAAAHic42JgYBAEYiYGCOAEYn4glgBiWSCWBGJeIGaD0iB5Yai4NBCLAjE3ELNA9bMDsY+eEpBkJIj/MxAHCJsEwQgAAHEBAs0=');
DropCopper := DTMFromString('mVAEAAHicE2BgYFAGYk4g5gViMSCWB2JNIDYFYn0gVoOKCwAxBxCzMCAAMxDzMGAHLFAz+YFYCEojY3YgZgPi/xMcGP7//4/AID46RpZHw79w2E8sYKQQowMArigrtA==');

if FindDTM(Ore, X, Y, 767, 260, 1042, 618) Then
WriteLn('Found the ore yay!');
MoveMouse(X, Y);
Wait(1000);
ClickMouse(X, Y, 0);
Wait(500);
if FindDTM(DropCopper, A, B, 767, 260, 1042, 618) then
begin
WriteLn('Found the drop yay!');
MoveMouse(A, B);
Wait(500);
ClickMouse(A, B, 1);
end;
FreeDTM(Ore);
FreeDTM(DropCopper);
end;

procedure MiningCopper;

var
CopperRock, S, Q: Integer;
begin
CopperRock := DTMFromString('mQwAAAHicY2ZgYLBkYmCwBmJbIDZmZGAwAGJTIM72NWRojLVmiHTQZEAGjEgYCACnAgQd');

if FindDTM(CopperRock, S, Q, 296, 128, 804, 456) Then
MoveMouse(S, Q);
Wait(500);
ClickMouse(S, Q, 1);
FreeDTM(CopperRock);
end;

procedure DroppingCopperOre;
begin
repeat
DroppingCopper;
MiningCopper;
Wait(12000);
until(false);
end;

begin
DroppingCopperOre;
end.

Joe

2012-04-13 20:45:56

What does it Thieve?
And why do you have such a long wait?
Havent tested just looking

Sean

2012-04-13 20:47:54

From: JOEbot
What does it Thieve?
And why do you have such a long wait?
Havent tested just looking


Oh, Its at the Silk Stall. The wait times are slowing down the script it was moving way too quick without them.

Joe

2012-04-13 20:50:54

Wait(1502220);
what about that?
1 second is 1000…

Sean

2012-04-13 20:58:22

From: JOEbot
Wait(1502220);
what about that?
1 second is 1000…



Wow, No idea I must have typed it in randomly lol? It wasnt in the script when I was running it haha. Now I see what your talking about.. It was only 1500 somehow I added "3" 2s. haha

Joe

2012-04-13 21:35:44

From: Sean25
Wow, No idea I must have typed it in randomly lmfao? It wasnt in the script when I was running it haha. Now I see what your talking about.. It was only 1500 somehow I added "3" 2s. haha


That would be a very long thieving script.

Element17

2012-04-13 22:02:50

Using static cords in bot like isn't? Why not use DTMs to find things in your inventory and drop them?


Procedure DropOres;
Var
X, Y, OreDTM, I:Integer;
SlotBox:TBox;
OrePattern:TIntegerArray;

Begin
OreDTM := DTMFromString('mrAAAAHic42BgYHBmYmCwB2IvIA4GYj8gdgBiYyA2AeLHQDVXgfgmEN8H4tdA/AmI3wDxQyA2kRcHkkx4MG7wH4gZCWAYAAAOhgrG');
OrePattern :=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,28,19,20,21,22,23,24,25,26,27,28];
For i:=0 to 27 do
Begin

StatsGuise('Dropping Ore' + IntToStr(I));
SlotBox:=InvBox(OrePattern[I]);
If FindDTM(OreDTM,X,Y,SlotBox.X1,SlotBox.Y1, SlotBox.X2,SlotBox.Y2) Then
MMouse (X, Y, 5, 5);
Begin
FindNormalRandoms;
MouseItem (OrePattern[I],Mouse_Right);
ChooseOption ('rop' );
Wait (550 + random (60));


FreeDTM(OreDTM);
MarkTime(TooLong);
End;
End;
End;


That is my drop procedure for my powerminer. I'm not sure if it is 100 percent correct but when I made it a month or so ago it worked and instead of that list of numbers you could just have it

Patter:=[1];
For i:=0 to 1 do

That would drop anything inventory slot one.

Sean

2012-04-13 22:05:21

From: 14578
Using static cords in bot like isn't? Why not use DTMs to find things in your inventory and drop them?


Procedure DropOres;
Var
X, Y, OreDTM, I:Integer;
SlotBox:TBox;
OrePattern:TIntegerArray;

Begin
OreDTM := DTMFromString('mrAAAAHic42BgYHBmYmCwB2IvIA4GYj8gdgBiYyA2AeLHQDVXgfgmEN8H4tdA/AmI3wDxQyA2kRcHkkx4MG7wH4gZCWAYAAAOhgrG');
OrePattern :=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,28,19,20,21,22,23,24,25,26,27,28];
For i:=0 to 27 do
Begin

StatsGuise('Dropping Ore' + IntToStr(I));
SlotBox:=InvBox(OrePattern[I]);
If FindDTM(OreDTM,X,Y,SlotBox.X1,SlotBox.Y1, SlotBox.X2,SlotBox.Y2) Then
MMouse (X, Y, 5, 5);
Begin
FindNormalRandoms;
MouseItem (OrePattern[I],Mouse_Right);
ChooseOption ('rop' );
Wait (550 + random (60));


FreeDTM(OreDTM);
MarkTime(TooLong);
End;
End;
End;


That is my drop procedure for my powerminer. I'm not sure if it is 100 percent correct but when I made it a month or so ago it worked and instead of that list of numbers you could just have it

Patter:=[1];
For i:=0 to 1 do

That would drop anything inventory slot one.


I'm very new to the scripting and Ive read little in DTM's so I dont understand most of it. I dont understand how to get the string ext. I didnt want to make a thread about it because there is a tut somewhere but Ill look more into it.

Element17

2012-04-13 22:32:02

http://villavu.com/forum/showthread.php?t=77691 good DTM tut


http://villavu.com/forum/showthread.php?t=68018 another good one by YoHoJo. This is actually where I got the above code from really.

Sean

2012-04-13 23:23:14

From: 14578
http://villavu.com/forum/showthread.php?t=77691 good DTM tut


http://villavu.com/forum/showthread.php?t=68018 another good one by YoHoJo. This is actually where I got the above code from really.


Quite funny, I just found YoHoJo thread and was watching the video when you posted the link. I'm very happy you did take time and send me the link though.

Element17

2012-04-14 02:33:09

Of course man! Just here trying to learn and help as much as possible ha.

m34tcode

2012-04-14 02:40:42

Glad to see you are striving to learn. Keep at it, and great first script, and great first post =]

Just as a headsup. Most of the srl functions will not work on private servers, as srl is designed for the current runescape. Most functions you will need to make yourself, for that specific server. Chooseoption is one that will not work =\

Element17

2012-04-14 02:57:51

Thanks for the credits haha Rep+


m34tcode, is there a reason it doesn't work on private servers? Just curious.

zluo

2012-04-14 03:45:34

From: 14578
Thanks for the credits haha Rep+


m34tcode, is there a reason it doesn't work on private servers? Just curious.


uptext and everything is different, you cant tell it to open tabs without coords and stuff

Olly

2012-04-14 07:28:23

From: 14578
Using static cords in bot like isn't? Why not use DTMs to find things in your inventory and drop them?


Procedure DropOres;
Var
X, Y, OreDTM, I:Integer;
SlotBox:TBox;
OrePattern:TIntegerArray;

Begin
OreDTM := DTMFromString('mrAAAAHic42BgYHBmYmCwB2IvIA4GYj8gdgBiYyA2AeLHQDVXgfgmEN8H4tdA/AmI3wDxQyA2kRcHkkx4MG7wH4gZCWAYAAAOhgrG');
OrePattern :=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,28,19,20,21,22,23,24,25,26,27,28];
For i:=0 to 27 do
Begin

StatsGuise('Dropping Ore' + IntToStr(I));
SlotBox:=InvBox(OrePattern[I]);
If FindDTM(OreDTM,X,Y,SlotBox.X1,SlotBox.Y1, SlotBox.X2,SlotBox.Y2) Then
MMouse (X, Y, 5, 5);
Begin
FindNormalRandoms;
MouseItem (OrePattern[I],Mouse_Right);
ChooseOption ('rop' );
Wait (550 + random (60));


FreeDTM(OreDTM);
MarkTime(TooLong);
End;
End;
End;


That is my drop procedure for my powerminer. I'm not sure if it is 100 percent correct but when I made it a month or so ago it worked and instead of that list of numbers you could just have it

Patter:=[1];
For i:=0 to 1 do

That would drop anything inventory slot one.



Its a private server lol… you aren't gonna get banned.

m34tcode

2012-04-14 10:28:17

Of course it is botlike. It is his first script. Cant expect a flawless script to be everyones first ;]

Element17

2012-04-14 10:30:23

From: zluo
uptext and everything is different, you cant tell it to open tabs without coords and stuff



Ah okay, thanks for clearing that up.

Oxygen

2012-04-14 10:55:16

You should add the instructions on running the script in the starter thread, it will make it look less confusing and more appealing.

m34tcode

2012-04-14 11:17:40

This is a first script, not a product. He want advice on bettering the script, not using it ;]

Sean

2012-04-14 14:29:11

Alright, So far ive been working on the DBM method for quite some time.. I use the editor and it find the drop perfect and when I get the string and add it for some reason it cant find it and moves the mouse to the top left corner lol?
This code here is to ONLY test the droping method.

program OreDTM;

Var
Ore, X, Y: Integer;
Drop, Q, W: Integer;
procedure FreDTM;
begin
FreeDTM(Ore);
FreeDTM(Drop);
end;

begin
Ore := DTMFromString('m1gAAAHic42JgYBAEYiYGCOAEYn4glgBiWSCWBGJeIGaD0iB5Yai4NBCLAjE3ELNA9bMDsY+eEpBkJIj/MxAHCJsEwQgAAHEBAs0=');
Drop := DTMFromString('mqAEAAHicE2FgYBACYi4gZgdiFgZUwAzEbEDMDcSCQCwCxJJALAXEslAsDcQSQCwMxAJI5jAjmcMGtYMbC+aH0shuQMbuDgYMxRmhDMVZkQwRgS4M7o7GEOxgzEAM8HG1YPB2NmfwcjVniPB3BNtDTcxIZYwNAABQoAwa');
if FindDTM(Ore, X, Y, 553, 208, 736, 462) Then
WriteLn('Found the ore yay!');
MoveMouse(X, Y);
ClickMouse(X, Y, 0);
Wait(1000);
if FindDTM(Drop, Q, W, 553, 208, 736, 462) Then
WriteLn('Found the Drop yay!');
MoveMouse(Q, W);
ClickMouse(Q, W, 1);
FreeDTM(Ore);
FreeDTM(Drop);

end.

begin

end.

Element17

2012-04-14 14:47:16

What are you trying to drop?

Sean

2012-04-14 14:51:59

From: 14578
What are you trying to drop?


In that currently script - Ores

Element17

2012-04-14 15:23:45

What ore? Iron?

Sean

2012-04-14 15:49:09

From: 14578
What ore? Iron?

Currently trying to make it drop anything when the menu comes up.

Element17

2012-04-14 16:04:03

This drops whatever is it the first inventory slot. To change the slot just change the number, this doesn't need any colors of dtm. It should work. If it doesn't sorry ha and I'll try again. PM me or post here if you have any more questions. I hope I helped.

program Drop;
//{$DEFINE SMART}
{$i srl/srl.simba}

var
x, y: Integer;

Procedure drop;
Begin

MMouse( x, y, 5, 5);
MouseItem(1, Mouse_Right);
ChooseOption ('rop' );
Wait (550 + random (60));
end;

begin
SetupSRL;
Drop;

end.

Sean

2012-04-14 16:12:24

Im writing a script on a private server. It doesnt work.

Element17

2012-04-14 16:26:34

Hmmm…do you know what functions work/don't work on a private server? I don't bot or play on private servers…:( wish I was of more help.

m34tcode

2012-04-14 22:39:42

most of them. I cant list them lol

evanw25

2012-04-15 01:31:20

How do you get it to work in rsps?

Element17

2012-04-15 12:07:36

From: m34tcode
most of them. I cant list them lol


Ha yeah that sucks, it there was an list it would be easier.


@evanw25 what is your question? Like this script or a script in general?

Sir Ducksworthy

2012-04-15 16:22:55

Like All of them pretty much except anything that doesn't involve the Graphics like TypeSend and stuff like that or RandomMouseMovement

Imanoobbot

2012-04-15 16:37:55

You should use the drop command on NR (dont remember it atm, think it was ::empty or something like that). Also it is shitty to make skilling scripts in my opinion because the emotes are bugged? Example if you click the rock you want to mine it will make the emote until you teleport or something like that. Or is that patched yet?

Do you have access to ::di and ::die?

tombow

2012-04-15 18:01:06

theres no point to a nr thiever it doesnt make any cash mate

Element17

2012-04-15 21:57:29

From: tombow
theres no point to a nr thiever it doesnt make any cash mate


He might not be looking to make cash and he is scripting on a private server…so let him make whatever he wants and if nothing else it is just a learning opportunity for him.

Sean

2012-04-17 14:49:26

From: 14578
He might not be looking to make cash and he is scripting on a private server…so let him make whatever he wants and if nothing else it is just a learning opportunity for him.


yeah, Im not looking to make cash nor care about the graphics emotes lol. I wanted to learn how to start scripting with a base. Learning to script without the functions is harder but pretty cool since its showing me more about them too.

nielsie95

2012-04-25 14:25:38

Closed on request.