SRL Archive - RS3 Script Requests

Ideas for my amazing mining script?


RedIce

2010-03-17 14:50:10

:stirthepot:Miner Ideas Wanted!:stirthepot:

So far, I have so basic power-mining stuff, it can power mine and bank.

I want this script to have extensive user options, and I'll be adding a form so it is easy to use. I think I will also release a non-bank version for the freeforall forum

Ill add good ideas into a code-box so no one repeats.

Check to see if someone is mining rock before I click it.

Please dont spam this

Coh3n

2010-03-17 14:58:42

Multi-location? You'd have to be careful though since some walking paths would be hard to do in color.

You should make your main locations, ones that aren't common. By that I mean ones that haven't been scripted (i.e. Crafting guild, Edgeville dungeon, etc.). Those would be hard with color walking, but you could always use reflection. :)

It seems like you're pretty determined, good luck!

Cheers,
Coh3n

RedIce

2010-03-17 15:01:13

I am, haha, I have always like scar but never enough to write a nice script. And I am planning on learning reflection, except I hear it is down right now… am I wrong?? I hope so :P

Coh3n

2010-03-17 15:03:00

From: RedIce
I am, haha, I have always like scar but never enough to write a nice script. And I am planning on learning reflection, except I hear it is down right now… am I wrong?? I hope so :P

It is and it isn't. There are certain things that work, but I know for sure the walking works. To be honest, you should do everything you can in color, that way you have less to update if reflection breaks. :)

RedIce

2010-03-17 15:04:55

Yea. Good idea, I think I could have the script only check itself with reflection, but not ever having used it I probably make that sound easy.

Coh3n

2010-03-17 15:08:05

From: RedIce
Yea. Good idea, I think I could have the script only check itself with reflection, but not ever having used it I probably make that sound easy.

I'm not sure I know what you mean.

RedIce

2010-03-17 15:10:17

Lol, i mean that my script would primarily search for colors, but then use reflection to make sure its going to click what i want. Do i make sense?

Coh3n

2010-03-17 15:11:52

From: RedIce
Lol, i mean that my script would primarily search for colors, but then use reflection to make sure its going to click what i want. Do i make sense?

Ohh, yes you do. :)

And that's a very smart idea. You can use defines so you can enable/disable reflection by commenting one line. This way, if the hooks are outdated (you'll learn about hooks when you learn about reflection), the script can still run. :)

RedIce

2010-03-17 15:14:09

OK, still making it sound easy, is reflection really that simple though?

Coh3n

2010-03-17 15:15:26

From: RedIce
OK, still making it sound easy, is reflection really that simple though?

Reflection overall is very simple, but it is a little more complicated for what you mentioned above, but I'm sure it's nothing you can't handle.

Timer

2010-03-17 15:16:40

Reflection is as simple as:
WalkTo(Point(3164, 3486), MinutesBeforeFail*60*1000);

RedIce

2010-03-17 15:19:38

Haha, that is one of the things I dont understand about reflection, how does it find where a tile is in x,y screen coordinates, and how far can reflection travel?

Coh3n

2010-03-17 15:23:16

From: RedIce
Haha, that is one of the things I dont understand about reflection, how does it find where a tile is in x,y screen coordinates, and how far can reflection travel?

As far as you tell it. And, you have to look through the reflection include to understand how each function works. ;)

Timer

2010-03-17 15:25:18

From: RedIce
Haha, that is one of the things I dont understand about reflection, how does it find where a tile is in x,y screen coordinates, and how far can reflection travel?


Reflection can travel everywhere. :)
To get a tile– run this. Let smart load, etc etc. Hit F2 to print your tile.
{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}

const
MyPlayer = 'f.U';
BaseX = 'sc.h';
BaseY = 'pr.e';
CurrentX = 'r';
CurrentY = 'h';

function GetMyPos:TPoint;
var
me: Integer;
begin
me := SmartGetFieldObject(0, MyPlayer);
Result.x := SmartGetFieldInt(0, BaseX) + SmartGetFieldInt(me, CurrentX) shr 7;
Result.y := SmartGetFieldInt(0, BaseY) + SmartGetFieldInt(me, CurrentY) shr 7;
SmartFreeObject(me);
end;

begin
SetupSRL;
repeat
Wait(100);
if (IsFKeyDown(2)) then
begin
Writeln('Tile is: Point(' + IntToStr(GetMyPos.x) + ', ' + IntToStr(GetMyPos.y) + ')');
while (IsFKeyDown(2)) do
Wait(50);
end;
until False;
end.

RedIce

2010-03-17 15:25:41

As far as you tell it. And, you have to look through the reflection include to understand how each function works.
Yea, but aren't plug-ins compiled? Obviously not(since i can look in it), but isn't being compiled what makes things faster?

Timer

2010-03-17 15:26:35

From: RedIce
Yea, but aren't plug-ins compiled? Obviously not(since i can look in it), but isn't being compiled what makes things faster?


Reflection is a include. You gotta download it via SVN.

RedIce

2010-03-17 15:28:49

If reflection is an include, then how does it see all the info in rs2?

Timer

2010-03-17 15:31:01

From: RedIce
If reflection is an include, then how does it see all the info in rs2?


Reflection calls functions that are built into SMART. SMART can read the client.
;)

I.E.
me := SmartGetFieldObject(0, 'f.U');

mysterious123

2010-03-17 15:32:13

I know I'm not much of pro scripter, but I advise you to first have it mine fast and very stable. Enhance it with time as most scripters do - though don't give up.
Since what good does one script with many features have if it only lasts 30 mins?

Other than that, if you want it to generally mine anywhere and everything then making it mine in the guild and bank would be very nice.

A great feature for mine-scripts is to check if someone is mining a certain rock and then make sure not to click it. Or go to a different rock if too many people are on one, or to switch worlds if more than X miners are around.

But as I said - I suggest to have it super stable and will be able to run for hours before continuing. A simple but affective script is better than a complicated but less affective one.

RedIce

2010-03-17 15:32:27

Ohhhh, wow, should have known, ha-ha, that means reflection only works if i use smart though, right?

Timer

2010-03-17 15:33:05

From: RedIce
Ohhhh, wow, should have known, ha-ha, that means reflection only works if i use smart though, right?


Correct.

RedIce

2010-03-17 15:36:25

From: mysterious123
I know I'm not much of pro scripter, but I advise you to first have it mine fast and very stable. Enhance it with time as most scripters do - though don't give up.
Since what good does one script with many features have if it only lasts 30 mins?

Other than that, if you want it to generally mine anywhere and everything then making it mine in the guild and bank would be very nice.

A great feature for mine-scripts is to check if someone is mining a certain rock and then make sure not to click it. Or go to a different rock if too many people are on one, or to switch worlds if more than X miners are around.

But as I said - I suggest to have it super stable and will be able to run for hours before continuing. A simple but affective script is better than a complicated but less affective one.



Yea, that is how I plan on making it, but i want to know how everything will be integrated into it. I have already started making it, lol.


You also mention that I should check rocks for other miners, I have thought of that, but it doesn't seem easy, but maybe reflection can handle that.

As an anti-ban I could reverse that effect and annoy people every once in a while, haha:P. I would speak to make it un-botlike.

Timer

2010-03-17 15:38:10

IsInteracting()
with the rock index.
…Maybe.

RedIce

2010-03-17 15:40:54

lol, im gonna read a tut on reflection right now, it cant be this easy:P.

mysterious123

2010-03-17 15:45:51

From: RedIce
Yea, that is how I plan on making it, but i want to know how everything will be integrated into it. I have already started making it, lol.


You also mention that I should check rocks for other miners, I have thought of that, but it doesn't seem easy, but maybe reflection can handle that.

As an anti-ban I could reverse that effect and annoy people every once in a while, haha:P. I would speak to make it un-botlike.


Speaking isn't so good since people will start answering and once it will seem you ignore them and keep muttering to yourself - they will report you. Because it would seem too obvious.

Annoying others would cause people to talk to you as well, so I think you should omit from doing it.

RedIce

2010-03-17 15:52:20

OK, im in rs2 right now, in the guild.

What is a very successful way of finding ore, but not clicking the black and not clicking the ground? Is it possible to use a 2 point dtm and find a point to the side of the black line?

RedIce

2010-03-17 15:59:40

Yea, your probably right, that talking is a big way to alert people I'm botting

Dynamite

2010-03-17 16:05:46

Use a TPA to find the color of the vein :)

RedIce

2010-03-17 16:10:07

i just searched forum tuts, no tpa, but im sure i have heard of it and it is something i should know, lol. Where can i learn it?

Frement

2010-03-17 16:13:47

http://villavu.com/forum/showthread.php?t=49067

Read that tutorial.

silor

2010-03-17 16:14:35

Auto coloring with FindObjTPA ftw. :) http://villavu.com/forum/showpost.php?p=695053&postcount=3

RedIce

2010-03-17 16:15:41

Thank you both

RedIce

2010-03-17 16:21:14

…I looked at both those, and i have learned that a TPA is an array of points, so whats the difference between a DTM and TPA? I searched the whole site and got no hits for tpa…

Frement

2010-03-17 16:24:58

From: RedIce
…I looked at both those, and i have learned that a TPA is an array of points, so whats the difference between a DTM and TPA? I searched the whole site and got no hits for tpa…


Well, DTM has many other values in the points too, TPA has just the points.

For example, heres my AttackGuard function.
function AttackGuard( GuardColor: Integer ): Boolean;
var GuardTP: TPoint;
GuardTPA: TPointArray;
GuardATPA: T2DPointArray;
i, GuardHigh: Integer;
begin
if ( FindColorsSpiralTolerance( x, y, GuardTPA, GuardColor, MSX1, MSY1, MSX2, MSY2, 3 ) ) then
begin
SortTPAFrom( GuardTPA, Point( MSCX, MSCY ) );
GuardATPA := TPAtoATPAEx( GuardTPA, 20, 20 );
GuardHigh := High( GuardATPA );
for i := 0 to GuardHigh do
begin
GuardTP := MiddleTPA( GuardATPA[i] );
MMouse( GuardTP.X, GuardTP.Y, 3, 3 );
if ( IsUpTextMultiCustom( ['ttack', 'uard', 'ck Gu'] ) ) then
begin
GetMousePos( x, y );
if not ( IsFightAt( x, y ) ) then begin
Mouse( x, y, 0, 0, True );
Flag;
Wait( 200 + Random( 500 ) );
Result := True;
Break;
end else begin
Result := False;
Break;
end;
end;
end;
end;
end;

RedIce

2010-03-17 16:29:21

Oh, OK. I have been thinking of DTMs as TPAs. haha. that makes sense, but how would i click the brwn part of a coal rock… since with shadows and camera movement the rocks colors change

Frement

2010-03-17 16:35:09

There are several things you should have the basic idea of, TPoint, TPointArray, T2DPointArray, TIntegerArray, TStringArray. Prefer using those instead of "Array of String" or "Array of Integer".

For the color i would recommend getting all the colors with some tolerance, lets say 5-10 and store them into TPA. And work with that, the tutorial i already linked here will teach you on that and you can check my function for guidance.

RedIce

2010-03-17 16:45:06

How do I find a point perpendicular to a DTM?( so i can click beside the color line in a rock instead of on it)

Frement

2010-03-17 16:47:41

I dont understand what you want exactly.

WT-Fakawi

2010-03-17 16:48:12

A good idea would be to print out scripts that work for you to examine the flow. Some good old outdated scripts to print out maybe:

Wizzup/Fakawi's MultiMiner

Wizzup's Powerminer (5k downloads!)

or perhaps even our old Mining Guild Miner (4k downloads!)

Also: it is vital to become in sync with runescape. Once you have a script up and running you need to watch it for a loooong time and iron out all the little things that go wrong that lead to disaster. Been there many times :)

Start small, dont overdo it. Make something beautiful ;)

RedIce

2010-03-17 16:50:43

For a first script, I'm making this something to be proud of, lol, thanks for the links/idea. I'll do that now. Thanks

Frement

2010-03-17 16:55:24

I would recommend like making power miner or miner that banks for some place.

RedIce

2010-03-17 17:03:22

Can I get the rotation of a dtm in the main-screen? I want this so I can click the area beside the vein after finding the direction the vein is pointing.

This script, still in its infancy, is confined to the mining guild. I will worry about banking after I finish it as a powerminer

grats

2010-03-18 00:20:50

A good iron miner for al kharid up north mining zone that banks would be nice

Coh3n

2010-03-18 02:23:14

From: RedIce
Can I get the rotation of a dtm in the main-screen? I want this so I can click the area beside the vein after finding the direction the vein is pointing.

This script, still in its infancy, is confined to the mining guild. I will worry about banking after I finish it as a powerminer

I highly doubt you're going to get a DTM to work for object finding on the main screen. If you're talking about not clicking the "vein" of ore in the rocks every time, just have it click an offset of the TPA found (i.e. increase the randomness of the MMouse procedure):

MMouse(x, y, 10, 10);

RedIce

2010-03-18 07:25:39

if I use offset and if the vein color is picked at the edge of the rock then wont it move the mouse over the ground next to the vein, instead of straight to the rock?

Frement

2010-03-18 10:26:49

From: RedIce
if I use offset and if the vein color is picked at the edge of the rock then wont it move the mouse over the ground next to the vein, instead of straight to the rock?


Read the tutorial i linked, it really helps you on this subject.

Coh3n

2010-03-18 11:37:08

From: RedIce
if I use offset and if the vein color is picked at the edge of the rock then wont it move the mouse over the ground next to the vein, instead of straight to the rock?

It's possible, but since you'll have an uptext check, it won't click. It will just move the mouse to the next point in the TPA.

RedIce

2010-03-18 12:08:40

You dont think jagex will notice the mouse go near a rock then leave?

Coh3n

2010-03-18 12:51:09

From: RedIce
You dont think jagex will notice the mouse go near a rock then leave?

No, they don't track mouse movements. But even if they did, people misclick/move all the time, I wouldn't really say that it's signs of a bot. You could even make it only click with a lot of randomness once ever 10 times or something.

RedIce

2010-03-18 14:06:08

…I like that idea. couldnt be a every 10 times though, because then its repetitive.. like every 4 + random(10) clicks.

Coh3n

2010-03-18 17:04:15

From: RedIce
…I like that idea. couldnt be a every 10 times though, because then its repetitive.. like every 4 + random(10) clicks.

Well if you did Random(10), chances are it's not going actually misclick it once every 10 times.

g0tp0t

2010-03-18 17:20:18

But it still seems traceable, because every misclick is on every tenth twentieth thirtieth click ect. so i could maybe start at 10? Then add random to that?

Coh3n

2010-03-18 17:26:20

From: g0tp0t
But it still seems traceable, because every misclick is on every tenth twentieth thirtieth click ect. so i could maybe start at 10? Then add random to that?

It wouldn't do it like that. Run this:

program New;

var
i: Integer;
begin
repeat
Inc(i);
Writeln(i);
if (Random(10) = 1) then
Writeln('Random = 1')
else
Writeln('Random != 1');
until(i = 100);
end.
Take a look at when "Random = 1" comes up in the debug. Sometimes it'll come up after 7 "Random != 1", sometimes 3, sometimes 12. That's how the random command works. It's completely random. :)

g0tp0t

2010-03-18 17:34:59

haha, ya, I understand that, but how I didn't realize that….:duh:

I want to add a check through reflection to make sure no one who is better at mining than me is mining my rock, can I do that without modifying Runescape?

you could make that simpler and use a for loop :P

mysterious123

2010-03-23 17:33:46

From: g0tp0t
haha, ya, I understand that, but how I didn't realize that….:duh:

I want to add a check through reflection to make sure no one who is better at mining than me is mining my rock, can I do that without modifying Runescape?

you could make that simpler and use a for loop :P


I don't think you can unless you look him (it) in the high scores.
Well, you'd know also by the picaxe, but that doesn't say much except for "My mining is over 40" or "Under 40" (since people usually use other kinds of pics very temporarily - or only for a short amount of time until they get their lvls up)…

But it doesn't really matter. There is a certain percentage for a player to mine a rock. While your levels rises, that percentage rises with it (by a certain percentage), so basically, someone with a lvl 30 mining could get a rock of a lvl 70 mining.

And that means that you should just look if the player started mining after you or before you. (That would be done with reflection I assume)

Heavenguard

2010-03-23 18:06:04

I dun think a Miner has to be complicated xD, i mean this is runescape, and to me its not really a big thing when your training a skill. But since were all scripters i guess we could just make it fancy :D why not make a checklist.
-What type of Rocks can you mine?
-Where can you mine?
-does it cover most of the things we need when we mine? [pickaxe or w/e]
-can it eat when you have low hp?
-can it switch to weapons if you engage into a fight?
-can it run if that fight is going bad for you?
-where can it walk?
-how does it walk?
-is the walking safe and reliable?

whenever i think of making a script, my mind just jumbles up and it gets confusing when i really try to concentrate on things im missing. So a list just helps you narrow it down a bit, its just a suggestion :P

g0tp0t

2010-03-23 18:22:58

That is an amazing suggestion, lol its common sense :tongue: apparently i have none. lol. +rep

mysterious123

2010-03-24 03:54:40

From: g0tp0t
That is an amazing suggestion, lol its common sense :tongue: apparently i have none. lol. +rep


Buddy, it's better if you add more features to your script later on than give everything in one go. People usually expect the scripter to add - they want to see change in a script. So I'd suggest that instead of replying to this thread of suggestions you start working on it. ;)

As they say - actions are bigger than words.:o

g0tp0t

2010-03-24 20:03:22

LOL, i have been working on it. I have also been pushing myself into corners, because im not amazing at scripting yet. :/ i just started a thread to see if anyone was willing to help me make this script.

As they say - actions are bigger than words.


What action do you mean?

mysterious123

2010-03-25 01:25:27

From: g0tp0t
LOL, i have been working on it. I have also been pushing myself into corners, because im not amazing at scripting yet. :/ i just started a thread to see if anyone was willing to help me make this script.



What action do you mean?


Actions as in scripting. Easy to think of new things, harder to script them.
Even if we suggested something like "Check which rocks the other players mined so you know that if they mined a much better rock their levels are much higher" - That would be almost impossible (Checking 10 other players for a whole 6 hours or so - if this script actually lasts that long).

That's why no one - or most people - don't make these threads.
These suggestions happen on the script's thread, AFTER it's already scripted.

Just get mIRC and people will help you, I know they help me. ;)