PDA

View Full Version : Some basic rules for autoing on OSR



WT-Fakawi
03-05-2013, 01:35 PM
Here are some basic rules I recall from OSR:

Users:

1. Set your nickname. Use three letter from your name (not the first letter). These are used for screenname checking,
2. Have chatsoff. Always. Otherwise the script will alarm you whenever someone uses your screenname. With chatsoff, only randoms show up with yellow text.
3. Try to call FindTalk as much as you can: at least four times a second. This is vital! For that purpose I wrote FTWait (FindTalkWait), that replaces any wait and checks for the occurence of your yellow screenname (nickname).


Developers:

Check for randoms using five methods:
1. Nickname checking
2. Gametab visibility
3. Inventory checking
4. Red Bar/Health check
5. Skill related

1. Nickname checking. when a random adresses us, our nickname is displayed in yellow. You find the middle of the screentext, you rightclick it and read from the chooseoption the name of the random. From that point onwards you call the appropriate solvers.
2. Gametab configuration. The teleport randoms (molly, mordaut, mime, maze, leo, drill demon, bob, forester) have disabled tabs in different configs. the correct configs can be found in ye'olde SRL-4
3. Often the box is handed out so fast we can't spot the yellow text. Therefore a inventory check for lamp and box needs to be inside FNR.
4. Once we have missed a random, changes are it starts killing us (dwarf, evil chicken bwuk bwuk, security guard, etc). If we detect a red bar above our heads, we should immidiately switch to Gametab 2 and read our health status. It is vital to know which direction you can run to (RunTo(direction, Far)), wait 5 seconds and run back.
5. Skill related.
Mining: Gas!, pickhead and rockgolem (see 4) Gas is checked using wizzups Gaschecker. If detected, just click near your feet and wait for it to disappear. Pickhead is more difficult. Search for a nearby red minimap dot, hope it is your axehead, click on the nearest red dot, and pick up from underneath your feet and attach the handle to the head. Set global IsWielding!
Woodcutting: Evil Tree (the uptext "Tree" changes from white to yellow indicating an evil tree), Axehead.
Fishing: Whirlpool.

More?

General:


Make sure you check you materials once every so often. I recall bots running with broken picks, or pickaxe heads running back and forth mindlessly.
If anything is wrong.....get the hell out of there, log out as fast as you can, or you'll end up dead in lumby!

The Claw
03-06-2013, 09:37 AM
I guess most of the skill-specific and the randoms can just be straight ripped from the old SRL yea?

DannyRS
03-14-2013, 08:26 PM
WT-Fakawi

Most efficient / best way to do this?


function FTWait(WaitTime: Integer): Boolean;
var
_FTW_StartTime: Integer;
begin
_FTW_StartTime := GetSystemTime;
repeat
if FindTalk then Result := True;
Wait(50);
until ((GetSystemTime - _FTW_StartTime) > WaitTime);
end;


Ashaman88 I'm using the above ^ works great but I sometimes get you passed the wrong values into a finder function ( ys > ye ) it's coming from FindTalk, but I've no idea why, only seems to happen when I use it in such quick successions of each other like above, and rarely, once every 1500 calls maybe, any Ideas?

Works perfect BTW ;) great job

Ashaman88
03-15-2013, 11:59 PM
WT-Fakawi

Most efficient / best way to do this?


function FTWait(WaitTime: Integer): Boolean;
var
_FTW_StartTime: Integer;
begin
_FTW_StartTime := GetSystemTime;
repeat
if FindTalk then Result := True;
Wait(50);
until ((GetSystemTime - _FTW_StartTime) > WaitTime);
end;


Ashaman88 I'm using the above ^ works great but I sometimes get you passed the wrong values into a finder function ( ys > ye ) it's coming from FindTalk, but I've no idea why, only seems to happen when I use it in such quick successions of each other like above, and rarely, once every 1500 calls maybe, any Ideas?

Works perfect BTW ;) great job

Hmm I can take a look at why it might be doing that, did it happen to be while people were talking?

DannyRS
03-16-2013, 01:28 AM
Hmm I can take a look at why it might be doing that, did it happen to be while people were talking?

Wasn't paying much attention, but probably as I didn't bother toggling my chat off as I was alone, maybe something to do with lots of yellow in different places of the screen?

Doesn't effect it at all, just annoying debug spam :p, an if ys>ye exit or something would do just fine

Edit - I'll get a debug tomorrow, but the values were something like, 339, 337, those being ys and ye

cause
08-10-2013, 04:05 PM
WT-Fakawi

Most efficient / best way to do this?


function FTWait(WaitTime: Integer): Boolean;
var
_FTW_StartTime: Integer;
begin
_FTW_StartTime := GetSystemTime;
repeat
if FindTalk then Result := True;
Wait(50);
until ((GetSystemTime - _FTW_StartTime) > WaitTime);
end;


Ashaman88 I'm using the above ^ works great but I sometimes get you passed the wrong values into a finder function ( ys > ye ) it's coming from FindTalk, but I've no idea why, only seems to happen when I use it in such quick successions of each other like above, and rarely, once every 1500 calls maybe, any Ideas?

Works perfect BTW ;) great job

Bit of a grave dig but very handy bit of code...*protip to new scripters, write your script with waits and sleeps and use Edit->Replace Wait with FTWait or sleep with FTWait :)

DannyRS
08-13-2013, 08:39 PM
Bit of a grave dig but very handy bit of code...*protip to new scripters, write your script with waits and sleeps and use Edit->Replace Wait with FTWait or sleep with FTWait :)

I noticed a flaw tho, wait(50) means you'll always be intervals of 50, so if your pc can handle it wait(random(10)).

cause
08-14-2013, 05:43 PM
I noticed a flaw tho, wait(50) means you'll always be intervals of 50, so if your pc can handle it wait(random(10)).

Marginal difference, not noticeable IMO? Either way I can't use FTWait because it runs from combat (??) (or else something else was messing up, pretty sure it was randoms related) so I've made my own wait procedure.

DannyRS
08-15-2013, 09:07 PM
Marginal difference, not noticeable IMO? Either way I can't use FTWait because it runs from combat (??) (or else something else was messing up, pretty sure it was randoms related) so I've made my own wait procedure.


Either way I can't use FTWait because it runs from combat

You can disable that specifically if u want :),


Marginal difference, not noticeable IMO?

/TinFoilHat

cause
08-16-2013, 01:31 AM
You can disable that specifically if u want :),



/TinFoilHat
Ah hah! Well thank you kindly!