hey guys,
What command to I use if I want the camera to change and look directly above where I am? I know of MakeCompass('N'), but doesn't help for changing the camera to look from above instead of sideways.
Thank you =]..
hey guys,
What command to I use if I want the camera to change and look directly above where I am? I know of MakeCompass('N'), but doesn't help for changing the camera to look from above instead of sideways.
Thank you =]..
Ongoing Project:
Treehugger 1.0
SCAR Code:SetAngle(True);
Thanks! =D
Ongoing Project:
Treehugger 1.0
also.... here's my code below, for some reason it's not actually running past login and moving the camera..any hints? I'm sure it's something stupid :P
PHP Code:program TreeHugger;
//Including all the needed thingies.
{.include SRL/SRL/Misc/Smart.scar}
{.Include SRL\SRL.SCAR}
{.include srl/srl/misc/Reports.scar}
//declaring players
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
Players[0].Name := 'username'; //Username
Players[0].Pass := 'pass'; //Password
Players[0].Nick := 'nick'; //2-3 Letters Of Your Username
Players[0].Active :=True; //Using This Account?
if(not(loggedin)) then loginplayer;
end;
//Checking if you're at the west Varrock bank.
function CheckingAtBank: Boolean;
var a, b, w, z, x, k, l, j: integer;
begin
MakeCompass('N');
SetAngle(True);
if FindColor(a, b, 2075128, 600, 200, 700, 300) and
FindColor(w, z, 6975602, 500, 300, 600, 400) and
FindColor(x, k, 5388097, 500, 400, 600, 500) and
FindColor(l, j, 1403051, 600, 400, 700, 500) then
result:= true;
end;
//Checking for Axe
function CheckingForAxe: Boolean;
var a, b, w, z: integer;
begin
MakeCompass('N');
SetAngle(True);
if FindColor(a, b, 1207697, 900, 400, 1000, 500) and
FindColor(w, z, 791907, 900, 400, 1000, 500) then
result:= true;
end;
//Equipping Axe
procedure EquippingAxe;
begin
if CheckingAtBank = true and
CheckingForAxe= true then
Mousebox(908, 415, 916, 430, 1)
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
CheckingAtBank;
CheckingForAxe;
EquippingAxe;
end.
Ongoing Project:
Treehugger 1.0
Have you set CurrentPlayer and HowManyPlayers?
I assumed since there is only one player it is the one it uses? It logs it in..
Ongoing Project:
Treehugger 1.0
Ehh LoginPlayer?
~Home
ah..yeah..that was dumbD
Ongoing Project:
Treehugger 1.0
Fixed Includes and removed activateclient ( Because of use of SMART) And added LoginPlayer in Mainloop.Code:program TreeHugger; //Including all the needed thingies. {.include SRL/SRL/Misc/SMART.scar} {.include SRL\SRL.scar} {.include srl/srl/misc/Reports.scar} //declaring players procedure DeclarePlayers; begin NumberOfPlayers(1); Players[0].Name := 'username'; //Username Players[0].Pass := 'pass'; //Password Players[0].Nick := 'nick'; //2-3 Letters Of Your Username Players[0].Active :=True; //Using This Account? if(not(loggedin)) then loginplayer; end; //Checking if you're at the west Varrock bank. function CheckingAtBank: Boolean; var a, b, w, z, x, k, l, j: integer; begin MakeCompass('N'); SetAngle(True); if FindColor(a, b, 2075128, 600, 200, 700, 300) and FindColor(w, z, 6975602, 500, 300, 600, 400) and FindColor(x, k, 5388097, 500, 400, 600, 500) and FindColor(l, j, 1403051, 600, 400, 700, 500) then result:= true; end; //Checking for Axe function CheckingForAxe: Boolean; var a, b, w, z: integer; begin MakeCompass('N'); SetAngle(True); if FindColor(a, b, 1207697, 900, 400, 1000, 500) and FindColor(w, z, 791907, 900, 400, 1000, 500) then result:= true; end; //Equipping Axe procedure EquippingAxe; begin if CheckingAtBank = true and CheckingForAxe= true then Mousebox(908, 415, 916, 430, 1) end; begin SetUpSRL; DeclarePlayers; LoginPlayer; CheckingAtBank; CheckingForAxe; EquippingAxe; end.
~Home
He's had it.
is located in DeclarePlayers;.SCAR Code:if(not(loggedin)) then loginplayer;
Ok, the new script is below..but it still logs in, moves the camera..and says script successfully executed.
PHP Code:program TreeHugger;
//Including all the needed thingies.
{.include SRL/SRL/Misc/Smart.scar}
{.Include SRL\SRL.SCAR}
{.include srl/srl/misc/Reports.scar}
//declaring players
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Change this accordingly
NumberOfPlayers(HowManyPlayers); // Total Number Of Players
CurrentPlayer := 0; // The Current Player To Start With
Players[0].Name := 'user'; //Username
Players[0].Pass := 'pass'; //Password
Players[0].Nick := 'nick'; //2-3 Letters Of Your Username
Players[0].Active := True; //Using This Account?
if(not(loggedin)) then loginplayer;
end;
//Checking if you're at the west Varrock bank.
function CheckingAtBank: Boolean;
var a, b, w, z, x, k, l, j: integer;
begin
MakeCompass('N');
SetAngle(True);
if FindColor(a, b, 2075128, 600, 200, 700, 300) and
FindColor(w, z, 6975602, 500, 300, 600, 400) and
FindColor(x, k, 5388097, 500, 400, 600, 500) and
FindColor(l, j, 1403051, 600, 400, 700, 500) then
result:= true;
end;
//Checking for Axe
function CheckingForAxe: Boolean;
var a, b, w, z: integer;
begin
MakeCompass('N');
SetAngle(True);
if FindColor(a, b, 1207697, 900, 400, 1000, 500) and
FindColor(w, z, 791907, 900, 400, 1000, 500) then
result:= true;
end;
//Equipping Axe
procedure EquippingAxe;
begin
if CheckingAtBank = true and
CheckingForAxe= true then
Mousebox(908, 415, 916, 430, 1)
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
CheckingAtBank;
CheckingForAxe;
EquippingAxe;
end.
Ongoing Project:
Treehugger 1.0
What is it supposed to do now..?
Heh, my bad
Hmm how i can explain this to you..
First it logs in then moves camera.
Then it checks are in you bank ( What i think will result false? ) Because of simple findcolor ( Colors do change ) after that it checks for an Axe what MIGHT result false but it does not matter because of this.
If one or 2 will result false then it will SKip whoe MouseBox Procedure and it will be tarminated ( Because Mainloop is over )Code:if CheckingAtBank = true and CheckingForAxe= true then Mousebox(908, 415, 916, 430, 1)
I hope that i explained enough clearly.
~Home
Ah..so you're saying it's not finding the color so it doesn't move on...that might be it.. I guess I'll use a different method.
Ongoing Project:
Treehugger 1.0
I think I'll wait to try and make something that works until new scar and SRL is out..lots of the SRL functions don't work..like the find symbol :P
Ongoing Project:
Treehugger 1.0
yeah now would be an annoying time to learn how to script, since rs seems to be doing alot of updateing latley. Functions could break every time rs updates, but dont let that hold you back, they will always be fixed up again and so your script should still work.
your doing quite good sofar, good luck :]
Lance. Da. Pants.
There are currently 1 users browsing this thread. (0 members and 1 guests)