View Full Version : Error =\
gaetano
12-22-2011, 02:31 AM
program SecretForNow;
{$DEFINE SMART}
{$i SRL\SRL.scar}
procedure SetupChar;
begin
SetAngle(True);
MakeCompass('N');
Retaliate(True);
end;
procedure WalkToPad;
Begin
If Not LoggedIn then Exit;
if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 990) then
Begin
MoveMouse(651, 37);
Mouse(651, 37, 1, 1, True);
End;
End;
Begin
Smart_Server:=35;
SetupSRL;
Repeat
WalkToPad;
Until (false)
End.
I keep on getting this error with this script
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
YoHoJo
12-22-2011, 02:36 AM
Thats not the error, that just happens any time you stop a script prematurely/script stops itself.
What else is in the debug?
gaetano
12-22-2011, 02:37 AM
Compiled successfully in 593 ms.
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 35, Members: False, Signed: False, Super Detail: False.
Error: Out Of Range at line 21
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
This
Brandon
12-22-2011, 02:42 AM
Out of range because you didn't Declare Players yet.
You need this procedure before anything else:
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Runecrafting';
Active := True;
end;
end;
gaetano
12-22-2011, 02:45 AM
Thanks, but I still get the same error
Griff
12-22-2011, 02:55 AM
Thanks, but I still get the same error
Did you call DeclarePlayers in the main loop?
gaetano
12-22-2011, 02:59 AM
Can you teach me how to do that?
YoHoJo
12-22-2011, 03:01 AM
Show us entire script you are using please.
Basically after SetupSRL; call your declare players procedure!
Griff
12-22-2011, 03:02 AM
Right under where you have SetUpSRL, just put DeclarePlayers, so it will look like this:
SetUpSRL;
DeclarePlayers;
Edit: YoHoJo you speedy ninja!
gaetano
12-22-2011, 03:04 AM
program SecretForNow;
{$DEFINE SMART}
{$i SRL\SRL.scar}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Runecrafting';
Active := True;
end;
end;
procedure SetupChar;
begin
SetAngle(True);
MakeCompass('N');
Retaliate(True);
end;
procedure WalkToPad;
Begin
if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 154) then
Players[CurrentPlayer].Level[SKILL_HITPOINTS] := Max(1, GetSkillInfo('hitpoints', False));
Begin
MoveMouse(651, 37);
Mouse(651, 37, 1, 1, True);
End;
End;
Begin
Smart_Server:=35;
SetupSRL;
Repeat
WalkToPad;
Until (false)
End.
THis is the entire script. Its a simple AFK'er (Secret) will release once 100% ready
YoHoJo
12-22-2011, 03:05 AM
After setupSRL put DeclarePlayers
You never called DeclarePlayers yet!
Griff
12-22-2011, 03:07 AM
First, check Shuttleu's guide (http://villavu.com/forum/showthread.php?t=60288) for help on fixing your standards.
Next, Make sure you have DeclarePlayers called in the main loop of your scri[t, followed by LoginPlayer. That should fix the problems you're having now, but post if you need anything else :)
gaetano
12-22-2011, 03:07 AM
Ok, the script works (kinda) now, the only problem i have now is I try to set the string to run to my co-ords if hp is under ____ The problem is that it is just running even if my hitpoints are over the string, if you get what I mean
Set it to
if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 333) then
Players[CurrentPlayer].Level[SKILL_HITPOINTS] := Max(333, GetSkillInfo('hitpoints', False));
Begin
MoveMouse(651, 37);
Mouse(651, 37, 1, 1, True);
It will run if it is at 940 hp (My max hp as of now)
Griff
12-22-2011, 03:10 AM
You need to put brackets after everything after your then statement, or move your begin.
gaetano
12-22-2011, 03:11 AM
Do you mind showing me? I don't seem to get it.
Griff
12-22-2011, 03:13 AM
if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 333) then
begin
Players[CurrentPlayer].Level[SKILL_HITPOINTS] := Max(333, GetSkillInfo('hitpoints', False));
MoveMouse(651, 37);
Mouse(651, 37, 1, 1, True);
end;
You could even take out that third line there, unless you need it for later.
gaetano
12-22-2011, 03:19 AM
Im sorry for being trouble but :P
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.
Griff
12-22-2011, 03:28 AM
Do you have a "." after your end of the main loop?
gaetano
12-22-2011, 03:29 AM
Ahh got it to work! thanks guys!
Time to test this method now :P
Griff
12-22-2011, 03:30 AM
No problemo ;)
gaetano
12-22-2011, 03:40 AM
And It stops after one run. How would I be able to Main loop ?
procedure WalkToPad;
Begin
if (Players[CurrentPlayer].Level[SKILL_HITPOINTS] < 500) then
begin
Players[CurrentPlayer].Level[SKILL_HITPOINTS] := Max(500, GetSkillInfo('hitpoints', False));
MoveMouse(651, 37);
Mouse(651, 37, 1, 1, True);
Griff
12-22-2011, 03:45 AM
Don't you already have a repeat in your main loop? I wouldn't recommend until false, maybe just like until(100) or something. Also, your MoveMouse line isn't really needed, because Mouse moves it anyways. And I'd recommend trying to take out those Mouse procedures, and learn some object finding, although I'm not sure what your script does so I can't help too much there.
gaetano
12-22-2011, 03:54 AM
Instead of the junk I had
I made this instead
procedure WalkToPad;
Begin
if (HPPercent < 550) then
begin
Mouse(651, 37, 1, 1, True);
End;
End;
But how can I make it from clicking the co-ords even if it is above 550?
Griff
12-22-2011, 04:35 AM
If you want it to click the co ord every time then just take out your if.. Then statement.
gaetano
12-27-2011, 12:35 AM
Still needing help with this, even though I have full hp it just keeps on clicking the co-ords.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.