Log in

View Full Version : How do you run scar?



blink182
03-24-2007, 05:22 PM
I have scar downloaded and i have some scripts but i dont understand like where to plug in what.:(
heres an example of a script i have. P.S. i got it from here :)
i tried running it as it is but it didn't work.

{.Script Info:
# ScriptName = Special WoodCutter
# Author = Special Ed
# Description = Chop & Banks Willows at Draynor
# Version = 1.5
# Date = March 13, 2007
# Comments =
/Script Info}
program SpecialWillowBanker;
{.include SRL\SRL.SCAR}
{.include SRL\SRL\Skill\Woodcutting.SCAR}
var
TreeName1,TreeName2,TreeName3:string;
TreeColor,DTMBrokenAxe,DTMNormalAxe,Load,LoadTarge t,DTMAxeHandle:integer;
Banked,Ran,Ent,NewAxe:integer;

//Setup//
procedure Setup;
begin;
Status('Procedure Setup;');
SetupSRL;
TreeColor:= 4415576;
LoadTarget:= 5; //Number of loads until it switches characters
end;

procedure DeclarePlayers;
begin
Status('Procedure DeclarePlayers;');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=true;
end;
//End Of Setup//

procedure SetupScript;
begin
Status('Procedure SetupScript;');
FindAxeHeadColor;
Wait(10 + Random(100));
MakeCompass('N');
Wait(10 + Random(100));
HighestAngle;
Wait(10 + Random(100));
Load:= 0;
Banked:= 0;
Ran:= 0;
Ent:= 0;
NewAxe:= 0;
Wait(10 + Random(100));
end;

procedure LoadingDTMBitmaps;
begin
Status('Procedure LoadDTMBitmaps;');
DTMBrokenAxe:= DTMFromString('78DA633CCCC4C0B091910119D4C4F131804 44' +
'0F83F10301E02AA5987AA06220B2381F459A09AF504D49C03 AAD9' +
'4040CD19A09ACD4498B38D809AD340353B08A8390A54B3858 09AD' +
'D403527F0AB0100F014127B');

DTMNormalAxe:= DTMFromString('78DA637CCDC4C0B09E91011974670832804 44' +
'0F83F1030BE02AA598DAA06220B2381F47BA09A3504D47C26 42CD' +
'57A09A7544A8D94840CD27A09AAD04D43C02AA398A5F0D002 B8D1' +
'231');
DTMAxeHandle:= DTMFromString('78DA63F4616260F8C6800618914820ED0B5 4F' +
'385801A4FA09A3F44A8F941408D3D500D1F237E35DE986EAE 88E2' +
'63E042520300750807A0');
end;

procedure RunAway;
begin
Status('Procedure RunAway;');
Ran:= (Ran + 1);
SetRun(true);
MouseFindFlag(MMCX + 40,MMCY + 40,5,5);
Wait(15000 + Random(5000));
MouseFindFlag(MMCX - 40,MMCY - 40,5,5);
Flag;
Wait(100 + Random(100));
end;

procedure Ents;
begin
Status('Procedure Ents;');
if(not(FindColorTolerance(x,y,55769,85,15,115,15,2 5)))then
begin
Exit;
end;
if(FindColorTolerance(x,y,55769,85,15,115,15,25))t hen
begin
Ent:= (Ent + 1);
SetRun(true);
MouseFindFlag(MMCX + 3,MMCY + 3,2,2);
Wait(15000 + Random(5000));
MouseFindFlag(MMCX - 3,MMCY - 3,2,2);
Flag;
Wait(500 + Random(100));
end;
end;

procedure SpecialAntiRandoms;
begin
Status('Procedure SpecialAntiRandoms;');
FindNormalRandoms;
DwarfItem;
FindLamp('Woodcutting');
OpenBox;
SolveBox;
if(DetectFrogCave)then SolveFrogSwamp;
if(InBlack)then Logout;
if(FindFight)then RunAway;
if(TalkToRand)then
begin
repeat
ClickToContinue;
until(not(TalkToRand));
end;
if(WeAreDead)then
begin
Logout;
Players[CurrentPlayer].Active:= False;
NextPlayer(True);
end;
end;

procedure SpecialAntiBan;
var RX:integer;
begin
Status('Procedure SpecialAntiBan;');
RX:=Random(19);
case RX of
0 : HoverSkill('Woodcutting',false);
1 : PickUpMouse;
2 : Wait(100 + Random(10));
3 : Wait(100 + Random(10));
4 : SpecialAntiRandoms;
5 : Wait(100 + Random(10));
6 : Wait(100 + Random(10));
7 : Wait(100 + Random(10));
8 : begin; GameTab(Random(7) + 1) Wait(300 + Random(50)) end;
9 : SpecialAntiRandoms;
10 : Wait(100 + Random(10));
11 : Wait(100 + Random(10));
12 : Wait(100 + random(10));
13 : begin; GameTab(Random(7) + 1) Wait(300 + Random(50)) end;
14 : Wait(100 + Random(10));
15 : Wait(100 + Random(10));
16 : Wait(100 + Random(10));
17 : PickUpMouse;
18 : Wait(100 + Random(10));
19 : PickUpMouse;
end;
end;

procedure WithdrawAxe;
var BX,BY,BT:integer;
begin
Status('Procedure WithdrawAxe;');
BT:= 0;
if(not(FindDtm(DTMNormalAxe,BX,BY,MSX1,MSY1,MSX2,M SY2)))then
begin
Status('You Have No More Axes Logging Out...');
Logout;
Players[CurrentPlayer].Active:= False;
Nextplayer(true);
end;
if(FindDtm(DTMNormalAxe,BX,BY,MSX1,MSY1,MSX2,MSY2) )then
begin
repeat
BT:= (BT + 1);
Mouse(BX,BY,1,1,True);
Wait(700 + Random(200));
until(FindDtm(DTMNormalAxe,BX,BY,MIX1,MIY1,MIX2,MI Y2)or(BT > 5));
FindAxeHeadColor;
end;
end;

procedure DepositBrokenAxe;
var BX,BY,BT:integer;
begin
Status('Procedure DepositBrokenAxe;');
BT:= 0;
if(not(FindDtm(DTMBrokenAxe,BX,BY,MIX1,MIY1,MIX2,M IY2)))then
begin
Exit;
end;
if(FindDtm(DTMBrokenAxe,BX,BY,MIX1,MIY1,MIX2,MIY2) )then
begin
repeat
BT:= (BT + 1);
Mouse(BX,BY,1,1,True);
Wait(700 + Random(200));
until(not(FindDtm(DTMBrokenAxe,BX,BY,MIX1,MIY1,MIX 2,MIY2))or(BT >= 5));
end;
end;

procedure DepositAxeHandle;
var BX,BY,BT:integer;
begin
Status('Procedure DepositAxeHandle;');
BT:= 0;
if(not(FindDtm(DTMAxeHandle,BX,BY,MIX1,MIY1,MIX2,M IY2)))then
begin
Exit;
end;
if(FindDtm(DTMAxeHandle,BX,BY,MIX1,MIY1,MIX2,MIY2) )then
begin
repeat
BT:= (BT + 1);
Mouse(BX,BY,1,1,True);
Wait(700 + Random(200));
until(not(FindDtm(DTMAxeHandle,BX,BY,MIX1,MIY1,MIX 2,MIY2))or(BT >= 5));
end;
end;

procedure BankNewAxe;
begin
Status('Procedure BankNewAxe;');
NewAxe:= (NewAxe + 1);
SetRun(true);
Wait(100);
FindSymbol(x,y,'bank');
Status('Trees -> Bank;');
Wait(100);
Mouse(x,y,1,1,true);
Flag;
Wait(500 + Random(100));
if(FindObj(x,y,'ooth',3552827,5))then
begin
Mouse(x,y,0,0,false);
Wait(1000 + Random(500));
PopUp('ickl');
Flag;
Wait(1000 + Random(500));
DepositBrokenAxe;
Wait(1000 + Random(500));
DepositAxeHandle;
Wait(1000 + Random(500));
Wait(1000 + Random(500));
WithdrawAxe;
end;
CloseBank;
Wait(100 + Random(100));
MouseFindFlag(MMCX - 30,MMCY + 30,3,3);
Status('Bank -> Trees;');
end;

procedure AxeBroken;
begin
Status('Procedure AxeBroken;');
GameTab(4)
Wait(100 + Random(100))
if(not(FindDTM(DTMBrokenAxe,x,y,MIX1,MIY1,MIX2,MIY 2)))then
begin
Status('No Broken Axe;');
Exit;
end;
if(FindDTM(DTMBrokenAxe,x,y,MIX1,MIY1,MIX2,MIY2 )and(not(FindDTM(DTMNormalAxe, x, y, MIX1, MIY1, MIX2, MIY2))))then
begin
Status('Found a Broken Axe / No More in Inventory;');
BankNewAxe;
end;
end;

procedure AxeFinder;
begin
Status('Procedure AxeFinder;');
LoadingDTMBitmaps;
Wait(100 + Random(100));
if(not(FindDTM(DTMAxeHandle,x,y,MIX1,MIY1,MIX2,MIY 2)))then
begin
Status('AxeHandle not Found;');
Exit;
end;
if(FindDTM(DTMAxeHandle,x,y,MIX1,MIY1,MIX2,MIY2)or (InChatMulti('ot ha','ch yo','ing le')))then
begin
Status('AxeHandle Found;');
FindHead;
Wait(100 + Random(100));
AttachHead;
Wait(100 + Random(100));
BankNewAxe;
end;
end;

procedure Banking;
var BX,BY,BAX,BAY,PP:integer;
begin
PP:= 0;
Status('Procedure Banking;');
if(not(FindSymbol(BX,BY,'bank')))then
begin
Status('Procedure Banking - [BankSymbol not Found];');
Mouse(660, 50,1,1,true);
Wait(100);
Flag;
Wait(1000 + Random(100));
end;
if(FindSymbol(BX,BY,'bank'))then
begin
SetRun(true);
Wait(100);
Mouse(BX,BY,1,1,true);
Wait(100);
Flag;
Wait(1000 + Random(100));
end;
Wait(1000 + Random(500));
if(FindObj(BAX,BAY,'booth',3552827,5))then
begin
Mouse(BAX,BAY,1,1,false);
Wait(400 + Random(200));
PopUp('ickl');
end;
Wait(1000 + Random(500));
begin
repeat
if(FindItemName('Wil')or(FindItemName('ogs')))then
begin
PP:= (PP + 1);
Mouse(x,y,1,1,false);
Wait(500 + Random(100));
ChooseOption(BX,BY,'All')
Banked:= (Banked + 1);
Wait(200 + Random(100));
end;
until((not(FindItemName('Wil'))or(not(FindItemName ('ogs')))or(PP >= 2)));
end;
Wait(100 + Random(50));
DepositBrokenAxe;
Wait(100 + Random(50));
CloseBank;
Wait(100 + Random(100));
MouseFindFlag(MMCX - 30,MMCY + 30,3,3);
Flag;
Wait(200 + Random(200));
end;


function StillCutting: Boolean;
var XT,YT:integer;
begin
Status('Function StillCutting;');
if(IsUpText('alk')or(IsUpText('lk he')or(IsUpText('her'))))then
begin
result:= false;
end;
if(IsUpText('hop')or(IsUpText('own')or(IsUpText(Tr eeName2))))then
begin
result:= true;
end;
if(result = true)then
begin
Status('Procedure StillCutting - [result = true];');
Exit;
end;
if(result = false)then
begin
Status('Procedure StillCutting - [result = false];');
FindObjMultiText(XT,YT,'Wil','illo','llow',TreeCol or,3)
Wait(500 + Random(100));
Ents;
Mouse(XT,YT,1,1,True);
AxeFinder;
AxeBroken;
SpecialAntiRandoms;
end;
end;

procedure TreeTime;
var XT,YT,TTol:integer;
begin
Status('Procedure TreeTime;');
TTol:= 3
if(not(LoggedIn))then
begin
NextPlayer(false);
Exit;
end;
Wait(1000 + Random(500));
AxeBroken;
if(not(FindObjMultiText(XT,YT,'Wil','illo','llow', TreeColor,TTol)))then
begin
repeat
TTol:= (TTol + 1);
until(FindObjMultiText(XT,YT,'Wil','illo','llow',T reeColor,TTol));
end;
if(FindObjMultiText(XT,YT,'Wil','illo','llow',Tree Color,TTol)or(IsUpTextMulti('hop down','down','own'))or(IsUpTextMulti(TreeName1,Tre eName2,TreeName3)))then
begin
Wait(100 + Random(10));
Ents;
Mouse(XT,YT,1,1,True);
Wait(100 + Random(100));
SpecialAntiRandoms;
AxeFinder;
Flag;
Wait(100 + Random(10));
SpecialAntiBan;
Wait(100 + Random(10));
StillCutting;
Wait(2000 + Random(1000));
end;
if(InvFull)then
begin
Banking;
end;
end;

procedure ProgressReport;
begin
Writeln(' Special Woodcutter ');
Writeln('');
Writeln(' Time Ran: ' + TimeRunning + ' ');
Writeln(' Loads Banked: ' + inttostr(Banked) + ' ');
Writeln(' Ran Away: ' + inttostr(Ran) + ' ');
Writeln(' Ents Avoided: ' + inttostr(Ent) + ' ');
Writeln(' Axes Withdrawn: ' + inttostr(NewAxe) + ' ');
Writeln('');
end;


procedure SpecialTree;
begin
Status('Procedure SpecialTree;');
repeat
begin
Wait(100);
TreeTime;
Wait(100);
end;
until(InvFull);
Banking;
ProgressReport;
end;

begin
ClearDebug;
Status('- Main Loop -');
Wait(1500);
Setup;
DisguiseScar('Ventrilo');
LoadingDTMBitmaps;
DeclarePlayers;
ClearDebug;
if(not(LoggedIn))then Loginplayer;
begin
SetupScript;
repeat
begin
repeat
if(not(LoggedIn))then
begin
NextPlayer(False);
Exit;
end;
SpecialTree;
ProgressReport;
until(Load > (Random(5) + LoadTarget));
end;
LogOut;
NextPlayer(True);
ProgressReport;
until(false);
end;
end.

gsquare567
03-24-2007, 06:02 PM
a) use scar tags, like this (without the *s) //scar code[/scar*]
b) [SCAR]//Setup//
procedure Setup;
begin;
Status('Procedure Setup;');
SetupSRL;
TreeColor:= 4415576;
LoadTarget:= 5; //Number of loads until it switches characters
end;

procedure DeclarePlayers;
begin
Status('Procedure DeclarePlayers;');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=true;
end;
//End Of Setup//

that is the setup area. to set TreeColor:= 4415576; you need to use the colorpicker in the scar toolbar and pick the color of the tree you want the script to click. then for
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :=''; you need to put in your username, password, then for nick put in letters 2,3, and 4 of your username (thats important).
if it still doesnt work, post the errors, but this time make it easier for us to read and put in in scar tags, like i showed you in (a)

Ramage
03-24-2007, 09:12 PM
Don't forget to be on 32 Bit TRUE color and drag the cross-hair before using the script each time.

WhiteShadow
03-24-2007, 09:14 PM
Don't forget to be on 32 Bit TRUE color and drag the cross-hair before using the script each time.

OMG !

Are you the Ramage from Kaitnieks?

Smartzkid
03-24-2007, 09:29 PM
OMG !

Are you the Ramage from Kaitnieks?

Would that be good or bad? I was only at Kaitnieks for a month or two before it went down...

Jason2gs
03-24-2007, 09:48 PM
Would that be good or bad? I was only at Kaitnieks for a month or two before it went down...

You were on Kaitneiks?

COOL!

I never got the pleasure.

How long ago did it go down?

blink182
03-24-2007, 10:55 PM
I did drag the cross hair but it said failed when compiling. Do you have to use more than 1 character or can you just use 1.

Ramage
03-25-2007, 12:07 AM
OMG !

Are you the Ramage from Kaitnieks?

I'm remembered! (Hopefully for the good things :( ) <3


I did drag the cross hair but it said failed when compiling. Do you have to use more than 1 character or can you just use 1.

Yes you can use more than once account.

Here are some mistakes I picked up when reading the script:

Replace 'LoadTarge t' with 'LoadTarget'

var
TreeName1,TreeName2,TreeName3:string;
TreeColor,DTMBrokenAxe,DTMNormalAxe,Load,LoadTarge t,DTMAxeHandle:integer;
Banked,Ran,Ent,NewAxe:integer;

Line 89 is missing a comma

if(not(FindColorTolerance(x,y,55769,85,15,115,15,2 ,5)))then

I think there is more though.

blink182
03-25-2007, 12:32 AM
Thanks for noticing; as i stated earlier I know that you can use more than one account but can you just use one only? Also where do I need to replace'LoadTarge t'? I also have a Draynor Netter by Dankness, I read the instructions and added the different colors with the color picker but it didn't quite work out. IF you can help me out with that problem also it would be greatly appreciated. Thank you again for the help you've already given me (everyone).

//---> Instructions
//---> 1) Start Script at Draynor Bank
//---> 2) Start Script Logged Out
//---> 3) Adjust Setup in Lines 66-73
//---> 4) Press Start and SetUp Player Array

BenMouse := True; //** Use Benlands Spline Mouse
MouseSpeed := 15; //** Set MouseSpeed
TripsToDo := 3; //** Amount of Trips to Do + Random 4 Trips before Switching Chars
RandomPlayer := True; //** Set to True to Pick a Random Player each Player Switch
UseAntiBan := True; //** Will Chat, Rotate Screen, Check Exp and other humanlike behavors
ReinCarnate := True; //** Set to True to Attempt Walkback on Death, Works Sometimes :P
UseGUI := false; //** Must Use GUI Atleast Once to Setup Chars Data File, Afterwards it will Load Players from File
FileName := 'Fishing'; //** Filename of Player Array

Ramage
03-25-2007, 12:49 AM
I've replaced LoadTarget for you already, var
TreeName1,TreeName2,TreeName3:string;
TreeColor,DTMBrokenAxe,DTMNormalAxe,Load,LoadTarge t,DTMAxeHandle:integer;
Banked,Ran,Ent,NewAxe:integer;


And yes you can use one account only:

HowManyPlayers := 1;


How isn't it working? Is there an error? Or does it just do nothing? If it is an error, mind posting what the error is?

blink182
03-25-2007, 01:06 AM
Thanks again and i filled out all the info(at least im pretty sure) and it said failed when compiling. I dragged the crosshair and set the color to 32 bit true color. Do i have to be in low detail on runescape. Am i doing something wrong with the player thing?

Status('Procedure DeclarePlayers;');
HowManyPlayers := 1;
NumberOfPlayers(1);
CurrentPlayer := 0;

Players[0].Name :='Im wcin 4eva';//Edit by Boreas: I removed your username, put it back
Players[0].Pass :='***********';// if you don't care
Players[0].Nick :='cin';
Players[0].Active:=true;
The *s are really the characters of my password.

Ramage
03-25-2007, 03:44 AM
That piece of code is compiling successfully for me, and you don't need to touch the NumberOfPlayers(HowManyPlayers); part.

It would be very helpful if you can post the error :)