SRL Archive - First Scripts

gold ore superheater


justleveling

2012-01-17 14:44:49

rubbish

Shuttleu

2012-01-17 14:51:01

i will look in more detail in a min, but here is a couple of bits i noticed
    MMouse(X, Y, 3, 3)
WaitUpText('se', 1000);
IF IsUpText('se') THEN
Mouse(X, Y, 0, 0, TRUE);
Wait(1500+Random(300));

if it doesnt find the uptext then it will not run Mouse, but it will run everything else

you can replace IsUpText with just WaitUpText

you have incorrect standards (look in my siggy for a tutorial on standards)

and please post your script in simba tags

~shut

justleveling

2012-01-17 14:54:35

thanks, ill fix up everything and edit my post :)

e/ i fixed it up a little more

Shuttleu

2012-01-17 15:02:09

after fixing up your standards i have noticed some more stuff

on the case, you have a begin/end for each option, but if the option only have one function/procedue to run then you dont need a begin/end

i also see some FindDTM's where you dont check if it actually found the DTM

you dont seem to have used failsafes

~shut

EDIT: on this bit
      MMouse(X, Y, 7,7);
Wait(100+Random(50));
WaitUpText('old', 1000);
Mouse(X, Y, 0, 0, FALSE);
WaitOption('All', 500);

you dont check if it is actually hovering over the item

also, you first move to x, y with 7 randomness, but a little bit down you move to the exact location

you could do something like this
MMouse(x, y, 7, 7);         //moves the mouse
GetMousePos(x, y); //gets the mouse position
Mouse(x, y, 0, 0, False); //doesnt move the mouse because x, y was set to its current location on the line above

justleveling

2012-01-17 15:19:35

fixed up some failsafes, added GetMousePos(X, Y); and updates first post.
i still need to work on the spacing (standards)

Poofhead

2012-01-30 22:05:21

I am getting:
failed to find gold bars in inv, (username) is now inactive.
NextPlayer(False)
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active…
All players not active!
Successfully executed.
The following DTMs were not freed: [2]

I have my gold ore in the first slot of the main tab but it just opens the bank then logs out.