shiningwhite
2012-05-17 10:09:49
this is meant to be embedded into a fighter eventually, but this is what I have so far:
This is my updated code. One problem is that no matter how many times I redo the DTM's, it always overlooks 1 dose pots in favor of 4 doses. Is there an easy fix for this?
program New;
{$DEFINE SMART}
{$i srl/srl.simba}
Const
StrToPot = 27; //Enter Str level at which to pot
Potdownlog = True;
Sworld= 7;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure PotUp;
var potone, pottwo, potthree, potfour, x, y: integer;
begin
if StrToPot > 0 then
begin;
potone := DTMFromString('mbQAAAHicY2VgYGADYh4gZgdiXgYIEILS4kDMBcTcQLx1Sx2QZELDmIARCwYDAJ/KAl4=');
pottwo := DTMFromString('mbQAAAHicY2VgYGADYh4gZgdiXgYIEILS4kDMBcTcQLx1Sx2QZELDmIARCwYDAJ/KAl4=');
potthree := DTMFromString('mrAAAAHic42BgYOACYhYGCGAGYh4gFgZiISDmg4oxQ9UJALEgEPMCMQdUz+o15UCSCQ/GDxgJYBgAABXNAoM=');
potfour := DTMFromstring('mwQAAAHic42RgYOAEYl4gFgRiASBmZ0AAViBmhooxQdWC1AgBMT8Qc0HVsQDxlk0WUFW4MRMDYcBIBIYDACfXAlo=');
if GetSkillInfo('Strength', True) < (StrToPot+1) then
begin
writeln('Potting UP!');
if ExistsItemDTM(potone, x, y) then
begin
writeln('...Found 1dose POT!');
wait (500+random(500));
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(pottwo, x, y) then
begin
writeln('...Found 2dose POT!');
wait (500+random(500));
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(potthree, x, y) then
begin
writeln('...Found 3dose POT!');
wait (500+random(500));
mouse(x, y, 2, 2, true);
end else
if ExistsItemDTM(potfour, x, y) then
begin
writeln('...Found 4dose POT!');
wait (500+random(500));
mouse(x, y, 2, 2, true);
end else
begin
writeln('no pots!')
if Potdownlog = True then
begin
writeln('LOGGING OUT!');
logout;
TerminateScript;
end;
end;
end else
begin
wait(20000+random(5000));
end;
freedtm(Potone);
freedtm(Pottwo);
freedtm(Potthree);
freedtm(Potfour);
end;
end;
begin
Smart_Server := SWorld;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetUpSRL;
ActivateClient;
ClearDebug;
DeclarePlayers;
LoginPlayer;
wait(5000 +random(600));
while(true) do
begin
PotUp;
end;
end.
This is my updated code. One problem is that no matter how many times I redo the DTM's, it always overlooks 1 dose pots in favor of 4 doses. Is there an easy fix for this?