SRL Archive - S.M.A.R.T. Tutorials

VERY easy way to add smart


NiCbaZ

2008-04-06 18:10:37

VERY easy way to add smart


this tut will tell you the easy way to add smart to a script

ok in every SRL script there is a line up the top of the script called

{.include srl/srl.scar}


change that to

{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}


also in everything script there is a mainloop down the bottom in the mainloop procedure there is a line called

SetupSRL;


simply change that to

smartSetup('mn3', False, True);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
SetupSRL;
// credits to hyper for that setup


Thats the Simplest way to add smart to any script.

KoKouKo

2008-04-06 18:50:44


If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
what exactly does that do, if it does what I think it does, IMO it's pretty useless due to
while(not(SmartReady))do Wait(100);

canu44

2008-04-06 19:31:30

thank you very much for help as other setups doesnt work for me
but do you know how to change world because adding

WorldNum = 136; in const doesnt matter and it always go to world 16

Pierre14

2008-04-06 19:32:38

Wow Awsome I don't know if you know me but i posted over 2 thread's asking how to do this properly and this is the best thank you so much!!!!

palmpilot71

2008-04-06 22:19:51

WOW AMAZING thank you! I have been reading other [TUTS] but I always end up "WTF?" Now I can hang @ srl-forums and auto @ the same time!!! Also thanks to some other tut around here, I use Yod'm 3D so I have 4 desktops on each side of a cube! Desky 1 is for browsing and desky 4 is for autoing! NOTE: Autoing on another desktop (that you are not looking at) will not work without SMART!

EDIT: I get the same problem. It always goes to world 16… How can I change this?

Gazrat

2008-04-06 22:30:55

finally i found an easy way to get smart!
but alas its difficult haha. I dont think this script has "SetupSRL;"
so i cant find it and now im lost. a little help plz =)

edit: ok i found a script i want to use and changed the things around to add smart so its all good.
I target runescape but it always fails and it always says:
"include file c:\program files\scar 3.15\includes\srl\srl\misc\smart.scar does not exist"
"include file c:\program files\scar 3.15\includes\srl\srl\misc\bitmaps.scar does not exist"

a little help here too..

P1nky

2008-04-07 09:49:40

nicbaz

good job :) thats what i use

GUYS USE THIS!

mixster

2008-04-07 09:58:56

Gazrat, you don't have the latest SRL so search to learn how to download and install SVN then update to rev 15.
Other people with world 16 problem, change:

smartSetup('mn3', False, True);
to

SmartSetupEx(WorldNum, False, Signed);
then add

const
WorldNum = 16;
Signed = False;
to the top under where you add the includes, so it should look like:

program Blah;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}
const
WorldNum = 16;
Signed = False;
And then change WorldNum (at the const section) to the world number you want and change Singed to whether or not you want to use a signed client (False is recommended if autoing).

pagosapunk

2008-04-07 11:06:08

Thanks Al ot this works great :)

kingstun

2008-04-07 18:37:48

thanks now i can make non smart scripts hav smart!!

canu44

2008-04-07 22:15:09

thanks both mixter and nicbaz +reps: all other ways bugged and would not complie afterwards

scissormetimbers

2008-04-09 04:15:21

i keep tryin both versions posted and whenever i start it it says successful and then just closes the SCAR window and doesnt do anything…

brent8900

2008-04-09 23:30:08

nice that helped a lot thanks!

NiCbaZ

2008-04-10 02:09:17

thanks for all the feedback :)

MrLonely

2008-04-13 01:44:02

wow this is even simpler than the other ways. nice

w00tage

2008-04-13 22:17:29

do we have to add these ourselves or do the scriptors modify them?

eugenius1

2008-04-13 22:19:27

[admin]Dear User,
Your post count has been reset on account of your mass of spam posts. Please take the time to read this thread before posting again.
Sticky: Attention Spammers and Leechers...
RAM

Cheers,
Hobbit.[/admin]


okay im still lost on all this scar stuff

ohh dang. im still so lost

can you make it log on its own?

lol at no good summoning macroe bots out yet

yeah just wait to the summer man. though i have heard of somepeople getting pins for virtually free somehow?

okay im still lost after reading this

man its alot better than what i could do.

yeah im still working on the learning part im still lost but thanks so far

nice help but i could use more help

yeah its really nice

this script is jacking up for me

playing any computer game will increase your wpm lol

yeah where is the script?

im still lost after reading so many tutorials

From: P1NKY
eh he doesnt macro
(in my thoughts)

but rumors say that he does but jagex unbanned him or something like that cause makes rs look bad.

but i talked to him on IRC, he seems as a nice guy. but he is always #1 even if he quited for a bit cause once hes back he gets 99 he'll jump up..?


once he gets 99 he'll be back to #1

finally i can do it without parents looking and getting in trouble

after reading many guides this has helped alittle

dling and going to try it out

yeah we cant download java on the computers at school.. so i dont think its even possible

yeah its just alittle old

that happens to me also.. i dont know why

yeah just buy a new one.. i mean it couldnt be that hard or call a friend to get one to you

yeah i need help with this thanks!

yeah i have this same problem the download tab the left it says download srl here and it doesnt work someone needs to check it out

anyone know and can help me?

mixster

2008-04-14 09:05:30

From: w00tage
do we have to add these ourselves or do the scriptors modify them?

Some scriptors will modify their script to work with SMART and most likely release a SMART version of it, though sometimes they don't offer a SMART version, so you will have to modify it to work with SMART (unless you want it to work with a browser, in which case you're fine).

hobohotel33

2008-04-16 05:29:56

This tutorial was very beneficial. I used it to convert my auto fighter, now i can run two auto fighters at the same time. Best smart tutorial so far.

Waddo

2008-04-16 07:39:14

me liky v much

kikz0rz

2008-04-17 22:47:22

thats a big help :] i appreciate it

1van

2008-04-18 03:32:15

Mmm me likey the lil red silent dot mouse so much. Might marry it.

Codester93

2008-04-18 11:50:11

Thanks for this, now that I got a new computer, i can now run SMART without lag, so now I run SMART…yay… ok Ill stop. But also big thanks to mixster for the better way to put it in.
thanks
Codester93:spot:

1313

2008-04-20 14:06:24

Thanks, this helped me alot!

Gone Fishing

2008-04-20 16:01:07

Thank you very much that is a great method.

Micky13

2008-04-24 02:18:34

I Love You Man!
First Time Ive Actually Done It Right!
=d

Sc00by22

2008-04-25 11:54:28

Sweet

2xpnsv

2008-04-27 07:11:04

THANK YOU!!! lol.. ive been looking for a couple days now.. lol..works great

insanomano

2008-05-17 15:52:58

ummmm it works properly but when i do the stuff so i can set my world as a const and all those steps my SCAR just closes?????

ilyadusoleil

2008-05-17 20:35:42

Wow thanks - This is just what i was looking for :D

W0uter

2008-05-18 04:39:15

Thank You :D
This really helped me, now I can do some usefull things while autoing :p

[edit]I repped U :D[/edit]

mixster

2008-05-19 02:17:27

From: insanomano
ummmm it works properly but when i do the stuff so i can set my world as a const and all those steps my SCAR just closes?????


Update your worlds.ini file - there's a tutorial in this forum about it (S.M.A.R.T. Tutorials section).

blueguisee

2008-05-22 23:17:31

wow it works perfectly!!
thx for the tut ++Rep

Sc00by22

2008-05-24 02:55:27

I always use this method, So easy

ujimitsu

2008-05-28 20:04:20

flawless tut for me…thanks alot!

Infidel00

2008-06-01 20:54:03

Thanks for this little Tutorial, it helped add scar to my script I am working…so that means that your tutorial must be working then ;)

Sgt Soul

2008-06-06 02:16:44

thankyou so much for the help, i got it to work in forefeathers, but i found thay there was no 'SetupSRL;' so i tested with SetupScript; and it works fine.

welshboy

2008-06-06 16:26:20

thank you so much, up until i saw this thread ive been trying to find scripts which use smart, but some of the best ones dont, so i didnt bother using them, thanks so much, because no i can:d

r3d

2008-06-09 23:06:01

From: mixster
Gazrat, you don't have the latest SRL so search to learn how to download and install SVN then update to rev 15.
Other people with world 16 problem, change:

smartSetup('mn3', False, True);
to

SmartSetupEx(WorldNum, False, Signed);
then add

const
WorldNum = 16;
Signed = False;
to the top under where you add the includes, so it should look like:

program Blah;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}
const
WorldNum = 16;
Signed = False;
And then change WorldNum (at the const section) to the world number you want and change Singed to whether or not you want to use a signed client (False is recommended if autoing).

so i do that, but it just closes out of scar.. and when i do it the other way it goes to w16 but i need it to go to a member world so i can pick flax.. so what am i doing wrong because i tried what you said and it just closed out

wand2658

2008-06-11 05:10:19

umm noob question but where would i get smart?

jakestr

2008-07-10 08:41:48

Thanks dude!

jumbosped

2008-08-09 01:04:45

[BANANA]hey idk if this really works. cuz i am using the script Narcles Fast Fighter v.2.72 and when i dont edit the script for smart to work.. the script works fine and the form shows up. But when i edit the script so it uses smart. no form shows up and nothing happens. here is the whole script….Whats wrong.. can you fix it for me?? please . Thank you,[/BANANA]
{------------------------------Script Info-------------------------------------|
| ScriptName = Fast Fighter |
| Author = Narcle |
| Description = Fights any monster, food eating and HP regen. |
| Version = 2.72 |
| Date = 7/16/08 |
|______________________________________________________________________________|
|----------------------Instructions, Credits & Help info-----=-----------------|
| |
| Instructions: |
| Setup: 1. Select form or no form [In constants - true/false] |
| 2. Input SRL-stats ID & Password [In constants] |
| 3. Get a HP count of monster for form. |
| 4. Make sure you use the Color picker and select 3 colors |
| from monster, and copy/paste them into notepad. |
| 5. Read the "Need to knows" below. |
| 6. Push play! |
| |
| Need to knows: |
| -In the player form; (default) is next to each option, meaning |
| you can leave it blank if you want it to use default settings. |
| -Options for "Skill to train" are > strength, attack, defence, |
| even, pure, accurate, rapid or longrange < |
| Overrides:> c1, c2, c3, c4 < if range will not count ammo |
| -Options for "Run Direction" are > n, e, s, w < |
| |
| Credits: |
| -HyperSecret for posting his SecretFighter (v0.50) script |
| -Chitin & Cruel100 for Testing and Suggestions |
|______________________________________________________________________________}
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}
{.include SRL/SRL/misc/Users.scar}
{------------------------------------------------------------------------------}
{===============================Player Setup===================================}
{------------------------------------------------------------------------------}
Const
MySRLID = '1337';//example: '9999'
MySRLPassword = 'fuckoff';//example: 'password'

UseForm = false;//Use form? [true/false] False uses DeclarePlayers;
HaveReport = false;//Puts some information in Report box
PublicChat = 'off';//Public chat on or off?

{==============================================================================}
{!!!!! If UseForm = true then DeclarePlayers does not APPLY! !!!!!}
{==============================================================================}
procedure DeclarePlayers;
begin
if not(UseForm) then
begin
HowManyPlayers := 1;//Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='1337'; //Character Name
Players[0].Pass :='fuckoff'; //Character Pass
Players[0].Nick :='bitch'; //Nickname 3 - 4 Letter's of char name
Players[0].Active:=True; //True if you want this player to be ran in the script, false if not


Players[0].Booleans[0] := false;//Eat food? true/false
Players[0].Integers[0] := ;//1st color of monster
Players[0].Integers[1] := ;//2nd color of monster
Players[0].Integers[2] := ;//3rd color of monster
Players[0].Integers[3] := ;//hitpoints
Players[0].Strings[0] := '';//monster name
Players[0].Strings[1] := 'strength'; //the skill you want to train > strength, attack, defence, pure, even, accurate, rapid or longrange <
Players[0].Strings[2] := 's';//Player run direction > n, e, s, w <


{------------------------------------------------------------------------------}
{========================Don't edit below this!===============================}
{------------------------------------------------------------------------------}
Writeln('No-form setup');
end else
begin
Writeln('Form setup');
SRLPlayerForm(True, ['Eat Food'], ['Color 1','Color 2','Color 3','Monster Hitpoints'], ['Monster Name (tack)', 'Skill to train (even)','Run Direction (s)'], []);
end;
CheckUserNicks;
SRLid:= MySRLId;
SRLpassword:= MySRLPassword;
ScriptID := '424';
If (HowManyPlayers = 1) then Writeln('Single-Player Mode') else Writeln('Multi-Player mode; '+IntToStr(HowManyPlayers)+' Players');
end;

const
Version = '2.72';
ScriptName = 'Fast Fighter';
var
CharStartTime, TKilled, Txp, Startxp, foodate, RoundTimer, FailTimer, TFoodate,
ArrowStartAmount, TArrowAmount, CurrentMonsterHP, tacktime:integer;
Hoverskillis,CurrentMonsterName,CurrentRunDir,CurrentStyle,StartTime:string;
CurrentColors: array of integer; ScriptStarted: boolean;
procedure LogoutSeq(reason:string); forward;

procedure NarcSig;
var
I,II,n:integer;
s:string;
begin
Disguise('Sig Call');
ChangeReportWidth(255);
Status('Signature call; Watch the report box!');
for I := 0 to 57 do
begin
clearreport;
for II := 0 to 5 do
Addtoreport(s+'||');
wait(30);
if I < 29 then s := s + ' ' else delete(s, Length(s), 1);
end;
for I := 1 to 29 do
begin
ClearReport;
AddtoReport(Left(' _ _ _ ', I));
AddtoReport(Left('| \ | | made by | | ', I));
AddtoReport(Left('| \| | __ _ _ __ ___| | ___ ', I));
AddtoReport(Left('| . ` |/ _` | ''__/ __| |/ _ \', I));
AddtoReport(Left('| |\ | (_| | | | (__| | __/', I));
AddtoReport(Left('|_| \_|\__,_|_| \___|_|\___|', I));
wait(50);
end;
AddtoReport(ScriptName+' v'+Version);
if (MySRLID = '') or (MySRLPassword = '') then
begin
Writeln('Please register at SRL-stats in the future');
Writeln('to remove this message and the time delay.');
Writeln(' -Regards Narcle');
n := 15;
repeat
n := n-1;
wait(999);
Disguise(inttostr(n)+' Seconds to start.');
until (n=0)
end;
Status('Start '+ScriptName);
Disguise(ScriptName+' v'+Version);
StartTime := TheTime;
AddtoReport('Start time: '+StartTime);
end;

function ActiveCount:integer;
var i:integer;
begin
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active then
result := result+1;
end;
end;

Function FFWait(Time: Integer): Boolean;
var
T: Integer;
begin
if not(loggedin) then exit;
for T := 7 to time do
begin
if FindNormalRandoms then
begin
FindInventoryRandoms;
result := true;
end;
if FindTalk then
Result := True;
Wait(200 + Random(50));
end;
end;

function FFInFight: Boolean;
var
x, y : Integer;
begin//264, 160
Result := (FindColor(x, y, 65280, 249, 140, 279, 175) or FindColor(x, y, 255,
249, 140, 279, 175))
end;

function FightOnScreen: Boolean; //Works! already tweaked
var
x,y:integer;
B:TBox;
begin
B:=IntToBox(228, 143, 300, 190);
result := FindColorSkipBox(x, y, 65280, MSX1, MSY1, MSX2, MSY2, B) or
FindColorSkipBox(x, y, 255, MSX1, MSY1, MSX2, MSY2, B);
end;

Function MobsOnScreen: integer;//Working but needs some tweaks
var
i: integer;
Mobs : TPointArray;
begin
FindColorsTolerance(Mobs, 195836, 598, 67, 656, 105, 19);
if High(Mobs) > 0 then
begin
RAaSTPA(Mobs, 4);
for i := 0 to High(Mobs) do
If InAbstractBox(590, 60, 656, 60, 646, 102, 600, 102, Mobs[i].x, Mobs[i].y) then
begin
result := result + 1;
end;
end;
end;

procedure Stopban;
begin
if not LoggedIn then Exit;
case Random(58) of
0: wait(500+random(3000));
1: begin
RandomMovement;
SetAngle(true);
end;
2: HoverSkill(Hoverskillis ,false);
3: PickUpMouse;
end;
status('');
end;


function GetArrowCount:integer;
//creds to masquerader | Freddy1990 | Boreas | Mr. Freeweed
//for the "GetAmount" parts I used
var
amountstr: string;
begin
gametab(5);
wait(50);
amountstr := TrimOthers(GetTextAtEx(667, 249, 0, StatChars, False, False, 0, 2, -1, 5, True, tr_AlphaNumericChars));
if (Length(amountstr) > 0) then
begin
if (Pos('K', amountstr) > 0) then
begin
Delete(amountstr, Length(amountstr), Length(amountstr));
Result := StrToInt(amountstr) * 1000;
end else
if (Pos('M', amountstr) > 0) then
begin
Delete(amountstr, Length(amountstr), Length(amountstr));
Result := StrToInt(amountstr) * 1000000;
end else
Result := StrToInt(amountstr);
end else
Result := 0;
end;

procedure OptionsAre;
begin
if Players[CurrentPlayer].Strings[2] = '' then CurrentRunDir := 's'
else CurrentRunDir := lowercase(Players[CurrentPlayer].Strings[2]);
if Players[CurrentPlayer].Strings[1] = '' then CurrentStyle := 'even'
else CurrentStyle := lowercase(Players[CurrentPlayer].Strings[1]);
CurrentColors := [Players[CurrentPlayer].Integers[0],
Players[CurrentPlayer].Integers[1], Players[CurrentPlayer].Integers[2]];
if (Players[CurrentPlayer].Integers[3]<3) then CurrentMonsterHP := 3
else CurrentMonsterHP := Players[CurrentPlayer].Integers[3];
if Players[CurrentPlayer].Strings[0] = '' then CurrentMonsterName := 'tack'
else CurrentMonsterName := Players[CurrentPlayer].Strings[0];
If (CurrentPlayer > 0) and (Players[CurrentPlayer].Integers[0]=0) then
begin
CurrentColors := [Players[0].Integers[0], Players[0].Integers[1], Players[0].Integers[2]];
CurrentMonsterName := Players[0].Strings[0];
CurrentMonsterHP := Players[0].Integers[3];
end;
end;

Procedure NameColorCheck;
begin
OptionsAre;
if (CurrentColors[0] = 0) or (CurrentColors[1] = 0) or (CurrentColors[2] = 0) then
begin
Logout;
Writeln('Error: Please enter 3 monster colors for player(s).');
terminatescript;
end;
if CurrentMonsterName = '' then
begin
Logout;
Writeln('Error: Please enter monster name(s) for player(s).');
terminatescript;
end;
end;

function MyEatFood:boolean;
var
i,x,y:integer;
begin
gametab(4);
for i := 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
wait(150+random(50));
if (pos('Eat', rs_GetUpText) > 0) then
begin
Mouse(x,y,0,0,false);
wait(50+random(50));
if ChooseOption('Eat') then
begin
wait(350+random(150));
result := true;
exit;
end;
end;
end;
end;

procedure FFHpCheck;//The new and improved! 3/25/08
var
c:Integer;
begin
if (not LoggedIn) or (HPPercent > 64) then exit;
if (HPPercent < 30) then
begin
Status('Running away HP% < 30...');
RunAway(CurrentRunDir, true, 1, 5000+random(5000) );
end;
if (HPPercent < 65) then
begin
Status('HP low doing HP checks...');
if (Players[CurrentPlayer].Booleans[0]) then
if not(InvEmpty) then
for c := 0 to 2 do
begin
if MyEatFood then foodate := foodate+1;
if (not(loggedin)) or (HPPercent > 64) then exit;
end;
repeat
FFWait(4);
Case random(20) of
0: RandomMovement;
end;
if FFInFight then
begin
RunAway(CurrentRunDir, true, 1, 10000+random(2000) );
if (HPPercent < 50) and FFInFight then
begin
Status('Waiting to auto-logout...');
repeat
FFwait(4);
until(not(loggedin))
LogoutSeq('');
end;
end;
if ( (Getsystemtime-CharStartTime) > (RandomRange(8, 14)*60000+random(60000)) ) then LogoutSeq('');
if not LoggedIn then exit;
until(HPPercent > 64);
SetAngle(true);
end;
end;

procedure FFOutFight;
begin
if FFInFight then
begin
repeat
if not LoggedIn then exit;
FFWait(1);
FFhpcheck;
if not FightOnScreen then exit;
until(not FFInFight)
end else
Wait(3000);
end;

procedure PReport;
Var
CurRemXP, XPpH, Tlm, CurXP, CurAU, XPn, Killed, I,H,M,S:integer;
Active:string;
begin
if not(loggedin) then loginplayer;
FFoutfight;
ConvertTime(gettimerunning, H, M, S);
GetAllLevels;
CurXP := GetXP(Hoverskillis);
if (CurXP > Startxp) and (Startxp > 0) then XPn := CurXP-Startxp else XPn := 0;
try Killed := Round((XPn/(4.0*CurrentMonsterHP))) except Killed := 0; end;
TKilled := TKilled+killed;
Txp := (Txp+XPn);
TFoodate := TFoodate + foodate;
if (HowManyPlayers = 1) then
begin
CurRemXP := XpTillNextLevel(Hoverskillis);
if (CurRemXP>0) and (Txp > 0) then Tlm := Round((CurRemXP)/(Txp/(H*60.0+m))) else Tlm := 1;
if (txp>0) then XPpH := Round((Txp*60.0)/(H*60.0+m)) else XPpH := 0;
end;
if (Players[CurrentPlayer].Booleans[0]) then
if (ArrowStartAmount > GetArrowCount) and (GetArrowCount > 0) then
CurAU := ArrowStartAmount - GetArrowCount else CurAU := 0;
if (Players[CurrentPlayer].Booleans[0]) then TArrowAmount := TArrowAmount+CurAU;
if (HowManyPlayers = 1) then
begin
Cleardebug;
Writeln('|_Single Player__Narcle''s Fast Fighter v'+Version+' by Narcle___|');
Writeln('| Ran: ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s Current Time: '+TheTime+' Start Time: '+StartTime+' |');
WriteLn('| Total Kills: '+ inttostr(TKilled)+', Total XP Gained: '+ inttostr(Txp));
WriteLn('| Kills Round: '+ inttostr(Killed)+', XP Round: '+ inttostr(XPn)+' XP/hour: '+inttostr(XPpH));
try
If (Players[CurrentPlayer].Booleans[0]) then
writeln('| Ammo remaining: '+inttostr(GetArrowCount)+', Total Ammo used: '+
+inttostr(TArrowAmount)+', Ammo Used/hour: '+inttostr(Round((TArrowAmount*60.0)/(H*60.0+m)))+' |');
except end;
end;
if (HowManyPlayers > 1) then
begin
Players[currentplayer].Integers[11] := Players[currentplayer].Integers[11] + XPn;
Players[currentplayer].Integers[12] := Players[currentplayer].Integers[12] + killed;
Players[currentplayer].Integers[13] := Players[currentplayer].Integers[13] + CurAU;
Players[currentplayer].Integers[15] := Players[currentplayer].Integers[15] + foodate;
Players[currentplayer].Integers[31] := Players[currentplayer].Integers[31] + TimeFromMark(RoundTimer);
if (Players[currentplayer].Integers[11]>0) and (Players[currentplayer].Integers[31]>0) then
try Players[currentplayer].Integers[32] := Round((Players[currentplayer].Integers[11]*3600.0)/(Players[currentplayer].Integers[31]/1000.0))
except Players[currentplayer].Integers[32] := 0; end;
ClearDebug;
Writeln('|_Multi-Player__Fast Fighter v'+Version+' by Narcle___|');
Writeln('| Ran: ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s Current Time: '+TheTime+' Start Time: '+StartTime+' |');
WriteLn('| Totals: XP Gained; '+ inttostr(Txp)+', Kills; '+ inttostr(TKilled)+', Food ate; '+inttostr(TFoodate)+', Ammo used; '+inttostr(TArrowAmount)+' |');
writeln(' _________________________________________________________________________');
Writeln('| # | Nick | Active | XP gained | Kills | XP/hour | Food ate | Ammo Used |');
For I := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active=True then Active := 'True' else Active := 'False';
Writeln('| '+IntToStr(I)+' | '+Players[i].Nick+' | '+Active+' | XP: '+IntToStr(Players[i].Integers[11])+' | K: '+
+IntToStr(Players[i].Integers[12])+' | XP/h: '+IntToStr(Players[i].Integers[32])+' | Ate: '+IntToStr(Players[i].Integers[15])+
+' | AU: '+IntToStr(Players[i].Integers[13])+' |');
end;
end;
begin//stat updates
ReportVars[0] := Killed;
ReportVars[1] := XPn;
ReportVars[2] := FoodAte;
SendSRLReport;
end;
foodate := 0;
Killed := 0;

end;

procedure CombatLookup;
var
x, y, i, WaitT, CP:integer;
Xarr, Yarr:array of integer;
TB: TBox;
TP: TPointArray;
begin
CP := CurrentPlayer;
Xarr := [600, 685, 600, 685];
Yarr := [275, 275, 330, 330];
GameTab(1);
for i := 0 to 3 do
begin
MMouse(Xarr[i], Yarr[i], 7, 7);
repeat
WaitT := WaitT+1;
wait(100);
if WaitT >= 30 then exit;
until findcolor(x, y, 10551295, 540, 205, 750, 465);
GetClientDimensions(TB.X2, TB.Y2);
TB.X1 := 0;
TB.Y1 := 0;
FindColorsTolerance(TP, 10551295, TB.X1, TB.Y1, TB.X2, TB.Y2, 0);
If Length(TP) = 0 Then Exit;
TB := GetTPABounds(TP);
Players[CP].Strings[i+50] := Lowercase(Between('(', ' XP',
GetTextAtEx(TB.X1+2, TB.Y1+27, 0, SmallChars, False, True, 0, 1, 0, 20, False, tr_AllChars)));
if Players[CP].Strings[i+50] = '' then
begin
Players[CP].Strings[i+50] := Lowercase(Between('(', ' XP',
GetTextAtEx(TB.X1+2, TB.Y1+14, 0, SmallChars, False, True, 0, 1, 0, 20, False, tr_AllChars)));
end;
Writeln(Players[CP].Strings[i+50]);
end;
end;

function CombatSelect(kind: string): boolean;
var
i:integer;
begin
for i := 0 to 3 do
if Lowercase(kind) = Players[currentplayer].Strings[i+50] then
begin
SetFightMode(i+1);
Hoverskillis := kind;
result := true;
exit;
end;
end;

function CombatTrain: string;
var
i:integer;
begin
for i := 0 to 3 do
begin
if 'range' = Players[currentplayer].Strings[i+50] then
begin
result := 'range';
exit;
end;
if 'magic' = Players[currentplayer].Strings[i+50] then
begin
result := 'magic';
exit;
end;
end;
result := 'melee';
end;

procedure SetupPlayer;
Var
Mode, i:integer;
begin
if (not(LoggedIn)) then Exit;
if not Players[CurrentPlayer].Booleans[3] then
begin
SetBar(4, 1, 1, 1);
Players[CurrentPlayer].Booleans[3] := true;//Graphics & Audio Set.
end;
Status('Setting up player: '+Players[CurrentPlayer].Name+'...');
MouseSpeed := RandomRange(11,16);
SetAngle(true);
GameTab(1);
Retaliate(True);
mode := 0;
if Players[currentplayer].Strings[50] = '' then
begin
CombatLookup;
Players[currentplayer].Strings[55] := CombatTrain;
end;
for i := 1 to 4 do
if CurrentStyle = 'c'+inttostr(i) then
SetFightMode(i)
else
case Players[currentplayer].Strings[55] of
'melee': begin
case CurrentStyle of
'attack': mode := 1;
'strength': mode := 2;
'defence': mode := 3;
'even': begin
if (Players[CurrentPlayer].level[3] <= Players[CurrentPlayer].level[1]) and
(Players[CurrentPlayer].level[3] <= Players[CurrentPlayer].level[2]) then mode := 3;
if (Players[CurrentPlayer].level[1] <= Players[CurrentPlayer].level[3]) and
(Players[CurrentPlayer].level[1] <= Players[CurrentPlayer].level[2]) then mode := 1;
if (Players[CurrentPlayer].level[2] <= Players[CurrentPlayer].level[1]) and
(Players[CurrentPlayer].level[2] <= Players[CurrentPlayer].level[3]) then mode := 2;
end;
'pure': begin
if Players[CurrentPlayer].level[2]<15 then mode := 2 else
if Players[CurrentPlayer].level[1]<30 then mode := 1 else
if Players[CurrentPlayer].level[2]<25 then mode := 2 else
if Players[CurrentPlayer].level[1]<40 then mode := 1 else mode := 2;
end;
end;
Case mode of
1: if not CombatSelect('attack') then
if not CombatSelect('strength') then
CombatSelect('defence');
2: if not CombatSelect('strength') then
if not CombatSelect('attack') then
CombatSelect('defence');
3: if not CombatSelect('defence') then
if not CombatSelect('strength') then
CombatSelect('attack');
end;
end;
'range': begin
if CurrentStyle = 'even' then
CurrentStyle := 'rapid';
case CurrentStyle of
'accurate' : SetFightMode(1);
'rapid' : Setfightmode(2);
'longrange': Setfightmode(3);
end;
Hoverskillis := 'range';
ArrowStartAmount:=GetArrowCount;
If (ArrowStartAmount <= 200) then
begin
LogoutSeq('Low ammo count! (below 200)');
exit;
end;
end;
end;

SetChat(PublicChat, 1);
SetChat('off', 2);
SetChat('off', 3);
SetChat('off', 4);
SetChat('off', 5);
GetAllLevels;
Startxp := GetXP(Hoverskillis);
SetRun(True);
CharStartTime := Getsystemtime+random(30000);
MarkTime(RoundTimer);
MarkTime(FailTimer);
If HaveReport then
begin
ClearReport;
ChangeReportWidth(284);
AddtoReport('/~~~~~~ Fast Fighter v'+Version+' ~~~~~~\');
AddtoReport('|________Made by Narcle_________|');
AddtoReport('| Active Players: '+inttostr(ActiveCount)+' False: '+inttostr(HowManyPlayers-ActiveCount)+' |');
AddtoReport('Current Player: '+Players[Currentplayer].Name);
end;
end;

procedure LogoutSeq(reason:string);
begin
if(not(loggedin))then exit;
FFoutfight;
Status('Logout sequence...');
PReport;
Stopban;
if (reason = '') then nextplayer(true) else
begin
Writeln(reason+' '+Players[Currentplayer].Name+' is now inactive.');
nextplayer(false);
end;
SetupPlayer;
end;

function FFattack(Name: string; Colors:TintegerArray; tol: integer): boolean;
var
L1, c, x, y, xx, yy: integer;
begin
result := false;
if FFInFight and FightOnScreen then Exit;
L1 := High(Colors);
for c := 0 to L1 do
begin
x:=MSCX;
y:=MSCY;
if FindColorSpiralTolerance(x, y, Colors[c], MSX1, MSY1, MSX2, MSY2, Tol) then
begin
MMouse(x, y, 3, 3);
if FindColorSpiral(xx, yy, 65280, x - 15, y - 40, x + 15, y+ 40) then continue;
wait(150+random(50));
if (pos(Name, rs_GetUpText) > 0) then
begin
Players[CurrentPlayer].Integers[15] := 0;
GetMousePos(x, y);
case Random(2) of
0: begin
Mouse(x, y, 0, 0, false);
if ChooseOption('tack') then
result := true;
end;
1: if IsUpText('tack') then
begin
Mouse(x, y, 0, 0, true);
result := true;
end;
end;
if result then
begin
MarkTime(FailTimer);
exit;
end;
end;
end;
end;
end;

function ChangeCamera: boolean;
var
i, II, PosNeg:integer;
begin
Case random(2) of
0: PosNeg := 1;
1: PosNeg := -1;
end;
i := Round(rs_GetCompassAngleDegrees/45 - 1);
if i < 0 then i := 0;
if i > 7 then i := 7;
For II := 0 to 7 do
begin
if (MobsOnScreen > 0) then
begin
result := true;
exit;
end;
i := i+PosNeg;
if i > 7 then i := 0;
if i < 0 then i := 7;
MakeCompass(inttostr(i*45));
end;
end;


//=============================================Main Execution============================================\\

begin
smartSetup('world135', False, True, False);

Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
SetupSRL;
ClearDebug;
NarcSig;
DeclarePlayers;
NameColorCheck;
if not LoggedIn then LoginPlayer;
ScriptStarted := true;
SetupPlayer;
repeat
if not(loggedin) then LoginPlayer;
FFhpcheck;

if FFattack(CurrentMonsterName, CurrentColors, 3) then
begin
FFlag(0);
MarkTime(tacktime);
while not FFInFight and (TimeFromMark(tacktime) < 2000) do wait(100);
FFOutFight;
end;

if (MobsOnScreen = 0) then ChangeCamera;

FFWait(0);
Stopban;
if (TimeFromMark(FailTimer) > 240000) then
begin
Players[CurrentPlayer].Integers[15] := Players[CurrentPlayer].Integers[15]+1;
MarkTime(FailTimer);
end;
if (Players[CurrentPlayer].Integers[15]>3) then LogoutSeq('Finding mob failed');
if ( (Getsystemtime-CharStartTime) > (RandomRange(6, 12)*60000+random(60000)) ) then LogoutSeq('');
until(false);
end.
:mad: :mad: :mad:

Homicida

2008-08-31 13:22:48

good job it helps alot

Faitness

2008-09-01 05:28:40

I get this error:
Line 406: [Error] (16535:31): Invalid number of parameters in script C:\Documents and Settings\Jan\Desktop\forefeathers1.2.0.scar

bzum

2008-09-01 05:52:35

From: jumbosped
[BANANA]hey idk if this really works. cuz i am using the script Narcles Fast Fighter v.2.72 and when i dont edit the script for smart to work.. the script works fine and the form shows up. But when i edit the script so it uses smart. no form shows up and nothing happens. here is the whole script….Whats wrong.. can you fix it for me?? please . Thank you,[/BANANA]:mad: :mad: :mad:


You should try changing this:
UseForm     = false;//Use form? [true/false] False uses DeclarePlayers;

to this:
UseForm     = true;//Use form? [true/false] False uses DeclarePlayers;

sherlucky

2008-09-05 16:22:00

hi, i teid the smart stuff out but, when i tried the mehtod i get error, for some reason i dont know howto copy the error so i have to type it]
'ine error 18 18505:1, semicolon (';') expected blah blah…plz help me :(

enidraj

2008-12-21 06:37:46

From: Faitness
I get this error:
Line 406: [Error] (16535:31): Invalid number of parameters in script C:\Documents and Settings\Jan\Desktop\forefeathers1.2.0.scar


i get the same error:S
i think its to do with the new srl?
cant seem to get smart to work on anything

Dani Bolton

2009-01-18 10:47:08

Line 90: [Error] (16557:41): Invalid number of parameters in script C:\Program Files\SCAR 3.15\Scripts\Chicken Killer (Med).scar

I get this error to I don't know how to fix it though!? Please help it will be much appreceated!

Thanks,
Dani B x

Baked0420

2009-01-18 11:41:44

don't gravedig and SRL has been updated since then, to include smart just put:

{.include srl/srl/misc/Smart.scar}

above

{.include SRL/SRL.scar}

so it looks like:

{.include srl/srl/misc/Smart.scar}
{.include SRL/SRL.scar}

then search for SetupSRL; and right underneath it put:

  Smartsetupex(35, false, true, false);   
Settargetdc(smartgetdc);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

so that it looks like:

  
SetupSRL;
Smartsetupex(35, false, true, false); //you can change 35 to what ever world you want to log into
Settargetdc(smartgetdc);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

and then you have SMART set up and it should be working, if it still doesn't you need to update your SRL or your Worlds.ini folder. Next time use the search button though and don't gravedig something a month old. ;)

jurrien

2009-01-22 09:15:26

thans, this works good!

Choroid

2009-02-07 09:15:39

Failed when compiling
Line 10: [Error] (16224:11): Duplicate identifier 'RELEASEMOUSE' in script C:\Documents and Settings\Owen.HPPENT4DESKTOP\Desktop\SCAR 3.15\includes\SRL/SRL/Misc/smart.scar

TomTuff

2009-02-16 15:48:58

Line 120: [Hint] (16432:1): Variable 'I' never used in script F:\Program Files\SCAR 3.15\Scripts\forefeathers1.2.5.scar
Line 433: [Error] (16745:31): Invalid number of parameters in script F:\Program Files\SCAR 3.15\Scripts\forefeathers1.2.5.scar

thats forefeathers btw
scar and srl are up to date
none of these smart tutorials work!!!!!!!
help plzzzzzzz

( . Y . )

2009-02-21 22:41:56

that is helpful
:D

lysolman00

2009-02-24 19:49:21

Omg…This is…wow. I can't believe it can be that easy. This could have saved me lots of trouble. Wish I could have had it when I was installing it. Looks great. Keep up the good work!