Frement
2010-04-16 11:10:40
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
C++, (Does PHP & HTML + CSS count?).
Are you a member of any other communities?
Not any RS related communities.
Tell us about yourself…
From: Frement
Im a 17 year old learning-programmer who wants to extend the programming knownledge. Basicly my interests are in computers and programming (More web-dev then actual programming.)
Please show us one (or multiple) of your scripts.
{Well, here is one of my scripts (which is not yet finished, but i just dont have much interest in finishing it right now.), i hope it shows my general scripting capabilities:}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{----------------------------->>>>> Falador Guard Killer By Frement <<<<<------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
// INSTRUCTIONS ETC GO HERE :)
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
program FGK;
{$IFDEF SIMBA}
{$DEFINE SMART}
{$I SRL/SRL.scar}
{$I SRL/SRL/Skill/Fighting.scar}
{$ELSE}
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{$ENDIF}
type
TFood = record
UpText: TStringArray;
DTM: Integer;
Heal: Integer;
end;
TFoods = Array of TFood;
var x, y, GuardsKilled, EXPGained, StartEXP: Integer;
ZeroTP: TPoint;
const
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{------------------------------------------>>>>> SCRIPT SETUP <<<<<------------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//} NumberOfPleijers = 1; // Here how many players you are using. {//}
{//} PlayerToStartWith = 0; // Number of the player you want to start with. {//}
{//} ShufflePlayers = True; //Randomly select next player. {//}
{//} TimePerPlayer = 30; //Time for player to run (minutes). {//}
{//} COL_GUARD = 6052960; //NO NEED TO TOUCH! {\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//} {//}
{//}{ * Valid foods: bread, cake, chicken, crayfish, herring, lobster, meat, pie, }{//}
{//}{ pizza, sardine, shrimp, stew, swordfish, trout, tuna }{//}
{//} {//}
{//}{------------------------------------------------------------------------------------------------------------}{\\}
{//}{------------------------------------->>>>> END OF SCRIPT SETUP <<<<<----------------------------------------}{\\}
{//}{------------------------------------------------------------------------------------------------------------}{\\} {//}
procedure DeclarePlayers;
begin
NumberOfPlayers( NumberOfPleijers );
CurrentPlayer := PlayerToStartWith;
with Players[0] do
begin
Name := ''; //Username
Pass := ''; //Password
Nick := ''; //3-5 Letters from your username
Loc := 'Market'; //Valid values: Market, Bank, Gate
Active := True; //Player active or not
Strings[1] := 'attack'; //Mode: attack, strength, defence or multi (att+str+def) (Which to train)
Integers[1] := 5; //Guards to kill
Arrays[1] := ['trout', 'salmon', 'pike']; //The foods you like your characters to eat. *
end;
end;
procedure SetupScript;
begin
ZeroTP := IntToPoint(0, 0);
SymbolAccuracy := 0.4;
GuardsKilled := 0;
EXPGained := 0;
DeclarePlayers;
end;
function SelectFood( Food: String ): TFood;
begin
case Lowercase( Food ) of
'bread': begin
Result.UpText := ['Bread', 'Eat Bre'];
Result.DTM := DTMFromString('78DA63EC66626028616440054C0CAC401226C' +
'AD80754534840CD64A09A5C026A6601D5A41350338F08358B816A' +
'7208A8590454534440CD54A09A3A22FC5E4F40CD6CA09A4ADC6AF' +
'E03010027670ED0');
Result.Heal := 50;
end;
'chicken': begin
Result.UpText := ['oked chi', 'chicke'];
Result.DTM := DTMFromString('78DA8DD24F0B40600C06F0BDCA0721214A94E' +
'2DBF8172921C9814FEF717070F16C871DD6AFB5AD99C612498C7C' +
'C3121BF9AD9A0E26226684F18999603C62161887985DD16755980' +
'DC625E652DCE784498939607262669882981EA624A656F4A914F3' +
'3C262346F33F2D4CACD82B24668009FECD0D7FB60CA1');
Result.Heal := 30;
end;
'crayfish': begin
Result.UpText := ['Eat Cray', 'ayfis'];
Result.DTM := DTMFromString('78DA8DD0C10A40501085E1995B5E04258A287' +
'97036A46CA4F0540EB175CE2C6EFDF52DEE8C6FC1AC72BB27B26F' +
'C2F3FA5B7EA04BC1C4C49CE854309960D87F567443CC88EE8819D' +
'0B560D80D277441CC2C98059D0BBB33B3A313627A74FB6F2E9032' +
'0F7D');
Result.Heal := 20;
end;
'herring': begin
Result.UpText := ['Eat Herr', 'erring'];
Result.DTM := DTMFromString('78DA8DD0C10A40501085E1995B5E04258A287' +
'97036A46CA4F0540EB175CE2C6EFDF52DEE8C6FC1AC72BB27B26F' +
'C2F3FA5B7EA04BC1C4C49CE854309960D87F567443CC88EE8819D' +
'0B560D80D277441CC2C98059D0BBB33B3A313627A74FB6F2E9032' +
'0F7D');
Result.Heal := 50;
end;
'lobster': begin
Result.UpText := ['Eat Lobst', 'obster'];
Result.DTM := DTMFromString('78DA8DD2CD0A40501005E0995BDEC84652224' +
'592B7F01B295960A13CB9636161756616B398BE9A53339A399159' +
'E55F4E3CF46FAA39CC60301D31054C434C05D31253C3F40633125' +
'3C24C86CC8BC1ACC424303B3111CC494C0CB311131A760506E3C3' +
'1CC4BCFF731393C25C865B903C0FF6F70E85');
Result.Heal := 120;
end;
'meat': begin
Result.UpText := ['oked me', 'd meat'];
Result.DTM := DTMFromString('78DA639CC7C4C0F093010D3031B002494620F' +
'E0F048C33816AFE42645891D43040D580E905403E17234E73C078' +
'09500D1301358B1176E154D30954C34DC09C1EA01A61026A2603D' +
'58812503307A84688809AB94035FC04D42C04AAE120C2EF2CF8D5' +
'0000D2590F36');
Result.Heal := 30;
end;
'sardine': begin
Result.UpText := ['Eat Sard', 'ardine'];
Result.DTM := DTMFromString('78DA639CC1C4C0A0CAC80002AC0C30C004261' +
'9A13CC69940BE0A0135B3817C0D026AE600F95A04D44C05F20D08' +
'A89900E41B1150D347843913817C1D22FCAE8D5F0D00FEF50736');
Result.Heal := 0; //MISSING
end;
'shrimp': begin
Result.UpText := ['Eat Shri', 'hrimps'];
Result.DTM := DTMFromString('78DA8DD2490A83401484E16E8F621C0289317' +
'10E22640051D1E0FD4F6329B8C8C62A17C2DF7CD8CDB3EDCF31C6' +
'B7E6FF71B6F7BE6A47B4474C877689F9A24FC47C84BDDEC2995FE' +
'8403067625A7448CC207C679DE155301131133A266616F6EAD1A9' +
'3067661A74454C89BE1193A22FC464C29C4BE1FE3C05530977753' +
'5393105FA2E9CF9414C8DCE847F911C9B05B94E0C8A');
Result.Heal := 30;
end;
'swordfish': begin
Result.UpText := ['Eat Swordf', 'wordfis'];
Result.DTM := DTMFromString('78DA63CC61626048636440054C0CAC401226C' +
'A980154934D404D32504D090135B140357544A86924A02611A8A6' +
'96809A54A09A4A026A8A8970732E504D110135A540355504D4540' +
'0D59412505343847B4076E5135093095453865F0D003C450CEF');
Result.Heal := 140;
end;
'trout': begin
Result.UpText := ['Eat Trou', 'rout'];
Result.DTM := DTMFromString('78DA8DD1BD0A80300C04E0A4E01B29086EB65' +
'06DFD0311447DFFE7F01C1C5CBC64C8707C848368EB44A2CA779C' +
'14D86FAA1EA637984C4C8449C48C309E98092618EE74C42CC63E0' +
'33109662626C06CC43CBF388869602E624A9893980A6627A68659' +
'FFCD0DA26B09EB');
Result.Heal := 70;
end;
'tuna': begin
Result.UpText := ['Eat Tun', 'una'];
Result.DTM := DTMFromString('78DA63DCCBC4C0E0CDC8800A98185881244C9' +
'4F108508D170135A789507312A82698809A3344A801D9154840CD' +
'29A01A7F22CC21E4F74D40359104D46C03AA8921A06637504D2C1' +
'1E11C815F0D0037BA0D93');
Result.Heal := 100;
end;
end;
end;
function ExtendArrayWith( Arr: TStringArray; Val: String ): TStringArray;
begin
SetArrayLength( Arr, High( Arr ) + 1 );
Arr[ High( Arr ) ] := Val;
Result := Arr;
end;
function SetupFood: TFoods;
var I, P: Integer;
begin
P := High( Players[ CurrentPlayer ].Arrays[1] );
for I := 0 to P do begin
Result[ I ] := SelectFood( Players[ CurrentPlayer ].Arrays[1][ I ] );
end;
end;
procedure ScriptTerminate;
begin
//SCRIPT TERMINATE STUFF
end;
procedure AntiBan;
begin
case Randomrange( 1, 9 ) of
1: MMouse( Random( 173 ), Random( 141 ), 3, 3 );
2: PickUpMouse;
3: MMouse( Random( 173 ), Random( 141 ), 3, 3 );
4: HoverSkill( 'random', False );
5: PickUpMouse;
6: MMouse( Random( 173 ), Random( 141 ), 3, 3 );
7: MMouse( Random( 173 ), Random( 141 ), 3, 3 );
8: HoverSkill( 'random', False );
9: RandomRClick;
end;
end;
function ModeToInt( Mode: String ): Integer;
begin
case Mode of
'attack': Result := 1;
'strength': Result := 2;
'defence': Result := 4;
'multi': Result := 3;
end;
end;
function SurpriseMrImp: Boolean;
var MrImpTP: TPoint;
MrImpTPA: TPointArray;
MrImpATPA: T2DPointArray;
i, MrImpHigh: Integer;
begin
if ( FindColorsSpiralTolerance( x, y, MrImpTPA, 2303854, MSX1, MSY1, MSX2, MSY2, 3 ) ) then
begin
SortTPAFrom( MrImpTPA, Point( MSCX, MSCY ) );
MrImpATPA := TPAtoATPAEx( MrImpTPA, 20, 20 );
MrImpHigh := High( MrImpATPA );
for i := 0 to MrImpHigh do
begin
MrImpTP := MiddleTPA( MrImpATPA[i] );
MMouse( MrImpTP.X, MrImpTP.Y, 3, 3 );
if ( IsUpTextMultiCustom( ['ttack', 'Imp', 'ck Im'] ) ) then
begin
GetMousePos( x, y );
if not ( IsFightAt( x, y ) ) then begin
Mouse( x, y, 0, 0, True );
Flag;
Wait( 200 + Random( 500 ) );
Result := True;
Break;
end else begin
Result := False;
Break;
end;
end;
end;
end;
end;
function SymbolInRange( SymbolName: String ): TPoint;
begin
Result := IntToPoint( 0, 0 );
if ( FindSymbolIn( x, y, SymbolName, MMX1, MMY1, MMX2, MMY2 ) ) then
begin
Result := IntToPoint( x, y );
end;
end;
function SymbolsInRange( SymbolNames: TStringArray; var Found: Integer ): Boolean;
var I: Integer;
begin
Result := False;
for I := 0 to High( SymbolNames ) do
if ( FindSymbolIn( x, y, SymbolNames[ I ], MMX1, MMY1, MMX2, MMY2 ) ) then
begin
Inc( Found );
Result := True;
end;
end;
function TPisTP(TP1, TP2: TPoint): Boolean;
begin
Result := (TP1.X = TP2.X) and (TP1.Y = TP2.Y);
end;
function AttackGuard( GuardColor: Integer ): Boolean;
var GuardTP: TPoint;
GuardTPA: TPointArray;
GuardATPA: T2DPointArray;
i, GuardHigh: Integer;
begin
if ( FindColorsSpiralTolerance( x, y, GuardTPA, GuardColor, MSX1, MSY1, MSX2, MSY2, 3 ) ) then
begin
SortTPAFrom( GuardTPA, Point( MSCX, MSCY ) );
GuardATPA := TPAtoATPAEx( GuardTPA, 20, 20 );
GuardHigh := High( GuardATPA );
for i := 0 to GuardHigh do
begin
GuardTP := MiddleTPA( GuardATPA[i] );
MMouse( GuardTP.X, GuardTP.Y, 3, 3 );
if ( IsUpTextMultiCustom( ['ttack', 'uard', 'ck Gu'] ) ) then
begin
GetMousePos( x, y );
if not ( IsFightAt( x, y ) ) then begin
Mouse( x, y, 0, 0, True );
Flag;
Wait( 200 + Random( 500 ) );
Result := True;
Break;
end else begin
Result := False;
Break;
end;
end;
end;
end;
end;
function NextPlayerEx( Active: Boolean ): Boolean;
begin
if not ( AllPlayersInactive ) then begin
if ( ShufflePlayers ) then begin
Players[ CurrentPlayer ].Integers[2] := 0;
RandomNextPlayer( Active );
Result := True;
end else begin
NextPlayer( Active );
Result := True;
end;
end else begin
ScriptTerminate;
end;
end;
procedure LostAndForgotten;
begin
Writeln( 'Lost and forgotten.' );
Players[ CurrentPlayer ].Loc := 'Lost';
if ( LoggedIn ) then begin
LogOut;
end;
NextPlayerEx( False );
end;
function DTMRotatedDistanceFromMMC( DTM: Integer ): TPoint;
var TempX, TempY: Integer;
Angle: Extended;
begin
if ( FindDTMRotated( DTM, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) then begin
TempX := MMCX - x;
TempY := MMCY - y;
if ( TempX < 0 ) then begin
TempX := iAbs( TempX );
end;
if ( TempY < 0 ) then begin
TempY := iAbs( TempY );
end;
Result := IntToPoint( TempX, TempY );
end else begin
Result := IntToPoint( 0, 0 );
end;
end;
function F_InFight: Boolean;
var CTPA: TPointArray;
begin
FindColorsTolerance( CTPA, 49499, 226, 118, 262, 147, 40 );
Result := ( GetArrayLength( CTPA ) >= 15 );
end;
function F_OpenBank( Pin: String ): Boolean;
var BankerTP: TPoint;
BankerTPA: TPointArray;
BankerATPA: T2DPointArray;
i, BankerHigh: Integer;
begin
if ( FindColorsSpiralTolerance( x, y, BankerTPA, 7110793, MSX1, MSY1, MSX2, MSY2, 5 ) ) then
begin
SortTPAFrom( BankerTPA, Point( MSCX, MSCY ) );
BankerATPA := TPAtoATPAEx( BankerTPA, 20, 20 );
BankerHigh := High( BankerATPA );
for i := 0 to BankerHigh do
begin
BankerTP := MiddleTPA( BankerATPA[i] );
MMouse( BankerTP.X, BankerTP.Y, 3, 3 );
if ( IsUpTextMultiCustom( ['se Ba', 'nk boo', 'ank boot'] ) ) then
begin
GetMousePos( x, y );
Mouse( x, y, 0, 0, False );
Flag;
Wait( 200 + Random( 500 ) );
repeat
Wait( 200 + Random( 200 ) );
until( ChooseOption( 'ickl' ) or ChooseOption( 'kly' ) or ChooseOption( 'e-qu' ) );
Flag;
Wait( 400 + Random( 200 ) );
if ( PinScreen ) then begin
if ( InPin( Pin ) ) then begin
Result := True;
Break;
end else begin
Result := False;
end;
end;
Result := True;
Break;
end;
end;
end;
end;
function MC_Gate: Boolean;
var DTM_Market_To_Gate: Integer;
Angle: Extended;
begin
MakeCompass( 'N' );
DTM_Market_To_Gate := DTMFromString('78DA63AC646260906700032608C5D0D254C0C' +
'00FA419A17CC672A04C08AA9AA2C24454353D40195354354D0D79' +
'A86A5A81325104EC2A03CAA41350930894092660571C504601554' +
'D5B7B1DAA9A0AA08C10AA9AF6D662B89AFF4000004EB515D1');
if ( FindDTMRotated( DTM_Market_To_Gate, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) then begin
Mouse( x, y, 2, 2, True );
Wait( 1000 + Random( 500 ) );
Flag;
Wait( 1000 + Random( 500 ) );
Players[ CurrentPlayer ].Loc := 'Gate';
Result := True;
end else begin
Writeln( 'ERROR: Could not walk to gate.' );
LostAndForgotten;
Result := False;
end;
FreeDTM( DTM_Market_To_Gate );
end;
function MC_Gate_Center: Boolean;
var DTMGate_Center: Integer;
Angle: Extended;
begin
DTMGate_Center := DTMFromString('78DA632C606260F06500032608C5D0D254C0C' +
'00FA419A17CC668A08C1FAA9AB6F63A54350E409940026A0A8132' +
'99686A9A8B50D56403653409A8E903CAC41370732D502619554D5' +
'D4D365CCD7F20000018CE141F');
if ( FindDTMRotated( DTMGate_Center, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) then begin
Mouse( x, y, 2, 2, True );
Wait( 1000 + Random( 500 ) );
Flag;
Wait( 500 + Random( 500 ) );
Players[ CurrentPlayer ].Loc := 'Gate';
Result := True;
end else begin
Writeln( 'ERROR: Could not walk to gate.' );
LostAndForgotten;
Result := False;
end;
FreeDTM( DTMGate_Center );
end;
function MC_Market( Location: String ): Boolean;
begin
Result := False;
case Location of
'Bank': begin
//Bank to Market
end;
'Gate': begin
//Gate to Market
end;
end;
end;
function MC_Market_Center: Boolean;
var DTMMarket_Center, Symbols: Integer;
Angle: Extended;
begin
MakeCompass( 'N' );
DTMMarket_Center := DTMFromString('78DA634C636260F06000032608C5505498C8C' +
'00FA419A17CC60CA08C0EAA9AA6863C54357540190D54352D4D05' +
'A86AEA813281A86A6AAA3231EDCA21608E2F50C68D807B1C8132E' +
'E04CC4907CA1410505301947125A0A610337C1AEA72E16AFE0301' +
'0088D219E3');
if ( FindDTMRotated( DTMMarket_Center, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) then begin
Mouse( x, y, 2, 2, True );
Wait( 1000 + Random( 500 ) );
Flag;
Wait( 1000 + Random( 500 ) );
if ( SymbolsInRange( ['furnace', 'bar', 'store', 'shield', 'water', 'mace shop'], Symbols ) ) then begin
Players[ CurrentPlayer ].Loc := 'Market';
Result := True;
end else begin
Writeln( 'ERROR: Could not relocate to center.' );
Result := False;
end;
end else begin
Writeln( 'ERROR: Could not relocate to center.' );
Result := False;
end;
FreeDTM( DTMMarket_Center );
end;
procedure MC_Center;
begin
case Players[ CurrentPlayer ].Loc of
'Gate': MC_Gate_Center;
'Market': MC_Market_Center;
end;
end;
procedure MC_Swap_Locations;
begin
MC_Center;
case Players[ CurrentPlayer ].Loc of
'Bank': MC_Market( Players[ CurrentPlayer ].Loc );
'Market': begin
MC_Gate;
MC_Gate_Center;
end;
'Gate': begin
MC_Market( Players[ CurrentPlayer ].Loc );
MC_Market_Center;
end;
end;
end;
function MC_Bank: Boolean;
var DTMBank, DTMBankers, DTMBankers2: Integer;
Angle: Extended;
begin
if ( Players[ CurrentPlayer ].Loc = 'Gate' ) then begin
MC_Swap_Locations;
end;
MakeCompass( 'N' );
DTMBank := DTMFromString('78DA6374646260686140019D6D950C22409A1' +
'188FF0301A30D504D3CAA9AA6FA22B81A1060AC00AA69C36D0E58' +
'4D16504D24AA9A8ED67254358140356104D49403D5641150D3025' +
'413875B0D2BCC1C0F54356DCDA5986A6A0898530254D38BAAA6A5' +
'B104AE0628CB000030DE1C4A');
DTMBankers := DTMFromString('78DA63AC666260A86740017FFE3031F003694' +
'620FE0F048CF5F8D580006333116ADA8950D343580D00D5B41349' +
'');
DTMBankers2 := DTMFromString('78DA638C636260686700034608C5B03AC89B8' +
'11589CF180B54534A404D0AA6398D7616A86A2231D5B4395AA1AA' +
'01B9A70B55CD64770754354940356504CC2900AA294455D3D2508' +
'8AAC61EA8A604554D535D015CCD7F200000A76014AB');
if ( FindDTMRotated( DTMBank, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) then begin
Mouse( x, y, 2, 2, True );
Wait( 1000 + Random( 500 ) );
Flag;
Wait( 1000 + Random( 500 ) );
if ( FindDTMRotated( DTMBankers, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) or
( FindDTMRotated( DTMBankers2, x, y, MMX1, MMY1, MMX2, MMY2, 0.0, 360.0, 1.0, Angle ) ) then begin
Mouse( x, y - 25, 2, 2, True );
Wait( 1000 + Random( 500 ) );
Flag;
Wait( 1000 + Random( 500 ) );
Players[ CurrentPlayer ].Loc := 'Bank';
Result := True;
end else begin
Writeln( 'ERROR: Could not walk to bankers.' );
LostAndForgotten;
Result := False;
end;
end else begin
Writeln( 'ERROR: Could not walk to bank.' );
LostAndForgotten;
Result := False;
end;
FreeDTM( DTMBank );
FreeDTM( DTMBankers );
end;
function WhileInFight: Boolean;
begin
while F_InFight do
begin
Writeln( 'NOTICE: We are in fight.' );
FindNormalRandoms;
AntiBan;
FindNormalRandoms;
Wait( 200 + Random ( 500 ) );
FindNormalRandoms;
end;
Inc( GuardsKilled );
Inc( Players[ CurrentPlayer ].Integers[2] );
Disguise( 'Guards Killed: ' + IntToStr( Players[ CurrentPlayer ].Integers[2] ) );
Result := True;
end;
function ProggySpaces( TheString, TheOther: String; MaxLength: Integer ): String;
var Len: Integer;
begin
Len := Length( TheString );
{$IFDEF Simba}
Result := TheString + Copy( TheOther, 1, MaxLength - Len );
{$ELSE}
Result := TheString + Left( TheOther, MaxLength - Len );
{$ENDIF}
end;
function EXP_Gained( Mode: Integer; Start: Boolean ): Integer;
var EXP: Integer;
begin
GameTab( tab_Stats );
case Mode of
1: begin
EXP := GetXP( 'attack' );
end;
2: begin
EXP := GetXP( 'strength' );
end;
3: begin
EXP := GetXP( 'attack' );
EXP := EXP + GetXP( 'strength' );
EXP := EXP + GetXP( 'defence' );
end;
4: begin
EXP := GetXP( 'defence' );
end;
end;
if Start then begin
Result := EXP;
end else begin
Result := EXP - StartEXP;
end;
end;
procedure SetupPlayer;
begin
Players[ CurrentPlayer ].Integers[3] := GetTickCount;
ClickNorth( True );
SetAngle( True );
SetRun( True );
Retaliate( True );
SetFightMode( ModeToInt( Players[ CurrentPlayer ].Strings[1] ) );
Wait( 500 + Random( 500 ) );
StartEXP := EXP_Gained( ModeToInt( Players[ CurrentPlayer ].Strings[1] ), True );
GameTab( tab_Inv );
end;
procedure ProgressReport;
var H, M, S: Integer;
Time: String;
begin
ConvertTime( GetTimeRunning, H, M, S );
Time := IntToStr( H ) + ' hours, ' + IntToStr( M ) + ' minutes and ' + IntToStr( S ) + ' seconds.';
Writeln( '+------------------------------------------------------+' );
Writeln( '+- Falador Guard Killer By Frement -+' );
Writeln( '+------------------------------------------------------+' );
Writeln( '| Time Running: ' + ProggySpaces( Time, ' ', 38 ) + ' |' );
Writeln( '+------------------------------------------------------+' );
Writeln( '| Guards Killed: ' + ProggySpaces( IntToStr( GuardsKilled ), ' ', 37 ) + ' |' );
Writeln( '| EXP Gained: ' + ProggySpaces( IntToStr( EXP_Gained( ModeToInt( Players[ CurrentPlayer ].Strings[1] ) , False ) ), ' ', 40 ) + ' |' );
Writeln( '+------------------------------------------------------+' );
end;
procedure PlayerLoop;
var I: Integer;
begin
if not ( LoggedIn ) then
begin
LoginPlayer;
end;
Wait( 200 + Random( 200 ) );
SetupPlayer;
repeat
if not ( AttackGuard( COL_GUARD ) ) then begin
Writeln( 'NOTICE: No Guards found!' );
if ( SurpriseMrImp ) then begin
FindNormalRandoms;
Wait( 500 );
Flag;
Wait( 1000 + Random( 500 ) );
FindNormalRandoms;
end;
if ( I = 1 ) then begin
Writeln( 'NOTICE: Centering character!' );
MC_Center;
end;
Inc( I );
if ( I >= 5 ) then begin
I := 0;
Writeln( 'NOTICE: Swapping locations!' );
MC_Swap_Locations;
end;
end else begin
Wait( 2000 + Random ( 500 ) );
WhileInFight;
Wait( 1000 + Random ( 500 ) );
end;
until( Players[ CurrentPlayer ].Integers[2] >= Players[ CurrentPlayer ].Integers[1] ) or ( ( GetTickCount - Players[ CurrentPlayer ].Integers[3] ) >= ( ( TimePerPlayer + Random( 5 ) ) * 60 * 60 ) );
ProgressReport;
if ( Players[ CurrentPlayer ].Integers[2] >= Players[ CurrentPlayer ].Integers[1] ) then begin
NextPlayerEx( False );
end else if ( ( GetTickCount - Players[ CurrentPlayer ].Integers[3] ) >= ( TimePerPlayer * 60 * 60 ) ) then begin
NextPlayerEx( True );
end;
end;
begin
SetupSRL;
SetupScript;
repeat
PlayerLoop;
until( AllPlayersInActive );
end.