SRL Archive - Archive

PhaseCode - SRL Member Application


PhaseCode

2012-02-02 01:22:35

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Java, C#


Are you a member of any other communities?
Sythe: FunForRunescape, member since 2007
RSBuddy: PhaseCode


Tell us about yourself…
From: PhaseCode
Oh man were do I start. My name is Ivica, pronounced (Evitzz, kind like pizza but with e in the front). I am currently attending a half high school,half college program at my community college. Trying to get some credits before I transfer to University of Reno. God, that sounds like I'm writing a CV of some sorts. Pretty much, I love programming and I don't think I could do much else. And since I'm 17 I can't get a job with a programming firm without a Degree, so you can guess I'm going for a Comp. Sci degree. Also, I really love this community, for the time I spent in IRC ( 4 weeks about now ? ) beats the two years of being at PowerBot/RSBuddy. Most of my scripts are private since I don't like for things to be saturated. Anywho, I hope I get to meet all of you guys that read this > :D.

PS. Don't bash on my scripting skills to much. <3



Please show us one (or multiple) of your scripts.
(*******************************************************************************
A Basic Clay Miner, utilizes the Soft Clay Bracelet. Sorry for going beyond the
80 text limit, the ObjDTm's Are huge.
BY PhaseCode;
*******************************************************************************)
program Clayer;
{$DEFINE SRL5}
{$DEFINE SMART}
{$DEFINE PAINT}
{$i SRL\SRL.simba}
{$i SRL\SRL\Misc\PaintSmart.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
{$i sps/sps.simba}
var
X,Y,old : integer;
mineCount : Integer;
timeStarted : Integer;
maxTries,maxWalkingTries,lastActionPreformed : Integer;
(*******************************************************************************
procedure getClayColor: Integer;
By: AutoColorAid
Description: Returns the Clay Color of the Rock based on TPA's.
*******************************************************************************)
function getClayColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.01, 2.46);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 7058396, MSX1, MSY1, MSX2, MSY2, 13);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 27.67) and (X <= 67.91) and (Y >= 28.16) and (Y <= 69.04) and (Z >= 14.55) and (Z <= 34.96) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
(*******************************************************************************
procedure getBankerColor: Integer;
By: AutoColorAid
Description: Returns the color of the Banker.
*******************************************************************************)
function getBankerColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.60);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 5321275, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 2.45) and (X <= 7.12) and (Y >= 2.04) and (Y <= 6.31) and (Z >= 4.80) and (Z <= 12.66) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
(*******************************************************************************
function WalkPath(Points : TStringArray;
FlagDistance, PollRate, Tries: Integer;
GroundLevel: Boolean) : Boolean;
By: PhaseCode, Modified from euphemism's WalkPath.
Description: Walks a ObjDTM Path based on whats passed in.
*******************************************************************************)
function WalkPath(Points : TStringArray;
FlagDistance, PollRate, Tries: Integer;
GroundLevel: Boolean) : Boolean;
var
I : Integer;
begin
for I := 0 to (High(Points) - 1) do
begin
WriteLn(i);
writeln('Walking For to DTM:' + Points[i]);
if(ObjDTM_Walk(Points[i], FlagDistance, PollRate, Tries, GroundLevel) = False) then
begin
writeln('Exiting');
Exit;
end;
end;
if ObjDTM_InArea(Points[High(Points)], True) then
begin
writeln('we are the location');
result := True;
end
else
result := False;
end;
function IsAtClay : Boolean;
var
location : TPoint;
begin
location := SPS_GetMyPos;
if(Distance(location.x,location.y,4555,3170) < 35) then
begin
result := True;
Exit;
end;
end;
(*******************************************************************************
function IsAtBank : Boolean;
By: PhaseCode.
Description: Checks if the Character is in a ObjDTM's Area.
*******************************************************************************)
function IsAtBank : Boolean;
var
areaObjDTM : string;
begin
areaObjDTM := '624:84:3:0:7:628:47:1:7:575:58:1:7'
+ ':591:106:4:607:108:607:42:675:45:675:110';
result := ObjDTM_InArea(areaObjDTM,True);
end;
(*******************************************************************************
function IsOkayToMine : Boolean;
By: PhaseCode.
Description: Checks if the Character is in a ObjDTM's Area, if not will attempt
to fix itself.
*******************************************************************************)
function IsOkayToMine : Boolean;
begin
if(ObjDTM_InArea('79:80:11:1:7:68:60:1:7:51:75:1:7:113:56:1:7:101:95:1:7:31:90:1:7:24:74:1:7:32:55:1:7:51:40:9:7:107:68:9:7:85:82:9:7:93:55:8:70:77:84:63:103:81:79:94:66:92:60:83:64:77:63:79' ,True)) then
begin
result := True;
Exit;
end
else
begin
writeln('Not in Mine, Attempt');
IsInUnkown;
ObjDTM_Walk('79:80:11:1:7:68:60:1:7:51:75:1:7:113:56:1:7:101:95:1:7:31:90:1:7:24:74:1:7:32:55:1:7:51:40:9:7:107:68:9:7:85:82:9:7:93:55:8:70:77:84:63:103:81:79:94:66:92:60:83:64:77:63:79' ,0,80,15,True);
end;
end;
(*******************************************************************************
procedure EquipBracelet;
By: PhaseCode.
Description: Will Equip the Bracelet Of Clay.
*******************************************************************************)
procedure EquipBracelet;
var
braceletColor : Integer;
begin
braceletColor := DTMFromString('mggAAAHicY2NgYOgB4nYg7gTiXiCeCsVpQJwHxIVAXArExUCcBcQSMquBJBMG5geS2DAjDgwBAMd4Bzo=');
if(FindDTM(braceletColor,X,Y,MIX1,MIY1,MIX2,MIY2)) then
begin
Mouse(X,Y,5,5,true);
end;
FreeDTM(braceletColor);
end;
(*******************************************************************************
procedure MineClay;
By: PhaseCode.
Description: This will mine the clay at the spot.
*******************************************************************************)
procedure MineClay;
var
maxTimeOut : Integer;
begin
maxTimeOut := GetTimeRunning;
repeat
if(IsOkayToMine) then
begin
writeln(GetUpText);
if(FindObjCustom(X,Y,['Mine'],[getClayColor],3))then
begin
if(Pos('crumbles',GetChatBoxText(8,0)) > 0) then
begin
EquipBracelet;
end;
MMouse(X,Y,2,2);
if(Pos('Mine Clay rocks',GetUpText) > 0) then
begin
Mouse(x,y,2,2,true);
end;
old := InvCount;
if(DidRedClick)then
begin
repeat
if(InvCount = 28) then
begin
Exit;
end;
if((GetTimeRunning - maxTimeOut ) > 10000) then
begin
MineClay;
Exit;
end;
until not (old = InvCount);
mineCount := mineCount + (InvCount - old);
end;
end
else
Exit;
end;
until(InvCount = 28);
end;
(*******************************************************************************
function Bank : Boolean;
By: PhaseCode.
Description: A fool proof banking type.
*******************************************************************************)
function Bank : Boolean;
var
braceletDTM : integer;
begin
braceletDTM := DTMFromString('mggAAAHicY2NgYOgB4nYg7gTiXiCeCsVpQJwHxIVAXArExUCcBcQSMquBJBMG5geS2DAjDgwBAMd4Bzo=');
if not (BankScreen) then
begin
if( FindObj(X,Y,'ank',getBankerColor,5) ) then
begin
Mouse(X,Y,5,5,false);
wait(1200);
ChooseOption('Bank Banker');
Wait(3000);
if(BankScreen) then
begin
if(DepositAll)then
begin
Wait(1300);
if(FindDTM(braceletDTM,X,Y,MSX1,MSY1,MSX2,MSY2)) then
begin
Mouse(X,Y,5,5,true);
end;
if(FindDTM(braceletDTM,X,Y,MIX1,MIY1,MIX2,MIY2)) then
begin
Mouse(X,Y,5,5,true);
end;
end;
end;
end;
end
else
begin
if( InvCount = 28 ) then
begin
if(DepositAll)then
begin
if(FindDTM(braceletDTM,X,Y,MSX1,MSY1,MSX2,MSY2)) then
begin
Mouse(X,Y,5,5,true);
end;
if(FindDTM(braceletDTM,X,Y,MIX1,MIY1,MIX2,MIY2)) then
begin
Mouse(X,Y,5,5,true);
end;
end;
end
else
begin
if(InvCount = 0) then
begin
if(FindDTM(braceletDTM,X,Y,MSX1,MSY1,MSX2,MSY2)) then
begin
Mouse(X,Y,5,5,true);
if(FindDTM(braceletDTM,X,Y,MIX1,MIY1,MIX2,MIY2)) then
begin
Mouse(X,Y,5,5,true);
end;
end;
end;
end;
end;
if(FindDTM(braceletDTM,X,Y,MIX1,MIY1,MIX2,MIY2)) then
begin
Mouse(X,Y,5,5,true);
end;
if(InvCount = 1)then
begin
if BankScreen then
CloseBank;
EquipBracelet;
result := true;
Exit;
end;
FreeDTM(braceletDTM);
end;
(*******************************************************************************
function WalkToBank(FirstPath : Boolean) : Boolean;
By: PhaseCode.
Description: Walk's to the bank.
*******************************************************************************)
function WalkToBank(FirstPath : Boolean) : Boolean;
var
Path:TStringArray;
I : Integer;
begin
if(firstPath) then
begin
Path := ['61:23:6:1:7:66:58:1:7:115:55:1:7:131:63:1:7:102:96:1:7:50:74:1:7:50:38', '53:28:6:1:7:81:120:1:7:65:99:1:7:53:87:1:7:42:61:1:7:38:50:1:7:42:30', '76:22:8:1:7:74:43:1:7:70:55:1:7:62:67:1:7:66:83:1:7:46:79:1:7:46:62:1:7:42:42:1:7:58:46', '100:25:7:1:7:70:42:1:7:82:63:1:7:62:78:1:7:62:103:1:7:78:99:1:7:74:111:0:7:103:52', '114:46:4:10:7:101:54:1:7:82:59:1:7:50:98:0:7:83:108']
end
else
Path := ['613:21:6:1:7:597:80:1:7:614:64:1:7:652:103:1:7:684:99:1:7:681:70:1:7:664:61:4:582:80:617:43:666:59:612:123','602:27:4:0:7:674:50:1:7:614:89:1:7:602:77:1:7:630:109:4:574:38:607:21:641:44:613:125','622:37:6:0:7:663:66:1:7:614:97:1:7:618:108:1:7:630:133:1:7:643:145:1:7:614:61:4:595:53:625:23:649:86:606:120','639:32:6:0:7:659:37:0:7:672:114:1:7:638:48:1:7:618:64:1:7:618:89:1:7:634:85:4:621:24:649:23:648:95:617:90','681:59:4:1:7:646:44:1:7:614:84:1:7:626:105:1:7:606:121:4:640:50:692:53:691:85:658:104','629:54:4:1:7:597:69:1:7:565:109:1:7:578:131:0:7:648:139:4:611:14:612:69:675:70:676:29'];
if ( WalkPath(Path,3,80,25,True) ) then
begin
result := True;
Exit;
end
else
result := WalkToBank(false);
end;
(*******************************************************************************
function WalkToClay(firstPath : Boolean) : Boolean;
By: PhaseCode.
Description: Walk's to clay.
*******************************************************************************)
function WalkToClay(firstPath : Boolean) : Boolean;
var
Path: TStringArray;
I: Integer;

begin
if(firstPath) then
begin
Path := ['85:110:13:10:7:69:45:10:7:69:53:10:7:69:61:10:7:69:70:10:7:69:78:10:7:69:91:10:7:116:83:10:7:116:75:10:7:116:66:10:7:116:58:10:7:116:49:10:7:116:41:0:7:83:38:4:62:96:63:34:130:33:133:97', '28:112:7:1:7:45:67:0:7:46:118:10:7:65:62:10:7:65:49:10:7:65:41:10:7:111:54:10:7:111:46', '80:123:8:0:7:96:84:1:7:61:74:1:7:74:96:1:7:54:112:1:7:71:133:1:7:54:137:1:7:67:146:1:7:37:117', '79:131:10:0:7:95:43:0:7:108:120:1:7:74:55:1:7:53:70:1:7:70:91:1:7:54:96:1:7:66:104:1:7:58:116:1:7:79:120:1:7:62:132', '89:125:13:0:7:107:71:1:7:62:115:1:7:58:104:1:7:62:83:1:7:78:71:1:7:50:120:1:7:42:104:1:7:46:92:1:7:42:80:1:7:58:67:1:7:66:55:1:7:69:43:1:7:75:140', '92:137:11:0:7:98:27:1:7:66:95:1:7:78:107:1:7:95:127:1:7:58:124:1:7:79:144:1:7:54:70:1:7:49:59:1:7:42:75:1:7:46:91:1:7:38:112', '79:80:11:1:7:68:60:1:7:51:75:1:7:113:56:1:7:101:95:1:7:31:90:1:7:24:74:1:7:32:55:1:7:51:40:9:7:107:68:9:7:85:82:9:7:93:55:8:70:77:84:63:103:81:79:94:66:92:60:83:64:77:63:79'];
end
else
Path := [ '99:105:3:1:7:48:97:1:7:31:48:0:7:84:36:5:63:98:64:33:133:32:134:98:95:99','20:106:2:0:7:71:11:1:7:35:70:5:51:72:51:8:119:130:47:136:48:127','76:139:5:1:7:61:87:1:7:73:109:1:7:96:45:1:7:52:125:1:7:35:104','92:145:8:1:7:86:113:1:7:74:96:1:7:78:83:1:7:61:87:1:7:70:23:1:7:83:45:1:7:65:109:1:7:69:126','105:135:9:1:7:79:50:1:7:61:62:1:7:52:116:1:7:57:83:1:7:40:83:1:7:57:45:1:7:66:33:1:7:73:121:1:7:61:95','100:119:8:1:7:53:66:1:7:65:79:1:7:82:100:1:7:66:117:1:7:44:95:1:7:36:116:10:7:120:107:9:7:126:109' ] ;
if not ( WalkPath(Path,0,80,20,True) ) then
begin
result := WalkToClay(false);
end
else
result := True;
end;
procedure PrintProgress;
begin
Writeln('//////////');
Writeln('AutoClayer');
Writeln('Mined:' + ToStr(mineCount));
Writeln('Time:' + TimeRunning);
writeln('//////////');
end;
begin
Smart_Server := 5;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);//SPS Areas\
timeStarted := GetTimeRunning;
ObjDTM_Setup;
ObjDTM_Debug := True;
if not LoggedIn then
begin
repeat
Sleep(1000);
until( LoggedIn );
end;
repeat
if not LoggedIn then
begin
// Exit;
end;
IsInUnkown;
if(IsAtBank) then
begin
if BankScreen then
begin
CloseBank;
end;
if(InvCount = 0) then
begin
maxTries := 0;
WalkToClay(True);
end;
if(InvCount = 1) then
begin
WalkToClay(True);
end;
if(InvCount = 28) then
begin
if(maxTries < 4) then
begin
bank;
end
else
begin
SPS_WalkToPos(Point(SPS_GetMyPos.x + RandomRange(0,10),SPS_GetMyPos.y + RandomRange(0,10)));
maxTries := 0;
end;
maxTries := maxTries + 1;
end;
end;
Writeln('Location: ' + ToStr(SPS_GetMyPos) +' Distance To: ' + ToStr(Distance(SPS_GetMyPos.x,SPS_GetMyPos.y,4555,3170)));
if(IsAtClay) then
begin
if not (InvCount = 28) then
begin
writeln('end');
Writeln(IsOkayToMine);
if(IsOkayToMine) then
begin
Writeln('HURR');
EquipBracelet;
MineClay;
end
end;
if(InvCount = 28) then
begin
writeln('walking to bank');
walkToBank(True);
if(isAtBank) then
Bank;
end;
end;
PrintProgress;
until not (true);
end.

[XoL]

2012-02-02 16:59:21

Sorry you only have 32 posts and have been here since October
I do like this: http://villavu.com/forum/showthread.php?t=72577

But, I don't see you any where else on the forums (5 threads total where you have posted). I would suggest posting more actively, SRL members is not just about being a good scripter it is also about being a good member of the community.

PhaseCode

2012-02-02 20:12:07

From: R4nd0m
Sorry you only have 32 posts and have been here since October
I do like this: http://villavu.com/forum/showthread.php?t=72577

But, I don't see you any where else on the forums (5 threads total where you have posted). I would suggest posting more actively, SRL members is not just about being a good scripter it is also about being a good member of the community.


Thanks for the reply :D, I don't post much but I usually stick around in IRC to help people.

DemiseScythe

2012-02-02 21:13:03

DeJaVu? Hi there buddy, definitely a good start.

Is this your first time applying for SRL Membership? If it is then I have definitely seen your name on these forums few times. The script looks alright to me. May be being a little more active and involved with the community would help =)

I reserve my vote for now.

I know you from IRC, thats where from, nice to see you around.

Hero

2012-02-02 23:08:39

Not a bad script but I think you can do better. ;)



(Maybe a progress report, On Screen GUI? Random things that show you put a bit more effort then just ACA)


(Not voting)

PhaseCode

2012-02-02 23:18:44

From: DemiseScythe
DeJaVu? Hi there buddy, definitely a good start.

Is this your first time applying for SRL Membership? If it is then I have definitely seen your name on these forums few times. The script looks alright to me. May be being a little more active and involved with the community would help =)

I reserve my vote for now.

I know you from IRC, thats where from, nice to see you around.



Hey Demise :D. Yea, I've started work on a Air Crafter : P

Sin

2012-02-03 07:08:35

You're a bit green here.
Wait, appreantly you're DeiJaVui or something?

Kyle Undefined

2012-02-03 09:49:18

From: Sin
You're a bit green here.
Wait, appreantly you're DeiJaVui or something?


I think it's a joke :p

PhaseCode

2012-02-03 11:46:18

From: Sin
You're a bit green here.
Wait, appreantly you're DeiJaVui or something?

I think as in he had a moment of DeJaVu : P

DemiseScythe

2012-02-03 11:51:46

she and yea, DeJaVu is when something happens that happened before

superuser

2012-02-03 12:02:13

From: DemiseScythe
she and yea, DeJaVu is when something happens that happened before


Déjà vu - experience of feeling sure that one has already witnessed or experienced a current situation.

footballjds

2012-02-03 13:55:21

From: DemiseScythe
she and yea, DeJaVu is when something happens that happened before


no, DeJaVu is absolutely nothing, it's deja vu
Also as superuser said it's not something happening again. The literal french translation means "already seen".

Kyle Undefined

2012-02-03 14:02:19

From: footballjds
no, DeJaVu is absolutely nothing, it's deja vu
Also as superuser said it's not something happening again. The literal french translation means "already seen".


But the perception of the person, it's happening again. It was a slang definition :p

Hero

2012-02-03 14:02:37

Get back on topic people?

PhaseCode

2012-02-03 15:00:54

From: Hero
Get back on topic people?

Thank you. I started working on another script I'll reapply soon.

Hero

2012-02-03 15:03:31

When you finish your script and if this application is still open feel free to update and add it to this application. Otherwise follow the rules and you will have to wait two weeks or a month before being able to reapply.

PhaseCode

2012-02-03 18:14:49

From: Hero
When you finish your script and if this application is still open feel free to update and add it to this application. Otherwise follow the rules and you will have to wait two weeks or a month before being able to reapply.


Thanks Hero, I plan releasing it to the masses so I can get some feedback

Hobbit

2012-02-23 12:32:04

The poll has closed and you didn't quite make it this time. Please take the suggestions made here and read some more in the tutorial section and improve your script. You may reapply in 4 weeks time.


Cheers
Hobbit