mangolee
2013-04-15 00:26:37
Hi, I have been having a lot of issues with Simba and now i'm at my wits end.
Code;
Having issues like;
1. If statements not working in the same Procedure/Function. (Worked around this by pasting into a separate Function/Procedure and calling.)
2.
Error at line 57 (BOLD);
Also the script will compile without error but when I try to run it will halt with this error. All help will be appreciated, don't worry if you're stumped this does not look like normal behavior. PLEASE :D :redface: ALSO, SORRY ABOUT THE ATROCIOUS LAYOUT, I UNDERSTAND ITS VERY VERY MESSY, PLEASE DON'T SALT THE WOUND LOLOL
Code;
program PowerMiner;
//{$DEFINE SMART8}
{$i SRL\SRL.simba}
{$i sps/sps.simba}
//{$i SRL\SRL\Misc\paintsmart.simba}
{$i P07Include.simba}
Const
SRLStats_Username = 'bonestriper2';
SRLStats_Password = '';
BreakEvery = 120;
BreakFor = 5;
NumbOfPlayers = 1;
StartPlayer = 0;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(1) Of
0:Begin WAIT(1) End;
1:Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); PickUpMouse; End;
2:Begin P07_TabInventoryTab(4); End;
3:Begin RandomAngle(SRL_ANGLE_HIGH); SetAngle(SRL_ANGLE_HIGH); End;
4:Begin Wait(1) End;
5:Begin P07_HoverSkill('random',RandomRange(2500,3500)); P07_TabInventoryTab(4); End;
End;
End;
Var
X,Y,OreTime,Slot,SlotPlus,OreDat,I: Integer;
LogPattern:TIntegerArray;
SlotBox:Tbox;
Procedure Drop;
Begin
If FindDTM(OreDat, X, Y, Slotbox.X1,SlotBox.Y1,SlotBox.X2,SlotBox.Y2) then
WriteLn('lolol') Else
writeLn('Polo');
End;
Procedure DropOre;
Begin
OreDat := DTMFromString('mAAEAAHic42FgYBAEYnEglgdiUSBmB2JOIOYFYikgloXKg/gMUFoMqoYRql4YiKWh+lmBmAmqlh+I7ZQloCqJw/8ZSAPEmwzByAAA7yYC/Q==');
LogPattern := [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27];
For I:=1 to 27 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
//Drop;
Begin
MouseItem(LogPattern[I],0);
ChooseOption('Drop');
End;
End;
End;
Procedure Ore;
Begin
If FindObjCustom(X, Y, ['mine', 'rocks'], [2174545, 1450298], 4) Then
End;
Procedure ClickRock;
Begin
Slot:= SlotPlus;
X:=MSCX;
Y:=MSCY;
MouseSpeed:= 12;
Ore();
Mouse(X ,Y ,10 ,5 ,True);
MarkTime(OreTime);
SlotPlus:= Slot + 1;
WriteLn(Slot);
Wait(10000);
End;
Begin
SetupSRL;
DeclarePlayers;
ActivateClient;
//Repeat
//ClickRock;
//Antiban;
//Until(Slot > 25);
FreeDTM(OreDat);
Drop;
//Ore;
//DropOre;
//Wait(12000);
End.Having issues like;
1. If statements not working in the same Procedure/Function. (Worked around this by pasting into a separate Function/Procedure and calling.)
2.
Error at line 57 (BOLD);
Error: Exception: The given DTM Index[0] doesn't exist at line 57
[B]If FindObjCustom(X, Y, ['mine', 'rocks'], [2174545, 1450298], 4) Then [/B]Also the script will compile without error but when I try to run it will halt with this error. All help will be appreciated, don't worry if you're stumped this does not look like normal behavior. PLEASE :D :redface: ALSO, SORRY ABOUT THE ATROCIOUS LAYOUT, I UNDERSTAND ITS VERY VERY MESSY, PLEASE DON'T SALT THE WOUND LOLOL