PDA

View Full Version : Kemico 2 PowerMiner



kemico2
06-07-2007, 05:59 AM
Instructions
-Fill in color and Start by any rock.
-Make sure that you have a pick dosent matter if it is equiped or not.
-You will have to stop the script when it is done mining.

Features
-This is my very first script release so there isnt many.
-It has a some antirandoms.


Future Updates.
-When I learn how to do mutliplayer i will add that.
-I will also learn forms and put one in the script.
-AntiBan and better AntiRandoms
-Anything else that i find needs improvement.

Notes
-I am very new at scripting so any help would be greatly appricated.
-I also made this in scar 3.06 it might work in 2.03 though

///make sure you are by the rocks\\\\
//This is made by kemico2 so please dont steal it\\\
//thanks for looking at it\\\\



program VarrockEastPowerMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}

const
RockColor=1318173;
MiningLvL=55;
PickWielded=true;
Loads=10;

var
Loadz : Integer; DidRandomHappen: Boolean;

Procedure Thanks;
Begin;
Writeln('Thank you for using my powerminer');
Writeln('This is my first script so be nice');
end;

Procedure CheckForGas;
begin
if findgas(x,y)then
begin;
runawaydirection('n')
wait(10000+random(3000))
end;
end;


Procedure Signiture;
begin;
writeln(' __ .__ ')
writeln('| | __ ____ _____ |__| ____ ____ ')
writeln('| |/ // __ \ / \| |/ ___\/ _ \ ')
writeln('| <\ ___/| Y Y \ \ \__( <_> ) ')
Writeln('|__|_ \\___ >__|_| /__|\___ >____/ ')
writeln(' \/ \/ \/ \/ ')
end;

procedure PrepCharacter;
begin;
HighestAngle;
MakeCompass('N');
end;

procedure Report;
begin
Writeln('[]-------------------------------------------[]');
Writeln('Worked For : ' + ScriptTime2(2))
Writeln('Mined/Dropped '+ IntToStr(Loadz) + ' Loads');
Writeln('[]--------------------------------------------[]');
end;


procedure MajorMining;
begin
repeat
FindNormalRandoms
FindTalk;
if(FindColorSpiralTolerance(x,y,RockColor,5,5,514 ,337,5)) then;
begin
Mmouse(x,y,2,2);
CheckForGas;
wait(100+random(250));
FindPick;
If(IsUpText('ine'))then
begin
Mouse(x,y,2,2,false);
ChooseOption(x,y,'Mine')
Wait(3000+random(2000))
End
end
Until(InvFull);
end;

Procedure drop;
begin
if(PickWielded=false)then
begin
dropto(2,28)
Loadz:=Loadz + 1;
If(PickWielded=True)then
begin
dropall;
Loadz:=Loadz + 1;
end
end
end;

begin
SetupSrl;
thanks;
Signiture;
prepcharacter
repeat;
Majormining;
Drop;
report;
until(loadz>Loads)
end.

JAD
06-07-2007, 02:39 PM
nooo! No ";" 's after bold letters (begins/thens/repeats....etc) :p


You need a then begin in your mining procedure like this:

procedure MajorMining;
begin
repeat
FindNormalRandoms;
FindTalk;
if(FindColorSpiralTolerance(x,y,RockColor,5,5,514 ,337,5)) then
begin
Mmouse(x,y,2,2);
CheckForGas;
wait(100+random(250));
If(IsUpText('ine'))then
begin
Mouse(x,y,2,2,false);
ChooseOption(x,y,'Mine')
Wait(3000+random(2000));
end;
end;
Until(InvFull);
End;



See how I did that? And I also took out the did random happen thing because that's not needed because FindNormalRandoms; will find a fight and handle it if found, and there'd still be no point to that variable anyway :p

In your drop procedure, huge problem. It checks if the pick weilded is true only if the pick weilded is false.. Because it's inside that begin. Do it like this and it will work:


Procedure drop;
begin
if(PickWielded=false)then
dropto(2,28)
If(PickWielded=True)then
DropAll;
end;


If you only want to do 1 thing after a then, you don't need a begin. But if you want to do multiple things after a then, you need a begin.




Overall it's a good try for your first script though, keep it up!

kemico2
06-07-2007, 06:16 PM
Thanks JAD ur always a great helper.

JAD
06-07-2007, 07:27 PM
Thanks JAD ur always a great helper.

I try! :) and np.

legendaryhero90
06-07-2007, 10:36 PM
lol keep trying to re-write the script and it will get better

kemico2
06-08-2007, 02:38 AM
I finally got a proggie its not that good but its all i got.
[]-------------------------------------------[]
Worked For : 24 Minutes, and 4 Seconds
Mined/Dropped 6 Loads
[]--------------------------------------------[]