SRL Archive - Archive

shadeslayer - SRL Member Application


shadeslayer

2013-04-24 16:35:08

How Long have You Played Runescape?
8 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Basic knowledge of C, C++, Java


Are you a member of any other communities?
yes, I am android kernel developer at xda


Tell us about yourself…
From: shadeslayer
I am bit of geek with online gaming thing.



Please show us one (or multiple) of your scripts.
Program MudGrinder;
{$DEFINE SMART8}
{$I SRL/SRL.SIMBA}

Var
BankSpot: Variant;

///////////////////////////////////////////////////////////////////////
// user setup //
///////////////////////////////////////////////////////////////////////

Const
{Break Settings}
TakeBreaks = False; // ***Do you want to take breaks?***
SwitchWorlds = False; // ***Switch worlds after a break?***
BreakIn = 600; // ***How long before we take a break? (minutes)***
BreakFor = 15; // ***How long will we break for? (minutes)***
Bir = 13; // ***Random minutes add/sub before break***
Bfr = 7; // ***Random minutes to add/subjtract from break duraction***

{Method Settings}
GrindMud = 'mud';

Procedure DeclarePlayers;
Begin
NumberOfPlayers(1);
CurrentPlayer := 0;
With Players[0] Do
Begin
Name := ''; // ***Username***
Pass := ''; // ***Password***
PIN := ''; // ***Pin**
Active := True;
Member := True;
WorldInfo := [77]; // ***Which world? Delete this line if you just want a random***
End;
BankSpot:= SRL_BANK_B; // ***Which bank?***
// ***Full list below***
//===== SRL Supported Banks ================================================
// Bank_FE (Falador East Bank)
// Bank_FW (Falador West Bank)
// Bank_VE (Varrock East Bank)
// Bank_VW (Varrock West Bank)
// Bank_GE (Varrock GE Bank)
// Bank_DR (Draynor Bank)
// Bank_AK (Al-Kharid Bank)
// Bank_EV (Edgeville Bank)
// Bank_CT (Catherby bank)
// Bank_CM (Camelot bank)
// Bank_NA (North Ardougne bank)
// Bank_SA (South Ardougne bank)
// Bank_YN (Yanille bank)
// Bank_NG (North gnome bank)
// Bank_SG (South gnome bank)
// Bank_WG (Warrior guild bank)
// Bank_FG (Fishing guild bank)
// SRL_BANK_SW (Soul Wars chest)
// SRL_BANK_CW (Castle Wars chest)
// SRL_BANK_B (Burthrope chest: outside warriors guild)
// SRL_BANK_GG (Gamer's Grotto: north of Falador)

End;

///////////////////////////////////////////////////////////////////////////////////////////
// End of user setup //
///////////////////////////////////////////////////////////////////////////////////////////

Var
ItemCount,XP,StartingExperience,Timeout: Integer;
W,X,Y,Z,RealBTime,CurrentBTime,BreakRounds,TotalBreaks: Integer;
ItemsPH,XPH: Extended;

Const
ScriptVersion = '0.1';

{*******************************************************************************
All of these mouse movements are credited to bENland100 and flight
*******************************************************************************}

//By Bandland100, modified to shift mouse speeds after every step
Procedure SuperWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
Var
veloX,veloY,windX,windY,veloMag,dist,randomDist,lastDist,step: extended;
lastX,lastY,MSP,W: integer;
sqrt2,sqrt3,sqrt5: extended;
Begin
MSP := MouseSpeed;
sqrt2:= sqrt(2);
sqrt3:= sqrt(3);
sqrt5:= sqrt(5);
While hypot(xs - xe, ys - ye) > 1 Do
Begin
dist:= hypot(xs - xe, ys - ye);
wind:= minE(wind, dist);
If dist >= targetArea Then
Begin
windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
End Else
Begin
windX:= windX / sqrt2;
windY:= windY / sqrt2;
If (maxStep < 3) Then
Begin
maxStep:= random(3) + 3.0;
End Else
Begin
maxStep:= maxStep / sqrt5;
End;
End;
veloX:= veloX + windX;
veloY:= veloY + windY;
veloX:= veloX + gravity * (xe - xs) / dist;
veloY:= veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
Begin
randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
veloMag:= sqrt(veloX * veloX + veloY * veloY);
veloX:= (veloX / veloMag) * randomDist;
veloY:= (veloY / veloMag) * randomDist;
End;
lastX:= Round(xs);
lastY:= Round(ys);
xs:= xs + veloX;
ys:= ys + veloY;

Case Random(50) Of
1..25: W := (MSP + (Random((MSP/4))));
26..50: W := (MSP - (RandomRange((MSP/2), MSP-1)));
End;
If (W < 1) Then
W := 1;

If (lastX <> Round(xs)) Or (lastY <> Round(ys)) Then
MoveMouse(Round(xs), Round(ys));

step:= hypot(xs - lastX, ys - lastY);
//W := round((maxWait - minWait) * (step / maxStep) + minWait);
wait(W);
lastdist:= dist;
end;

If (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) Then
MoveMouse(Round(xe), Round(ye));

MouseSpeed := MSP;
End;

Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
Var
randSpeed: extended;
X,Y,X2,Y2,j,Dist,MP: integer;
Begin
j := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
If MP < 0 Then
MP := 1;

randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(j*MP), eX+(j*MP));
Y2 := RandomRange(eY-(j*MP), eY+(j*MP));
SuperWindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := j;
End;

Procedure HumanMouseBox(X1, Y1, X2, Y2, ClickType: Integer);
Var
FX, FY: Integer;
Begin
GaussBox(FX,FY,X1,Y1,X2,Y2);
HumanMMouse(FX,FY,0,0);
Case ClickType Of
0: ClickMouse2(False);
1: ClickMouse2(True);
End;
End;

Function GrindMenu: Boolean;
Var
CTS: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);

SetColorSpeed2Modifiers(0.02, 0.36);

If CountColorTolerance(8280838,398,361-50,480,369-50,25) > 500 Then
Result:=True;

ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;

Function DoneButton: Boolean;
Var
CTS: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);

SetColorSpeed2Modifiers(0.02, 0.36);

If CountColorTolerance(8280838,223,217-50,299,233-50,20) > 100 Then
Result:=True;

ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;

Procedure ProgressReport;
Var
TTB: Integer;
Begin
ClearDebug;

TTB := (((W) + (Y) + BreakRounds)-GetTimeRunning);

ItemCount := ItemCount;
XP := (GetXPBarTotal - StartingExperience);
XPH := Round(XP * (3600.0 / (GetTimeRunning / 1000.0)));
ItemsPH := Round((ItemCount * (3600.0 / (GetTimeRunning / 1000.0))));

Writeln('======= ShadeSlayers MudGrinder '+ScriptVersion+' =======');
Writeln('Time Running: ' + TimeRunning);
Writeln('Items Made: ' + IntToStr(ItemCount));
Writeln('Experience Earned: ' + IntToStr(XP));
Writeln('Experience/Hour: ' + ToStr(XPH));
Writeln('Items/H: ' + ToStr(ItemsPH));
Writeln('================================');

If TakeBreaks Then
Writeln('Time until break: '+MsToTime(TTB, Time_Bare));
End;

Function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
Var
H,M,S: Integer;
Begin
If Not LoggedIn Then
Exit;

If (HowManyPlayers = 1) Then
Begin
If (GetTimeRunning < ((W) + (Y) + BreakRounds)) Then
Exit Else
If (GetTimeRunning > ((W) + (Y) + BreakRounds)) Then
Begin
RealBTime := ((X+Z)/60000);
Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
Logout;
MarkTime(CurrentBTime);
Repeat
Wait(21000);
ConvertTime((X+Z)-TimeFromMark(CurrentBTime),H,M,S);
Writeln('Breaktime left: '+IntToStr(H)+':'+IntToStr(M)+':'+IntToStr(S));
Until(TimeFromMark(CurrentBTime)>(X+Z));
Writeln('Logging in.');
If SwitchWorlds Then
If LoginPlayerToLob Then
ChangeWorld(RandomWorld(True, False)) Else
LoginPlayer;
Wait(4000);
Result := LoggedIn;
SetAngle(SRL_ANGLE_HIGH);
MarkTime(Timeout);
IncEx(BreakRounds, (W) + (X));
Inc(TotalBreaks);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
W := (BreakIn * 60000);
X := (BreakFor * 60000);
Y := RandomRange(-BIR * 60000, BIR * 60000);
Z := RandomRange(-BFR * 60000, BFR * 60000);
End;
End;
End;

Function WaitLoggedIn(Time:Integer): Boolean;
Var
T: Integer;
Begin
MarkTime(T);
Repeat
SRL_ResetNavBar;
If TimeFromMark(T)>Time Then
Begin
Result:=False;
Exit;
End;
Until (GetColor(472, 490) = 16777215);
Result:=True;
End;

Function Banking: Boolean;
Var
T: Integer;
Begin
If Not WaitLoggedIn(1000) Then
Exit;
MarkTime(T);
Repeat
Wait(Random(100));
If BankScreen Then
Break;
If IsUpTextMultiCustom(['Bank','Use',' chest','chest']) Then
Begin
ClickMouse2(True);
MarkTime(T);
Repeat
Wait(Random(100));
If Timefrommark(T)>6000 Then
Break;
Until BankScreen Or PinScreen;
If PinScreen Then
InPin(Players[CurrentPlayer].Pin);
If PinScreen Or BankScreen Then
Break;
End;
If OpenBank(BankSpot,True,True) Then
Break;
If (TimeFromMark(T)>10000) Or (Not WaitLoggedIn(1000)) Then
Exit;
Until (BankScreen Or Pinscreen);
If InvCount>1 Then
QuickDeposit(SRL_DEPOSIT_ALL);;
Case LowerCase(GrindMud) Of
'mud':
Begin
If (GetBankItemAmount(9,0) <= 28) Then
Begin
MarkTime(T);
Repeat
Wait(Random(100));
If Not WaitLoggedIn(1000) Then
Exit;
If TimeFromMark(T)>10000 Then
Begin
Writeln('Out of materials, top right slot. Shutting down');
Logout;
TerminateScript;
End;
Until (GetBankItemAmount(9,0) > 28)
End;
MarkTime(T);
Repeat
Wait(Random(100));
If Withdraw(9,0, 28) Then
Break;
If (TimeFromMark(T)>10000) Or (Not WaitLoggedIn(1000)) Then
Exit;
Until False;
End;
End;
CloseBank;
If LowerCase(GrindMud)='mud' Then
InvMouse(1,Mouse_Move) Else
HumanMouseBox(572,220,585,231,3);
MarkTime(T);
Result := True;
End;

Function MakeItems: Boolean;
Var
T: Integer;
Begin
If Not WaitLoggedIn(1000) Then
Exit;
Gametab(Tab_Inv);
Case LowerCase(GrindMud) Of
'mud':
Begin
InvMouse(1, Mouse_Left);
Wait(Random(100));
HumanMouseBox(300,300,437,320,2);

MarkTime(T);
Repeat
Wait(Random(100));
If (Not WaitLoggedIn(1000)) Or (TimeFromMark(T)>10000) Then
Exit;
Until GrindMenu;
ClickMouse2(True);

HumanMouseBox(232,170,284,180,2);
MarkTime(T);
Repeat
Wait(Random(100));
If (Not WaitLoggedIn(1000)) Or (TimeFromMark(T)>30000) Then
Exit;
Until DoneButton;
MarkTime(Timeout);
ClickMouse2(True);
MarkTime(T);
Repeat
Wait(Random(100));
If (Not WaitLoggedIn(1000)) Or (TimeFromMark(T)>30000) Then
Exit;
Until Not DoneButton;
Wait(Random(100));
ItemCount := ItemCount + 28;
End;
Else
Begin
Writeln('GrindMud type wrong, shutting down');
TerminateScript;
End;
End;
Result := True;
End;

Begin
ClearDebug;
Smart_FixSpeed := True;
SRL_SixHourFix := True;
SetupSRL;
DeclarePlayers;
LoginPlayer;
StartingExperience := GetXPBarTotal;
SetAngle(SRL_ANGLE_HIGH);
ToggleActionBar(False);
MarkTime(Timeout);

W := (BreakIn * 60000);
X := (BreakFor * 60000);
Y := RandomRange(-BIR * 60000, BIR * 60000);
Z := RandomRange(-BFR * 60000, BFR * 60000);

Repeat
If Not WaitLoggedIn(1000) Then
Begin
LoginPlayer;
SetAngle(SRL_ANGLE_HIGH);
MarkTime(Timeout);
End;

If Banking Then
Begin
FindNormalRandoms;
If MakeItems Then
Begin
ProgressReport;
FindNormalRandoms;
End;
End;

If TimeFromMark(Timeout)>300000 Then
Begin
Writeln('Nothing has happened for too long, shutting down!');
TerminateScript;
End;

If TakeBreaks Then
BreakHandler(BreakIn,BreakFor,Bir,Bfr);
Until AllPlayersInactive;
End.

rj

2013-04-24 16:46:01

I'm sorry but I couldn't help but notice this is the first post you have made in 5 years and SRL members is also a community rank. Your script seems alright, but it would be better if it included walking(maybe something different with walking?) Also your constant script version is never used :p

shadeslayer

2013-04-24 16:49:13

it is modified script from Ashaman's Herblore. I just made it for Mud Grinding, As there was none available of that sort in public section.

Benny

2013-04-24 16:51:54

I'm sorry ill have to say no simply because we want you to create your own script.

Yes you can use other people's functions but adapting the script isn't really making anything new.

Sorry but well done on the initiative :)

shadeslayer

2013-04-24 16:56:14

From: Benny
I'm sorry ill have to say no simply because we want you to create your own script.

Yes you can use other people's functions but adapting the script isn't really making anything new.

Sorry but well done on the initiative :)


Thank you. Will work on something new. But why would something new need to be done when all can be done just by modifying bits of code. Example: www.github.com/bhanvadia thats my kernel source, we modify linux kernels to do something different. just bit of line is huge.

As in here we can see, it does grind mud runes pretty fast.

Benny

2013-04-24 16:58:06

I like this guy :). Next time id like to see something more personal okay
Good luck!

Le Jingle

2013-04-24 18:04:39

I issued an infraction to the original poster due to their application post. Reason is that this is (for me and I imagine at least some number of others on this site) too close for comfort for Ashaman88's herblore script. Please note that taking somebody's script and removing some function's doesn't shed (noticeable) positive influence for your script abilities (In my eyes at least).

Plagiarized script found here: http://villavu.com/forum/showthread.php?t=93552
*Note, no public messages shed on the linked topic above that relate to communications in regards of exchanging script code/talking about use of script.

Rules Quote:

Infractable Offenses
The SRL Staff retains the right to issue and infraction or warning to any user at any time for any reason and without question. You will receive and infraction for the following offenses:
Plagiarism:
This involves posting someone else's work claiming that it is your own creation; this includes modified versions of the original work. Doing so will result in an infraction and suspension on the first offence and a permanent ban if it happens again. Copying and or modifying functions or procedures is only allowed if you credit the original author properly. For examples on how to credit properly, please refer to the SRL library or ask an SRL Member.


Lj.

P.S. I noticed the portion that says this could also be a potential warning. However given this user has been around for a large amount of time, I would like to think that they should definitively known better.

Justin

2013-04-24 20:22:54

@Le Jingle;

You have done the correct thing.
http://www.diffchecker.com/8o13mtcw

I see no credits to Ashaman88.

Closed.