SRL Archive - Archive

litoris - SRL Member Application


litoris

2012-07-09 13:35:34

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I have only programmed in Texas Instruments calculators before learning to script in pascal for Simba.


Are you a member of any other communities?
Not active in any currently.


Tell us about yourself…
From: litoris
I am an 18 year old guy from Turkey. I am interested in mathematics and economics and plan to attend university at the Unites States. I like debating and public speaking. I like to read science-fiction novels and books about philosophy and logic. I like many sorts of music, but I mostly listen to Muse and Coldplay these days. I also play bass guitar.



Please show us one (or multiple) of your scripts.
{both look better in simba, the links can be found in my signature}

{MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN8ZDMMMNZ8NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN. ~NMM$ .DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO. ~NMM$ INMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMN7.8MMM8~7DNNND$:ZNMMN=+NMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMN~ .8MMNNNNNNNNNNNNND, ,DMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMM$ ?NNNNNNDDDDNNNNNZ =MMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMN8$ZNNNNDDDDDDDDDDNNNO78NMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNDDDO$IIZ8DDDNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMD,IONNNNNDD8I. +ODDDNNNN8$~8MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMM$ .DNNNDDZ. I8DDNND. ?MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMM$ .DNNNDDZ I8DDNNN, ?MMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMNZ8NNMNNNDD8I. =O8DDNNNNN8ODMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNDDDO7?IZ8DDDNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMN87:$NNNNDDDD8DDDDDNNNZ,?ONMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMM= $NNNNNNDDDDNNNNNO. ,NMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMN: ,DMMNNNNNNNNNNNNMN? .DMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMNI=NMMNZ~$DNNNNZ=INMMN$+NMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNI ~NMMZ :NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMD. ~NMM$ .ZMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNO$8MMMN$ODMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM}
{litoris's}
{***************************************************************************
| | | _ \ / __ \ | \ | | | \/ | / \ | \ | |
| | | |_) | | | | | | \| | | \ / | / ^ \ | \| |
| | | / | | | | | . ` | | |\/| | / /_\ \ | . ` |
| | | |\ \----.| `--' | | |\ | | | | | / _____ \ | |\ |
|__| | _| `._____| \______/ |__| \__| |__| |__| /__/ \__\ |__| \__| 1.3
***************************************************************************}

{ IMPORTANT INFORMATION!
1) Mines iron ores at the dwarven mines, outside the resource dungeon and banks
inside.
2) Have (preferably rune) pickaxe equipped, or else it gets banked.
3) The miner must have high enough combat level to not to get attacked by the
scorpions.
4) Should beat other bots at ore finding.

SRL Stats commits list: [url]http://stats.villavu.com/script/1152/commits/1[/url]
}

program IronMan;

{$DEFINE SMART}
{$DEFINE SRL5}
{$IFDEF SRL5}
{$i srl/srl.simba}
{$ELSE}
{$i srl/srl.scar}
{$ENDIF}
{$i srl/srl/misc/paintsmart.simba}
{$i SRL/SRL/misc/Reports.simba}

var
cx, cy, t, L, LastL, Lnew, Loads, HowLong, MMX, MMY, F : Integer;
StartXP, CurrentXP, LastXP, GainedXP : LongInt;
StatsUser, StatsPass : String;

procedure DeclarePlayers;
begin

Loads := 20; //How many loads to do? }Put large numbers here if you want it to run till the script screws up
HowLong := 60; //For how many minutes? }Will stop whichever condition happens first

StatsUser := 'Anonymous'; //SRL Stats account information
StatsPass := 'Anon1773'; //leave them like this if you don't have a stats account


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

with Players[0] do
begin
Name := '';//login email/username
Pass := '';//password
Nick := '';//to be used in progress reports when/if there is multi player support
Active := True;
Pin := ''; //don't need to enter it
BoxRewards := ['Xp'];//Random event prizes.
Lampskill := Skill_prayer;//replace prayer with skill of choice
end;

end;
{*******************************************************************************
********|Don't change stuff below this line unless you are a scripter|**********
*******************************************************************************}
procedure StartUpClient;
begin
Smart_Server := 16;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
DeclarePlayers;
ActivateClient;
setupRandomTool(10000, 5, 'C:/Simba/randomSound.wav');//get a sound in your Simba directory
end; //and put its path here to get a sound
//whenever there is a random event
procedure AntiRandoms;
begin
if not LoggedIn then
Exit;
FindNormalRandoms;
if srl_InFight then
RunAway('e', False, 1, 20000);//in case someone uses a char with low combat level
end;
procedure AntiBan;
var
w, h, rx, ry: Integer;
begin
if (TimeFromMark(t) >= (30 * 60000)) and (TimeFromMark(t) < (90 * 60000)) then
case Random(3000) of //once every 3-4 loads chance
1..10: RandomRclick;
11..15: BoredHuman;
16..20: SleepAndMoveMouse(10000);
21..25: PickUpMouse;
25..30:
begin
writeln('Antiban mini break...'); //adapted from Le Jingle's procedure
GetClientDimensions(w, h); //moves mouse off the screen
rx := RandomRange(0, w); {most of the time, at least}
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(25000, 65000));
end;
end;
if (TimeFromMark(t) >= (90 * 60000)) then //once every 2 loads chance after 1.5 hours of work
case Random(4000) of //longer antiban wait
1..20: RandomRclick;
21..30: BoredHuman;
31..40: SleepAndMoveMouse(15000);
41..50: PickUpMouse;
50..70:
begin
writeln('Antiban mini break...');
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(65000, 120000));
end;
end else
Exit; //no antiban calls for the first 30 minutes
end;
function AND_TPA (tpa1 , tpa2 :TpointArray ; MinDist ,MaxDist : extended) : TPointArray;
var
a : integer; //thanks to beginner5 for this
temp_tpa1 :TPointarray; //picks close points from two TPAs
begin
Setlength(Result,0);
for a:=0 to High(tpa2) do
begin
temp_tpa1 := tpa1;

FilterPointsDist(temp_tpa1,MinDist,MaxDist,tpa2[a].x,tpa2[a].y);

CombineTPAWrap(Result,temp_tpa1,Result);
end;
ClearDoubleTPA(Result);
end;

Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer); //from flight's tut
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
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,131072);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
procedure Proggy;
begin
CurrentXP := GetXPBarTotal - StartXp;
SMART_ClearCanvas;
PrintOnSmart(['Iron Man by litoris', 'v. 1.3', 'Time Running: ' + ToStr(TimeRunning), 'Loads Done: ' + ToStr(L),
'Ores Mined: ' + ToStr(CurrentXP/35), 'Xp Gained: ' + Tostr(CurrentXP), 'Xp/h: '
+ ToStr(Round(((CurrentXP) / (TimeFromMark(t) / 1000)) * 3600))], Point(40, 50), 16777215);
end;
procedure Report; //SRL Stats and debug box proggy
begin
LastXP := CurrentXP;
CurrentXP := GetXPBarTotal - StartXp;
GainedXP := CurrentXP - LastXP;
Lnew :=L - LastL;
LastL := L;
stats_IncVariable('Iron Ore (Mined)', GainedXP/35);
stats_IncVariable('Mining EXP (Gained)', GainedXP);
stats_IncVariable('Loads Done', Lnew);
SRLProgressReport(ResultDebugBox, 'Iron Man', 'litoris', '1.3', ['Time Running', 'Loads Done', 'Ores Mined', 'Xp Gained', 'Xp/h'],
[TimeRunning, L, CurrentXP/35, CurrentXP, Round(((CurrentXP) / (TimeFromMark(t) / 1000)) * 3600)]);
Stats_Commit;
end;
function FindObject(Which: String): Boolean;
var //used stuff from lots of scripts before I got it working
TPA1, TPA2, RTPA: TPointArray; //it used to be 3-4 seperate procedures, one for each case
Color, Tol: TIntegerArray; //Thanks to Runaway for coming up with this version
Dist, nCTS, cts, i: Integer; //saved me some time :D
ATPA: T2DPointArray;
Option, Uptext: String;
begin
case Lowercase(Which) of
'rock':
begin
nCTS := 3;
Color := [3162221, 3764098];
Tol := [5, 5];
Dist := 10;
Uptext := 'ron ore';
Option := 'ine';
end;
'dooratbank':
begin
nCTS := 3;
Color := [9541015, 13160145];
Tol := [10, 10];
Dist := 10;
Uptext := 'yster';
Option := 'xit';
end;
'dooratmine':
begin
nCTS := 3;
Color := [2109405, 6383205];
Tol := [10, 5];
Dist := 10;
Uptext := 'yster';
Option := 'nter';
end;
'dbox':
begin
nCTS := 3;
Color := [6521749, 6647669];
Tol := [3, 3];
Dist := 20;
Uptext := 'box';
Option := 't B';
end;
end;
Result := False;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(nCTS);
FindColorsTolerance(TPA1, Color[0], MSX1, MSY1, MSX2, MSY2, Tol[0]);
RAaSTPAEx(TPA1,3,3);
FindColorsTolerance(TPA2, Color[1], MSX1, MSY1, MSX2, MSY2, Tol[1]);
RAaSTPAEx(TPA2,3,3);

RTPA := AND_TPA(TPA1,TPA2,0,Dist);

if Length(RTPA) = 0 then
begin
writeln('Didn''t find '+Which+' colors.');
ColorToleranceSpeed(cts);
Inc(F); //F for Failure
if F >= 10 then
begin
Writeln('We failed too many times, logging out and back in to change the colors.');
Disguise('Reset in progess');
ExitToLobby;
Wait(15000 + Random(5000));
F := 0;
LoginPlayer;
end;
Exit;
end;
ColorToleranceSpeed(cts);
ATPA := SplitTPAEx(RTPA, 15, 15);

if (Length(ATPA) > 0) then
begin
// SortATPASize(ATPA, true); /
SortATPAFrom(ATPA, Point(MSCX, MSCY));
end else
Exit;
SMART_ClearCanvas;
Proggy;
for i:= 0 to high(ATPA) do
begin
Antirandoms;
SMART_DebugTPA(False, ATPA[i]);
MMouse(MiddleTPA(ATPA[i]).x, MiddleTPA(ATPA[i]).y, 5, 5);
if (WaitUptext(Uptext, 300 + Random(100))) then
begin
ClickMouse2(mouse_right);
if WaitOption(Option, 600) then
begin
Result := True;
Exit;
end;
end;
end;
end;
function Mining: Boolean; //True if mining animation
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 400);
end;
procedure Minemine; //clicks rock and waits
var
z : Integer;
begin
if FindObject('rock') then
begin
MarkTime(z);
Proggy;//having it in the loop below slowed stuff down
repeat
Antiban;
Antirandoms;
Wait(600);
until (not (Mining)) or (TimeFromMark(z) > (2400 + Random(300)))
end;
end;


function WhereAmI: String; //Tells loop what to do, allows script to be started anywhere
var
DoorRocks, DoorBank : Integer;//MMX/Y values are later used to go to the doors on minimap
begin
DoorRocks := DTMFromString('mrAAAAHic42BgYIhnYmCIwIJjgDgRiBOAasKBOAqIY4E4C4h' +
'TgLgYiKuB2MFUieHt229Y8dfPHxhEgGrwYUYCGAYAV3gbDg==');
DoorBank := DTMFromString('mWAAAAHicY2FgYMhgYmAoQMLBQDF/BggdBsSsTEwMn5GwCFAMGTOiYRAAAGTPBlI=');
//ClickNorth(SRL_ANGLE_HIGH);
if FindDTM(DoorRocks, MMX, MMY, MMX1, MMY1, MMX2, MMY2) and (not (InvFull)) then //dungeon door at rocks & empty inv
Result := 'Mining'; //will mine ahead
if FindDTM(DoorRocks, MMX, MMY, MMX1, MMY1, MMX2, MMY2) and InvFull then //dungeon door at rocks and full inv
Result := 'NeedToBank'; //will go to bank
if FindDTM(DoorBank, MMX, MMY, MMX1, MMY1, MMX2, MMY2) and InvFull then //dungeon door at deposit box & full inv
Result := 'Banking'; //will click deposit box
if FindDTM(DoorBank, MMX, MMY, MMX1, MMY1, MMX2, MMY2) and (not (Invfull))then //dung door at dbox and empty inv
Result := 'ReturnFromBank'; //will go back to rocks
FreeDTMs([DoorBank, DoorRocks]);
end;

procedure Loop; //The almighty loop.
var
Depositbutton : Integer;
begin
AntiRandoms;
if not LoggedIn then
LoginPlayer;
case WhereAmI of
'Mining' :
begin
Disguise('Mining');
ClickNorth(SRL_ANGLE_HIGH); //antiban sometimes changes compass angle
repeat
MineMine;
until(InvFull)
end;
'NeedToBank' :
begin
Disguise('On the way to bank');
ClickNorth(SRL_ANGLE_HIGH);
Mouse(MMX, MMY, 5, 5, True);
Wait(2600 + Random(600));
if FindObject('DoorAtMine') then
Wait(3000 + Random(600));
end;
'Banking' :
begin
Disguise('Banking');
repeat
AntiRandoms;
if FindObject('Dbox') then
Wait(2000 + Random(400));
until DepositScreen
repeat
Wait(600);
AntiRandoms;
Depositbutton := DTMFromString('m1gAAAHic42JgYLBmZGCwAmJnKAaxjYHYAIg1oRjEFgdi' + //Deposit all button
'XiAWAmIpIFYAYhkglodiCSAWBmIlIV4GNjYWBn4+XjgG8TnNuOEYxBcB2k0MZiQSIwAAPf' +
'kFzQ==');
if FindDTM(Depositbutton, cx, cy, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(cx, cy, 5, 5, True);
Inc(L);
Report;
Proggy;
FreeDTM(Depositbutton);
Break;
end;
until (not (InvFull));//just in case
end;
'ReturnFromBank' :
begin
Disguise('Going back to the rocks');
Mouse(MMX, MMY, 5, 5, True);
Wait(2600 + Random(600));
if FindObject('DoorAtBank') then
Wait(2000 + Random(600));
end;
end;
end;

begin //Mainloop
StartUpClient;
SetupSRLStats(1152, StatsUser, StatsPass); //1152=This script
SMART_ClearCanvas;
if not LoggedIn then
LoginPlayer;
L := 0;
F := 0;
StartXP := GetXPBarTotal;
Proggy;
ClickNorth(SRL_ANGLE_HIGH); //so that it can work wherever it starts from
MarkTime(t); //though it makes it click twice if started from mine but w/e
repeat
Loop;
until (not (LoggedIn)) or (TimeFromMark(t) >= (HowLong * 60000)) or (L >= Loads)
Writeln('Script Over');
end.
//Happy Little Runescape - Lumbridge by litoris
//v 1.0
//Start behind Lumbridge castle with a sling, staff of air and melee weapon in inventory
//Recognizes all armor and weapons

program HappyLittleRunescape; //possible improvements:
//find a use for the "noncb" data
{$DEFINE SMART} //loot things such as armor and runes
{$DEFINE SRL5} //cut and burn willows when the levels allow
{$IFDEF SRL5} //equip hatchets before wc(possible with recorded name)
{$i srl/srl.simba}
{$ELSE} //things to add when I go crazy:
{$i srl/srl.scar} //collect feathers from the chickens to the north and fish with them at the river
//kill cows and bank their hides at beefy bill to the north
{$ENDIF}
{$i srl/srl/misc/paintsmart.simba}
{$i sps/sps.simba}
{$i srl/srl/skill/magic.simba}
{$i SRL/SRL/misc/Reports.simba}
var
C, cx, cy, t, L, Loads, HowLong, F, YourWorld : Integer;
Fish1, Fish2, Tree1, Tree2, Goblin1, Goblin2 : Tpoint;
StartXP, CurrentXP : LongInt;
type //mostly used for combat setup
InvSlot = record
Exist : Boolean; //is it there?
Name : string; //uptext
Use : string; //melee, ranged, magic or noncb(non combat)
end;
var
Slot: Array [1..28] of InvSlot; //inventory as an array
{********************STUFF TO FILL OUT BELOW HERE********************}
procedure DeclarePlayers;
begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
HowLong := 180; //how many minutes each player should run for
YourWorld := 81; //which world to log into. Do not choose popular worlds.
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := ''; // not needed
Active := True;
BoxRewards := ['Xp', 'ostume'];
end;

with Players[1] do // Multiplayer
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
BoxRewards := ['Xp', 'ostume'];
end;
end;
{********************STUFF TO FILL OUT ABOVE HERE********************}
procedure StartUpClient;
begin
Smart_Server := 16;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['11_8', '11_9']);
DeclarePlayers;
ActivateClient;
setupRandomTool(10000, 5, 'C:/Simba/randomSound.wav'); //add the path to a sound file to make it play
SmartSetRefresh(20); //when a random is encountered

Fish1 := Point(4518, 3603); //SPS Coordinates
Fish2 := Point(4531, 3559);
Tree1 := Point(4554, 3712);
Tree2 := Point(4550, 3749);
Goblin1 := Point(4561, 3650);
Goblin2 := Point(4599, 3692);

end;
procedure AntiRandoms;
begin
if not LoggedIn then
if Players[CurrentPlayer].Active then
LoginPlayer;
FindNormalRandoms;
end;
procedure AntiBan;
var
w, h, rx, ry: Integer;
begin
if (TimeFromMark(t) >= (30 * 60000)) and (TimeFromMark(t) < (90 * 60000)) then
case Random(3000) of
1..10: RandomRclick;
11..15: BoredHuman;
16..20: SleepAndMoveMouse(10000);
21..25: PickUpMouse;
25..30:
begin
writeln('Antiban mini break...'); //adapted from Le Jingle's procedure
GetClientDimensions(w, h); //moves mouse off the screen
rx := RandomRange(0, w); {most of the time, at least}
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(25000, 65000));
end;
end;
if (TimeFromMark(t) >= (90 * 60000)) then //higher chance after 1.5 hours of work
case Random(4000) of //longer antiban wait
1..20: RandomRclick;
21..30: BoredHuman;
31..40: SleepAndMoveMouse(15000);
41..50: PickUpMouse;
50..70:
begin
writeln('Antiban mini break...');
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(65000, 120000));
end;
end else
Exit; //no antiban calls for the first 30 minutes
end;

function AND_TPA (tpa1 , tpa2 :TpointArray ; MinDist ,MaxDist : extended) : TPointArray; //thanks to beginner5
var
a : integer;
temp_tpa1 :TPointarray;
begin
Setlength(Result,0);
for a:=0 to High(tpa2) do
begin
temp_tpa1 := tpa1;

FilterPointsDist(temp_tpa1,MinDist,MaxDist,tpa2[a].x,tpa2[a].y);

CombineTPAWrap(Result,temp_tpa1,Result);
end;
ClearDoubleTPA(Result);
end;
procedure InvExist; //stores filled inventory slots
var
i : Integer;
begin
for i:=1 to 28 do
begin
if ExistsItem(i) then
Slot[i].Exist := True
else Slot[i].Exist := False;
end;
end;
procedure InvName; //stores item names, adapted from Fakawi
var
i, s : Integer;
EFU : Array of string;
temp : string;
begin
EFU := ['Look-at ', 'Craft ', 'Wield ','Use ','Eat ','Drink ','Wear ','Bury ','Heal '];
for i:=1 to 28 do
begin
if Slot[i].Exist then
begin
AntiRandoms;
MMouseItem(i);
Wait(300 + Random(100));
for s := 0 to High(EFU) do
begin // filters out spaces and the "/"
temp :=Between(EFU[s],' /', GetUpText);
if temp <> '' then
Slot[i].Name := temp;
end;
end else Slot[i].Name := ''; //no name for empty slots to avoid problems
end;
end;
procedure InvUse; //determines the use of each item
var
i, s : Integer;
melee, magic, ranged: Array of string;
begin
melee := ['helm','mulet','dagger','chain', 'sword', 'battleaxe','scimitar',
'shield','legs','lateski','platebody', 'ape','oots', 'loves',
'oots'];
ranged := ['ling', 'eather body', 'tudded body', 'cowl', 'oif', 'ape',
'chaps', 'tudded chaps', 'vambraces'];
magic := ['izard robe','izard hat','ue ski', 'taff of']; //partially taken and adapted from Fakawi's Happy Little RuneScape
for i:= 1 to 28 do
begin
if not Slot[i].Exist then
Continue; //filters out empty slots
Slot[i].Use := 'noncb'; //all of them are set as non combat at first
for s:=0 to high(melee) do
if pos(melee[s], Slot[i].Name) <> 0 then
Slot[i].Use := 'melee';
for s:=0 to high(ranged) do
if pos(ranged[s], Slot[i].Name) <> 0 then //these override noncb if it's a combat item
Slot[i].Use := 'ranged';
for s:=0 to high(magic) do
if pos(magic[s], Slot[i].Name) <> 0 then
Slot[i].Use := 'magic';
end;
end;
procedure InvSetup;
begin
InvExist;
InvName;
InvUse;
Writeln('Inventory set.');
end;
function CheckIfInCombat(XpCounter, MaxTime: Integer): Boolean; //thanks to J J
var
X, Y, OldXp, NewXp, ShieldBitmap, SwordBitmap, d: Integer;

begin
ShieldBitmap := BitmapFromString(6, 6, 'meJxzMmU1Pv7PyZS1MpIdSNbf/lcY' +
'zAZkFIeAuOEXQVIbazggghCVzfHsQBEgQ2Q/QuPOZk6IGrjK/W2cQ' +
'EGgSiCCmAYAgGAjCw==');
SwordBitmap := BitmapFromString(5, 5, 'meJxzv/svNiEBiC5durRz9Xr3u/+A' +
'qLu7G8iGcFW3gRCQzVK1hSFkM4QLREAuu0U6kIRzAaL/Koo=');
OldXp := GetXpBar(XpCounter);

MarkTime(d);
repeat
Wait(50 + Random(50));
NewXp := GetXpBar(XPCounter);

until (FindBitmapToleranceIn(ShieldBitmap, X, Y, MSCX-15, MSCY-50, MSCX+15, MSCY, 20)) or (FindBitmapToleranceIn(SwordBitmap, X, Y, MSCX-20, MSCY-50, MSCX+10, MSCY, 20)) or (NewXp > OldXp) or (TimeFromMark(d)>MaxTime);
if TimeFromMark(d)<MaxTime then
Result := True;

FreeBitmap(ShieldBitmap);
FreeBitmap(SwordBitmap);
end;
function FindObject(Which: String): Boolean;
var //Made for my iron miner with a some help from runaway
TPA1, TPA2, RTPA: TPointArray;
Color, Tol: TIntegerArray;
Dist, cts, i, k: Integer;
ATPA: T2DPointArray;
Option, Uptext: String;
CloseBy : Boolean;
begin
case Lowercase(Which) of
'tree':
begin

Color := [3361116, 1384224];
Tol := [6, 4];
Dist := 10;
Uptext := 'ree';
Option := 'hop down';
CloseBy := False;
end;
'fire':
begin

Color := [2924019, 1472919];
Tol := [5, 5];
Dist := 10;
Uptext := 'ire';
Option := 'se';
CloseBy := False;
end;
'fishingspot':
begin

Color := [11905184, 11905184];
Tol := [10, 5];
Dist := 10;
Uptext := 'spot';
Option := 'age';
CloseBy := False;
end;
'goblin':
begin

Color := [4428938, 3243162];
Tol := [10, 10];
Dist := 10;
Uptext := 'oblin';
Option := 'tta';
CloseBy := False;
end;
'loot':
begin

Color := [12961743, 14014943];
Tol := [16, 5];
Dist := 10;
Uptext := 'ake';
Option := 'ones';
CloseBy := True;
end;
end;
Result := False;
AntiRandoms;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
if CloseBy then
begin //searches around the character
if CheckIfInCombat(1, 3000) then //might have problems with loot otherwise
Exit;
FindColorsSpiralTolerance(MSCX, MSCY, TPA1, Color[0], MSCX-100, MSCY-100, MSCX+100, MSCY+100, Tol[0]);
RAaSTPAEx(TPA1,3,3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA2, Color[1], MSCX-100, MSCY-100, MSCX+100, MSCY+100, Tol[1]);
RAaSTPAEx(TPA2,3,3);
end else
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA1, Color[0], MSX1, MSY1, MSX2, MSY2, Tol[0]);
RAaSTPAEx(TPA1,3,3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA2, Color[1], MSX1, MSY1, MSX2, MSY2, Tol[1]);
RAaSTPAEx(TPA2,3,3);
end;
RTPA := AND_TPA(TPA1,TPA2,0,Dist);

if Length(RTPA) = 0 then
begin
writeln('Didn''t find '+Which+' colors.');
ColorToleranceSpeed(cts);
Inc(F); //F for Failure
if F >= 10 then
begin
Writeln('We failed too many times, logging out and back in to change the colors.');
Disguise('Reset in progess');
ExitToLobby;
Wait(15000 + Random(5000));
F := 0;
LoginPlayer;
end;
Exit;
end;
F:= 0;
ColorToleranceSpeed(cts);
ATPA := SplitTPAEx(RTPA, 15, 15);

if (Length(ATPA) > 0) then
begin
//SortATPASize(ATPA, true);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
end else
Exit;
SMART_ClearCanvas;
//Proggy;
MarkTime(k);
for i:= 0 to high(ATPA) do
begin
Antirandoms;
SMART_DebugTPA(False, ATPA[i]);
MMouse(MiddleTPA(ATPA[i]).x, MiddleTPA(ATPA[i]).y, 5, 5);
if (WaitUptext(Uptext, 300 + Random(300))) then
begin
ClickMouse2(mouse_right);
if WaitOption(Option, 400 + Random(100)) then
begin
Result := True;
Exit;
end;
end;
if TimeFromMark(k) >3000 then
Exit;
end;
end;
procedure Report;//pretty crappy right now
begin
SRLProgressReport(ResultDebugBox, 'Happy Little Runescape', 'litoris', '1.0', ['Time Running', 'Xp Gained', 'Xp/h'],
[TimeRunning, (GetXPBarTotal - StartXp), Round(((GetXPBarTotal - StartXp) / (TimeFromMark(t) / 1000)) * 3600)]);
end;
procedure CutTree;
var
XP : Extended;
u : Integer;
begin
Wait(400 + Random(600));
Antiban;
XP := GetXPBarTotal;
Marktime(u);
if FindObject('Tree') then
repeat
AntiRandoms;
Wait(200 + Random(200));
until (XP <> GetXPBarTotal) or (TimeFromMark(u) > 20000)//timeout is there in case someone else cuts the tree
else
case Random(3) of
0..1: SPS_BlindWalk(Tree1); //First position is better, so you go there twice as often
2 : SPS_BlindWalk(Tree2);
end;
end;
function Burn : Boolean;
var
LogDTM, PrevCount, x, y, b: Integer;
XP : LongInt;
begin
LogDTM := DTMFromString('mrAAAAHic42BgYMhhYmBIBOIsIC4F4gooTgXiWCAOZGRg8ARiDyB2AWI/II4A4lhGiJyXhSLQFCac+D8DfsBIAMMAANZPB7E=');
repeat
AntiRandoms;
PrevCount := InvCount;
if FindDTM(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
XP := GetXPBarTotal;
Mouse(x, y, 3, 3, mouse_right);
WaitOption('ight', 300 + Random(300));
Wait(1200 + Random(600));
end;
until (PrevCount > InvCount);

repeat
AntiRandoms;
Wait(600); //waits until log is burned
until (GetXPBarTotal > XP);
repeat
AntiRandoms;
PrevCount := InvCount;
if FindDTM(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 3, 3, mouse_left);
Wait(800 + random(400));
MouseBox(269, 404, 335, 447, Mouse_left); //add to bonfire
Wait(1600 + random(600));
end else
begin
Result := True;
FreeDTM(LogDTM);
Exit;
end;
until (PrevCount > InvCount);
Marktime(b);
repeat
AntiRandoms;
Wait(1200 + Random(400));
until((CountItems('dtm', LogDTM, [])=0 ) or (TimeFromMark(b)>2*60*1000))
if CountItems('dtm', LogDTM, [])=0 then
begin
Writeln('All burned');
Result := True;
end
else
Result := False;
FreeDTM(LogDTM);
end;
procedure WCLoop;
var
i : Integer;
begin
Writeln('Cut and burn loop');
Disguise('Cutting');
for i := 1 to 28 do //drops all fish
begin
AntiRandoms;
if pos('fish', Slot[i].Name) <> 0 then
begin
MMouseItem(i);
Wait(300 + Random(100));
ClickMouse2(mouse_right);
WaitOption('rop', 400);
Wait(600);
end;
end;
repeat
AntiRandoms;
CutTree;
until InvFull;
Disguise('Burning');
repeat
AntiRandoms;
Wait(600);
until Burn;
end;
procedure FishCookLoop;
var
RawDTM, LogDTM, i, x, y, Count : Integer;
TPA : TPointArray;
XP : LongInt;
begin
Disguise('Fishing');
RawDTM := DTMFromString('mggAAAHicY2NgYGAHYkYGCBAEYh4g5gRifiAWBmJZIGYDYg6oGj9dCSDJhIFZGbADRhwYAgBlEwEq');
//Was used to recognize all types of crayfish, but it's useless now - FishDTM := DTMFromString('maQEAAHicrc5NCkBQGIXh79qBDQhJoSQSIT8RAwOrMLA+C+RVd2bIqaczOYNjikhniNRo0GPAhBEzVt0bFr15ti1K5EiUSAoXDgLYsODDQ4QQMTKUqLQC57Hzxvjkku9RP3jlBrv3Cjc=');
LogDTM := DTMFromString('mrAAAAHic42BgYMhhYmBIBOIsIC4F4gooTgXiWCAOZGRg8ARiDyB2AWI/II4A4lhGiJyXhSLQFCac+D8DfsBIAMMAANZPB7E=');
for i := 1 to 28 do
begin
AntiRandoms;
if pos('fish', Slot[i].Name) <> 0 then
begin
MMouseItem(i);
Wait(300 + Random(100)); //removed uptext check because it screws up often
ClickMouse2(mouse_right);
WaitOption('rop', 400);
Wait(600);
end;
end;
if not(ExistsItemDTM(LogDTM, x, y)) then
repeat
AntiRandoms;
CutTree;
until(ExistsItemDTM(LogDTM, x, y));
AntiBan;
SPS_BlindWalk(Fish1);//Walk to fishing spot
Wait(3000);
if FindObject('fishingspot') then
begin
repeat
AntiRandoms;
Count := CountItems('dtm', RawDTM, []);
Wait(8000 + Random(2000));
until (Count = CountItems('dtm', RawDTM, [])); //waits if at least one fish is caught every 8 seconds
if not Invfull then
begin //less than 8 seconds breaks it
if FindObject('fishingspot') then
repeat
AntiRandoms;
Count := CountItems('dtm', RawDTM, []);
Wait(8000 + Random(2000));
until (Count = CountItems('dtm', RawDTM, [])); //failsafe
if not Invfull then
begin
if FindObject('fishingspot') then
repeat
AntiRandoms;
Count := CountItems('dtm', RawDTM, []);
Wait(8000 + Random(2000));
until (Count = CountItems('dtm', RawDTM, [])); //failsafe x2
end;
end;
end else
begin
AntiBan;
SPS_BlindWalk(Fish2); //tries the other fishing spot
Wait(3000);
if FindObject('fishingspot') then
begin
repeat
AntiRandoms;
Count := CountItems('dtm', RawDTM, []);
Wait(8000 + Random(2000));
until (Count = CountItems('dtm', RawDTM, []));
if not Invfull then
begin
if FindObject('fishingspot') then
repeat
AntiRandoms;
Count := CountItems('dtm', RawDTM, []);
Wait(8000 + Random(2000));
until (Count = CountItems('dtm', RawDTM, [])); //failsafe
if not Invfull then
begin
if FindObject('fishingspot') then
repeat
AntiRandoms;
Count := CountItems('dtm', RawDTM, []);
Wait(8000 + Random(2000));
until (Count = CountItems('dtm', RawDTM, [])); //failsafe x2
end;
end;
end;
end;
repeat
AntiRandoms;
Wait(600);
until(Burn);
Disguise('Cooking');
repeat
AntiRandoms;
if FindDTM(RawDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 3, 3, mouse_left);
Wait(800 + Random(600));
if FindObject('fire') then
begin
Wait(600 + Random(600));
MouseBox(228, 400, 283, 447, mouse_left); //Will screw up if fire somehow
repeat //goes out before all the fish are cooked
AntiRandoms; //(never happened before)
Wait(1200 + Random(400));
until( (CountItems('dtm', RawDTM, [])=0));
Writeln('All cooked');
FreeDTMs([RawDTM, LogDTM]);
Exit;
end;
end;
until(false);
end;
function TrainWhich : string;//decides which combat skill to train
var
Ranged, Defence, Attack, Strength, Magic : Integer;
begin
Writeln('Getting levels');
Attack := GetSkillLevel('attack');
Strength := GetSkillLevel('strength');
Defence := GetSkillLevel('defence');
Ranged := GetSkillLevel('range');
Magic := GetSkillLevel('magic');
if (Defence <= 5) then
begin //trains defence up first or else it is likely to die when training range/mage
Result := 'defence';
Exit;
end; //trains lowest skill afterwards
case MinA([ Strength, Attack, Defence, Ranged, Magic]) of//in this priority
Attack : Result := 'attack';
Strength : Result := 'strength';
Defence : Result := 'defence';
Ranged : Result := 'ranged';
Magic : Result := 'magic';
end;
end;
procedure FightSetup;
var
i : Integer;
Data : array of TStringArray;
Training : string;
begin
TakeOffAllItems;
Training := TrainWhich;
case Training of //dresses up for fight
'attack', 'strength', 'defence':
for i:= 1 to 28 do
begin
if Slot[i].Use = 'melee' then
MouseItem(i, 1);
end;
'ranged':
for i:= 1 to 28 do
begin
if Slot[i].Use = 'ranged' then
MouseItem(i, 1);
end;
'magic':
for i:= 1 to 28 do
begin
if Slot[i].Use = 'magic' then
MouseItem(i, 1);
end;
end;
GetWeaponData(Data);
Writeln(Tostr(Data));
Wait(Random(600));
case Training of
'attack' : SetWeaponMode('tta', Data, True);
'strength': SetWeaponMode('reng', Data, True);
'defence' : SetWeaponMode('fence', Data, True);
'ranged' : SetWeaponMode('apid', Data, True);
'magic' : Cast('wind rush', True);
end;
Retaliate(True);
end;
procedure Loot; //only bones right now
var
BoneDTM, x, y : Integer;
begin
if FindObject('loot') then
begin
AntiBan;
Wait(3000 + random(600));
BoneDTM := DTMFromString('mbQAAAHicY2VgYJjKxMAwH4gnAPFMIJ4BxAGMDAwhQBwOxH5A7AHE+7dvB6pmQsEiDJiAEQsGAwAwewbp');
if FindDTM(BoneDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 3, 3, mouse_left);
end;
FreeDTM(BoneDTM);
end;
end;
procedure FightLoop;
var
CookedDTM, x, y, z, i : Integer;
begin
Writeln('Time to kick some goblin ass');
CookedDTM := DTMFromString('mbQAAAHicY2VgYLBjYmCwB2JfILYFYisgfg4Uvw7E94D4MxC/BuJrdZVAkgkFczFgAkYsGAwAT7MHrw==');
if (CountItems('dtm', CookedDTM, [])<10) then
begin
FishCookLoop;
InvSetup;
end;
for i := 1 to 28 do
begin
AntiRandoms;
if pos('urnt', Slot[i].Name) <> 0 then
begin
MMouseItem(i);
Wait(300 + Random(100));
ClickMouse2(mouse_right);
WaitOption('rop', 400); //gets rid of burnt food
Wait(600);
end;
end;
FightSetup;
Disguise('Fighting');
MarkTime(z);
repeat
AntiRandoms;
if FindObject('Goblin') then
repeat
AntiRandoms;
Wait(Random(600));
if (HPPercent < 50) then
repeat
AntiRandoms;
if FindDTM(CookedDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 3, 3, mouse_left);
end;
Wait(1200 + Random(300));
until(HPPercent >80) or (CountItems('dtm', CookedDTM, [])= 0);
until (not (CheckIfInCombat(1, 3000)))
else
case Random(3) of
0..1 : SPS_Blindwalk(Goblin1); //location 1 is much better so we go there more
2 : SPS_Blindwalk(Goblin2);
end;
Wait(Random(1200)); //searches for goblins and loots separately, couldn't find find a way to overcome this.
Loot;
until(CountItems('dtm', CookedDTM, [])<= 3) or (TimeFromMark(z)>15*60000);
FreeDTM(CookedDTM); //stops after 15 minutes of fighting or if there isn't much food left
TakeOffAllItems; //to not to screw up the indexing
end;
procedure MainLoop;
begin
InvSetup; //checks them all again
Report;
AntiBan;
AntiRandoms;
case Random(10) of
0..2 : WCLoop;
3..5 : begin Writeln('Fishing loop'); FishCookLoop; end;
6..9 : FightLoop; //it wasn't fighting much so I thought I'd increase the chances
end;
end;

begin //Mainloop
StartUpClient;
Disguise('Welcome to Happy Little Runescape');
LoginPlayertoLob;
Wait(1000);
OpenWorldScreen;
Wait(1000);
SelectWorld(YourWorld);
if not LoggedIn then
if Players[CurrentPlayer].Active then
begin
LoginPlayertoLob;
OpenWorldScreen;
SelectWorld(YourWorld);
end;
repeat
StartXP := GetXPBarTotal;
AntiRandoms;
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
MarkTime(t);
repeat
MainLoop;
until (not (LoggedIn)) or (TimeFromMark(t) >= (HowLong * 60000));
NextPlayer(Players[CurrentPlayer].Active = False);
Disguise('Next Player');
until AllPlayersInactive;
Writeln('Script Over');
end.

Kasi

2012-07-09 13:39:24

Yes, regardless of your scripts, been at SRL for quite a while ;) although the scripting knowledge is more than adequate to get you into Members

Joe

2012-07-09 14:08:54

He knows what he's doing for the most part and has a lot of experience on these forums.
I think that with SRL members you'll be an even better addition to the community.
Good luck with the application!

~Joe

Runaway

2012-07-09 15:22:54

Yes from me. You've pretty much covered every base with these two scripts :)

Abu

2012-07-09 15:29:36

Most of your advanced functions are created by someone else or adaptations of existing ones.

Nevertheless, you've used TPAs in other places and you've demonstrated good use of DTM's, walking and standards.

And you've also been here for a year now, which means.. it's about bloody time you applied :)


Yes from me

eska

2012-07-09 15:47:52

I skimmed through it and found that your FindObject function was a bit wierd.

I'm talking about that stuff:

case Lowercase(Which) of
'rock':
begin
nCTS := 3;
Color := [3162221, 3764098];
Tol := [5, 5];
Dist := 10;
Uptext := 'ron ore';
Option := 'ine';
end;
'dooratbank':
begin
nCTS := 3;
Color := [9541015, 13160145];
Tol := [10, 10];
Dist := 10;
Uptext := 'yster';
Option := 'xit';
end;
'dooratmine':
begin
nCTS := 3;
Color := [2109405, 6383205];
Tol := [10, 5];
Dist := 10;
Uptext := 'yster';
Option := 'nter';
end;
'dbox':
begin
nCTS := 3;
Color := [6521749, 6647669];
Tol := [3, 3];
Dist := 20;
Uptext := 'box';
Option := 't B';
end;
end;

Instead of hardcoding that into the function, what I'd do is make a type to store it outside of the function.

That way, if you want to reuse the function in another script, you can, and you have no modification needed.

What I do is make a type I usualy name ColorObject, in which I store the color, the Hmod, the Smod, the uptext and the size. Then, when I call my FindObject function, I send my ColorObject, along with a few other parameter. Here's the parameters and name of my own FindObject function I use in almost every script I make:

function FindObjectTPA(var x, y: Integer; areaX1, areaY1, areaX2,
areaY2: Integer; objectColorObject:ColorObject;
searchFrom: TPoint): Boolean;

x and y are the location the object was found. The function is a boolean, so you should only use x and y if the object was found.
areaX1, areaY1, areaX2 and areaY2 are the area we are seaching for. So if I'm just searching for it in the main screen of runescape I'd use MSX1 etc when calling the function.
ObjectColorObject is what you are looking for.

This is the type I'm using in my script (which isn't for runescape so that's why it doesn't contain uptext):
type ColorObject = record
Color: Integer;
HMod: Extended;
SMod: Extended;
Tolerance: Integer;
end;

searchFrom is where the function start looking for the object. I use FindColorsSpiralTolerance to find object. Basicaly. It start looking at searchFrom, and the rotate around it in a spiral until it reach the edge of the screen. This is usefull when you want to find the closest object to a certain point.

Anyway, that's how I do it. Maybe someone has a better method than me but I feel like my method is pretty good.

Yes for me.

litoris

2012-07-10 03:22:16

Thank you all for spending time on reading my application.
From: abu_jwka
Most of your advanced functions are created by someone else or adaptations of existing ones.

That is true, mostly because when I started to work on Iron Man, I didn't know much about scripting and adapted stuff from other scripts until the script worked the way I wanted. Then, I removed the obsolete parts and tried to understand how the stuff I used worked. In the end, it was mostly my code.
From: eska
I skimmed through it and found that your FindObject function was a bit wierd.

I'm talking about that stuff:

-snip-

Instead of hardcoding that into the function, what I'd do is make a type to store it outside of the function.

That way, if you want to reuse the function in another script, you can, and you have no modification needed.

That is what I thought of at first, but it is too much of a trouble to have a function with many variables. I find it easier to edit the function each time I want to use it in a script(ie. both of the scripts posted here use the same function), because instead of having numbers next to each other, I have that case statement that changes the values according to what object I wanted to find, which is much easier to edit. I hadn't thought of using cases like that at first, I was inclined to use a bunch of arrays but Runaway helped me with it.
I could use a record I suppose, but that wouldn't give me much of an advantage.
Anyway, thanks for the votes!

Silent

2012-07-10 14:32:38

Yes from me :). Glad to see you finally applied.

mika

2012-07-10 16:53:56

yes, btw i think there should be a C at the beggining of your username?

Ashaman88

2012-07-10 17:09:48

Yes, everything I could ever want ;) Keep up the good work

Justin

2012-07-11 13:43:27

You show knowledge in the SRL include.

Yes from me.

Silent

2012-07-18 12:33:37

In?

J J

2012-07-18 14:04:42

Yes from me. Overall I've seen you around loads and the script is good. You can still improve on some points though, I would store all the uptext / auto color aid details in an array and then according to the result of where you are you can input a number in the array. So you just have an integer and give it a number and then you input that number.. Might sound weird so here is an example.

procedure JoinGame;
var
Q, A: Integer;
WizardLocs: TPointArray;
MyPos: TPoint;

begin
FindNormalRandoms;

if Leech then
begin
DrawLeech;
TerminateScript;
end;

SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'joining team', clWhite);

case DesiredWizard of
'Wizards': Q := RandomRange(0, 1);
'Wizard Acantha': Q := 2;
'Wizard Vief': Q := 3;
end;

WizardLocs := [Point(RandomRange(39811, 39823), RandomRange(3051, 3059)),
Point(RandomRange(39847, 39863), RandomRange(3043, 3055)),
Point(RandomRange(39807, 39823), RandomRange(3027, 3043)),
Point(RandomRange(39843, 39855), RandomRange(3027, 3035))];
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
MyPos := SPS_GetMyPos;
WriteLn('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
SPS_BlindWalk(WizardLocs[Q]);
Wait(1000 + Random(1000));

repeat
Inc(A);
JoinWizard;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or
(A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');

if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
end;
end;

Anyways, good luck and keep it up.

litoris

2012-07-18 16:18:13

From: J J
Yes from me. Overall I've seen you around loads and the script is good. You can still improve on some points though, I would store all the uptext / auto color aid details in an array and then according to the result of where you are you can input a number in the array. So you just have an integer and give it a number and then you input that number.. Might sound weird so here is an example.

procedure JoinGame;
var
Q, A: Integer;
WizardLocs: TPointArray;
MyPos: TPoint;

begin
FindNormalRandoms;

if Leech then
begin
DrawLeech;
TerminateScript;
end;

SMART_DrawDotsEx(False, ActionBoxTPA, RGBtoColor(194, 178, 146));
SMART_DrawText(290, 429, UpChars, 'joining team', clWhite);

case DesiredWizard of
'Wizards': Q := RandomRange(0, 1);
'Wizard Acantha': Q := 2;
'Wizard Vief': Q := 3;
end;

WizardLocs := [Point(RandomRange(39811, 39823), RandomRange(3051, 3059)),
Point(RandomRange(39847, 39863), RandomRange(3043, 3055)),
Point(RandomRange(39807, 39823), RandomRange(3027, 3043)),
Point(RandomRange(39843, 39855), RandomRange(3027, 3035))];
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
MyPos := SPS_GetMyPos;
WriteLn('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
SPS_BlindWalk(WizardLocs[Q]);
Wait(1000 + Random(1000));

repeat
Inc(A);
JoinWizard;
Wait(5000 + Random(5000));
until(CountColorTolerance(10798276, 173, 279, 352, 292, 1) > 250) or
(A > 9) or (CheckIfJoined = 'joined') or (CheckIfJoined = 'kicked');

if CheckIfJoined = 'kicked' then
begin
WriteLn('We have been kicked..');
KickedFailsafe;
end;
end;

Anyways, good luck and keep it up.


I get what you mean, I went through your script before and you had lots of stuff in arrays, so that altar names correspond to the SPS area to be loaded and the coordinates to be walked to and such. I just wouldn't prefer to do it that way, because it is so easy to screw up the orders and such. It's just easier for me this way.

Thanks for the votes everyone BTW.

Chris

2012-07-18 17:24:31

Good job. Nice scripts and you're pretty active on the forums:
Yes!

Jakkle

2012-07-20 13:01:26

Yes from me :)

Caotom

2012-07-22 06:50:52

You seem to have a through knowledge of scripting and you hit all the bases for what is looked for ;)
Yes from me.

~Caotom

fre

2012-07-22 08:31:03

Yes,
i ran your script.
It is good work.

litoris

2012-07-22 08:54:49

Thanks for the votes everyone!
Two weeks are nearly up now, so I hope an admin sees this :D

J J

2012-07-22 15:42:37

From: litoris
Thanks for the votes everyone!
Two weeks are nearly up now, so I hope an admin sees this :D

Someone elses application has been one month :redface:
Let's hope an admin will look here soon :P Took 3 weeks for me personally since I posted the app :P

Caotom

2012-07-23 04:21:19

Mine got approval the other day, just under 3 weeks after posting it so yours shouldn't be too much longer. Just have to wait until an admin does a sweep of the section (if they do it in regular intervals, you just missed it by like 4 days).
Congrats on what looks like a successful app ;)

~Caotom

Frement

2012-07-23 04:28:42

Yes from me :)

Wizzup?

2012-07-23 05:36:04

From: Silent SPY
In?


In!

litoris

2012-07-23 05:42:19

Wooot!