SRL Archive - OSR Help

Yohojo help!!!


maxxxed

2013-04-03 14:11:17

i have followed all your videos and successfully completed them. Nothing went wrong, but when i try to load the AutoRangeGuilder script it does not open smart old rs window. I can manually open rs and select the green crosshair and get the bot to work on the RS WINDOW THAT I OPENED MYSELF, but then i cant minimize it cuz it uses my mouse.

The script has DEFINE SMART8 and SetupSRL in it in places but i dont know how to pop the window open so i can MINIMIZE THE BOT.

PLEASE HELP!

YoHoJo

2013-04-03 14:14:46

Post the entire code here, make sure to remove user/pass.

maxxxed

2013-04-03 14:15:21

program AutoRangeGuilder_11;

//Welcome to the AutoRangeGuilder_11! This is my first official script so please feel
//free to comment me on the forums/inbox for problems and suggestions.
//Thanks to everyone who dedicated their time for the OldSchool Simba support and the Simba Community.
//There is no leech but there is something you may want to change however.

//{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

var
TargetDTM, TargetViewDTM, BronzeArrowDTM, CloseDTM, AgainDTM, ScoreDTM, ClicktoContinueDTM, SureDTM, x, y, a, b, i, j, mouseclickcount, targetviewboxtimer, competitionsplayedcount: integer;

const
judgecolor1 = 3364126;
judgecolor2 = 3033937;
judgecolor3 = 3763576;

procedure P07_DeclarePlayer;
begin
P07_Playername:=''; //enter your username
P07_Playerpass:=''; //enter your password
end;

procedure Open_Inv_Tab;
begin
if(not P07_TabInventoryTab(4)) then
begin
P07_TabInventoryTab(4);
end;
end;

procedure Start_Comp;
begin
wait(randomrange(500,1000));
begin
case random(10000) of
1..50: wait(randomrange(3000,6000));
200..276: wait(randomrange(7000,12000));
9875..10000: P07_HoverSkill('ranged', random(6000));
end;
end;
//P07_MakeCameraAngleHigh; uncomment this if you are having problems with guards and need to make the camera angle high
begin
if P07_FindObjCustom(x, y, ['omp', 'tition', 'judge'], [judgecolor1, judgecolor2, judgecolor3], 5) then
begin
MMouse(x,y,5,5);
ClickMouse2(mouse_left);
writeln('');
writeln('Talking to the Judge...');
end
else
begin
writeln('Unable to find the Judge, looking again...');
P07_MakeCameraAngleHigh;
Start_Comp;
end;
end;
end;

procedure Click_to_Continue;
begin
wait(randomrange(1000,1500));
AgainDTM := DTMFromString('m1gAAAHic42JgYNgHxFuA+BoQnwbig0D8F4hzGRkYUoDYD4jVgXgpEM8G4gVAPB2IZwFxARCXA3EtEOcAcT4QYwMNWDCxgJFIjAAA6o4OCg==');
ClicktoContinueDTM := DTMFromString('mbQAAAHicY2VgYDBkZGB4CaQrgDQfEGsD8REgPgSlQfgoEDMw/EfBp3dNZWAFstAxIxYMBgApxQvh');
SureDTM := DTMFromString('mrAAAAHic42BgYGBmZGDYC6TdgPRbIH0HiPWB7MdAWhxIdwJxBxD3AHELlIbhLiDGBS4fWshw6eAcBlYgGx9mJIBhAADX4gzx');
if FindDTM(AgainDTM, x, y, 10, 351, 511, 470) then
begin
writeln('It appears we are already in a Competition! Resuming...');
P07_MakeCameraAngleLow;
begin
FreeDTM(AgainDTM);
end;
end
else
begin
begin
if FindDTM(ClicktoContinueDTM, x, y, 10, 351, 511, 470) then
begin
MMouse(x,y,5,5);
ClickMouse2(mouse_left);
wait(randomrange(600,1000));
end;
end;
begin
if FindDTM(SureDTM, x, y, 10, 351, 511, 470) then
begin
MMouse(x,y,5,5);
ClickMouse2(mouse_left);
wait(randomrange(600,1000));
end;
end;
begin
if FindDTM(ClicktoContinueDTM, x, y, 10, 351, 511, 470) then
begin
MMouse(x,y,5,5);
ClickMouse2(mouse_left);
wait(randomrange(600,1000));
ClickMouse2(mouse_left);
end;
end;
writeln('The competition has started! Wielding the Bronze arrows...');
end;
begin
FreeDTM(ClicktoContinueDTM);
FreeDTM(SureDTM);
end;
wait(randomrange(400,900));
end;

procedure Wield_Arrow;
begin
BronzeArrowDTM := DTMFromString('mggAAAHicY2NgYDjBxMBwCIj3AvFxID4LxNuBmImRgeE/AwT/BeJ/QCwAFHM2lgXjeE8dMK2nIsKQK8LLwA+Ux4YZcWAIAACNZgyT');
if FindDTM(BronzeArrowDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x,y,5,5);
ClickMouse2(mouse_left);
wait(randomrange(300,500));
end
else
begin
writeln('We did not see any Bronze arrows in your inventory! Checking your equipment...');
MMouse(675,184,10,10); //equipment
ClickMouse2(mouse_left);
wait(randomrange(50,300));
if FindDTM(BronzeArrowDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
P07_TabInventoryTab(4);
end;
end;
FreeDTM(BronzeArrowDTM);
end;

procedure Fire_Target;
begin
P07_MakeCameraAngleLow;
P07_MakeCompassDegree(randomrange(304,311));
writeln('Compass Angle set for:' + IntToStr(P07_GetCompassAngle));
wait(randomrange(300,500));
TargetDTM := DTMFromString('mlwAAAHicY2dgYPgDxD+B+B+U/Q2IGRghYvJArAvEekCsCcTKUGwIxM9vRzNs2tjDEJkizpAVZsMQnTWfYW2YP0N8rhEDF1AeF2bEg6EAAKUoEN4=');
TargetViewDTM := DTMFromString('m6wAAAHic42ZgYFgKxHuA+BoQvwFiJkYGBjEgLQrEnxgheBMQPwPi5UCx1UC8DIiXAPEKILYBYjtGBD0PSGsBMcP/mQwMZ/4DMZDd8Z8ByGLwdDBhCA4JhOP/q1yAoowMpABGEjASAAD3dhgy');
CloseDTM := DTMFromString('mFQEAAHic42VgYHjKyMDwCogfQjGIfQ+I3zJC5J5B2feQxDWB+lSgWA+KNRgg4kpAbAilYWwQZmBgxMAp4Y5gXJDoxhDiaQ6mYWwQZgWqIhVj2kIYowAAOJcV5Q==');
ScoreDTM := DTMFromString('mAAEAAHic42FgYPgPxB+AmJ+RgeEzkP4JxCyMEP5fIDsXSKcAsSgQ+wHxZCCeBKX7obgPShcAcTkQ1wJxDRDnADE+0ICEL+ydDaZJBYwkYmQAAC0aEME=');

if FindDTM(TargetDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
writeln('Firing at Target!');
MMouse(x,y,0,0);
wait(randomrange(400,900));
ClickMouse(x,y,mouse_left);
repeat
if FindDTM(TargetDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
//MMouse(x,y,5,5); uncomment this if you want to spam click all over the target rather then one spot
//ClickMouse2(mouse_left); and comment the clickmouse(x,y,mouse_left) below.
ClickMouse(x,y,mouse_left);
wait(randomrange(80,105));
end
else
if FindDTM(TargetViewDTM, a, b, MSX1, MSY1, MSX2, MSY2) then
begin
targetviewboxtimer := 0;
repeat
targetviewboxtimer := targetviewboxtimer + 1;
if(targetviewboxtimer > 50) then
begin
if FindDTM(CloseDTM, i, j, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(i,j,1,1);
ClickMouse2(mouse_left);
MMouse(x,y,5,5);
end;
end;
until(FindDTM(TargetDTM, x, y, MSX1, MSY1, MSX2, MSY2));
end;
until(FindDTM(ScoreDTM, x, y, 10, 351, 511, 470));
begin
if FindDTM(TargetDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x,y,5,5);
wait(randomrange(300,700));
ClickMouse2(mouse_left);
wait(randomrange(200,600));
end;
end;
end
else
begin
FreeDTM(TargetDTM);
writeln('Unable to find Target... Trying again...');
Fire_Target;
end;
competitionsplayedcount := competitionsplayedcount + 1;
writeln('Competitions Played:' + IntToStr(competitionsplayedcount) +'!');
FreeDTM(TargetDTM);
FreeDTM(CloseDTM);
FreeDTM(ScoreDTM);
FreeDTM(TargetViewDTM);
end;

begin
//SetupSRL;
P07_DeclarePlayer;
SetupP07Include;
ActivateClient;
ClearDebug;
Wait(1000);
If (Not P07_LoggedIn) then
begin
P07_LogInPlayer;
end;
repeat
Open_Inv_Tab;
Start_Comp;
Click_to_Continue;
Wield_Arrow;
Fire_Target;
until(competitionsplayedcount = 500);
begin
writeln('Number of Competitions completed!');
writeln('Logging out...');
MMouse(644,483,5,5);
ClickMouse2(mouse_left);
wait(randomrange(500,1500));
MMouse(633,378,5,5)
ClickMouse2(mouse_left);
end;
TerminateScript;
end.

Kevin

2013-04-03 14:17:07

Please post it in
 
tags.= for readability reasons (edit your previous post)

YoHoJo

2013-04-03 14:17:21

A // before a line means that it is commented out.
This means the script does not execute those lines.
You'll need to remove a // somewhere for it to use Smart 8.

'Helping' him over Skype, this is fun, he'll figure it out:p
[11:18:06 AM] AbuseFagex: ok so
[11:18:09 AM] AbuseFagex: i did remove the //
[11:18:13 AM] AbuseFagex: before the setpusrl
[11:18:19 AM] AbuseFagex: but it didnt pop open the window
[11:18:32 AM] Aakash [YoHoJo]: The code you posted still has //
[11:19:01 AM] AbuseFagex: do i remove ALL of the //
[11:19:19 AM] Aakash [YoHoJo]: Noooo
[11:19:23 AM] AbuseFagex: every dark blue line has them
[11:19:24 AM] Aakash [YoHoJo]: Just // before the lines you want executed
[11:19:44 AM] AbuseFagex: you see you have mistaken me for someone who knows what they are doing lol
[11:20:09 AM] Aakash [YoHoJo]: There is just one line you need to removed // from, the line that oepns smart
[11:20:14 AM] AbuseFagex: ive never scripted therefore i dont know which ones to remove, although i have removed the ones infront of the SetupSRL just to try it out
[11:20:29 AM] AbuseFagex: ohhhhhhh
[11:20:31 AM] AbuseFagex: ok
[11:20:34 AM] AbuseFagex: so the define smart8
[11:20:36 AM] AbuseFagex: but
[11:20:40 AM] AbuseFagex: what about setpupSRL?

maxxxed

2013-04-03 14:25:27

thanks a lot!

Sk1nyNerd

2013-04-03 17:32:22

hahaha, glad you finally got it:). i just updated some bug fixes maxxxed, try it out and let me know of any other problems. Thanks