SRL Archive - First Scripts

a little bit of help at the gilded altar


TheSmit1967

2008-12-02 20:37:58

just got scar et al today as i was getting annoyed at mis-clicks at the gilded altar..

this is what i`ve put together to help me out.. its long-winded and not optimised at all but it does exactly what i want. before you ask…. I didnt want it to loop as I wanted the slots to be used in the order i normally do them in real life and i wanted control over the random delays too :)


{.Script Info:
# ScriptName = praying at gilded altar
# Author = TheSmit1967
# Description = start with mouse over the altar
# Version =
# Date =
# Comments = will use all bones on altar then take more from familiar (tortoise) and use them too (leaves the top 4 inventory spaces as i bring house tabs marrentils and a tinderbox)
# MoreComments = didnt want this to do anything more as it was just meant to help out with the clicking.
/Script Info}
program FirstScript;
{.include SRL/SRL.scar}
var myx,myy: integer;

Procedure AnExampleProcedure;
begin
SetRun(True);
getMousePos(myx,myy);

Wait(55 + random(55));
GameTab(4);

MouseItem(5,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(9,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(13,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(17,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(21,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(25,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(6,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(10,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(14,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(18,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(22,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(26,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(7,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(11,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(15,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(19,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(23,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(27,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(24,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(28,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));
///////////////////////////////////////////////////////////////////
mouse(540,480,10,10,true);
mouse(640,440,10,10,true);

///////////////////////////////////////////////////////////////////
MouseItem(1,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(5,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));


MouseItem(9,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(13,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(17,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(21,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(2,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(6,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(10,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(14,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(18,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(22,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));


MouseItem(7,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(11,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(15,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(19,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(23,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(8,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(12,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(16,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(20,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));

MouseItem(24,false);
Wait(55 + random(55));
ChooseOption('Use');
Wait(55 + random(55));
mouse(myx,myy,30,20,true);
Wait(55 + random(55));



end;

begin
SetupSRL;
AnExampleProcedure;
end.


thanks sandstorm ….

and by the way, this could be made really tiny if you wanted to use the bones in order 4 to 28 .. but i prefer it like this … less obvious too? hehe

Sandstorm

2008-12-02 20:40:15

SCAR codes!
 
- no spaces! I'll take a look at it in a bit :).

benjaa

2008-12-07 17:41:24

EDIT:
program FirstScript;
{.include SRL/SRL.scar}
var
myx,myy: integer;

Procedure AnExampleProcedure;
var
Slot : array of integer;
i : integer;
begin
SetRun(True);
GetMousePos(myx,myy);

Wait(55 + random(55));
GameTab(4);

Slot := [5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 7, 11, 15, 19, 23, 27, 24, 28];
for i:=0 to GetArrayLength(Slot) do
begin
MouseItem(Slot[i], false);
Wait(55 + Random(70));
ChooseOption('Use');
Wait(55 + Random(70));
Mouse(myx, myy, 30, 20, true);
Wait(55 + Random(70));
end;
end;

begin
SetupSRL;
ActivateClient;
AnExampleProcedure;
end.

That condenses it a little - myx, and myy isn't a good idea for an independant script though :p

Also, i had no idea what this meant -
///////////////////////////////////////////////////////////////////
mouse(540,480,10,10,true);
mouse(640,440,10,10,true);

///////////////////////////////////////////////////////////////////
So I left it out, Hope it helped