SRL Archive - Scripting Help

Withdrawing of Items Broken?


DylanHolmes

2013-06-11 22:52:07

My code is this:
Procedure WithdrawEssence;
var
x, y, essence: Integer;
Begin
essence := DTMFromString('mwQAAAHic42RgYIgD4gAgDgTiMCBOAOIMIM6B4kwg9gdiTyAOAuJIII4G4gioPi8gdgXi2tJSIMmIF3MxEAb4TYBgOAAAebwHvw==');
FindDTM(essence, x, y, MSX1, MSY1, MSX2, MSY2);
MMouse(x, y, 0, 0);
Mouse(x, y, 0, 0, false);
ChooseOption('Withdraw All');
FreeDTM(essence);
End;
It finds the essence, right clicks it, but then doesn't select an option any help here?

Flight

2013-06-11 23:48:51

Try this bud:

Procedure WithdrawEssence;
var
x, y, essence: Integer;
Begin
essence := DTMFromString('mwQAAAHic42RgYIgD4gAgDgTiMCBOAOIMIM6B4kwg9gdiTyAOAuJIII4G4gioPi8gdgXi2tJSIMmIF3MxEAb4TYBgOAAAebwHvw==');
if FindDTM(essence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
ClickMouse2(mouse_right);
waitOptionMulti(['w A','All'], 200);
end else
Writeln('Failed to find essence DTM');
FreeDTM(essence);
End;

DylanHolmes

2013-06-12 00:00:35

From: Flight
Try this bud:

Procedure WithdrawEssence;
var
x, y, essence: Integer;
Begin
essence := DTMFromString('mwQAAAHic42RgYIgD4gAgDgTiMCBOAOIMIM6B4kwg9gdiTyAOAuJIII4G4gioPi8gdgXi2tJSIMmIF3MxEAb4TYBgOAAAebwHvw==');
if FindDTM(essence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
ClickMouse2(mouse_right);
waitOptionMulti(['w A','All'], 200);
end else
Writeln('Failed to find essence DTM');
FreeDTM(essence);
End;

Alright, I put that in. Same result. It right clicks the item, but then doesn't select the option.

DylanHolmes

2013-06-12 00:10:15

Change the code to this:
Procedure WithdrawEssence;
var
x, y, essence: Integer;
Begin
essence := DTMFromString('mwQAAAHic42RgYIgD4gAgDgTiMCBOAOIMIM6B4kwg9gdiTyAOAuJIII4G4gioPi8gdgXi2tJSIMmIF3MxEAb4TYBgOAAAebwHvw==');
if FindDTM(essence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
Mouse(x, y, 0, 0, false);
wait(200);
P07_ChooseOptionMulti(['w A','All']);
end else
Writeln('Failed to find essence DTM');
FreeDTM(essence);
End;
And it works now. Thanks for the help! Can I PM you if I need further help?

DylanHolmes

2013-06-12 00:15:40

From: Flight
Try this bud:

Procedure WithdrawEssence;
var
x, y, essence: Integer;
Begin
essence := DTMFromString('mwQAAAHic42RgYIgD4gAgDgTiMCBOAOIMIM6B4kwg9gdiTyAOAuJIII4G4gioPi8gdgXi2tJSIMmIF3MxEAb4TYBgOAAAebwHvw==');
if FindDTM(essence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
ClickMouse2(mouse_right);
waitOptionMulti(['w A','All'], 200);
end else
Writeln('Failed to find essence DTM');
FreeDTM(essence);
End;

Also, let's say I want to Open a chest with multi option, where do I find all the string array codes relating to options?