SRL Archive - OSR Help

First Power Chopper.....Views from ground level


paintballer4lfe

2013-03-06 16:43:44

alright i watched and read some basic tuts on how to script with simba(i've scripted some super simple scripts for powerbot before)

but im not going to lie i took some script code from a few power mining scripts.
I kind of understand the coding for when it chops, i just dont see why its putting the camera view in the ground.
its a small area power chopper so i pretty much want the view to stay ariel my antiban moves compas randomly thats no issue.

can someone help point out where its telling it to go down or how to change it? im lost with ObjectTPA and all that really

my code so far:
program PowerChopper;
{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

Procedure P07_DeclarePlayer;
begin
P07_PlayerName:=''; //username
P07_PlayerPass:=''; //password
end;




procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(1200+Random(212));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(98+random(243));
MakeCompass('S');
wait(67+random(300));
MakeCompass('N');
end;
end;
end;







procedure ChopTree;
var
tmpCTS, l, r:Integer;
ObjectTPA:TPointArray;
begin
MouseSpeed:=15;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.02, 0.08);
P07_TabInventoryTab(4);
repeat
FindNormalRandoms;
if FindColorsTolerance(ObjectTPA, 4419729, 8, 25, 518, 359, 11) then
begin
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(ObjectTPA);
mmouse((ObjectTPA[r].x), (ObjectTPA[r].y), 15, 15);
clickmouse2(mouse_left);
wait(randomrange(10000, 500));
Writeln('Chopping');
wait(randomrange(2000, 2500));
end;
repeat
wait(400+random(260));
AntiBan;
Until not IsUpText('ew') or (InvFull);
until(InvFull);
end;



procedure Drop;

Begin;
repeat
FindNormalRandoms;
ChopTree;
until P07_InvFull
If P07_InvFull then
P07_DropallExcept([1]);
AntiBan
end;


begin
SetupSRL;
P07_DeclarePlayer;
SetupP07Include;
P07_LoginPlayer;
P07_MakeCameraAnglelow;
repeat
P07_TabInventoryTab(4);
AntiBan;
drop;
until (not P07_LoggedIn);
end.

paintballer4lfe

2013-03-06 17:15:27

From: tealc
looks like part of your code got cut off use simba tags instead of code tags


put it in simba tag, its a small script thats all of it

tealc

2013-03-06 17:27:27

now i can see the full script. Tpas are arrays of points they take a little while to get used to.
It makes the camerea angle low because of this

P07_MakeCameraAnglelow;

paintballer4lfe

2013-03-06 17:49:03

From: tealc
now i can see the full script. Tpas are arrays of points they take a little while to get used to.
It makes the camerea angle low because of this

P07_MakeCameraAnglelow;

wowwwwww………i feel so stupid right now ha

paintballer4lfe

2013-03-06 18:48:06

One extra thing, is there a way i can get an integer from a single line text file containing the integer on my website to load into a variable?

like this:
Load Script>Grab File contents from website>Put into variable(Named X)>Use varaible for Object find?