Log in

View Full Version : Proggy Help



mightyz
04-11-2012, 01:09 AM
Hello there, i did look at multiple proggy tutorials but they didn't have what i was looking for.

i know how to make a proggy but my issue is when ever it completes a load or
(invfull) it is suppose to drop all the ore as well as begin the proggy but it doesn't so im not sure what i did wrong

program MightysPowerMiner;
{$DEFINE SMART}
{$i srl/srl.simba}
//////////////Srl Stats Setup \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True;
NumbOfPlayers = 1;
StartPlayer = 0;
////////////////////////////////////////////////////////////////////////
var
TotalExp, IronMined: Integer;

////////////////////////Player Setup\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username;
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := '';// Leave blank if player doesn't have a bank pin
end;
end;
//////////////////////////////////////////////////////////////////////////////
////////////////////////DONT TOUCH BELOW THIS/////////////////////////////////
//////////////////////////////////////////////////////////////////////////////


//progress report
procedure IronMinedX;

Begin
If InvFull Then
IncEx(IronMined,28)
End;
//progress report Thanks to gucci, didn't know how to make one
Procedure Report;

Begin
If (InvFull) Then
Begin
TotalExp := (IronMined*35);

Writeln('////////// Mighty Report \\\\\\\\\\');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Ore Mined : ' + IntToStr(IronMined));
Writeln('|= Ore Dropped : ' + IntToStr(IronMined));
Writeln('|= Xp Gained : ' + IntToStr(TotalExp));
Writeln('////////// Mighty Report \\\\\\\\\\');
End;
End;







//Anti Ban
procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(150) of
0: RandomRClick;
1: PickUpMouse;
2: RandomMovement;
3: BoredHuman;
4: ExamineInv;
5:
Begin
GameTab(Tab_Stats);
HoverSkill('Mining', False);
Wait(2000 + Random(1000));
End;
end;
end;
end;
// Failsafe
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc := Reason;
Logout;
Stats_Commit;
TerminateScript;
End;
// mine iron
Function MineIron:Boolean;
var
x, y: Integer;
Begin
FindNormalRandoms;
If FindObjTPAMulti(x, y, [3294064, 3623291], 11, 1, 5, 10, 15, ['ine', 'ron'])Then

Begin
Case Random(2) Of
0: Mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
WaitOption('ron', 500);
end;
end;
Wait(3000+random(400));
result:= true;
end else result:= false;
end;

// Drop Iron
procedure DropIron;
var
Ix, Iy, IronDTM, I: Integer;
SlotBox:Tbox;
IronPattern: TIntegerArray;


Begin
FindNormalRandoms;
IronDTM := DTMFromString('mKgEAAHic42NgYBAEYkYgZgdiLiDmA2IRIJ YCYjkglgViaSAWBWJ+IOZkgAAQmweqDwZA5rAAMRtUThCqD6Yf xLdSApnMRAYmDzCSiVEBAOKrAi8=');
IronPattern := [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];

For I := 0 to 27 do
begin
FindNormalRandoms;
Slotbox := InvBox(IronPattern[I]);
If FindDTM(IronDTM, Ix, Iy, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(IronPattern[I],MOUSE_RIGHT);
ChooseOption('Dro');
End;
End;
End;







begin

Smart_Server := 69;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
ClearDebug;
DeclarePlayers;
LoginPlayer;
Repeat
MineIron;
If (InvFull) Then
DropIron;
Report;
Until(False);
Antiban;
end.

bolshak25
04-11-2012, 01:30 AM
If (InvFull) Then
begin
DropIron;
Report;
end;

mightyz
04-11-2012, 01:32 AM
yeah was just about to update it, i put that in and it still does nothing

Frement
04-11-2012, 01:38 AM
Thats because you drop before you report, meaning your report procedure will always exit before outputting. Call Report procedure before dropping :)

This happens because you check for InvFull in your Report procedure.

mightyz
04-11-2012, 01:45 AM
awesome, that worked thanks.

bolshak25
04-11-2012, 02:06 AM
you never call ironminedx. you should call that before the proggy or in the proggy, and remove the if invfull on that one if you call it within your proggy

mightyz
04-11-2012, 03:08 AM
ok so i need a bit more help. after that worked i realized that it wasn't
counting the iron ore dropped or mined so i followed a tutorial on how to make a good proggy hoping that would fix the problem, the same issue is happening
the thing is im not sure where to put the functions like IncEx and Inc if you see below this is as far as i've gotten and now im just jumbled.

program MightysPowerMiner;
{$DEFINE SMART}
{$i srl/srl.simba}
//////////////Srl Stats Setup \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True;
NumbOfPlayers = 1;
StartPlayer = 0;
////////////////////////////////////////////////////////////////////////
var
XPGain, LoadsDone, TimeGone, IronMined: Integer;
XPPerHour, LoadsPerHour, IronPerHour, CurrentXP, OriginalXP: Integer;

////////////////////////Player Setup\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username;
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := '';// Leave blank if player doesn't have a bank pin
end;
end;
//////////////////////////////////////////////////////////////////////////////
////////////////////////DONT TOUCH BELOW THIS/////////////////////////////////
//////////////////////////////////////////////////////////////////////////////


procedure IronCount;
begin
IncEx(IronMined, 28)
end;

procedure LoadsCompleted;
begin
Inc(LoadsDone);
end;






//Progress Report
procedure Report;
Begin
ClearDebug;
TimeGone := (Getsystemtime/1000);
CurrentXP := GetXPBar(1);
XPGain := (CurrentXP - OriginalXP);
XPPerhour := (3600*(35))/((TimeGone));
LoadsPerhour := (3600*(LoadsDone))/((TimeGone));
IronPerHour := (3600*(IronMined))/((TimeGone));
Begin
Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=');
Writeln('=-=-=-=-=-=-= Mightys Power Miner =-=-=-=-=-=-=-=-=-=');
Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=');
Writeln('');
Writeln('=-=-=-=-=-=-= Progress for: ' + Players[0].Nick + ' =-=-=-=-=-=-=-=');
Writeln('=-=-=-=-=-=-= Worked For: ' + TimeRunning);
Writeln('=-=-=-=-=-=-= Xp Gained: ' + IntToStr(XPGain) + ' Thats ' + IntToStr(XPPerHour) + ' XP per hour');
Writeln('=-=-=-=-=-=-= Loads Done: ' + IntToStr(LoadsDone) + ' Thats ' + IntToStr(LoadsPerHour) + ' Loads per hour');
Writeln('=-=-=-=-=-=-= Iron Mined: ' + IntToStr(IronMined) + ' Thats ' + IntToStr(IronPerHour) + ' Iron per hour ');
End;
End;







//Anti Ban
procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
0: RandomRClick;
1: PickUpMouse;
2: RandomMovement;
3: BoredHuman;
4: ExamineInv;
5:
Begin
GameTab(Tab_Stats);
HoverSkill('Mining', False);
Wait(2000 + Random(1000));
End;
end;
end;
end;
// Failsafe
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc := Reason;
Logout;
Stats_Commit;
TerminateScript;
End;
// mine iron
Function MineIron:Boolean;
var
x, y: Integer;
Begin
FindNormalRandoms;
If FindObjTPAMulti(x, y, [3294064, 3623291], 11, 1, 5, 10, 15, ['ine', 'ron'])Then

Begin
Case Random(2) Of
0: Mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
WaitOption('ron', 500);
end;
end;
Wait(3000+random(400));
result:= true;
end else result:= false;
end;

// Drop Iron
procedure DropIron;
var
Ix, Iy, IronDTM, I: Integer;
SlotBox:Tbox;
IronPattern: TIntegerArray;


Begin
FindNormalRandoms;
IronDTM := DTMFromString('mKgEAAHic42NgYBAEYkYgZgdiLiDmA2IRIJ YCYjkglgViaSAWBWJ+IOZkgAAQmweqDwZA5rAAMRtUThCqD6Yf xLdSApnMRAYmDzCSiVEBAOKrAi8=');
IronPattern := [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];

For I := 0 to 27 do
begin
FindNormalRandoms;
Slotbox := InvBox(IronPattern[I]);
If FindDTM(IronDTM, Ix, Iy, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(IronPattern[I],MOUSE_RIGHT);
ChooseOption('Dro');
End;
End;
End;







///////////=-=-=-=-=-=-=-=-=-= Main Loop =-=-=-=-=-=-=-=-=-=-=\\\\\\\\\\\\\\\
begin

Smart_Server := 69;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
DeclarePlayers;
LoginPlayer;
ActivateClient;

Repeat
MineIron;
If (InvFull) Then
Begin
Report;
DropIron;
Antiban;
End;
Until(False) or (Not LoggedIn);

end.

Total
04-11-2012, 03:14 AM
You could put it in your main loop.


Repeat
MineIron;
If (InvFull) Then
Begin
IronCount;
LoadsCompleted;
Report;
DropIron;
Antiban;
End;
Until(False) or (Not LoggedIn);


That way every time your inventory is full it will increment it.

Another way you could do it is add it in your Report procedure before it does the Writeln. However you want to do it.