SRL Archive - Archive

Tv-XxX - SRL Member Application Form


Tv-XxX

2008-04-13 10:46:43

<!– BEGIN TEMPLATE: formanswers –>
Tv-XxX - SRL Member Application Form
Tv-XxX

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
C, C#, Vb, Php, Html, Java, DBP, C++

Other Communitys


How Long have You Played Runescape
5 Years?

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

Hi, I'm Tv-XxX
and Im Applying For Membership … Again :)
I'Ve Been Scar Coding Fo Awhile Now, Though, I Tend To Edit Ppls Scripts and Make Them Work Better For Me, Than Actually Release My Own Sctipts, But I Am Begining To.

Attached To This Application Is My PowerMiner Script, I Wrote This Script Within 48 Hours, and It Is Very Stable, But Unfortunatly I Doesnt Fix Picks Yet, As My Character Hasnt Broken His Pick Yet :( But It Will Be Done,

So Hopefully You Will Except My Membership, But If Not, I Will Be Back.

Yours Tv.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

program TvXxXs_Power_Miner;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Users.scar}

Var
OresMined, TvEXPTimes, InvX1, InvY1, InvX2, InvY2 : Integer;
AxePosX, AxePosY, AxeInGameTab, TvOreColor, TvOreColor2 : Integer;
GasesAvoided, GemsMined, Loads : Integer;

Procedure TvReport;
Begin
if not LoggedIn then Exit;
ClearReport;
AddToReport('====================')
AddToReport('= Tvs PowerMiner =')
AddToReport('====================')
AddToReport('Ores Mined = '+IntToStr(OresMined))
AddToReport('Experience Gained = '+IntToStr(OresMined*TvEXPTimes)+' EXP')
AddToReport('Gases Avoided = '+IntToStr(GasesAvoided))
AddToReport('Gems Mined = '+IntToStr(GemsMined))
AddToReport('Time Running = '+TimeRunning)
End;

Function TvFindGas(Tx, Ty: Integer): Boolean;
var
clientcanvas, gascanvas1, gascanvas2: TCanvas;
xG, yG, count: Integer;
pic1, pic2: Integer;
begin
If Not Loggedin then Exit;
if(Tx < 20)then
Tx := 20;
if(Ty < 20)then
Ty := 20;
if (FindColorTolerance(xG, yG, 8296866, Tx - 20, Ty - 20, Tx + 20, Ty + 20,
20)) then
begin
pic1 := BitmapFromString(40, 40, '');
pic2 := BitmapFromString(40, 40, '');
gascanvas1 := GetBitmapCanvas(pic1);
gascanvas2 := GetBitmapCanvas(pic2);
clientcanvas := getclientcanvas;
CopyCanvas(clientcanvas, gascanvas1, Tx - 20, Ty - 20, Tx + 20, Ty + 20, 0,
0, 40, 40);
Wait(100);
CopyCanvas(clientcanvas, gascanvas2, Tx - 20, Ty - 20, Tx + 20, Ty + 20, 0,
0, 40, 40);
count := 0;
for yG := 1 to 40 do
for xG := 1 to 40 do
if ((gascanvas1.pixels[xG, yG]) <> (gascanvas2.pixels[xG, yG])) then
count := count + 1;
WriteLn(IntToStr(Trunc(((count) / 1024) * 100)) + '% change.');
if (count > 150) then
Result := True;
FreeBitmap(pic1);
FreeBitmap(pic2);
end;
end;

Procedure CheckAxe;
Var
AxeDTM, Tx, Ty : Integer;
FoundAxe : String;
Begin
if not LoggedIn then Exit;
AxeDTM := DTMFromString('78DA639CC4CCC0D0C6C8800C421CD519FE036' +
'990E87F20606C03AA5980AA06220B23817413504D27013573816A' +
'26105003724F0F01351D40355DF8D500006CA00C87');
If(Players[CurrentPlayer].Booleans[0])=True then begin
GameTab(5);
If(DTMRotated(AxeDTM,Tx,Ty,InvX1,InvY1,InvX2,InvY2))Then
Begin
FoundAxe:= 'True';
AxePosX:= Tx;
AxePosY:= Ty;
AxeInGameTab:= 5;
End
Else
Begin
FoundAxe:= 'False';
End;
End
else
Begin
GameTab(4);
If(DTMRotated(AxeDTM,Tx,Ty,InvX1,InvY1,InvX2,InvY2))Then
Begin
FoundAxe:= 'True';
AxePosX:= Tx;
AxePosY:= Ty;
AxeInGameTab:= 4;
End
Else
Begin
FoundAxe:= 'False';
End;
End;
Writeln('Found Axe : '+FoundAxe+' | Axe Position : '+IntToStr(AxePosX)+' , '+IntToStr(AxePosY)+' | In Game Tab '+IntToStr(AxeInGameTab)+'.')
// If(FoundAxe = 'False') then TerminateScript;
End;

Procedure TvLogo;
Var
TlC : integer;
Begin
TlC := 0
Repeat
ClearDebug;
Writeln('=======================================')
Writeln('= ///// \\ // \\ // =')
Writeln('= / \\ // \// \\// \// =')
Writeln('= / \\ // //\ // //\ =')
Writeln('= / \\// // \\ //\\ // \\ =')
Writeln('=======================================')
Writeln(' Smart Is Loading Please Be Patient ')
wait(500)
ClearDebug;
Writeln('#######################################')
Writeln('# \\\\\ \\ // \\ // #')
Writeln('# \ \\ // \\/ \\// \\/ #')
Writeln('# \ \\ // /\\ \\ /\\ #')
Writeln('# \ \\// // \\ //\\ // \\ #')
Writeln('#######################################')
Writeln(' Smart Is Loading Please Be Patient ')
wait(500)
ClearDebug;
TlC := TlC + 1
Until(TlC=4)
End;

Procedure FindAxeHead;
Begin

End;

Procedure CheckAxeBroken;
Begin
If Not Loggedin then Exit;
Begin
IsChatBlackTextAnyLine('ick')
GameTab(AxeInGameTab);
MMouse(AxePosx,AxePosY,4,4)
wait(200)
If IsUpText('ndle') then Begin Writeln('Your Axe is Broken'); FindAxeHead; End;
End;
End;

Procedure LoadOres;
Begin
if (Players[CurrentPlayer].Booleans[1]) then
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'tin' : TvOreColor := 664510;
'iron' : TvOreColor := 1515315;
'clay' : TvOreColor := 5933217;
'silver' : TvOreColor := 6584190;
'copper' : TvOreColor := 3695007;
'coal' : TvOreColor := 2966339;
'mith' : TvOreColor := 7096649;
'addy' : TvOreColor := 6322528;
'gold' : TvOreColor := 1815517;
//////////////////////////////////////////////////////////////
'tin' : TvOreColor2 := 10461355;
'iron' : TvOreColor2 := 2305610;
'clay' : TvOreColor2 := 8173011;
'silver' : TvOreColor2 := 6584190;
'copper' : TvOreColor2 := 6461672;
'coal' : TvOreColor2 := 2966339;
'mith' : TvOreColor2 := 7096649;
'addy' : TvOreColor2 := 6322528;
'gold' : TvOreColor2 := 1815517;
end;
end;
if (Players[CurrentPlayer].Booleans[1]) = False then
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'tin' : TvOreColor := 8421514;
'iron' : TvOreColor := 1646901;
'clay' : TvOreColor := 6005188;
'silver' : TvOreColor := 6584190;
'copper' : TvOreColor := 4483474;
'coal' : TvOreColor := 2570553;
'mith' : TvOreColor := 6111295;
'addy' : TvOreColor := 4741704;
'gold' : TvOreColor := 4102828;

'tin' : TvOreColor2 := 8421514;
'iron' : TvOreColor2 := 1646901;
'clay' : TvOreColor2 := 6005188;
'silver' : TvOreColor2 := 6584190;
'copper' : TvOreColor2 := 4483474;
'coal' : TvOreColor2 := 2570553;
'mith' : TvOreColor2 := 6111295;
'addy' : TvOreColor2 := 4741704;
'gold' : TvOreColor2 := 4102828;
end;
end;
case lowercase(Players[CurrentPlayer].Strings[0]) of
'tin' : TvEXPTimes := 17;
'iron' : TvEXPTimes := 35;
'clay' : TvEXPTimes := 5;
'silver' : TvEXPTimes := 40;
'copper' : TvEXPTimes := 17;
'coal' : TvEXPTimes := 50;
'mith' : TvEXPTimes := 80;
'addy' : TvEXPTimes := 95;
'gold' : TvEXPTimes := 65;
end;
End;

Procedure TvTalksBack;
Begin
If Not Loggedin then Exit;
if InChat('hey')or InChat('hello') then
begin
case random(8) of
0: TypeSend('Mining lvls?');
1: TypeSend('Hello');
2: TypeSend('Yawn');
3: TypeSend('soz cant talk i wanna get this level');
4: TypeSend('NEED SLEEP');
5: TypeSend('Minin lvls?');
6: TypeSend('I want 60 mining :p');
7: TypeSend('im so bored and sleepy');
end;
end;
if InChat('level')or InChat('lvl')or InChat('mining') then
begin
case random(8) of
0: TypeSend('non of your business');
1: TypeSend('shushhh');
2: TypeSend('Yawn...');
3: TypeSend('soz cant talk i wanna get this level');
4: TypeSend(inttostr(GetSkillInfo('mining',false))+' you?')
end;
end;
End;

Procedure Tvrandoms;
begin
if not LoggedIn then Exit;
If(FindFight)Then
begin
MakeCompass('N');
RunTo('N', True);
Wait(7000 +Random(3000));
end;
FindNormalRandoms;
FindLamp('Mining');
if NoGameTab then
begin
Logout;
NextPlayer(False);
MakeCompass('N');
end;
if InBlack then
begin
Logout;
NextPlayer(False);
MakeCompass('N');
end;
end;

Procedure TvMineOre;
var
Tx, Ty, OreDTM, OreMined, IncTol : integer;
begin
If Not Loggedin then Exit;
LoadOres;
OreDTM := DTMFromString('78DA639CC4CCC0B08D910119F819A830FC07D' +
'220D1FF40C0D80754B312550D44164602E9F940351B09A8990554' +
'B38F801A905D4708A86904AAD945404D1B50CD06FC6A00E37B0EB' +
'8');
If not InvFull then begin
repeat
If Not Loggedin then Exit;
if FindObjCustom(Tx, Ty, ['Min', 'ine'], [TvOreColor, TvOreColor2], 7 + IncTol) then begin
MMouse(Tx,Ty,4,4)
wait(100+random(100))
if IsUpText('ine') then Mouse(Tx,Ty,4,4,True);
Flag;
wait(500)
If(ClickToContinue)Then CheckAxeBroken;
wait(100)
ClickToContinue;
wait(100);
TvRandoms;
wait(100)
TvTalksBack;
wait(100)
If TvFindGas(Tx, Ty) Then Begin RunTo('E',False); GasesAvoided := GasesAvoided + 1; End;
Wait(2000+random(1000));
TvReport;
IncTol := 0
end
else
Begin
wait(1000+random(1000))
If Not Loggedin then Exit;
IncTol := IncTol + 2
end;
until(InvFull);
end;
OreMined := CountItemsDtm('inv',OreDTM)
OresMined:= OresMined+OreMined;
TvReport;
end;

procedure TvDropOre;
Var
Tx, Ty, OreDTM : Integer;
begin
If Not Loggedin then Exit;
OreDTM := DTMFromString('78DA639CC4CCC0B08D910119F819A830FC07D' +
'220D1FF40C0D80754B312550D44164602E9F940351B09A8990554' +
'B38F801A905D4708A86904AAD945404D1B50CD06FC6A00E37B0EB' +
'8');
if InvFull then
repeat
if not LoggedIn then Exit;
Gametab(4);
wait(300);
if FindDTM(OreDTM, Tx, Ty, MIX1, MIY1, MIX2, MIY2) then
begin
Wait(500 + random(250));
Mouse(Tx, Ty, 2, 2, false);
wait(150 + random(25));
Chooseoption('rop');
Wait(150 + random(500));
TvTalksBack;
end;
until not (FindDTM(OreDTM, Tx, Ty, MIX1, MIY1, MIX2, MIY2)) or not(loggedin);
Loads:= Loads + 1
end;

Procedure TvGems;
Var
Tx, Ty, GemDTM : Integer;
Begin
If Not Loggedin then Exit;
GemDTM := DTMFromString('78DA637CCACCC0E0C6C4800CF845AA19FE036' +
'94620FE0F048CB7816AEC51D540646124907E0354134840CD5DA0' +
'9A00026A5E13B60B00BE780B9A');
If(DTMRotated(GemDTM,Tx,Ty,InvX1,InvY1,InvX2,InvY2)) Then Begin
GemsMined := CountItemsDtm('inv',GemDTM)
TvReport;
End;
End;

Procedure TvSetup;
Begin
loginplayer;
Loads:= 0
InvX1 := 560;
InvY1 := 212;
InvX2 := 728;
InvY2 := 464;
SetAngle(True);
MakeCompass('n');
GameTab(4)
TvReport;
CheckAxe;
End;

Var
NxtPlayer : Integer;
begin
SetupSRL;
SRLPlayerForm(True, ['Axe Equipt', 'New Ores', 'Use Smart'], ['World Number'], ['Ore Type (Tin, Iron, Rune Ect...)', 'Axe Type (Iron, Steel, Rune Ect...)'], []);
if (Players[CurrentPlayer].Booleans[2]) then
Begin
TvLogo;
SmartSetupEx(Players[0].Integers[0], false, true);
SetTargetDC(SmartGetDC);
TvLogo;
End;
ActivateClient;
Repeat
NxtPlayer:=0
TvSetup;
Repeat
TvMineOre;
TvGems;
TvDropOre;
If Loads = 10 Then Logout;
If Not Loggedin then Begin NextPlayer(True); NxtPlayer:=1; End;
Until(NxtPlayer=1)
Until(False)
end.

——————————————————
<!– END TEMPLATE: formanswers –>

Timer

2008-04-13 10:51:43

You need more than a power miner. Standards are off. But you got some things it looks like u didn't credit for…

Sorry. No.

mixster

2008-04-13 11:03:55

Your load ore DTM case won't work properly as it will only do the 1st occurrence it finds, so I dunno if it's you trying to make it look better as the case is bigger or what, but it adds an extra 20 or so lines between the 2 loadings that do nothing. Also, your huge logo style thing it outputs also adds a lot of extra lines that do nothing. Aside from those things, it is a fairly good script, though it could use a lot more fine tuning is different places. For example, InvX1, InvY1, InvX2 and InvY2 could just be MIX1, MIY1, MIX2, MIY2 which wouldn't even need declaring and assigning. Also, there's a SRL gas check, so that's more lines that could've been saved. You also don't free your DTM's at the end which is frowned upon as it can bring memory leaks, though as you don't repeatedly call them, it would be alright, but still nicer if you do free them :)
Your TVSetup procedure does seem a bit unneeded as does your nxtPlayer var as you could just add the couple of needed things to do after NextPlayer. Also, you don't need LoginPlayer as NextPlayer logs in the char automatically.
Lastly, you should probably fix up your standards a bit and improve the similarity between how you code, as you have captial If's, small if's, captial Begin's, lowercase begin's etc. and it makes it very hard to read through.
I'll not be voting, but it is a farily good script with a good base and could become very good if you cleaned it up a bit and improved the readability and flow of it :)

Tv-XxX

2008-04-13 11:10:50

Cheers Mixster for the feedback, erm…
well as for the case ores, its just the way i thought of doing it, and it works :p as For InvX1 ect… I Couldn't remember what the built in Var names were, so i just added mine, but ill change that ASAP, I Never new about freeing DTMs so Ill Learn about that and do it :) and As For How I Wrote The Code, I Failed English A-Level Lol, So I Dunno How To Make It Look Nice :p

Cheers Once Again

Yours Tv

n3ss3s

2008-04-13 11:50:18

Your most advanced procedure is a direct copy of Piv's gas checker which you named as it'd be your own. Good bye.

EvilChicken!

2008-04-13 13:51:08

I voted yes.
I don't want to explain why.

If what N3S said is true, someone needs to change my vote.

Timer

2008-04-13 13:59:04

That Is Piv's…

Torrent of Flame

2008-04-13 14:02:42

Wtf? Am I the only one that noticed this is a powerminer and the DTM is CheckAxe?

No? Obviousley not yours.

Iron Man

2008-04-13 14:13:31

I find it weird how you put your name on every procedure but 4 of them, are there credits that you have to give, Tv-XxX?

Edit: Why would you use InvX1 InvY1 etc? There is MIX1, MIY1 etc….

I didn't vote just to let you know.

Tv-XxX

2008-04-13 14:59:04

I Only Write Tv InFront So That I Dont Copy The Same Procedure Name As Something From SRL, and yes It Is PIVS, But When I Included It From Mining.scar i got a complie error, so i placed it in the main script

Iron Man

2008-04-13 15:30:45

Thats weird because none of them have the same name as SRL's functions.

Except for FindGas, which is in mining.scar which you didn't include so it still would compile.

Richard

2008-04-13 15:45:00

Voted no, pretty much for the same reason everyone else has…

Harry

2008-04-13 15:49:45

No, because of what n3ss3s said :p

nielsie95

2008-04-14 08:57:16

I'm afraid you're not getting in this time.
Read some tutorials and try again in one month, good luck.
Closed.