marpis
2008-12-12 10:31:54
<!– BEGIN TEMPLATE: formanswers –>
marpis - SRL Member Application Form
marpis
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
The very basics of C++
Other Communitys
Nothing really
How Long have You Played Runescape
6 months for now, had a few years break. I played a couple of years when i was a kid.
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Im learning very fast and i am already good enough to create useful scripts and functions. At the moment i just need some ideas. I write SCAR pretty much every day. I am a pretty good in maths, which is an advantage i think.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Chop&Burn by marpis
——————————————————
<!– END TEMPLATE: formanswers –>
marpis - SRL Member Application Form
marpis
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
The very basics of C++
Other Communitys
Nothing really
How Long have You Played Runescape
6 months for now, had a few years break. I played a couple of years when i was a kid.
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Im learning very fast and i am already good enough to create useful scripts and functions. At the moment i just need some ideas. I write SCAR pretty much every day. I am a pretty good in maths, which is an advantage i think.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Chop&Burn by marpis
program Woodcutpro;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
///////////////////CONSTANTS////////////////////
const
TreeColor1 = 1656637; //No need to change
TreeColor2 = 2055245; //No need to change
TreeColor3 = 3964530; //No need to change
breakafterminutes = 30; //take a break every x minutes
//////////////////DECLARE PLAYERS////////////////
procedure DeclarePlayers;
begin
HowManyPlayers := 2;
numberOfPlayers(howManyPlayers);
CurrentPlayer := 1;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your usernam)
Players[0].integers[1]:= 100; //How many logs you want to burn
Players[0].strings[1]:='N' //Direction to flee a fight
Players[0].Active := True;
Players[1].Name := ''; //username
Players[1].Pass := ''; //password
Players[1].Nick := ''; //3-4 letters from your usernam)
Players[1].integers[1]:= 100; //How many logs you want to burn
Players[1].strings[1]:='N' //Direction to flee a fight
Players[1].Active := True;
{
Players[2].Name := ''; //username
Players[2].Pass := ''; //password
Players[2].Nick := ''; //3-4 letters from your usernam)
Players[2].integers[1]:= 100; //How many logs you want to burn
Players[2].strings[1]:='N' //Direction to flee a fight
Players[2].Active := True;
{
Players[3].Name := ''; //username
Players[3].Pass := ''; //password
Players[3].Nick := ''; //3-4 letters from your usernam)
Players[3].integers[1]:= 100; //How many logs you want to burn
Players[3].strings[1]:='N' //Direction to flee a fight
Players[3].Active := True;
{
Players[4].Name := ''; //username
Players[4].Pass := ''; //password
Players[4].Nick := ''; //3-4 letters from your usernam)
Players[4].integers[1]:= 100; //How many logs you want to burn
Players[4].strings[1]:='N' //Direction to flee a fight
Players[4].Active := True;
}
end;
////////////////////VARIABLES/////////////////////
var
log, timemark,x,y : integer;
LogsBurned : Array [0..4] of Integer;
//////////////////////////////////////////////////
Procedure ScriptTerminate;
begin
FreeBitmap(log);
TerminateScript;
end;
////////////////LOAD BITMAPS//////////////////////
Procedure LoadBitmaps;
begin
log := BitmapFromString(10, 7, 'beNpLsNowIRCOykPl2tLtgKg51Q' +
'aCkKUgIg3J1nBUEmlaHS4PRCVBsnDBGHeteE+dZB89oGx5jDlQqjb' +
'BKs1fHxllBRlCZHN8pTO8pIBsCCoIN4EgiCzE5AJ/GaAJyAgoC9SI' +
'5jaI7bUAUwJMDw==');
end;
/////////////////////////////////////////////////
//////////////////////HAVE A BREAK //////////////
procedure haveabreak;
begin
if loggedin then logout;
writeln('having a few minutes break (5min + random 2min)');
wait(1000*60*5 +random(1000*60*2));
writeln('ok then, lets continue!');
loginplayer;
end;
//////////////////////////////////////////////////
procedure Checkxp; //part of randomstuff
begin
case(random(3)) of
0: HoverSkill('woodcutting', false);
1: HoverSkill('firemaking', false);
2: HoverSkill('attack', false);
end;
end;
//////////////////////////////////////////////////
procedure Checkgametab; //part of randomstuff
begin
wait(100+random(100));
GameTab(1 +random(7));
wait(100+random(100));
GameTab(4);
end;
////////////////////////////////////////////////
//////////////////////DO RANDOM STUFF///////////
procedure DoRandomStuff;
begin
case(random(3)) of
0: Checkgametab;
1: Checkxp;
2: RandomMovement;
end;
end;
///////////////////////////////////////////////
////////////////////AVOID FIRE///////////////// BY LEE LOK HIN
Procedure avoidfire;
var avoided : boolean;
dx, dy, num : integer;
begin
FreeBitmap(log);
repeat
dy := (msy2-100)-(msy1+100); //chords are like this, so it doesnt go too far
dx := (msx2-100)-(msx1+100);
x := 100+random(dx);
y := 100+random(dy);
num := 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9;
MMouse(x, y, 0, 0);
wait(200+random(100));
if IsUpText('alk here') and not IsUpText('alk here / '+IntToStr(num)+'more options') then
begin
avoided := true;
Mouse(x, y, 0, 0, true);
wait(3000+random(1000));
end;
LoadBitmaps;
until(avoided=true);
end;
////////////////////////////////////////////////
///////////////////////BURN WOOD///////////////
Procedure Burn;
var
x, y, TimeFromClickingLog : integer;
begin
GameTab(4);
wait(100+random(100));
FindNormalRandoms;
if FindFight then RunAway(Players[CurrentPlayer].strings[1], true, 1, 8000);
if FindBitmaptolerancein(log, x, y, MIX1, MIY1, MIX2, MIY2, 30) then
begin
MouseItem(1, true);
wait(200+random(200));
Mouse(x, y, 0, 0, true);
MarkTime(TimeFromClickingLog);
Wait(2000);
repeat
wait(100+random(100));
until(
FindNormalRandoms or
FindFight or
(TimeFromMark(TimeFromClickingLog)>15000) or
IsBlackText('he fire catches', 8) or
IsBlackText('ou can', 8) or
FindText(x, y, 'Congratulation', NPCChars, MCX1, MCY1, MCX2, MCY2) or
FindText(x, y, 'You have been given a Mysterious box!', NPCChars, MCX1, MCY1, MCX2, MCY2));
end;
if IsBlackText('he fire catches', 8) then Inc(LogsBurned[CurrentPlayer]);
if FindText(x, y, 'Congratulation', NPCChars, MCX1, MCY1, MCX2, MCY2) then Inc(LogsBurned[CurrentPlayer]);
end;
////////////////////////////////////////////////
//////////////CutWood///////////////////////////
Procedure Chop;
var
x, y, TimeFromClickChop : integer;
begin
FindNormalRandoms;
if FindFight then RunAway(Players[CurrentPlayer].strings[1], true, 1, 8000);
if
FindObjCustom(x, y, ['hop down Tree'], [TreeColor1, TreeColor2, TreeColor3], 0)then
Mouse(x, y, 0, 0, false);
if ChooseOption('hop') then
begin
MarkTime(TimeFromClickChop);
repeat
wait(100+random(100));
until(
FindEnt(x, y, true) or
FindNormalRandoms or
FindFight or
(TimeFromMark(TimeFromClickChop)>15000) or
IsBlackText('ou get some logs', 8) or
FindText(x, y, 'Congratulation', NPCChars, MCX1, MCY1, MCX2, MCY2) or
FindText(x, y, 'You have been given a Mysterious box!', NPCChars, MCX1, MCY1, MCX2, MCY2));
end;
if not LoggedIn then
begin
NextPlayer(false);
writeln('oops! something has gone wrong! Next player...');
end;
FindNormalRandoms;
if FindFight then RunAway(Players[CurrentPlayer].strings[1], true, 1, 8000);
DoRandomStuff;
end;
////////////////////////////////////////////////
///////////////////////RAPORT///////////////////
procedure Raport;
var i : integer;
begin
ClearDebug;
writeln('***********************');
for i := 0 to HowManyPlayers-1 do
begin
writeln(+Players[i].Nick+' burned '+intToStr(LogsBurned[i])+' logs of '+IntToStr(Players[i].Integers[1]));
end;
writeln('Script worked for '+TimeRunning);
writeln('***********************');
writeln('*Script by: marpis ');
writeln('***********************');
end;
////////////////////////////////////////////////
//////////////////////MAIN EXECUTION///////////
begin
SetupSRL;
SetupWoodcutting;
DeclarePlayers;
if not LoggedIn then loginplayer;
wait(1500+random(1000));
GameTab(1);
GameTab(4);
KeyDown(VK_UP);
wait(1500+random(500));
KeyUp(VK_UP);
SetChat('off', 1);
SetChat('off', 2);
SetChat('off', 3);
MarkTime(timemark);
LoadBitmaps;
repeat
Chop;
repeat
Burn;
if IsBlackText('ou can', 8) then avoidfire;
until(not(FindBitmaptolerancein(log, x, y, MIX1, MIY1, MIX2, MIY2, 30)));
Raport;
if (TimeFromMark(timemark) mod 1000*60*breakafterminutes = 0) then Haveabreak;
if(LogsBurned[CurrentPlayer] mod 15 = 0) and (LogsBurned[CurrentPlayer] <> 0)then
begin
if not LoggedIn then
begin
NextPlayer(false);
writeln('oops! something has gone wrong! next player!');
end;
if LoggedIn then
begin
if (Players[CurrentPlayer].integers[1] = LogsBurned[CurrentPlayer])
then
begin
writeln('This player has done his job, next player...');
NextPlayer(false);
end;
if (Players[CurrentPlayer].integers[1] <> LogsBurned[CurrentPlayer])
then
NextPlayer(True);
end;
end;
until(false);
FreeBitmap(log);
end.——————————————————
<!– END TEMPLATE: formanswers –>