Just a mock up of stuff to check and a function to toggle whether the Money pouch should be open or closed.
Simba Code:
Function PouchEmpty : Boolean;
Begin
Result := CountColor(65535, 494, 93, 503, 103) = 14;
End;
Function PouchOpen : Boolean;
Begin
Result := CountColor(65535, 482, 93, 505, 104) > 0;
End;
Function TogglePouch(Open : Boolean) : Boolean;
Var
i : Integer;
Begin
For i := 0 to 5 do
Begin
if (PouchOpen) and (Open) then
Exit;
if (Not PouchOpen) XOR (Not Open) then
Begin
MouseBox(523, 92, 537, 105, 2);
ChooseOption('oggle');
WaitFunc(@PouchOpen, 250, 2500);
If PouchOpen then
Begin
Result := True;
Exit;
End;
End;
Result := False;
End;
End;