SRL Archive - Archive

vilon - SRL Member Application Form


vilon

2007-10-31 07:48:48

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

What is the meaning to life?


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


Programming Knowledge
(HTML,) PHP, AutoIt, C#.

Other Communitys
None related to "runescape cheating".

How Long have You Played Runescape
About 5 years.

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

Hello,

Some of you might have seen me around here for a time now, some not. I would like to start by saying that I'm the kind of person that sees everything in a logical way, maybe this is why I enjoy mathematics so much. The thoughts about programming/scripting has always been there in my head, ever since back when I was 14 or maybe a bit younger, and I first learned HTML and was amazed about it.

But HTML was never a "programming" experience. I moved on to PHP and studied that for about a year. About the same time I also became interested in Autoit (some of you might have heard about it), since it was very user friendly and easy to use. When I later found out how boring it was, I decided I should move to something else. C# was next in turn and I'm still taking classes in it at the moment. And finally, I'm now into pascal and especially SCAR/runescape scripting.

I'm not the kind of guy who scripts because he wants to earn respect or anything similar. I do it because I enjoy it, want to learn more, enjoy the challenge and simply loves the logical parts.

- vilon

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

{==================================================================]
[ _ _ _ _ ]
[ | | | | (_) | | ]
[ | | _ _ _ __ ___ | |__ _ __ _ __| | __ _ ___ ]
[ | | | | | | '_ ` _ \| '_ \| '__| |/ _` |/ _` |/ _ \ ]
[ | |___| |_| | | | | | | |_) | | | | (_| | (_| | __/ ]
[ |______\__,_|_| |_| |_|_.__/|_| |_|\__,_|\__, |\___| ]
[ Castle Flax Spinner v1.2b __/ | ]
[ by Vilon |___/ ]
[==================================================================]
[ NAME : Lumbridge Castle Flax Spinner (LumbCFS) ]
[ AUTHOR : Vilon ]
[ CATEGORY : Fletching ]
[ DESCRIPTION : Spins flax into bowstrings, at Lumbridge. ]
[ MEMBERS ONLY : Yes ]
[ MULTIPLAYER : Yes ]
[ SCAR VERSION : 3.12c ]
[ SRL VERSION : 4 #rev 6 ]
[ RELEASE DATE : 28/10/2007 ]
[==================================================================]
[ 01. Use the offical runescape client, with low detail and very ]
[ bright. Set your screen resolution to 32bit true color. ]
[ 02. Setup your player(s), starting at line 40. ]
[ 03. Position your runescape characters in the one and only open ]
[ bankslot, in the lumbridge castle (third floor). Also make ]
[ sure your inventory is empty and flax is in the 1st bankslot.]
[ 04. Drag the crosshair over the runescape client and press play. ]
[ 05. Enjoy the script and please post progress/feedback :D ]
[==================================================================}

program LumbCFS;
{.include SRL/SRL.scar}

{-------------------------------------------------------------------------------
procedure DeclarePlayers;
Description: Here is where you declare your player(s).
-------------------------------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers:=4; // Type in the number of players you are going to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0; // Type in the number of the player you want to start with.

Players[0].Name:='Username'; // Enter your username
Players[0].Pass:='Password'; // Enter your password
Players[0].Nick:='sern'; // Enter your nickname (3-4 letters from your username)
Players[0].Loc:='Bank'; // Enter start-location (don't touch)
Players[0].Pin:=1234; // Enter your bank-pin, if you have one
Players[0].Skill:='crafting'; // Enter skill for genie lamp(s)
Players[0].Integers[0]:=100; // Enter number of loads
Players[0].Active:=True; // Enter True if you want to use this player, else False.

Players[1].Name:='Username';
Players[1].Pass:='Password';
Players[1].Nick:='sern';
Players[1].Loc:='Bank';
Players[1].Pin:=1234;
Players[1].Skill:='crafting';
Players[1].Integers[0]:=100;
Players[1].Active:=True;

Players[2].Name:='Username';
Players[2].Pass:='Password';
Players[2].Nick:='sern';
Players[2].Loc:='Bank';
Players[2].Pin:=1234;
Players[2].Skill:='crafting';
Players[2].Integers[0]:=100;
Players[2].Active:=True;

Players[3].Name:='Username';
Players[3].Pass:='Password';
Players[3].Nick:='sern';
Players[3].Loc:='Bank';
Players[3].Pin:=1234;
Players[3].Skill:='crafting';
Players[3].Integers[0]:=100;
Players[3].Active:=True;

Writeln('[Notice] Using: '+IntToStr(HowManyPlayers)+' player(s).');
CheckUserNicks;
end;

{///////////////////////////////////////////////////////////////////////////////
/| THERE IS NO NEED TO CHANGE ANYTHING BELOW THIS LINE! |\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}

{-------------------------------------------------------------------------------
const Setup
Description: Declare constants.
-------------------------------------------------------------------------------}
const
ScriptName = 'Lumbridge Castle Flax Spinner (LumbCFS)';
ScriptVersion = '1.2b';

{-------------------------------------------------------------------------------
var Setup
Description: Declare global variables.
-------------------------------------------------------------------------------}
var
Times, TotalTimes, Bowstrings, TotalBowstrings, Repeats, x, y : Integer;
FlaxDTM, BowstringDTM, DoorBMP, SpinBMP, GuideBMP, BankBMP : Integer; // DTM's and BMP's

{-------------------------------------------------------------------------------
procedure PlayerLogin;
Description: Login the "CurrentPlayer".
-------------------------------------------------------------------------------}
procedure PlayerLogin;
begin
LoginPlayer;
end;

{-------------------------------------------------------------------------------
procedure PlayerLogout;
Description: Logout the "CurrentPlayer".
-------------------------------------------------------------------------------}
procedure PlayerLogout;
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;

{-------------------------------------------------------------------------------
procedure PlayerCheck;
Description: Check if the "CurrentPlayer" is loggedin.
-------------------------------------------------------------------------------}
procedure PlayerCheck;
begin
if(not(LoggedIn))then Exit;
end;

{-------------------------------------------------------------------------------
procedure PlayerCheckLoc;
Description: Check if the "CurrentPlayer" has the correct location set.
-------------------------------------------------------------------------------}
procedure PlayerCheckLoc;
begin
if(Players[CurrentPlayer].Loc = 'Error')then
begin
Writeln('[Error] Location unknown, switching character...');
PlayerLogout;
end;
end;

{-------------------------------------------------------------------------------
procedure AlignCompass;
Description: Aligns the compass.
-------------------------------------------------------------------------------}
procedure AlignCompass;
begin
PlayerCheck;
HighestAngle;
MakeCompass('N');
end;

{-------------------------------------------------------------------------------
procedure AntiBan;
Description: Antiban procedure.
-------------------------------------------------------------------------------}
procedure AntiBan;
begin
PlayerCheck;
case random(35) + 1 of
0: HoverSkill('crafting', false);
1: HoverSkill('random', false);
2: BoredHuman;
3: HoverSkill('crafting', false);
4: BoredHuman;
5: BoredHuman;
6: HoverSkill('crafting', false);
end;
end;

{-------------------------------------------------------------------------------
procedure AntiRandom;
Description: The procedure we use for finding random events.
-------------------------------------------------------------------------------}
procedure AntiRandom;
begin
PlayerCheck;
FindNormalRandoms;
end;

{-------------------------------------------------------------------------------
procedure SetupDTMs;
Description: Loads DTMs.
-------------------------------------------------------------------------------}
procedure SetupDTMs;
begin
FlaxDTM := DTMFromString('78DA638C676460686440038C4824900E06B2E' +
'A08A80903B23A08A84902B23A09A8C902B29A09A84901B22A09A8' +
'8926AC060068650635');

BowstringDTM := DTMFromString('78DA63B467666090606440058C482490F607A' +
'A9123A0C605A84699801A33A01A45026AAC806A8409A83105AA11' +
'C5AF0600243E0244');
end;

{-------------------------------------------------------------------------------
procedure FreeDTMs;
Description: Frees DTMs.
-------------------------------------------------------------------------------}
procedure FreeDTMs;
begin
FreeDTM(FlaxDTM);
FreeDTM(BowstringDTM);
end;

{-------------------------------------------------------------------------------
procedure SetupBMPs;
Description: Loads BMPs.
-------------------------------------------------------------------------------}
procedure SetupBMPs;
begin
DoorBMP := BitmapFromString(1, 4, 'beNpjYPjOwPCfAUR+BwAVfgPl');
SpinBMP := BitmapFromString(1, 1, 'beNoLUM0CAAGnAOA=');
GuideBMP := BitmapFromString(1, 1, 'beNqLaVQCAAI7AQA=');
BankBMP := BitmapFromString(1, 1, 'beNo77XELAAPOAe4=');
end;

{-------------------------------------------------------------------------------
procedure FreeBMPs;
Description: Frees BMPs.
-------------------------------------------------------------------------------}
procedure FreeBMPs;
begin
FreeBitmap(DoorBMP);
FreeBitmap(SpinBMP);
FreeBitmap(GuideBMP);
FreeBitmap(BankBMP);
end;

{-------------------------------------------------------------------------------
procedure SetupProgress;
Description: Setup and display the progress report.
-------------------------------------------------------------------------------}
procedure SetupProgress;
begin
PlayerCheck;

// Increase times done
Inc(Times);
Inc(TotalTimes);

// Disguise title
Disguise(''+IntToStr(Times)+'/'+IntToStr(Players[CurrentPlayer].Integers[0])+' [ '+IntToStr(Bowstrings)+' | '+IntToStr(TotalBowstrings)+' ]');

// Progress report
Writeln('[=================================================]');
Writeln('[ '+ScriptName+' v'+ScriptVersion+'');
Writeln('[=================================================]');
Writeln('[Name: ['+IntToStr(CurrentPlayer)+'] '+Players[CurrentPlayer].Name+'');
Writeln('[Worked (total): '+TimeRunning+'.');
Writeln('[Loads done: '+IntToStr(times)+'/'+IntToStr(Players[CurrentPlayer].Integers[0])+' ('+IntToStr(TotalTimes)+')');
Writeln('[Bowstrings made: '+IntToStr(Bowstrings)+' ('+IntToStr(TotalBowstrings)+')');
Writeln('[=================================================]');

// SRL randomevent report
SRLRandomsReport;
end;

{-------------------------------------------------------------------------------
procedure SetupScript;
Description: Does the nessecary things to set up the script properly.
-------------------------------------------------------------------------------}
procedure SetupScript;
begin
// "Reset" values
Times := 0;
Repeats := 0;
Bowstrings := 0;
TotalBowstrings := 0;
TotalTimes := 0;

// Rest of setup
ClearReport;
ClearDebug;
SetupSRL;
DeclarePlayers;
LampSkill := (Players[CurrentPlayer].Skill); // Set lampskill
FindRS;
ActivateClient;
end;

{-------------------------------------------------------------------------------
procedure DepositBowstrings;
Description: Deposists bowstrings (called from BankFB).
-------------------------------------------------------------------------------}
procedure DepositBowstrings;
var
DepositMark, InvAmount : Integer;
begin
PlayerCheck;
if(not(Repeats = 0))then
begin
// Look for bowstrings in inventory
if(FindDTM(BowStringDTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
// Count how many items there are in the inventory.
InvAmount := InvCount;

// Deposit the bowstrings, if they were found.
MarkTime(DepositMark);
repeat
Mouse(x, y, 10, 10, false);
ChooseOption('Store All');
Wait(500+random(250));
until((not(InvCount = InvAmount)) or (TimeFromMark(DepositMark) > 3000));

// Let's count how many bowstrings we made during this run.
Bowstrings := Bowstrings + (InvAmount - InvCount);
TotalBowstrings := TotalBowstrings + (InvAmount - InvCount); // Count total number of bowstrings.
end;
end;

// Lets deposit everything now, since we counted the bowstrings.
DepositAll;

// Wait until the inventory is empty.
MarkTime(DepositMark);
repeat
Wait(100+random(100));
until((InvCount = 0) or (TimeFromMark(DepositMark) > 2000));
end;

{-------------------------------------------------------------------------------
procedure BankFB;
Description: Withdraws flax (and deposits bowstrings).
-------------------------------------------------------------------------------}
procedure BankFB;
var
BankTries, BankTries2, BankActive, BankMark, BankColor : Integer;
begin
BankTries2 := 0;
BankColor := 8032931;

PlayerCheck;
PlayerCheckLoc;
repeat
BankTries := 0;
BankActive := 0;
Inc(BankTries2);

if(Players[CurrentPlayer].Loc = 'Bank')then
begin
repeat

if((not(BankScreen)) and (not(PinScreen)))then
begin
Inc(BankTries);
AntiRandom;

if(FindObjCustom(x, y, ['ank', 'oot'], [BankColor], 15))then // Open bank
begin
Mouse(x, y, 5, 5, false);
if(not(ChooseOption('Use-quickly')))then Continue;
end else
begin
OpenBankFast('lb');
end;

MarkTime(BankMark);
repeat
Wait(100+random(50));
until((PinScreen) or (BankScreen) or (TimeFromMark(BankMark) > 3000));

if(PinScreen or BankScreen)then
begin
BankActive := 1;
Break;
end;
end else
begin
BankActive := 1;
Break;
end;
until((BankTries = 3) or (BankActive = 1));

if(PinScreen)then InPin(IntToStr(Players[CurrentPlayer].Pin)); // Enter PIN

MarkTime(BankMark);
repeat
Wait(100+random(50));
until((BankScreen) or (TimeFromMark(BankMark) > 1500));

if(BankScreen)then
begin
FixBank;
SetupDTMs;
DepositBowstrings; // Deposit inventory items
if(FindDTM(FlaxDTM, x, y, MSX1, MSY1, MSX2, MSY2))then // If we can't find flax, exit.
begin
if(not(Repeats >= Players[CurrentPlayer].Integers[0]))then Withdraw(1, 1, 0);
end else
begin
Writeln('[Notice] You have run out of flax, switching character...');
FreeDTMs;
MarkTime(BankMark);
repeat
CloseBank;
until((not(BankScreen)) or (TimeFromMark(BankMark) > 2000));
PlayerLogout;
Break;
end;
FreeDTMs;
Wait(500+random(250));
MarkTime(BankMark);
repeat
CloseBank;
until((not(BankScreen)) or (TimeFromMark(BankMark) > 2000));
AntiRandom;
end else if(FindSymbol(x, y, 'guide'))then // Failsafe, if we cant find bank, try walking closer.
begin
if(MFNF(x, y, 1, -random(3)))then
begin
MarkTime(BankMark);
repeat
Wait(100+random(250));
until((FlagDistance = 0) or (TimeFromMark(BankMark) > 5000));
Continue;
end else
begin
Writeln('[Error] Failure when trying to walk closer to bank, switching character...');
PlayerLogout;
Break;
end;
end else
begin
Writeln('[Error] Could not open bank, switching character...');
PlayerLogout;
Break;
end;
end;
until((BankActive = 1) or (BankTries2 = 2));
end;

{-------------------------------------------------------------------------------
function ClimbLadder(Direction : String) : Boolean
Description: Climbs ladder in given direction.
-------------------------------------------------------------------------------}
function ClimbLadder(Direction : String) : Boolean;
var
LadderDown, LadderUp, LadderMark, LadderTries : Integer;
begin
LadderDown := 602440;
LadderUp := 540510;
LadderTries := 0;

PlayerCheck;
PlayerCheckLoc;
case LowerCase(Direction) of
'down': begin
MarkTime(LadderMark);
repeat
Inc(LadderTries);

if(LadderTries = 5)then
begin
Writeln('[Error] Could not climb ladder (down), switching character...');
PlayerLogout;
Break;
end;

if(FindObjEx(x, y, 'own', 125, 140, 300, 250, LadderDown, 15, 1, 1, 0, false))then
begin
Mouse(x, y, 5, 5, false);
if(ChooseOption('Climb-down'))then
begin
Result := True;
Break;
end;
end else Result := False;
until((LadderTries = 5) or (TimeFromMark(LadderMark) > 10000))
end;
'up': begin
MarkTime(LadderMark);
repeat
Inc(LadderTries);
if(FindObjCustom(x, y, ['lim', 'imb'], [LadderUp], 15))then
begin
Mouse(x+5, y+10, 10, 5, false);
if(ChooseOption('Climb-up'))then
begin
Result := True;
Break;
end else Result := False;
end else Result := False;
until((LadderTries = 3) or (TimeFromMark(LadderMark) > 10000))
end;
end;
end;

{-------------------------------------------------------------------------------
procedure CheckDoor
Description: Checks for door and opens if it's closed.
-------------------------------------------------------------------------------}
procedure CheckDoor;
var
DoorMark, DoorColor, DoorTries : Integer;
begin
DoorColor := 2772852;
DoorTries := 0;

PlayerCheck;
PlayerCheckLoc;
MarkTime(DoorMark);
repeat
Inc(DoorTries);

if(DoorTries = 5)then
begin
Writeln('[Error] Could not find the door, switching character...');
PlayerLogout;
Break;
end;

if(FindObjCustom(x, y, ['oor'], [DoorColor], 20))then
begin
if(IsUpText('pen'))then
begin
Mouse(x, y, 5, 5, false);
if(ChooseOption('Open'))then
begin
FFlag(0);
Break;
end;
end else if(IsUpText('los'))then
begin
Break;
end;
end;
until((DoorTries = 5) or (TimeFromMark(DoorMark) > 3000));
end;

{-------------------------------------------------------------------------------
procedure WalkSpinner;
Description: Walks to spinner.
-------------------------------------------------------------------------------}
procedure WalkSpinner;
var
WalkMark, WalkMark2, WalkTries, WalkTries2, DoorColor, SpinColor, GuideColor : Integer;
begin
WalkTries := 0;

PlayerCheck;
PlayerCheckLoc;

SetupDTMs;
// If we don't have flax in inventory, we should try to open bank again.
if(not(FindDTM(FlaxDTM, x, y, MIX1, MIY1, MIX2, MIY2)))then BankFB;
FreeDTMs;

// The first time we want to set run to "on".
if(Repeats = 0)then
begin
SetRun(true);
GameTab(4);
end;

// Walk to ladder and climb down
PlayerCheckLoc;
if(Players[CurrentPlayer].Loc = 'Bank')then
begin
if(RadialWalk(FindLadderColor, 230, 150, 70, -random(3), random(3)))then
begin
MarkTime(WalkMark);
repeat
Wait(100+random(250));
until((FlagDistance < 2) or (TimeFromMark(WalkMark) > 10000));
Wait(500+random(250));
Players[CurrentPlayer].Loc := 'LadderUpStairs';
if(ClimbLadder('down')) then Players[CurrentPlayer].Loc := 'LadderDownStairs' else Players[CurrentPlayer].Loc := 'Error';
end else Players[CurrentPlayer].Loc := 'Error';
end;


// Walk to door
PlayerCheckLoc;
if(Players[CurrentPlayer].Loc = 'LadderDownStairs')then
begin
MarkTime(WalkMark);
repeat
Wait(100+random(250));
until((FindSymbol(x, y, 'spin')) or (TimeFromMark(WalkMark) > 3000));

// Lets get to the spinner...
MarkTime(WalkMark);
repeat
Inc(WalkTries);

// Try to open/walk to the door directly (by right-clicking).
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
WalkTries2 := 0;
repeat
Inc(WalkTries2);
if(FindObjEx(x, y, 'oor', 250, 1, 500, 50, 2772852, 20, 20, 0, 0, false))then
begin
if(IsUpText('pen'))then
begin
Mouse(x, y, 5, 5, false);
if(ChooseOption('Open'))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance < 2) or (TimeFromMark(WalkMark2) > 5000));
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end else if(IsUpText('los'))then
begin
if(WalkTries2 = 3)then Break;
Mouse(x, y, 5, 5, false);
if(ChooseOption('Walk here'))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance = 0) or (TimeFromMark(WalkMark2) > 3000));
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end;
end else
begin
if(WalkTries2 = 2)then Break;
Mouse(250, 130, 15, 5, false);
ChooseOption('Walk here');
MarkTime(WalkMark2);
repeat
Wait(500+random(250));
until((FlagDistance < 2) or (TimeFromMark(WalkMark2) > 3000));
end;
until((Players[CurrentPlayer].Loc = 'Door') or (WalkTries2 = 2) or (TimeFromMark(WalkMark) > 15000));

// Now, if we still failed walking to door, walk back to the ladder, so we can use the rest of the failsafes.
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
RadialWalk(FindLadderColor, 265, 150, 50, 1, 1);
Wait(750+random(250));
end;
end;

// Try to radialwalk to the door
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
SetupBMPs;
DoorColor := AutoColorThis(DoorBMP, 50, MMX1, MMY1, MMX2, MMY2);
FreeBMPs;

if(not(DoorColor = 0))then
begin
if(RadialWalk(DoorColor, 300, 425, 35, 1, 1))then
begin
CheckDoor;
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end;
end;

// Try to find the spinsymbol
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
if(FindSymbol(x, y, 'spin'))then
begin
if(MFNF(x, y, 1, 1))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance < 2) or (TimeFromMark(WalkMark2) > 5000));
CheckDoor;
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end;
end;

// Try to radialwalk to the spinsymbol
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
SetupBMPs;
SpinColor := AutoColorThis(SpinBMP, 50, MMX1, MMY1, MMX2, MMY2);
FreeBMPs;

if(not(SpinColor = 0))then
begin
if(RadialWalk(SpinColor, -50, 100, 45, 1, 1))then
begin
CheckDoor;
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end;
end;

// Try finding the guide symbol
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
if(FindSymbol(x, y, 'guide'))then
begin
if(MFNF(x, y, 1, 1))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance < 2) or (TimeFromMark(WalkMark2) > 5000));
CheckDoor;
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end;
end;

// Try to radialwalk to the guidesymbol
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
SetupBMPs;
GuideColor := AutoColorThis(GuideBMP, 50, MMX1, MMY1, MMX2, MMY2);
FreeBMPs;

if(not(GuideColor = 0))then
begin
if(RadialWalk(GuideColor, -50, 100, 45, 1, 1))then
begin
CheckDoor;
Players[CurrentPlayer].Loc := 'Door';
Break;
end;
end;
end;
until((WalkTries = 3) or (Players[CurrentPlayer].Loc = 'Door') or (TimeFromMark(WalkMark) > 10000));
end;

// If we're not at the door now, something went wrong.
if(not(Players[CurrentPlayer].Loc = 'Door'))then
begin
Writeln('[Error] Could not walk to door/spinner, switching character...');
PlayerLogout;
end;
end;

{-------------------------------------------------------------------------------
procedure AntiFight;
Description: Handles fighting.
-------------------------------------------------------------------------------}
procedure AntiFight;
var
WalkMark : Integer;
begin
PlayerCheck;
if(FindFightEx)then
begin
CheckDoor;
RunAwayDirection('N');
Wait(10000+random(10000));
GameTab(4);

if(FindSymbol(x, y, 'spin'))then // Try to walk back by finding the spin symbol.
begin
if(MFNF(x, y, 1, 1))then
begin
MarkTime(WalkMark);
repeat
Wait(100+random(250));
until((FlagDistance < 5) or (TimeFromMark(WalkMark) > 5000));
CheckDoor;
end else PlayerLogout;
end else if(FindSymbol(x, y, 'guide'))then // Try the guide symbol
begin
if(MFNF(x, y, 1, 1))then
begin
MarkTime(WalkMark);
repeat
Wait(100+random(250));
until((FlagDistance < 5) or (TimeFromMark(WalkMark) > 5000));
CheckDoor;
end else PlayerLogout;
end else PlayerLogout;
end;
end;

{-------------------------------------------------------------------------------
procedure SpinFlax;
Description: Spins flax into bowstrings.
-------------------------------------------------------------------------------}
procedure SpinFlax;
var
SpinMark, SpinMark2, SpinTries, SpinColor, SpinColor2, SpinLevel : Integer;
begin
SpinColor := 11330;
SpinColor2 := 1339815;
SpinTries := 0;
SpinLevel := 0;

PlayerCheck;
PlayerCheckLoc;
SetupDTMs;
// Walk to spinner
MarkTime(SpinMark);
repeat
Inc(SpinTries);
if(FindObjCustom(x, y, ['pin', 'nni'], [SpinColor, SpinColor2], 20))then
begin
Mouse(x, y, 4, 4, false);
if(ChooseOption('Spin'))then
begin

// Wait until we see the window
MarkTime(SpinMark2);
repeat
if(InChat('ach'))then Break;
Wait(500+random(250));
until((FindColorTolerance(x, y, 65024, 225, 129, 302, 167, 5)) and (FindColorTolerance(x, y, 2070783, 36, 29, 462, 51, 5)) or (TimeFromMark(SpinMark2) > 10000));

// Check if we got locked out
if(InChat('ach'))then
begin
CheckDoor;
Continue;
end;

// Make bowstrings
Mouse(261, 122, 28, 33, false);
if(ChooseOption('Make X'))then
begin
Wait(1000+random(250));

// Send random numbers, containing 1-5 and together form a number greater then 28 (lowest is 111).
case random(1) + 1 of
0: TypeSend(''+IntToStr(Random(5) + 1)+''+IntToStr(Random(5) + 1)+''+IntToStr(Random(5) + 1)+''+IntToStr(Random(5) + 1)+'');
1: TypeSend(''+IntToStr(Random(5) + 1)+''+IntToStr(Random(5) + 1)+''+IntToStr(Random(5) + 1)+'');
end;

// Wait until we find a bowstring
MarkTime(SpinMark2);
repeat
AntiRandom;
if(ClickContinue(true, true))then Break;
if(FindFight)then Break;
until((FindDTM(BowstringDTM, x, y, MIX1, MIY1, MIX2, MIY2)) or (TimeFromMark(SpinMark2) > 3500));

// Check if we breaked out of loop
if(not(FindDTM(BowstringDTM, x, y, MIX1, MIY1, MIX2, MIY2)))then
begin
MarkTime(SpinMark2);
repeat
AntiRandom;
AntiFight;
until(TimeFromMark(SpinMark2) > 7500);
Continue;
end;

// Find bowstring in inventory
if(FindDTM(BowstringDTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Players[CurrentPlayer].Loc := 'Spinner';
Break;
end;
end;
end;
end;
until((SpinTries = 5) or (Players[CurrentPlayer].Loc = 'Spinner') or (TimeFromMark(SpinMark) > 60000));
FreeDTMs;
end;

{-------------------------------------------------------------------------------
procedure WaitWhileSpinning;
Description: Performs different actions while spinning.
-------------------------------------------------------------------------------}
procedure WaitWhileSpinning;
var
WaitMark, WaitMark2 : Integer;
begin
PlayerCheck;
PlayerCheckLoc;

SetupDTMs;
MarkTime(WaitMark2);
repeat
if(Players[CurrentPlayer].Loc = 'Spinner')then
begin
// Wait while spinning
MarkTime(WaitMark);
repeat
if(not(FindDTM(BowstringDTM, x, y, MIX1, MIY1, MIX2, MIY2)))then SpinFlax;
if(TimeFromMark(WaitMark) < 5000)then AntiBan;
if(ClickContinue(true, true))then Break;
if(FindFight)then Break;
AntiRandom;
until((FindDTM(BowstringDTM, x, y, 682, 426, 727, 462)) or (TimeFromMark(WaitMark) > 60000));

// When we should be done with spinning, make sure we have no more flax in inventory.
if(FindDTM(FlaxDTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
MarkTime(WaitMark);
repeat
AntiRandom;
AntiFight;
until(TimeFromMark(WaitMark) > 7500);
SpinFlax;
end else Break;
end else
begin
Players[CurrentPlayer].Loc := 'Spinner';
Break;
end;
until(FindDTM(BowstringDTM, x, y, 682, 426, 727, 462) or (not(FindDTM(FlaxDTM, x, y, MIX1, MIY1, MIX2, MIY2))) or (TimeFromMark(WaitMark2) > 80000));
FreeDTMs;
PickUpMouse; // "Pick up the mouse"
AlignCompass; // Realign compass and set to highest angle
CheckDoor; // Check the door so we know its open.
end;

{-------------------------------------------------------------------------------
procedure WalkBank;
Description: Walks from spinner back to bank.
-------------------------------------------------------------------------------}
procedure WalkBank;
var
WalkTries, WalkMark, WalkMark2, GuideColor, BankColor : Integer;
begin
WalkTries := 0;

PlayerCheck;
PlayerCheckLoc;

// Go to ladder
MarkTime(WalkMark);
repeat
Inc(WalkTries);
if(Players[CurrentPlayer].Loc = 'Spinner')then
begin
if(RadialWalk(FindLadderColor, 275, 180, 70, -5, 5))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance < 2) or (TimeFromMark(WalkMark2) > 4000));
if(ClimbLadder('up')) then Players[CurrentPlayer].Loc := 'LadderUpStairs' else
begin
CheckDoor;
Continue;
end;
end else Players[CurrentPlayer].Loc := 'Error';
end else Players[CurrentPlayer].Loc := 'Error';
until((Players[CurrentPlayer].Loc = 'LadderUpStairs') or (WalkTries = 2) or (TimeFromMark(WalkMark) > 20000));


// Go to bank
WalkTries := 0;
PlayerCheckLoc;
if(Players[CurrentPlayer].Loc = 'LadderUpStairs')then
begin
MarkTime(WalkMark2);
repeat
Wait(250+random(250));
until((FindSymbol(x, y, 'bank')) or (TimeFromMark(WalkMark2) > 3000));

MarkTime(WalkMark);
repeat
Inc(WalkTries);

// Try to walk into bank, by finding the banker on the minimap
if(not(Players[CurrentPlayer].Loc = 'Bank'))then
begin
if(RadialWalk(52428, 300, 400, 65, 3, 7))then Players[CurrentPlayer].Loc := 'Bank';
end;

// Try walk to bank by banksymbol
if(not(Players[CurrentPlayer].Loc = 'Bank'))then
begin
if(FindSymbol(x, y, 'bank'))then
begin
if(MFNF(x, y, 1, -random(3)))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance = 0) or (TimeFromMark(WalkMark2) > 5000));
Players[CurrentPlayer].Loc := 'Bank';
end;
end;
end;

// Try radialwalking to bank, by banksymbol.
if(not(Players[CurrentPlayer].Loc = 'Bank'))then
begin
SetupBMPs;
BankColor := AutoColorThis(BankBMP, 50, MMX1, MMY1, MMX2, MMY2);
FreeBMPs;

if(not(BankColor = 0))then
begin
if(RadialWalk(BankColor, 300, 400, 65, 3, 7))then Players[CurrentPlayer].Loc := 'Bank';
end;
end;

// Try walk to bank by guide symbol
if(not(Players[CurrentPlayer].Loc = 'Bank'))then
begin
if(FindSymbol(x, y, 'guide'))then
begin
if(MFNF(x, y, 1, -random(3)))then
begin
MarkTime(WalkMark2);
repeat
Wait(100+random(250));
until((FlagDistance = 0) or (TimeFromMark(WalkMark2) > 5000));
Players[CurrentPlayer].Loc := 'Bank';
end;
end;
end;

// Try radialwalking to bank, by guide symbol
if(not(Players[CurrentPlayer].Loc = 'Bank'))then
begin
SetupBMPs;
GuideColor := AutoColorThis(GuideBMP, 50, MMX1, MMY1, MMX2, MMY2);
FreeBMPs;

if(not(GuideColor = 0))then
begin
if(RadialWalk(GuideColor, 300, 400, 65, 3, 7))then Players[CurrentPlayer].Loc := 'Bank';
end;
end;
until((Players[CurrentPlayer].Loc = 'Bank') or (WalkTries = 3) or (TimeFromMark(WalkMark) > 30000));
end;

// If we're not at the bank now, something went wrong.
if(not(Players[CurrentPlayer].Loc = 'Bank'))then
begin
Writeln('[Error] Could not walk to bank, switching character...');
PlayerLogout;
end;
end;

{-------------------------------------------------------------------------------
Main loop
Description: This is where we execute the script.
-------------------------------------------------------------------------------}
begin
SetupScript;
PlayerLogin;
repeat
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
Times := 0;
Repeats := 0;
Bowstrings := 0;
AlignCompass;
repeat
BankFB;
if(not(Repeats = 0))then SetupProgress;
if((Times >= Players[CurrentPlayer].Integers[0]) or (not(LoggedIn)))then Break;
WalkSpinner;
SpinFlax;
WaitWhileSpinning;
WalkBank;
Inc(Repeats);
until((Times >= Players[CurrentPlayer].Integers[0]) or (not(LoggedIn)));
NextPlayer(Players[CurrentPlayer].Active); // Next player
until(false);
end.

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

n3ss3s

2007-10-31 08:06:52

That script looks good, I'll try and check if it is real.

Sorry for doubts, but there is over 5 fake or blank apps per good app.

Hmm you have your own thread for it, it is not closed, it has pretty much comments and views, I'm pretty sure this is home-made :)

Yes from me!

Btw
I'm not the kind of guy who scripts because he wants to earn respect or anything similar. I do it because I enjoy it, want to learn more, enjoy the challenge and simply loves the logical parts.
Thats the attitude!

gerauchert

2007-10-31 08:30:12

Yes!

Has everything it needs, failsafes, randoms, antiban, walking, loops ect…

Great work ;)

Rikje

2007-10-31 10:40:43

its a yes!

(while reading i saw you even free your dtms most of the poeple forget ;))

MasterKill

2007-10-31 10:42:35

From: gerauchert
Yes!

Has everything it needs, failsafes, randoms, antiban, walking, loops ect…

Great work ;)



agreed.

YES :D

GoF

2007-10-31 11:03:20

Good enough for me. Yes.

pwnaz0r

2007-10-31 17:29:06

Yes from me.

(I asked him to apply XD I feel so proud)

rogeruk

2007-10-31 18:12:17

Looks very nice, well detailed and excellent standards.

Yes.

Smartzkid

2007-10-31 18:17:10

No.

Only because I don't trust newcomers with good scripts. Too much a possibility that you're someone we don't want in srl.

But if you aren't bad, and you don't get in this time, keep scripting, release a couple more scripts, help people out some, and I'll vote for you on your next app.

RAM

2007-10-31 22:10:51

From: Smartzkid
No.

Only because I don't trust newcomers with good scripts. Too much a possibility that you're someone we don't want in srl.

But if you aren't bad, and you don't get in this time, keep scripting, release a couple more scripts, help people out some, and I'll vote for you on your next app.



Users sharing the same IP Address User GoolD32 T0kY34 agoo213


All with 0 posts, understandable why they stuck with this name though…. just be sure not to use any of them in the future…rules state…1 account per person here….

vilon

2007-11-01 02:57:12

From: RAM
All with 0 posts, understandable why they stuck with this name though…. just be sure not to use any of them in the future…rules state…1 account per person here….



Honestly I'm not sure if I created these accounts, but I probably have. Any moderator/admin can of course delete those, because I've never really used them as far as I can remember. Sorry if this caused any trouble.

Santa_Clause

2007-11-01 03:59:07

My fellow members, have you looked through the script?

{-------------------------------------------------------------------------------
procedure PlayerLogin;
Description: Login the "CurrentPlayer".
-------------------------------------------------------------------------------}
procedure PlayerLogin;
begin
LoginPlayer;
end;

{-------------------------------------------------------------------------------
procedure PlayerLogout;
Description: Logout the "CurrentPlayer".
-------------------------------------------------------------------------------}
procedure PlayerLogout;
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;

{-------------------------------------------------------------------------------
procedure PlayerCheck;
Description: Check if the "CurrentPlayer" is loggedin.
-------------------------------------------------------------------------------}
procedure PlayerCheck;
begin
if(not(LoggedIn))then Exit;
end;

You obviously don't know what NextPlayer(True) and NextPlayer(False) do. No from me, sorry.

vilon

2007-11-01 04:59:10

Obviously I should? If I'm not correct (and please, do correct me if I am), NextPlayer(Boolean), switches player and sets .Active to either true or false? Isn't that what I have done?

I guess you were referring to PlayerLogout? Simple, It sets .Active to False and logs the player out. The PlayerCheck will then exit all other procedures, until it reaches the end of the loop (inside of the main loop):

...
until((Times >= Players[CurrentPlayer].Integers[0]) or (not(LoggedIn)));
NextPlayer(Players[CurrentPlayer].Active); // Next player

Where it sees that you are not loggedin, and it exits the loop, and switches to the next player, based on the .Active. If everything went well, .Active will still be true and it will remain true. If any error occured, .Active will be false and it will do NextPlayer(false).

If this is wrong, correct me.

HellBoyz

2007-11-01 06:00:29

The script looks good no comment at the moment. Perhaps no? Some information is miss use.

n3ss3s

2007-11-01 12:34:11

If you log out, make [CurrentPlayer].Active false, you obviosly will change player after doing that, but, NextPlayer(False) does the same thing =/

error
no. Problem.


Umm but the point there is that if you are not logged in, some troubles has occured and thats when you do NextPlayer(False)

No need for all those procs, but anyways the script is good enough.

vilon

2007-11-01 13:07:59

The reason why I did this was because it wouldn't mess up with the other procedures inside the main loop. Because, if I use NextPlayer() inside a procedure, wont it just logout/login and move on? Which still executes the other procedures just as if I was still logged in on the same character? Example:

repeat
repeat
BankFB;
if(not(Repeats = 0))then SetupProgress;
if((Times >= Players[CurrentPlayer].Integers[0]) or (not(LoggedIn)))then Break;
WalkSpinner; // Let's say something goes wrong here and we call NextPlayer(false), will it just continue on to SpinFlax or actaully break the loop?
SpinFlax;
WaitWhileSpinning;
WalkBank;
Inc(Repeats);
until((Times >= Players[CurrentPlayer].Integers[0]) or (not(LoggedIn)));
NextPlayer(Players[CurrentPlayer].Active); // Next player
until(false);


While I'm writing this anyway, I got this from nielsie95, and his tutorial on multiplayer.

Edit: PlayerLogin is kinda useless, I know, it's only used 1 time and has really nothing with multiplayer to do (and I don't use it for that either).
Edit (2): The real problem is actually that I call PlayerCheck in the beginning of every procedure, and "if(not(loggedin))then exit;" must be in the procedure we are calling itself…otherwise themultiplayer should work fine?

n3ss3s

2007-11-01 13:55:02

Hehe, you are on track, but you're missing SRL procedure creation rule no.1 :)

If Not LoggedIn Then Exit;

So, when you screw up in some procedure, because of the following sentence it skips all the other procs, and ends up to the Until which contains Not LoggedIn too, and then ya have nextplayer :)

the scar noob

2007-11-01 15:38:22

From: n3ss3s
Hehe, you are on track, but you're missing SRL procedure creation rule no.1 :)

If Not LoggedIn Then Exit;

So, when you screw up in some procedure, because of the following sentence it skips all the other procs, and ends up to the Until which contains Not LoggedIn too, and then ya have nextplayer :)


Indeed, use that and then in your mainloop "NextPlayer(Loggedin)" for Player Switching;)

I already have seen your script some days ago and I thought: Looks really nice.
I'm not sure if I've posted on your thread though.

However, Santa, I have seen worse applications of persons..

A YES from me:D

-Tsn.
EDIT: I have already voted, but I have to agree with Smartzkid, you're some kind of a new member, 56 post count, and a low activity, how does it come that you can produce a that-good-a-like script?

tylanbo

2007-11-01 18:28:50

From: n3ss3s
If you log out, make [CurrentPlayer].Active false, you obviosly will change player after doing that, but, NextPlayer(False) does the same thing =/

no. Problem.


Umm but the point there is that if you are not logged in, some troubles has occured and thats when you do NextPlayer(False)

No need for all those procs, but anyways the script is good enough.


Ok, so he didn't use NextPlayer(false), but I don't really like using it either. The damn thing gets into an infinite loop if it is on the last player and the last thing I want is a hanging script.

I voted yes, you more than demonstrated your aptitude for programming, a proper attitude, and have a post count of 56 which means you've been fairly active.

"No. Only because I don't trust newcomers with good scripts. Too much a possibility that you're someone we don't want in srl. "
While that's true I believe this application should still be approved.

pwnaz0r

2007-11-01 18:58:17

Like I said, I asked him to apply. He wasn't even thinking about it until I asked him, so you can't put that against him.

vilon

2007-11-02 04:23:26

From: n3ss3s
Hehe, you are on track, but you're missing SRL procedure creation rule no.1 :)

If Not LoggedIn Then Exit;


Not actually missing it, I was just so stupid I made a procedure containing that line of code and of course, everything that will happen is that it exits the procedure containing the code, instead of the one we call it in :duh:.

From: the scar noob
EDIT: I have already voted, but I have to agree with Smartzkid, you're some kind of a new member, 56 post count, and a low activity, how does it come that you can produce a that-good-a-like script?


I'm not sure actually but maybe because I enjoy programming so much and I've read more tutorials then I can count to? :rolleyes:
Programming in scar isn't that kinda different from the other programming languages I've learned, you just have to learn to use what SRL can "offer" and you're on your way…

From: pwnaz0r
Like I said, I asked him to apply. He wasn't even thinking about it until I asked him, so you can't put that against him.


Don't blame yourself too hard, it was still my decision after all ;)
But it's true, I wasn't really thinking of applying before you asked me…

n3ss3s

2007-11-02 06:57:40

Umm TSN btw, I had about 50 posts and lil activity when I became one.

But, anyways, vilon your poll looks good, 4:1 yes:no :)

pwnaz0r

2007-11-03 03:38:52

Can I get a "In" :D

Negaal

2007-11-05 01:59:01

From: rogeruk
Looks very nice, well detailed and excellent standards.

Yes.


:) Yeps…
Btw
Players[CurrentPlayer].Active := False;
LogOut;


Same as:
Nextplayer(False);

vilon

2007-11-12 15:20:45

Nothing happening here? huh?
No comments/votes for a while now…What's going to happen? Are "we" waiting for more people to comment/vote?

Hugolord

2007-11-12 15:32:27

Welcome to the community =D

Yes!

you have potential, you make use of SRL tuts and you have made all of this mostly by yourself so yes from me!

ugh i think you should be member already since the poll is closed, wait a bit more

RAM

2007-11-12 20:57:11

From: vilon
Honestly I'm not sure if I created these accounts, but I probably have. Any moderator/admin can of course delete those, because I've never really used them as far as I can remember. Sorry if this caused any trouble.


Ok, I deleted those accounts as you said I could…

Please read this…..

Sticky: Read Before Voting...
BenLand100


…and I'll leave the post open for Fakawi to give you your official welcome ;)

~RAM

WT-Fakawi

2007-11-20 01:22:10

Welcome. You derserve it!