SRL Archive - Research & Development Lounge

How would I do the following in Simba?


injustice

2012-03-30 16:01:09

Hey guys, I've been attempting to code my first script (a Firemaker) for a while now. I've done everything except for the part in which you actually burn the logs.
I've got this so far:


procedure Burn;
var
I : Integer;

begin
if(not(LoggedIn)) then
Exit;
if (InvCount = 0) then
FindRandoms;
WalkToBank;
Antiban;
Minibreaker;
Proggy;
StatsGuise('Attempting to burn ' + (LogType) + 's');
for I := 1 to 28 do
begin
FindRandoms;
InvMouse(I, 0);
Wait(125 + Random(75));
if ChooseOption('ight') then
Wait(1000 + Random(250));
end;
end;


It would be very greatly appreciated if someone could give me an example of how to do this. I will try my best to modify it so it's not direct copy + paste, and of course you will be credited.

Thanks all!

Frement

2012-03-30 16:14:05

for I := 1 to 28 do begin
//Get the InvBox
//If log DTM found, right click.
//Use InvBox x1 y1 x2 y2 coordinates for the DTM finding.
if ChooseOption('ight') then begin
//Wait here
end;
end;

Like that.

injustice

2012-03-30 16:17:09

From: Frement
for I := 1 to 28 do begin
//Get the InvBox
//If log DTM found, right click.
//Use InvBox x1 y1 x2 y2 coordinates for the DTM finding.
if ChooseOption('ight') then begin
//Wait here
end;
end;

Like that.


Thanks, and could you please also show me how to do it with ACA and TPAs? I would like to have more than one method for each procedure as a failsafe.

Thanks!

Frement

2012-03-30 16:22:58

From: injustice
Thanks, and could you please also show me how to do it with ACA and TPAs? I would like to have more than one method for each procedure as a failsafe.

Thanks!


Use search to find the instructions for specific methods of object detection, bitmap mask / DTM is enough thought. Its just for inventory, MS object detection would need more advanced detection. There is a tutorial for everything ;)

injustice

2012-03-30 16:25:15

From: Frement
Use search to find the instructions for specific methods of object detection, bitmap mask / DTM is enough thought. Its just for inventory, MS object detection would need more advanced detection. There is a tutorial for everything ;)


Okay, it's just that whenever I search something it normally comes up with random results :D

Frement

2012-03-30 16:26:11

From: injustice
Okay, it's just that whenever I search something it normally comes up with random results :D


Set the searches sub-forum to Tutorial Island (If it still has that name).

injustice

2012-03-30 16:30:50

From: Frement
Set the searches sub-forum to Tutorial Island (If it still has that name).


Ah okay, thanks; I'd never thought of that :D

Abu

2012-03-30 16:31:34

This is a great thread I read through just today.

Hopefully it's not too advanced :p

http://villavu.com/forum/showthread.php?t=35504

Joe

2012-03-30 19:15:39

From: Frement
Set the searches sub-forum to Tutorial Island (If it still has that name).


I find that switching the search setting to titles only works better. If I get too many random results then I switch to specified thread field

DemiseScythe

2012-03-30 19:57:18

Tbh use DTMs n a tinderbox, then use tinderbox on logs and wait until no log dtm found

injustice

2012-03-31 09:11:20

From: DemiseScythe
Tbh use DTMs n a tinderbox, then use tinderbox on logs and wait until no log dtm found


I'm going to do this first, then as I get more experienced I'll add ACA and TPointArray finding.

Thanks everyone though!

DemiseScythe

2012-03-31 09:51:58

From: injustice
I'm going to do this first, then as I get more experienced I'll add ACA and TPointArray finding.

Thanks everyone though!


DTMs is just as advanced, umm try something like this for the wait


I := InvCount;
Light Log;
repeat
Wait(150 + Random(50));
until (InvCount = (I - 1) or (not(LoggedIn));

Ofc might need 1 more failsafe with something like Inc(F) inside that repeat loop in case the Light Log function fails but you going to have to figure how to add that one on your own =)