SRL Archive - First Scripts

First Miner


Harkonnen

2008-07-13 01:10:42

This is not only my first powerminer but also it is my first full script please let me know if it is any good or if I forgot something.

program HarksPowerMiner;
{
Hey THis is my first power miner be nice I am sure
that it will not be the greatest but I hope that it
is not bad for a first script
}
{.include SRL/SRL.scar}
const
RockColor1= AAAAA; //Place rock color #1 Here
RockColor2= BBBBBB; //Place rock color #2 Here
var x, y, Tries: integer;

procedure DeclarePlayers;
begin

HowManyPlayers := 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;

Players[0] .Name := 'Username'; //Players Username
Players[0] .Pass := 'Password'; //Players Password
Players[0] .Nick := '3-4 Lw Case letters of Username'; //Players nick for randoms
Players[0] .Active := True; // If you do not want to use this player make active = false

Players[1] .Name := 'Username'; //Players Username
Players[1] .Pass := 'Password'; //Players Password
Players[1] .Nick := '3-4 Lw Case letters of Username'; //Players nick for randoms
Players[1] .Active := True; // If you do not want to use this player make active = false

Players[2] .Name := 'Username'; //Players Username
Players[2] .Pass := 'Password'; //Players Password
Players[2] .Nick := '3-4 Lw Case letters of Username'; //Players nick for randoms
Players[2] .Active := True; // If you do not want to use this player make active = false

Players[3] .Name := 'Username'; //Players Username
Players[3] .Pass := 'Password'; //Players Password
Players[3] .Nick := '3-4 Lw Case letters of Username'; //Players nick for randoms
Players[3] .Active := True; // If you do not want to use this player make active = false

Players[4] .Name := 'Username'; //Players Username
Players[4] .Pass := 'Password'; //Players Password
Players[4] .Nick := '3-4 Lw Case letters of Username'; //Players nick for randoms
Players[4] .Active := True; // If you do not want to use this player make active = false

{
If a player has been turned off make sure to adjust the proper
numbers in order for proper function.
}
end;

procedure AntiRandoms;
begin
if (FindFight) then
RunAway('N', True,1,15000);
FindNormalRandoms;
FindLamp('Mining');
end;

procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Mining', false);
3. RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;

procedure RockMining;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x,y, ['Mi', 'ne'], [RockColor1, RockColor2], 7))) then
wait(100+random(100))
Tries := Tries + 1;
if(Tries+random(25) = 40)then
begin
Logout;
Exit;
end else
if FindObjCustom(x, y, ['Min', 'ine'], [RockCOlor1, RockColor2], 7) then
repeat
case (random)2)) of
1: Mouse(x, y, 4, 4, false);
ChooseOption('ine');
2: Mouse(x, y, 4, 4, True);
end;
until (InvFull)
end;

procedure DropRocks;
begin
if FindObjCustom(x, y, ['Ore'], [RockColor1, Rockcolor2], 7) then
DropTo(2,28);
end;
begin
SteupSRL;
repeat
RockMining;
DropRocks;
AntiBan;
until (False)
end;
end.

scarmann

2008-07-14 06:56:13

can't compile


Failed when compiling
Line 71: [Error] (12714:1): Identifier expected in script

Daniel

2008-07-14 07:28:24

From: scarmann
can't compile


Failed when compiling
Line 71: [Error] (12714:1): Identifier expected in script

Replace SteupSRL; with SetupSRL; ;)

It's alright for a first script, except you don't use fail-safes, anti-randoms and all the important stuff.

H20Effect

2008-07-26 01:02:37

GJ.

Kudos on your first!

WithoutFear

2008-07-26 01:23:17

procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Mining', false);
3. RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;

This will not work, when you write

case Random(30) of

you must have 30 options to choose from the correct form would be

procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(6) of
1: RandomRClick;
2: HoverSkill('Mining', false);
3. RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;

Quickmarch

2008-07-26 04:13:25

nice:spot: :cartman:

PvH

2008-07-26 04:23:30

From: WithoutFear
procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Mining', false);
3. RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;

This will not work, when you write

case Random(30) of

you must have 30 options to choose from the correct form would be

procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(6) of
1: RandomRClick;
2: HoverSkill('Mining', false);
3. RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 +Random(90));
end;


Thats not true.
He made it
case random(30) of
Because he doesn't want it to perform the antiban every time.
Did you ever saw a legit player keep on moving his mouse, hovering over skills or things like that?
No, that would look very un-human;)

Good job on your first script:)
Though failsafes would be nice:p
But
  FindLamp('Mining');
Isn't needed, because the default lampskill is already mining, so there is NO need to do that;)
DoEmote(400 +Random(90));
I think you got that out of my tut:p
And it was wrong, my 00 was lagging, so it was way to much:p
There arn't 400 emotes, so make it
DoEmote(4+random(50));
or so.
if(Tries+random(25) = 40)then
Doesn't look good as a failsafe.
What if it never finds the rock, and the calculation always becomes more/less than 40?
That would make it an endless loop, because after 41 times, tries would be 41 already, and that would mean that Tries can never become 40 anymore.
I recommend you to have something like this:
if(Tries+random(25) => 40) then
this makes it do the
then
when Tries is equal to 41 or bigger than 41.
This will never result into an endless loop so this would be a better failsafe.

Good first start, and good to see you are starting to script:D
Good luck on updating your script.

PvH

hootman

2008-07-30 03:03:09

I guess its an ok script so gj

SubiN

2008-07-30 23:18:06

gud try for first time, Try use TPA 's . and add in a little more FailSafes , and remove the until(false) . Script would be much better if u add in a Dropping function and for the dropping function i would recommed using some DTMs

Polysporin

2008-07-31 00:09:58

Very good for a first script.

insanomano

2008-07-31 01:01:47

K this is good even though there is a lot of poerminers out there but goodjob because its your first script :D:D Congratulations ! Haha but it looks alot like the exact same powerminer script that you make in i think ToF's tut but good job anyways.

iamcool04

2008-07-31 22:39:08

good job except for the no compiling

Ghostman

2008-08-02 13:06:32

Nice job on your first script

INuKe

2008-08-05 04:04:12

Good Job just make sure you put the hard bits in :P

Lukeidiot

2008-08-05 21:33:25

First scripts at their best :D nice work