SRL Archive - First Scripts

PowerMiner - First Ever Script Created - ~~~Don't Use!!!


Daniel

2008-01-05 02:01:07

Hello all XD

This was my very first ever original script for SCAR. I have made more which include SRL (The more safer way of macroing).

But this was the very first script i have ever created for SCAR. Well, not the very first script for scar. This was my very first script for scar:
program hello;
begin
writeln('hello');
end.

But this was the second script i had created for SCAR (Which is the script i present to you today):

{.Script Info:
# ScriptName = Power Miner
# Author = IP-Drowner
# Description = A powerminer
# Version = 1.0000000000001
# Comments = A powerminer for Runescape.
/Script Info}
program powerminer;
const
rockcolour = 0; //Colour of the ore on the ground!
rockcolourinventory = 0; //Colour of the ore in your inventory.
var
x,y:integer;
function bitmap:boolean;
begin
dropore:=bitmapfromstrin2(false, 'a8d5vs9ddscd\r943232032r%20343128345' +
'sas8d9adiovcdsmav8s9dvsd87v32mxc&^379IPDMASD93lswjdasihda73' +
'sadkjasdf767812oplas;dmncuivg7823d893hdaks;dmnaswf654af8a65');
result:=true;
end;
function walkawayonestep:boolean;
begin
movemouse(400,285);
wait(100)
clickmouse(400,285,true);
end;
function findgas:boolean;
begin
if(findcolor(x,y,7770265,0,0,515,338)) then
result:=true;
end;
procedure dropores;
begin
if(findcolor(x,y,rockcolourinventory,550,210,731,459)) then
begin
movemouse(x,y);
Wait(1000)
clickmouse(x,y,false);
wait(200)
if(findbitmap(dropore,x,y)) then
movemouse(x,y);
wait(550)
clickmouse(x,y,true);
end;.
end;
end;
procedure loadmine;
begin
if(findcolor(x,y,rockcolour,0,0,515,338)) then
begin
movemouse(x,y);
wait(55) /
if(findgas=true) then
begin
walkawayonestep;
wait(4000)
end else
clickmouse(x,y,true);
wait(55)
dropores;
end;
end;
begin
repeat
loadmine;
until(isfkeydown(7));
end.

WARNING:THIS SCRIPT IS NOT TO BE USED IN RUNESCAPE. USE IT FOR LEARNING PURPOSES ONLY. THIS WILL GET YOU INSTANTLY BANNED. MOST PROBABLE IP ADDRESS BANNED OR ALL PLAYERS BANNED IF YOU DON'T DELETE UID.DAT AND RANDOM.DAT

Please send the most criticism feedback you can think of :) <<That is appreciated the most.

massive630

2008-01-08 08:23:57

looks nice. i know u have more posts than me, and im sure uve been scripting longer but i do have a few things i noticed.

1. isnt the rock color, ore color, and ore color in inv all the same? i think so, so having those diff constants might not do so well. idk

2. is tht bitmap to help the droping proces? if it is, u could skip the bit map and use some srl function. my fav drop is:


procedure drops;
begin
repeat;
dropall;
until invempty;
end;

that may not be right, but u can lookin in srl and find dropall and invempty and use them the right way. anyway bitmaps hog mem, so i try 2 avoid them

3. insted of steping away to drop, u could drop where you are standing, and just exclude that spot when you are searching for the rock color. FindColorSkipBox is a scar function that does just tht.

4. standards. this was hell to read. standards isnt just for other people to read easier, its also for yourself, so you can come back later and understand what you did.

5. randomness. on your waits, add some randomness i.e.:
 
begin
wait(5000+random(1000));
end;

6. i think movemouse and clickmouse are detectable. include srl and use some srl procedures.

let me know if you need anymore help, like if you want me to show you how any of those things are done.


other than tht looks great, esspecialy if that was ur second script after a hello script.

Daniel

2008-01-08 23:42:08

From: massive630
looks nice. i know u have more posts than me, and im sure uve been scripting longer but i do have a few things i noticed.

1. isnt the rock color, ore color, and ore color in inv all the same? i think so, so having those diff constants might not do so well. idk

2. is tht bitmap to help the droping proces? if it is, u could skip the bit map and use some srl function. my fav drop is:


procedure drops;
begin
repeat;
dropall;
until invempty;
end;

that may not be right, but u can lookin in srl and find dropall and invempty and use them the right way. anyway bitmaps hog mem, so i try 2 avoid them

3. insted of steping away to drop, u could drop where you are standing, and just exclude that spot when you are searching for the rock color. FindColorSkipBox is a scar function that does just tht.

4. standards. this was hell to read. standards isnt just for other people to read easier, its also for yourself, so you can come back later and understand what you did.

5. randomness. on your waits, add some randomness i.e.:
 
begin
wait(5000+random(1000));
end;

6. i think movemouse and clickmouse are detectable. include srl and use some srl procedures.

let me know if you need anymore help, like if you want me to show you how any of those things are done.


other than tht looks great, esspecialy if that was ur second script after a hello script.

Umm… If you read the first post this was the second ever script i created and i did not even know SRL existed then. Here are some answers to the bulleted numbers.

1. Yes it is, but i meant the yellow colour outside of the original colour.
2. Instead of dropping all from your inventory, you could use DropToPosition(x, y);, that will drop from inventory slot x to inventory slot y.
3. I thought this did drop where it was.
4. I know standards, this script was the second ever and i didn't know SRL or Standards, only the basic functions/procedures inside of SCAR. The official way of using standards is by highlighting some lines text inside of SCAR and by pressing CTRL+SHIFT+I to Indent and CTRL+SHIFT+U to not do the Indent.
5. I know randomness, you could also put Wait(1000 +Random(100+Random(100)));.
6. They're, you can use SendMouse or SendClick in my include package, not detectable and is located in the Public Test Corner. Also the standard way of clicking in SRL is by using Mouse(x,y,rx,ry,Left); (That also moves then clicks) and just to move the mouse is MMouse(x,y,rx,ry);.

Well, hope you understand now. There are also great starting tutorials inside of the Tutorial island and that can help your learn SRL much better. The one's i recommend are one's by pwnaz0r inside the Tutorial For Beginners section.

XxXx Toxin XxXx

2008-01-09 22:47:58

"WARNING:THIS SCRIPT IS NOT TO BE USED IN RUNESCAPE. USE IT FOR LEARNING PURPOSES ONLY. THIS WILL GET YOU INSTANTLY BANNED. MOST PROBABLE IP ADDRESS BANNED OR ALL PLAYERS BANNED IF YOU DON'T DELETE UID.DAT AND RANDOM.DAT"

I don't understand. Why is it here then if we should or shouldn't use it? That makes no sense…

ZephyrsFury

2008-01-10 00:17:03

From: XxXx Toxin XxXx
"WARNING:THIS SCRIPT IS NOT TO BE USED IN RUNESCAPE. USE IT FOR LEARNING PURPOSES ONLY. THIS WILL GET YOU INSTANTLY BANNED. MOST PROBABLE IP ADDRESS BANNED OR ALL PLAYERS BANNED IF YOU DON'T DELETE UID.DAT AND RANDOM.DAT"

I don't understand. Why is it here then if we should or shouldn't use it? That makes no sense…


Its here because he's learning and wants our opinion. He wants us to help him become a better scripter and wants to here any suggestions that might help him.

First of all, you need to learn the SRL standards. (the indenting and paragraphing and stuff). This makes it much easier for other people to analyse your script. Theres more info in the SRL wiki at the top of the page.

Second, your script doesn't compile cos theres a problem when you're declaring your dropore bitmap. The function is BitmapFromString2 but you've put bitmapfromstrin2 (you're missing the g). Theres also other minor compilation errors such as missing identifiers and extra identifiers.

Third, you shouldn't use clickmouse and movemouse. These are very basic procedure that will get you banned instantly. You should use SRL's Mouse and MMouse which are safer and more human.

Forthly, you need a heap of failsafes as well other wise your character will get lost rather quickly.

So yea…. hope I helped you become a better scripter :p

Zeph

Daniel

2008-01-10 00:32:45

From: ZephyrsFury
Its here because he's learning and wants our opinion. He wants us to help him become a better scripter and wants to here any suggestions that might help him.

First of all, you need to learn the SRL standards. (the indenting and paragraphing and stuff). This makes it much easier for other people to analyse your script. Theres more info in the SRL wiki at the top of the page.

Second, your script doesn't compile cos theres a problem when you're declaring your dropore bitmap. The function is BitmapFromString2 but you've put bitmapfromstrin2 (you're missing the g). Theres also other minor compilation errors such as missing identifiers and extra identifiers.

Third, you shouldn't use clickmouse and movemouse. These are very basic procedure that will get you banned instantly. You should use SRL's Mouse and MMouse which are safer and more human.

Forthly, you need a heap of failsafes as well other wise your character will get lost rather quickly.

So yea…. hope I helped you become a better scripter :p

Zeph


Oh My Godddd!!!! Don't you read other posts in this thread? This was the second ever script i created, i made a heap of other scripts which are good and private and include SRL, but back then when i made this script i did not know that SRL even existed.

First of all, i know SRL Standards. You can indent text in SCAR by highlighting it and pressing CTRL+SHIFT+I.

Secondly, i did not know how to fix errors back then.

Thirdly, I know it is very detectable. You can use SendMouse to move the mouse humanly and SendClick to click humanly (Can be found in IP-Includes in the Public Test Corner) or you can use the SRL Default clicking and mouse moving procedures (MMouse(x,y,rx,ry) and Mouse(x,y,rx,ry,Left)).

Fourthly (You spelt fourthly wrong :p), i know Fail Safes.

Besides Zeph, haven't you seen me post feedback in the Scripting Help section? Because if you have a look i have given quite a lot of feedback which have helped users with their errors and problems in SCAR also suggesting them to use SRL functions/procedures.

ZephyrsFury

2008-01-10 07:55:54

From: IP-Drowner
Oh My Godddd!!!! Don't you read other posts in this thread? This was the second ever script i created, i made a heap of other scripts which are good and private and include SRL, but back then when i made this script i did not know that SRL even existed.

First of all, i know SRL Standards. You can indent text in SCAR by highlighting it and pressing CTRL+SHIFT+I.

Secondly, i did not know how to fix errors back then.

Thirdly, I know it is very detectable. You can use SendMouse to move the mouse humanly and SendClick to click humanly (Can be found in IP-Includes in the Public Test Corner) or you can use the SRL Default clicking and mouse moving procedures (MMouse(x,y,rx,ry) and Mouse(x,y,rx,ry,Left)).

Fourthly (You spelt fourthly wrong :p), i know Fail Safes.

Besides Zeph, haven't you seen me post feedback in the Scripting Help section? Because if you have a look i have given quite a lot of feedback which have helped users with their errors and problems in SCAR also suggesting them to use SRL functions/procedures.


OMG DON'T YOU REALISE IM STICKING UP FOR YOU…:rolleyes:

Daniel

2008-01-11 03:28:15

From: ZephyrsFury
OMG DON'T YOU REALISE IM STICKING UP FOR YOU…:rolleyes:

Why do i need sticking up to:?:

It is just my second ever script i created, it is correct if it is in this section. There is no rule about posting it as soon as you made it. So i had the right to post it in here.

ZephyrsFury

2008-01-11 05:05:14

From: IP-Drowner
Why do i need sticking up to:?:

It is just my second ever script i created, it is correct if it is in this section. There is no rule about posting it as soon as you made it. So i had the right to post it in here.


Lol… XxXx Toxin XxXx asked why you posted it when you don't want people to use it. I just replied to that and said that you posted it because you want feedback. Jeez…

Daniel

2008-01-11 05:09:03

From: ZephyrsFury
Lol… XxXx Toxin XxXx asked why you posted it when you don't want people to use it. I just replied to that and said that you posted it because you want feedback. Jeez…


Oh yeah, i forgot about asking or the most criticism possible. Well, what i really meant was asking people to post the most bad stuff that they can think of by the script. Such as: "This script is total crap" etc.

Lol, thanks :)

permy

2008-03-27 12:12:32

nice to learn from i suppose =D

xbowman6

2008-05-28 14:57:32

next time i need to read the posts first before use now i'm banned

FreakyMonkey

2008-05-28 16:52:23

haha, thats hecka funny XD, massive gave this big lecture to you =p, how do u feel IP?