sm0k3
2013-04-13 20:21:22
How Long have You Played Runescape?
4 Year(s)
Are you affilated in anyway with Jagex LTD?
NO
Were you Referred to SRL?
What is your general programming knowledge?
html
Javascript
PascalScript
VB
Learning C++
CubeScript ( Sauerbraten Level Scripting )
Are you a member of any other communities?
Was an RSbuddy Member at one point
also can Be found@ XDA developers
Tell us about yourself…
Please show us one (or multiple) of your scripts.
TarCollecter (WIP) :
SMARTchat : i have left this in as this still works for me so i hope it does for others it is linked as its a package and the instructions need to be read … but i will also attach it here unless people want me to add more simba tags
SMARTchat
SMARTchat.sex
EDIT: i still think that [ATTACH]20661[/ATTACH] should be considered or at least looked at as altho its now deprecated it does a good job of showing what i am capable of it includes a form, reading from external files (ini) and so on and was one of my best scripts so ok it may not be valid but i still think people should take a look if they wish
4 Year(s)
Are you affilated in anyway with Jagex LTD?
NO
Were you Referred to SRL?
What is your general programming knowledge?
html
Javascript
PascalScript
VB
Learning C++
CubeScript ( Sauerbraten Level Scripting )
Are you a member of any other communities?
Was an RSbuddy Member at one point
also can Be found@ XDA developers
Tell us about yourself…
From: sm0k3
i live in the uk and enjoy Gaming
music, Parkour, Scripting and making maps for a games ie Saurbraten / Farcry
have plans to start a webhosting buisness in the near future, and i love Linux altho tend to use windows due to using a lot of Windows only apps
Please show us one (or multiple) of your scripts.
TarCollecter (WIP) :
program TarCollect; // 0.4a beta
{$DEFINE SMART8}
{$i SRL/srl.simba}
{$i sps/sps.simba}
{$i SRL/SRL/misc/smartgraphics.simba}
{$i srl/srl/misc/online.simba}
{=====Player Details========================================}
const
PNAME = ''; {Your Players USERNAME here}
PPASS = ''; {Your Players PASSWORD here}
{=====Options===============================================}
DEBUGSMART = True; {DUBUG output on SMART?}
DEBUGS = True; {DEBUG output In Simba}
totalrun = 100;
{=================== LEAVE THESE ALONE ===================}
var
truns, TarPrice, NUMtar, EstProf,NUMruns: integer;
CurrTask: string;
TarPath1, TarPath2, TarCpoints: TPointArray;
TarINSCREEN: boolean;
{=========================================================}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := PNAME;
Pass := PPASS;
BoxRewards := [''];
LampSkill := SKILL_PRAYER;
Pin := '';
Active := true;
end;
end;
{========================================================}
{===SCRIPT===============================================
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
========================================================}
procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
SMART_DrawBitmap(True,Pic, InttoPoint(Placement.x, Placement.y));
FreeBitmap(Pic);
end;
procedure StatsDebug;
begin
NUMtar := GetAmountBox(InvBox(1));
EstProf := TARPRICE * NUMtar;
PrintOnSmart(
['',
'',
'',
'',
' Tar Collector ',
' +======================+',
' Running: '+ TimeRunning,
'+======================+',
' ',
' Player Stats ',
' +====================+',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Tar Collected: '+ToStr(NUMtar),
' Estimated Profit: '+ToStr(EstProf),
' Runs: '+ToStr(NUMruns),
' +====================+',
' Status: '+ToStr(CurrTask),
' +====================+'
], Point(10, 70), 196050, 135972);
end;
procedure RunStats;
begin
NUMtar := GetAmountBox(InvBox(1));
EstProf := TARPRICE * NUMtar;
writeln('====Stats================================');
writeln('+ Time Running: '+TimeRunning);
writeln('+ Tar Collected: '+ToStr(NUMtar));
writeln('+ Estimated Earnings: ' +ToStr(EstProf)+'GP');
writeln('=========================================');
end;
function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
if not(FindColorsTolerance(arP, 2763308, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
if (DEBUGS = True) then Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
CurrTask := 'Searching';
Exit;
end;
TarCpoints := arP
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 0.00) and (H <= 8.35) and (S >= 1.94) and (S <= 2.82) and (L >= 15.27) and (L <= 21.00) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.93) and (X <= 3.49) and (Y >= 2.02) and (Y <= 3.63) and (Z >= 2.10) and (Z <= 3.78) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
// Wait(100 + Random(100));
if (IsUpText('Take')) then
begin;
Result := True;
TarINSCREEN := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
begin
if ( DEBUGS = True ) then Writeln('No tar here ?');
TarINSCREEN := False;
Exit;
end;
GetMousePos(fx, fy);
TarCpoints := arP;
end;
Function WithinBounderies(): Boolean;
var
P: TPoint;
Box: TBox;
begin
SPS_GatherMinimap;
P := SPS_GetMyPos;
Box := IntToBox(4360, 3839, 4531, 3938);
if ( DEBUGS = True ) then Writeln(ToStr(P));
if PointInBox(P, Box) then
begin
Result := True;
end
else
begin
writeln('Seem To Be lost ??');
Result := False;
end;
end;
procedure WalkBack;
begin
SPS_Blindwalk(Point(4519,3903));
while (IsMoving = True) do
begin
wait(100);
CurrTask := 'Walking Back';
StatsDebug;
end;
CurrTask := 'WalkLoop';
end;
procedure WalkToClosest;
var
i: TPointArray;
begin
CurrTask := 'Finding Tar Spots!!';
if ( DEBUGS = True ) then writeln('Finding closest Tar Spot');
StatsDebug;
RunStats;
try
i := GetMiniMapDots('red');
SortTPAFrom(i, Point(MMCX, MMCY));
if ( DEBUGSMART = True ) then SMART_DebugTPA(False,i); //testing>>>
Mouse(i[0].X + 6, i[0].Y + 4, 2, 0, mouse_left);
except
if ( DEBUGS = True ) then writeln('No Tar Spots Here :0');
If not WithinBounderies() then WalkBack;
finally
if ( DEBUGS = True ) then writeln('continuing to search');
CurrTask := 'WalkLoop';
// Wait(200);
StatsDebug;
end
end;
procedure DoPickup(xs,ys: integer);
begin
if not LoggedIn then LoginPlayer;
Wait(RandomRange(10,100));
MMouse(xs,ys, 0, 0); //use e.g. MMouse(xs,ys, 4, 4); since random movement better but will make misclicks happen tars to small
if IsUpTextMultiCustom(['Take','Tar']) then
begin
if ( DEBUGS = True ) then writeln('Found Tar');
ClickMouse2(mouse_right);
StatsDebug;
ChooseOptionMultiEx(['Take'],'',ClickLeft);
while (IsMoving = True) do
begin
wait(100);
end;
end
else
if ( DEBUGS = True ) then writeln('Theres no Tar? - Unless Something Went wrong');
TarINSCREEN := False;
end;
procedure DoCollect;
var
xe, ye: integer;
aFound: extended;
Dbox,Ebox: TPoint;
OBJBOX: TBox;
i: TPointArray;
begin
if not LoggedIn then LoginPlayer;
CurrTask := 'Search';
i := GetMiniMapDots('red');
while ( high(i) >= 1 ) and ( CurrTask = 'Search' ) do
begin
while (IsMoving = True) do
begin
StatsDebug;
wait(100);
end;
if ( DEBUGS = True ) then writeln('looking');
wait(RandomRange(50,200));
try FindObject(xe,ye);
if ( DEBUGSMART = True ) then SMART_DebugTPA(True,TarCpoints);
if ( DEBUGSMART = True ) then SMART_DebugTPA(false,i);
Dbox := IntToPoint(xe-5,ye-5);
Ebox := IntToPoint(xe+5,ye+5);
OBJBOX := PointToBox(Dbox,Ebox);
if ( DEBUGSMART = True ) then SMART_DrawBoxMS(False,False,OBJBOX,clblue);
while ( FindObject(xe,ye) = True ) do
begin
DoPickup(xe, ye);
end;
except
if ( DEBUGS = True ) then writeln('couldnt Find any Tar :0');
finally
if ( DEBUGS = True ) then writeln('Ill Keep Searching :)');
if ( DEBUGSMART = True ) then StatsDebug;
CurrTask := 'WalkLoop';
end;
end;
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(99) of
0: wait(500+random(3000));
1: begin
RandomMovement;
SetAngle(SRL_ANGLE_HIGH);
end;
3: PickUpMouse;
end;
end;
procedure DontActLikeAbot;
begin
If not WithinBounderies() then WalkBack;
AntiBan;
FindNormalRandoms;
end;
procedure WalkLoop;
var
i, mypath: integer;
mypathrand: TPointArray;
begin
If not WithinBounderies() then WalkBack;
mypath := random(2);
if (mypath = 1) then
begin
mypathrand := TarPath1;
end;
if (mypath = 2) then
begin
mypathrand := TarPath2;
end;
for i := 0 to High(mypathrand) do
begin
SPS_BlindWalk(mypathrand[i]);
//DoCollect;
WalkToClosest;
DoCollect;
if ( DEBUGSMART = True ) then StatsDebug;
RunStats;
end;
end;
procedure SetupScript;
begin
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Wait(774 + Random(277));
ClickNorth(SRL_ANGLE_HIGH);
SRL_Procs[SRL_Antiban] := @ DontActLikeAbot;
SPS_Setup(RUNESCAPE_SURFACE, ['10_9','11_9']);
SPS_AnyAngle := True;
TarPath1 := [Point(4533,3928),Point(4507,3928),Point(4484,3931),Point(4454,3932),Point(4447,3913),Point(4469,3893),Point(4487,3893),Point(4499,3903),Point(4516,3905),Point(4531,3912),Point(4534,3926)];
TarPath2 := [Point(4560,3929),Point(4579,3912),Point(4573,3894),Point(4545,3882),Point(4532,3868),Point(4519,3851),Point(4480,3842),Point(4450,3849),Point(4447,3876),Point(4469,3889),Point(4491,3896),Point(4515,3899),Point(4534,3922),Point(4557,3928)];
end;
procedure MainLoop;
begin
CurrTask := 'WalkLoop';
if not LoggedIn then LoginPlayer;
if ( DEBUGSMART = True ) then writeln('Starting Position: '+ ToStr(SPS_GetMyPos()));
while (CurrTask = 'WalkLoop') do
begin
NUMruns := NUMruns + 1;
if ( DEBUGSMART = True ) then StatsDebug;
WalkLoop;
end;
while (CurrTask = 'WalkingBack') do
begin
while (IsMoving = True) do
begin
StatsDebug;
wait(100);
end;
CurrTask := 'WalkLoop';
WalkLoop;
end;
if (truns = totalrun) then
CurrTask := 'STOP';
end;
begin
SMART_ClearCanvas;
NUMtar := GetAmountBox(InvBox(1));
NUMruns := 0;
SetupScript;
TarPrice := GETGEprice(1939);
CurrTask := 'Starting';
if ( DEBUGSMART = True ) then StatsDebug;
MainLoop;
CurrTask := 'NONE';
if ( DEBUGSMART = True ) then StatsDebug;
SMART_ClearCanvas;
end.
Edit: updated to latest versionSMARTchat : i have left this in as this still works for me so i hope it does for others it is linked as its a package and the instructions need to be read … but i will also attach it here unless people want me to add more simba tags
SMARTchat
SMARTchat.sex
program SMARTchat;
// SMART CHAT V0.1A By : Sm0k3 & ggzz
// Allows You To Use The chat In a Game When SMART Wont Let You
// To Use This Script ADD The Following To Each of you Scripts:
//
// {$I SRL/SRL/SMARTchat/SMARTChat.simba}
// And then Call it as Often as possible By adding the line
// WriteSMART;
// Please make sure you Have allready Setup The SMARTchat extension
// Instructions Are Here :
// HTTP://http://villavu.com/forum/showthread.php?t=63432
// Credits Got To ggzz For A lot Of Help Whith This Extension
// And the Accompanying Include's ..
function GetName : string;
begin;
result := 'SMARTchat';
end;
function GetVersion : string;
begin;
result := '0.1a';
end;
var
MainMenuItem, MenuSMARTForm: TMenuItem;
//{$ifndef PS_EXTENSION}
//var
// Client: TClient;
// Simba_MainMenu: TMainMenu;
//{$endif}
//{$i mml.simba}
procedure SMARTReadLine(Sender: TObject);
var
TheLine: string;
begin
inputQuery('SMARTchat', 'Say :', TheLine);
if (Length(TheLine) > 0) then
begin
WriteINI('Changed', 'Changed', 'True', IncludePath+'SRL/SRL/SMARTchat/SMARTchat.INI');
WriteINI('SMART', 'SMART', TheLine, IncludePath+'SRL/SRL/SMARTchat/SMARTchat.INI');
writeln('::SMARTchat:: Sending > '+TheLine+' < To Client Chat')
end;
end;
//type TKeyPressEvent = procedure (Sender: TObject; var Key: Char) of object;
{
procedure KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var
TheLine: string;
begin
if (Key = VK_F12) then
begin
inputQuery('SMARTchat', 'Say :', TheLine);
if (Length(TheLine) > 0) then
begin
WriteINI('Changed', 'Changed', 'True', IncludePath+'SRL/SRL/SMARTchat/SMARTchat.INI');
WriteINI('SMART', 'SMART', TheLine, IncludePath+'SRL/SRL/SMARTchat/SMARTchat.INI');
writeln('::SMARTchat:: Sending > '+TheLine+' < To Client Chat')
end;
end;
end;
}
procedure Init;
var
TheLine: string;
begin
MainMenuItem := TMenuItem.Create(Simba_MainMenu);
MainMenuItem.Caption := 'SMARTchat';
Simba_MainMenu.Items.Add(MainMenuItem);
MenuSMARTForm := TMenuItem.Create(MainMenuItem);
MenuSMARTForm.Caption := 'SMARTChat';
MenuSMARTForm.ShortCut := 123;
MenuSMARTForm.OnClick := @SMARTReadLine;
MainMenuItem.Add(MenuSMARTForm);
end;
procedure Free;
begin
end;
procedure Attach;
begin
writeln(' SMARTchat By Sm0k3 & ggzz ');
Writeln('# SMARTchat Simba Extension #');
Writeln('# Allows you to Enter Text #');
Writeln('# Into The SMART client #');
Writeln('# Without Having Mess about #');
end;
Procedure Detach;
begin
Writeln('SMARTchat: > Goodbye ...');
Writeln('SMARTchat : : Sm0k3 & ggzz');
end;
Begin
End.
EDIT: i still think that [ATTACH]20661[/ATTACH] should be considered or at least looked at as altho its now deprecated it does a good job of showing what i am capable of it includes a form, reading from external files (ini) and so on and was one of my best scripts so ok it may not be valid but i still think people should take a look if they wish