Simba Code:
program New;
{$i srl/srl.scar}
var
RuneDagger, SteelMedHelm, GoldRing, x, y:integer;// Vars are now global vars, this is recommended to avoid problems
procedure EquipGear; //If you want it do do something, make it a procedure.
begin
RuneDagger := DTMFromString('mlwAAAHicY2dgYMhmhuACIM4C4lQgzgTiOCDuZWRgmAjEHUDcCcSTgXgKEC8GYjvvAKBuJhwYN2DEgZEAAI2+B+Q=');
SteelMedHelm := DTMFromString('mbQAAAHicY2VgYHBggmA/IHYFYjMgvg8Uvw7Ez4D4ExC/AOLstDQgyYSGMQEjFgwGACndBxM=');
GoldRing := DTMFromString('mbQAAAHicY2VgYNjOzMCwE4j3AfEWIF4PxP2MDAw9QDwdiGcD8UQg3rlAGqiaCQ1jAkYsGAwAoCIICg==');
if FindDTM(RuneDagger, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(x, y, 4, 4, true);
if FindDTM(SteelMedHelm, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(x, y, 4, 4, true);
if FindDTM(GoldRing, x, y, MSX1, MSY1, MSY2, MSX2) then
Mouse(x, y, 4, 4, true);//Don't add begin end if you only doing 1 action, your code would have done the following 10+ lines if the Gold Ring is in the bank in the above step because begin/end; wrap around everything in between them.
CloseWindow;//Since these are no longer arround begin/end; they are no longer conditional and that is important because you want these to happen 100% of the times I suppose
wait(1000 + random(400));
GameTab(tab_inv);
wait(2000 + random(1000));//Added a few spaces for standards and readability, there is a tutorial on standards on this site, might be worth your time to look at it sometime in the future
if FindDTM(RuneDagger, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 4, 4, true);//Note I removed the begins since they are only needed when doing more than 1 action.
if FindDTM(SteelMedHelm, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 4, 4, true);
if FindDTM(GoldRing, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 4, 4, true);
//result := true is no longer needed, only need something like this for functions
//Also since begins are gone, ends are not needed, leaving them in will return error
FreeDTM(RuneDagger);
FreeDTM(SteelMedHelm);
FreeDTM(GoldRing); // this is good you free the DTMs correctly =)
end; //End for the begining of the procedure
begin
setupSRL;
Wait(1000+random(2000));
EquipGear;
end.