SRL Archive - RS3 Outdated / Broken Scripts

Mahogany Table Maker


eska

2012-03-13 23:59:16

I no longer support this script. It might, and probably does not work or even compiles due to changes to SRL includes. Feel free to use the code if you want to.



Super easy AntiLeech:
After someone warned me that there was a small compilation error, I noticed that I had made a tiny mistake. Instead of re uploading it without the error, I decided to leave it there as antileech.
It is insanely easy to fix. I'm not even sure I could call this anti leech. You need 1 mouse click and 1 key press to fix it.

Current problem: None!
  • The script won't click "Make Mahogany Table".
    • If this happen to you, make sure the upText (top left corner of your screen) aim at the green grass like in my screenshot shows.

  • I get interupted by the butler and it reduce the XP/hour.
    • I added a constant WAIT_FOR_BUTLER that fix this problem. Instructions on how to use this are in the script.

Note: Please keep in mind that I created this script to achieve 99 construction during the bonus XP weekend. Got 99 construction! There is randomisation everywhere but there is NO antiban other than radomisation, since it hurts the XP rate badly and mess up the timing. You should always babySit this script. I now feel that this script is much more solid than when I first released it. Just make sure it work good for the first 5 minute and if everything is perfect check it every 30 min or so.

At 52 construction, you unlock the ability to build mahogany table, one of the fastest construction training methods.

Credit:
  • Ashaman88's for letting me use and edit his FindButler function.
  • YoHoJo for his mousekey simulation technique I saw in his tutorial.
  • ProphesyOfWolf for his awesome tutorial about TPA & ColorToleranceSpeed(2) Modifiers.
Requirement:
  • 52 construction.
  • A dinning room.
  • A lot of money to blow on construction (Around 15 GP per XP, half that if bonus xp weekend)
  • Mahogany PLANKS, not logs.
  • A DEMON butler. The normal one wont work.

Feature:
  • Around 430k XP/hour Over
  • A simple on screen progress report.
  • Simulated mousekeys.
  • Near perfect timing for maximum XP.
  • Lag setting - If you have low fps, you can set the lag factor higher and the script should still work! (Less xp/hour though)
  • Demon butler
  • Uses TPA to always find the butler.
  • A bit recusivity, to make sure we search for the butler again if we somehow didn't find it the first time. :D
  • Every action is randomized. Never click the same spot or wait the same amount of time twice.
  • Many failSafes. Should the script fail to build table for a certain amount of time, you will be loged out.


Does NOT feature:

  • Normal butler
  • AntiBan (It does feature randomisation though)
  • AntiRandom (You can't get a random in building mode anyway)

MUST READ BEFORE USING:
The script does not actualy try to find the table, it just aim where it should be, and if it sees the correct overtext, it tries to build the table. The script will NOT move the camera for you. This means that you need to place it like I did on the screenshot. It dosen't matter if your room isn't like mine, all the script cares is that your camera is over the table and that the up text is over green grass!

INSTRUCTIONS:
  1. Make sure that the upText aim at the green grass like in my screenshot. (top left corner of your screen) If your dinning room is in the center of your house, just make a new one.
  2. Remove ALL furniture inside your dinning room.
  3. Have your "Game" chat on "All", it is needed for some failsafes.
  4. Have alot of mahogany plank in your bank.
  5. Have money in your money pouch to pay the Demon butler.
  6. Have a saw and a hammer in your tool belt.
  7. Fill your inventoy with mahogany plank
  8. Make sure building mode is ON.
  9. Make sure your Demon Butler is following you.
  10. Place the camera like seen on the screenshot. (Approximately)
  11. Ask your demon butler to bring you 26 or 24 mahogany plank.
  12. Start the script and watch the XP roll in.
  13. If you see the script missclick, failing to build or failing to remove the table within the first minute, increase the lag factor.


Screenshot (V0.2) During bonus XP weekend:

Sin

2012-03-14 00:06:04

Verrrryyy nice, I'll definitely use this during BXP!

Kyros

2012-03-14 11:26:58

I really think you should add stealing creation hammers ;o

eska

2012-03-14 15:39:39

From: Kyros
I really think you should add stealing creation hammers ;o


How does it even work? Do you need to select something or just have it in your inventory?

If you only need to have it in you inventory then it will work, but he won't bank to grab more though.

Gestapo

2012-03-15 15:23:55

Good luck, hope its released today or tomorrow.

eska

2012-03-15 16:26:03

Release is imminent.

Doing some final testing, adding some fail safe and some more check to make sure the script never missclick.

Gestapo

2012-03-15 17:17:36

oh my god i hope you can finish it soon :)

eska

2012-03-15 17:41:22

From: Xenophis
oh my god i hope you can finish it soon :)


Patience young padawan, I'm doing my final testing right now. I think I fixed all the problems, I'm doing 450k XP/hour!

Kyros

2012-03-15 17:48:38

Yesssssssssssss! And yes it just uses them when in inventory, no selecting needed

Gestapo

2012-03-15 17:51:08

is it going to be supported only with demon butler ?

eska

2012-03-15 18:02:34

From: Xenophis
is it going to be supported only with demon butler ?


Only demon butler.
If you can afford mahogany plank you can afford demon butler :p

eska

2012-03-15 18:32:37

Currently using 1k plank. If I can use all of them without messing up I'll be ready to release the script.

eska

2012-03-15 19:43:42

Finaly released. I've manage to do 1k plank without problems.

Please test it and report any bug you find.

Edit: My bad should have used edit button :duh:

Kyros

2012-03-15 19:45:31

Omfg you beast

Gestapo

2012-03-16 02:21:07

Testing

eska

2012-03-16 03:35:59

From: Xenophis
Testing


Are you having trouble with the script being unable to locate the butler? Because my friend was having that problem. I just switched to TPA instead of DTM and it seems like it never ever fails to find the butler now.

I'll upload V0.2 before going to sleep.
Edit: Done. Now using TPAs, not being able to find the butler should be a thing of the past!

siuman101

2012-03-16 04:55:12

Ah… it was too expensive…. which method is much cheaper? oak larder or Mahogany Table?
Edit: just checked.. 17-18 cash per exp for mahogany plank while oak plank is just 9 cash per exp. Never thank you, i am not going to try it lol, its too expensive.

eska

2012-03-16 05:09:35

From: siuman101
Ah… it was too expensive…. which method is much cheaper? oak larder or Mahogany Table?
Edit: just checked.. 17-18 cash per exp for mahogany plank while oak plank is just 9 cash per exp. Never thank you, i am not going to try it lol, its too expensive.


Yeah this is an elite training method. However, with the bonus xp weekend, it allow you to make insane xp in little time. Using the bonus xp weekend, 99 Construction will cost me less than if I did oak larder in normal condition, but in a fraction of the time it would have taken.

Ashaman88

2012-03-16 09:18:11

From: sir eska eau
Are you having trouble with the script being unable to locate the butler? Because my friend was having that problem. I just switched to TPA instead of DTM and it seems like it never ever fails to find the butler now.

I'll upload V0.2 before going to sleep.
Edit: Done. Now using TPAs, not being able to find the butler should be a thing of the past!


For oak larders the butler always comes to the same spot, so only searching in that square and increasing the DTM's tolerance makes it work perfectly. TPA's would work well too as long as you don't have too much red or whatever color you used in that room

eska

2012-03-16 11:41:51

Just woke up, testing my script.

I've put lag factor to 2 because servers are unusualy laggy. Working perfectly for me.

Making 1.03m xp an hour.

Gestapo

2012-03-16 12:32:00

Max time its working for me is like 6 mins :(

eska

2012-03-16 12:53:39

From: Xenophis
Max time its working for me is like 6 mins :(

Can't help you if you don't give me any information.

Gestapo

2012-03-16 12:56:29

it says can not find demon butler after 6 mins

eska

2012-03-16 13:03:51

It does find it sometime though, correct?

Move your camera, put it lower a bit lower instead of the highest. This should increase the butler surface visible to the bot and therfore increase the chance of finding it.

Tell me if it works.

Also, do not place your camera straight north, south, east or west, put it at an angle, like shown in this screenshot:

Personnaly, I've been runing the bot for 1 hour now, not a single missclick. Working flawlessly.

Gestapo

2012-03-16 13:10:49

this is kinda hard ill try to and will repost

Gestapo

2012-03-16 13:16:20

cant get it to work :(

eska

2012-03-17 06:08:19

V0.3 uploaded, this will fix the butler not found issue.

If you get stuck on the page where it is supposed to select the magohany table, make sure the upText (Top left corner or your screen where it says "walk here" when you aim the ground) is over the green grass. This will fix your problems.

eska

2012-03-17 16:17:18

V0.4 uploaded, this will fix the issues of trying to build while destroying and vice versa.
You should see an increase in XP rate and the bot will never mess up if you configured everything correctly.

hader dem2

2012-03-19 09:38:02

this script can get u to 99 with 2 days with sc hammer i get like 750k xp a hr it rock i love it and it work like it should good job


but u need to look ofter ur sc hammers so u can get the max xp out of it

eska

2012-03-19 13:12:52

Thanks.

I can't do anything about the sc hammers though. Banking would be almost impossible to incorporate since every house isn't the same layout. Also, you get so much xp, that most of the time you go out you'd get a random.

So either way you'd have to babysit it for sc hammer. Without them though it's pretty much cruise control.

Sin

2012-03-19 17:43:49

I spent 60M to use this script, if it doesn't work, I kill you.
Got it? :)

eska

2012-03-19 20:44:24

From: Sin
I spent 60M to use this script, if it doesn't work, I kill you.
Got it? :)


If it doesn't work because you didn't follow the instruction on the first post, I'm the one who will kill you. :)

Sin

2012-03-19 20:52:38

Naw it worked perfectly, ran it for an hour before I farmed a random.

eska

2012-03-19 21:18:30

Glad to learn that I'll live.

Sin

2012-03-19 21:28:14

You live today.

haxine

2012-03-20 07:34:58

[Error] (98:18): is ('=') expected at line 97
Compiling failed.

regardless what number i put.

haxine

2012-03-20 07:42:42

im using v.03 and i love it, props on the script man, i like taking my chances with scripts that romp xp

eska

2012-03-20 14:43:19

From: haxine
[Error] (98:18): is ('=') expected at line 97
Compiling failed.

regardless what number i put.


I found the mistake. It is so easy to fix that I'll let it there as a tiny antileech. If you want a clue, just read the error your compilator gave you…

You should swtich to V0.4 even if V0.3 wasn't that bad. V0.4 make sure that the table is destroyed before building and vice versa. This means that it never mess up like V0.3 does.
Also V0.4 is cheaper because we use the butler more efficiently.

kenddy3

2012-03-25 19:06:56

I have a few questions
1.Do I have to wield the scared hammer or do I need it to be in y inventory?
2.how long will the scared hammer last before it will destroy 30ect
3.sir eska sau u should make a prayer guilded altar bot but one tht could run to ya illegal bank & back home with a terror bird with it scrolls :D

eska

2012-03-25 19:10:04

From: kenddy3
I have a few questions
1.Do I have to wield the scared hammer or do I need it to be in y inventory?
2.how long will the scared hammer last before it will destroy 30ect
3.sir eska sau u should make a prayer guilded altar bot but one tht could run to ya illegal bank & back home with a terror bird with it scrolls :D


I didn't make this to support sacred clay hammer, I guess you can just keep it in inventory.
I don't know, I never tried.
There is already script to train prayer, this is a construction bot not prayer.

kenddy3

2012-03-25 19:15:07

Well u should make one u seem to be a beast scripter :D

hylloviand

2012-04-04 05:31:33

Im having this problem and cant figure out how to fix it

[Hint] C:\Games\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (98:18): is ('=') expected at line 97
Compiling failed

eska

2012-04-04 05:54:25

Read first post for a hint.

hylloviand

2012-04-04 09:07:22

From: sir eska eau
Read first post for a hint.


Okay so when i get everything set up.. like the butler and txt and what not and start it.. my mouse keeps hovering over the xp toggle disply..

eska

2012-04-13 17:26:40

Uh? What did you do Harry :s

Mango Kush

2012-04-28 18:16:12

Doesn't for me, compiling error and i dont understand your studied anti leech hint.

Mango Kush

2012-04-28 18:20:26

Nm, got it to work.
how much do you have for "wait for butler"

eska

2012-05-01 00:52:56

What do you mean?

Skellyhell

2012-05-06 23:18:11

WAIT_FOR_BUTLER:= 700; // 1000 = 1 seconds.
[Hint] D:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (98:18): is ('=') expected at line 97

your anti leech seems to be anti anyone who doesnt know how to code :(


Disregard that. figured it out haha

diromon

2012-05-23 16:35:19

Can you please tell me how to fix my error? My char doesn't seem to make table and all it does is right click fetch from bank. I have everything set up according to your screen shot. What is the cause of my error?

It would be greatly appreciated if those of you that got this script to work flawlessly could please provide me the exact number to enter for WAIT_FOR_BUTLER

johnarnts

2012-06-15 01:09:29

Got 99 yesterday! Great script easily runs 3-4 hours at 400kish exp and hour!

Gestapo

2012-06-23 04:30:28

omgg! i fixed antileech!!

line 97 should be:

WAIT_FOR_BUTLER= 700; // 1000 = 1 seconds.

NZ John

2012-06-30 10:57:04


Brilliant script ;) should add that prog to front page.

Product

2012-07-02 03:19:16

Bot is excellent, everyone gaining xp rates from 100k-200k should really think about only running this bot, as from my experience i've found that i can gain up to 400k-450kxp an hour if this bot is the only one running. (or logged on rs legitly) But yeah, maybe just my pc but recomend it :). did 91-97 yesterday, epic bot.

2496

2012-07-06 12:26:38

This should be faster… You can get 400k/h with oaks, and you should be able to get 600-700k/h with tables lol

eska

2012-07-06 18:42:13

From: 2496
This should be faster… You can get 400k/h with oaks, and you should be able to get 600-700k/h with tables lol


I got an idea. Make your own script. Assuming you are able to make a hello world with simba.

2496

2012-07-06 19:03:28

From: eska
I got an idea. Make your own script. Assuming you are able to make a hello world with simba.


You don't get it…

You can use oak planks for same exp outcome and save 50% of your money lol, making your script useless.

/thread

eska

2012-07-06 19:29:03

From: 2496
You don't get it…

You can use oak planks for same exp outcome and save 50% of your money lol, making your script useless.

/thread


/care

Cool story bro.

Azhar

2012-07-07 07:24:09

Doesnt work for me error with coding

eska

2012-07-07 12:25:20

From: Azhar
Doesnt work for me error with coding


I see you haven't read past the third sentence of the first post.

Saiga

2012-07-22 14:03:49

Sorted out the antileech and the script does absolutely nothing. Note that I manually called the butler to the bank and it also didn't work when I didn't. I think I should add that I tried starting the script and letting it load up smart, disabling smart and logging in and positioning the script and I also tried dragging the target to the client after stopping the script, neither worked. Anything I'm doing wrong?

eska

2012-07-23 07:13:50

From: Saiga
Sorted out the antileech and the script does absolutely nothing. Note that I manually called the butler to the bank and it also didn't work when I didn't. I think I should add that I tried starting the script and letting it load up smart, disabling smart and logging in and positioning the script and I also tried dragging the target to the client after stopping the script, neither worked. Anything I'm doing wrong?


All script are currently broken due to the change jagex made to the toolbar meny, which is now part of the applet.

Saiga

2012-07-23 15:02:56

From: eska
All script are currently broken due to the change jagex made to the toolbar meny, which is now part of the applet.

Ok thank you so much. I spent like 3 hours trying to get this or an oak door script to work and ended up having to sell back 10k mahogany planks. Thank you for saving me from trying to figure it out again LMAO. I look forward to trying it when the client is fixed.

jigz10

2012-08-25 05:46:26

[Error] C:\Simba\Includes\srl/srl/misc/smart.simba(46:19): Invalid number of parameters at line 45
Compiling failed.

Valeyard

2012-08-31 14:58:39

Hey eska, I was thinking of doing Teak tables to 99. I had a quick look at your script and it looks like I would only need to change some colour values and it would require little work. Can you confirm if that is the case or am I looking at having to make more significant changes?

Cheers

Okay it looks like there really isn't much to change at all. Just the colour tolerance stuff at the start that I don't understand but will try and figure out

Ill buy some teak planks and try this tomorrow, just adding this in so I remember

     if(i = 3) then
FindButler;

until (i = 4);

change to this

     if(i = 6) then
FindButler;

until (i = 7);

Also this

if FindWindow('elect a piece of furniture to build.') then
begin
Wait(LAG_FACTOR * 100 + Random(20));
MouseBox(290, 128, 320, 152, 3);
Wait(LAG_FACTOR * 30 + Random(20));

needs to change since the teak table coords are different

I think the only other stuff that would need to change is:

• the up text stuff referencing mahogany
• changing one color code in the function to find the table

I will let you know how I get on with these changes tomorrow

0blivian

2012-10-26 20:59:06

=0 omg ty man! ill be using this.

0blivian

2012-10-26 21:59:44

[Error] C:\Users\Jorge vargas\Desktop\MahoganyTableMakerV0.4.simba(113:3): Unknown identifier 'Smart_Server' at line 112
Compiling failed.

Ashaman88

2012-10-27 08:42:56

From: 0blivian
[Error] C:\Users\Jorge vargas\Desktop\MahoganyTableMakerV0.4.simba(113:3): Unknown identifier 'Smart_Server' at line 112
Compiling failed.


Not sure if it works, but this will compile:

program MahoganyTableMaker;
{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Smartgraphics.simba}

{-------------------------------------------------------------------------------
| * * * * * * * * * * * * * * * * Credit * * * * * * * * * * * * * * * * * |
--------------------------------------------------------------------------------
| * Ashaman88 for his FindButler function. |
| * YoHoJo for his mousekey simulation technique. |
| * ProphesyOfWolf for his TPAFinder function in his awesome tutorial about |
| Custom TPA Finding & ColorToleranceSpeed(2) Modifiers. |
-------------------------------------------------------------------------------}

{==============================================================================|
| Mahogany Table Maker by Sir Eska Eau V0.4 |
|==============================================================================|
| |
| Disclaimer: This script was made in a single day and is the first script I |
| release on simba. It does not have AntiBan nor AntiRandom. |
| AntiBan kills the XP/hour and AntiRandom isn't really needed |
| since you cannot get a random while in your POH with building |
| mode ON. The fact that it does not feature Antiban means that |
| you should refrain from using this script for very long period |
| of time. Due to time constraints, not much testing was put into |
| this script. You SHOULD, and MUST babysit this script. |
| |
| YOU HAVE BEEN WARNED |
| |
| You MUST read the instructions in the thread related to this |
| script. To find the details on how to set up the script, please |
| visit : |
| [url]http://villavu.com/forum/showthread.php?t=77529[/url] |
| |
| |
| Mahogany |
| Table |
| Maker : This script will make mahogany plank in a dinning room pretty |
| much as fast as it can get. The script use simulated mousekeys, |
| timeOut FailSafe and recursivity. Only the demon Butler is |
| suported. |
| HAPPY BONUS XP WEEKEND! |
| |
{==============================================================================|
| CHANGE HISTORY |
|==============================================================================|
| |
| V0.1 : * Initial release |
| |
| V0.2 : * Removed DTM and replaced them with TPA. Failing to find the butler |
| should be a thing of the past. |
| |
| V.03: * Made proper ATPA, failing to find the butler should REALLY be a | |
| thing of the past now. |
| * Fixed a small graphical glitch that was causing the on screen |
| progress report to go negative once you reach 600k+ xp. | |
| * Slowed down the mouse. I think it was causing alot of problem with |
the UpText. |
| * The LAG_FACTOR is now applied anywhere there is a Wait() |
| * Removed SRL Stats since they can't work with this script anyway | |
| (XP rate is too high and SRL Stats refuse to accept the data) |
| * Adjusted some Wait() and fixed some dead code that had the task to |
| search for the butler again if it wasn't found the first time. |
| |
| V0.4 * Added a color check before attemping to build or destroy a table. |
| That should fix most of the timing problems and increase XP/hour |
| since the bot should never missclick and go through the timeout |
| failsafe of some loops. |
| * Changed and removed some wait in an attempt to fix timing issues. |
| * We only call the butler every 4 cycle instead of 3. This increase |
| the XP/hour and decrease the cost of the butler over time |
| * Added a constant WAIT_FOR_BUTLER to help user fix their timing |
| problems with the butler interupting them. |
| |
-------------------------------------------------------------------------------}

{-------------------------------------------------------------------------------
| * * * * * * * * * * * * * DO NOT CHANGE THOSE * * * * * * * * * * * * * * |
-------------------------------------------------------------------------------}
var// |
loopTimeOut: integer;// |
{------------------------------------------------------------------------------}


{-------------------------------------------------------------------------------
| * * * * * * * * * * * * * Adjust as needed * * * * * * * * * * * * * * * *|
-------------------------------------------------------------------------------}
const
// Change this if you are laging.
LAG_FACTOR = 1; // Are you lagging? 1 = no lag, 5 = WTF LAG!!!
// Increase this if the bot often missclick even
// if you don't seem to be really lagging.
// Obviously, a LAG_FACTOR of 1 will give you the
// best XP/hour if your computer can support it.

// Change this if the butler interupt you!
WAIT_FOR_BUTLER= 700; // 1000 = 1 seconds.
//
// If the butler interupt you while you are
// destroying a table, REDUCE this until the
// script is done destroying the table once the
// butler comes back. If it still dosen't work at 0,
// INCREASE this until the script attempt to
// destroy the table once the butler comes back.
//
// If the butler interupt you while you are BUILDING
// a table, INCREASE this until the script is done
// destroying the table once the butler comes back.

procedure LoadUserVars;
begin
// Smart_Server := 0; // The server you want to login into. 0 = random
end;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // 3-4 lower case letters of your character's name
Pin := ''; // Bank pin
Member := True;
Active := True;
end;
end;

{*******************************************************************************
* * * * DO NOT CHANGE ANYTHING BELLOW UNLESS YOU KNOW WHAT YOU ARE DOING * * * *
*******************************************************************************}
var
timeSinceLastCommit,
oldXP, previousXP, x, y, xxx1, yyy1, xxx2, yyy2,
failToFindButlerCount, failToBuildTableCount, failToDestroyTableCount: integer;

const
SCRIPT_NAME = 'MahoganyTableMaker';
SCRIPT_VERSION = 'V0.4';
SIGNED = True;
DrawDebugs = True;
ATTEMPT_TIMEOUT = 10;


// *****
// * FindMahoganyTableBuilt : Returns true if it find the table color.
// *
function FindMahoganyTableBuilt: Boolean;
var
CTS: Integer;
begin
CTS := GetColorToleranceSpeed; // To restore the color tolerance later
SetColorspeed2Modifiers(0.1, 0.2);
Result:= FindColorTolerance(x, y, 3491678, xxx1, yyy1, xxx2, yyy2, 15)
ColorToleranceSpeed(CTS); // Restore previous color tolerance speed
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

// *****
// * BuildTable : Find the table hotspot using blind check, then use mousekeys
// * to quickly build a table.
// *
procedure BuildTable;
var t: integer;
begin
if failToBuildTableCount > ATTEMPT_TIMEOUT then
begin
Writeln('Couldn''t build tables for ' + inttostr(ATTEMPT_TIMEOUT)
+ ' attempts, loging out.');
LogOut;
TerminateScript;
end;

MarkTime(t);

repeat
until not FindMahoganyTableBuilt
or (TimeFromMark(t) > loopTimeOut)

if not (TimeFromMark(t) > loopTimeOut) then
begin
MouseBox(xxx1, yyy1, xxx2, yyy2, 3);
previousXP:= GetXPBarTotal;

if IsUptext('alk here / 2 more options') and not FindMahoganyTableBuilt then
GetMousePos(x, y);
Mouse(x, y, 0, 0, False); // Right click
Wait(LAG_FACTOR * 20 + Random(20));
MoveMouse(x, y+42); // Simulate mouse key jump to the second option.
Wait(LAG_FACTOR * 50 + random(20));
ClickMouse2(true); // Left click on whatever option was there.

Wait(LAG_FACTOR * 100 + 400 + Random(50));
end;

MarkTime(t);

repeat
until FindWindow('elect a piece of furniture to build.')
or (TimeFromMark(t) > loopTimeOut)

if FindWindow('elect a piece of furniture to build.') then
begin
Wait(LAG_FACTOR * 100 + Random(20));
MouseBox(290, 128, 320, 152, 3);
Wait(LAG_FACTOR * 30 + Random(20));


MarkTime(t);

repeat
until IsUpTextMultiCustom(['ahogany', 'table'])
or (TimeFromMark(t) > loopTimeOut)

if IsUpTextMultiCustom(['ahogany', 'table']) then
begin
ClickMouse2(true);
Wait(LAG_FACTOR * 100 + 100 + Random(100));

if(previousXP < GetXPBarTotal) then
failToBuildTableCount:= 0 // Reset
end else
begin
inc(failToBuildTableCount);
end;
end else
begin
if FindNPCChatText('Yes', Nothing) then
begin
TypeSend('1');
Wait(LAG_FACTOR * 200 + Random(300));
inc(failToBuildTableCount);
end;
end;
end;


// *****
// * DestroyTable : Find the table hotspot using blind check, then use mousekeys
// * to quickly destroy the table.
// *
procedure DestroyTable;
var t: integer;
begin
if failToDestroyTableCount > ATTEMPT_TIMEOUT then
begin
Writeln('Couldn''t destroy the table for ' + inttostr(ATTEMPT_TIMEOUT)
+ ' attempts, loging out.');
LogOut;
TerminateScript;
end;

MarkTime(t);
repeat
until FindMahoganyTableBuilt
or (TimeFromMark(t) > loopTimeOut)

if not (TimeFromMark(t) > loopTimeOut) then
begin
Wait(LAG_FACTOR * 50 + Random(50));
MouseBox(xxx1, yyy1, xxx2, yyy2, 3);

if IsUptext('alk here / 2 more options')
and FindMahoganyTableBuilt then
begin

GetMousePos(x, y);
Mouse(x, y, 0, 0, False); // Right click
Wait(LAG_FACTOR * 20 + Random(20));
MoveMouse(x, y + 42); // Simulate mouse key jump to the option.
Wait(LAG_FACTOR * 50 + random(20));
ClickMouse2(true); // Left click on whatever option was there.

Wait(LAG_FACTOR * 100 + Random(50));
end;

MarkTime(t);

repeat
until FindNPCChatText('Yes', Nothing) or (TimeFromMark(t) > loopTimeOut)

if TimeFromMark(t) < loopTimeOut then
begin
if FindNPCChatText('Yes', Nothing) then
begin
Wait(LAG_FACTOR * 50 + Random(50));
TypeSend('1');
Wait(LAG_FACTOR * 100 + RandomRange(300, 500));//(700, 900));
failToDestroyTableCount:= 0; // We reset
end else
begin
inc(failToDestroyTableCount);
end;
end else
begin
if FindWindow('elect a piece of furniture to build.') then
begin
MouseBox(290, 128, 320, 152, 3);
Wait(LAG_FACTOR * 100 + Random(20));

MarkTime(t);

repeat
until IsUpTextMultiCustom(['ahogany', 'table'])
or (TimeFromMark(t) > loopTimeOut)

if IsUpTextMultiCustom(['ahogany', 'table']) then
begin
ClickMouse2(true);
failToBuildTableCount:= 0 // Reset
end;
end;
end;
end;
end;


// *****
// * LocateButler : Return true if it found location of the demon butler using
// * TPAs.
// *
// * Originaly named: TPAFinder
// * By: ProphesyOfWolf
// * Edited by: Sir_eska_eau
// *
function LocateButler(x, y: Integer): Boolean;
var
CTS, I, B: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed; // To restore the color tolerance later
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.52, 5.16);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2371157, MSX1, MSY1, MSX2, MSY2, 5);
ColorToleranceSpeed(CTS); // Restore previous color tolerance speed
ATPA := TPAToATPAEx(TPA, 20, 20);

B:= High(ATPA);

For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);

Wait(LAG_FACTOR * 100);
If(IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler'])) then
begin
Result := True;
GetMousePos(x, y);
Break; // We found the object so we exit the loop
end;
end;
end;


// *****
// * FindButler : Return true if it found the demon butler. Fetch plank from the
// * bank and pays the butler if needed.
// * By: Ashaman88
// * Edited by: Sir_eska_eau
// * Description: Edited to fit my needs, comply with my standards, add timeout
// * failsafe, add recursivity, add mousekeys and add a little
// * optimisation.
// *
function FindButler: Boolean;
var
x, y, t: Integer;
foundButler: Boolean;
begin
if failToFindButlerCount > ATTEMPT_TIMEOUT then
begin
Writeln('Couldn''t find the demon butler 5 times. Loging out.');
LogOut;
TerminateScript;
end;

if not LoggedIn then
TerminateScript;

foundButler:= LocateButler(x, y);

if not foundButler then
begin
Writeln('Coudn''t find demon butler.');
MMouse(200,200,100,100);
inc(failToFindButlerCount);
Result := False;
end else
begin

GetMousePos(x, y);
if (IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler'])) then
begin
Wait(LAG_FACTOR * 100 + Random(50));
ClickMouse2(false); // Right click
Wait(LAG_FACTOR * 100 + Random(10));
MoveMouse(x, y + 42); // Simulate mouse key jump to the option.
Wait(LAG_FACTOR * 300 + Random(50));
ClickMouse2(true); // Left click on whatever option was there.

Wait(LAG_FACTOR * 100 + 200+Random(50));
end;

MarkTime(t);

repeat
until ((FindNPCChatText('coins', nothing))
or (FindNPCChatText('nother', nothing))
or (TimeFromMark(t) > loopTimeOut));


if (FindNPCChatText('coins', nothing)) then
begin
ClickContinue(true, true);
Wait(LAG_FACTOR * 50 + Random(50));
TypeSend('1');
Wait(LAG_FACTOR * 100 + RandomRange(700, 900));
MMouse(x, y, 2, 2);
Wait(LAG_FACTOR * 50 + Random(50));

MarkTime(t);

repeat
MMouse(x, y, 5, 5);
Wait(LAG_FACTOR * 100);
until (IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler']))
or (TimeFromMark(t) > loopTimeOut);

if (IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler'])) then
begin
Wait(LAG_FACTOR * 50 + Random(50));
ClickMouse2(false); // Right click
Wait(LAG_FACTOR * 100 + Random(50));
MoveMouse(x, y + 42); // Simulate mouse key jump to the option.
Wait(LAG_FACTOR * 100 + Random(50));
ClickMouse2(true); // Left click on whatever option was there.
end;
end;

MarkTime(t);
repeat
until (FindNPCChatText('nother', nothing))
or (TimeFromMark(t) > loopTimeOut);

if (FindNPCChatText('nother', nothing)) then
begin
TypeSend('1');
Wait(WAIT_FOR_BUTLER + Random(100));
failToFindButlerCount:= 0; // reset because the butler is on the way.
Result := true;
end;

if not foundButler or (TimeFromMark(t) > (loopTimeOut + 2000)) then
begin
Result:= false;
inc(failToFindButlerCount);
FindButler; // Recursivity
end;
end;
end;

// *****
// * DisplayOnScreenProgressReport : Display some interesting information
// * directly on the runescape client.
// *
procedure DisplayOnScreenProgressReport;
var
infoTimeRunning, infoTotalXp, infoXpHour: String;
background, currentXP: integer;
begin
currentXP:= GetXPBarTotal;

infoTimeRunning:= 'Running for ' + TimeRunning;
infoTotalXp:= 'Total xp gained ' + inttoStr(currentXP - oldXP) + 'xp';
infoXpHour:= 'Currently gaining ' + inttoStr(Round(((currentXP - oldXP)
/ (GetTimeRunning / 1000)) * 3600))
+ 'xp per hour';

background:= BitmapFromString(24, 21, 'meJxjYBgFo2AUjIJRMJwBAAXoAAE=');
SMART_DrawBitmap(true, background,Point(5,290));
FreeBitmap(background);

SMART_DrawText(8,270,SmallChars,infoTimeRunning,clAqua);
SMART_DrawText(8,290,SmallChars,infoTotalXp,clAqua);
SMART_DrawText(8,310,SmallCharsNS,infoXpHour,clAqua);
end;



procedure MainLoop;
var i: integer;
begin
repeat
inc(i);
previousXP:= GetXpBarTotal;
BuildTable;
Wait((LAG_FACTOR * 100) + 900 + Random(300));

if FindBlackChatMessage('ou don') then
FindButler;

if (GetXPBarTotal = previousXP) then
begin
inc(failToBuildTableCount);
end else
begin
failToBuildTableCount:= 0;
end;

DisplayOnScreenProgressReport;
DestroyTable;
Wait((LAG_FACTOR * 100) + Random(200));

if(i = 3) then
FindButler;

until (i = 4);
end;


// *****
// * SetUpScript : Define some mandatory variables for the script
// *
procedure SetUpScript;
begin

ClearReport;
ClearDebug;

SetupSRL;
ActivateClient;
DeclarePlayers;
LoadUserVars; // Load user defined bariables

MouseSpeed:= 12 + Random(3);
SetupRandomTool(10000 + Random(10000), 2, 'C:/Simba/alarm.wav');

if not (LoggedIn) then
LoginPlayer;

wait(LAG_FACTOR * 100 + 400 + random(400));
ToggleXPBar(True);
wait(LAG_FACTOR * 100 + 400 + random(400));

If IsXPBarOpen Then OldXP := GetXPBarTotal;

failToFindButlerCount:= 0;
failToBuildTableCount:= 0;
failToDestroyTableCount:= 0;
MarkTime(timeSinceLastCommit);

loopTimeOut:= ((((LAG_FACTOR * LAG_FACTOR) * 4) // *FailSafe* To break out of
/ (1 + LAG_FACTOR)) * 1000); // loops when something
// goes wrong.

xxx1:= MSCX-15; // To find the table.
xxx2:= MSCX+15; // To find the table.
yyy1:= MSCY+20; // To find the table.
yyy2:= MSCY+60; // To find the table.


if (LAG_FACTOR < 1) then
begin
WriteLn('LAG_FACTOR cannot be lower than 1, go change it.');
TerminateScript;
end;
Wait(LAG_FACTOR * 100 + 400 + Random(1000));
end;


// *****
// * Main program
// *
begin
SetUpScript;

If IsXPBarOpen Then OldXP := GetXPBarTotal;
repeat
MainLoop;
until(not LoggedIn);

end.

0blivian

2012-10-27 19:40:45

From: Ashaman88
Not sure if it works, but this will compile:

program MahoganyTableMaker;
{$DEFINE SMART}
{$i SRL/SRL.simba}
{$i SRL/SRL/Misc/Smartgraphics.simba}

{-------------------------------------------------------------------------------
| * * * * * * * * * * * * * * * * Credit * * * * * * * * * * * * * * * * * |
--------------------------------------------------------------------------------
| * Ashaman88 for his FindButler function. |
| * YoHoJo for his mousekey simulation technique. |
| * ProphesyOfWolf for his TPAFinder function in his awesome tutorial about |
| Custom TPA Finding & ColorToleranceSpeed(2) Modifiers. |
-------------------------------------------------------------------------------}

{==============================================================================|
| Mahogany Table Maker by Sir Eska Eau V0.4 |
|==============================================================================|
| |
| Disclaimer: This script was made in a single day and is the first script I |
| release on simba. It does not have AntiBan nor AntiRandom. |
| AntiBan kills the XP/hour and AntiRandom isn't really needed |
| since you cannot get a random while in your POH with building |
| mode ON. The fact that it does not feature Antiban means that |
| you should refrain from using this script for very long period |
| of time. Due to time constraints, not much testing was put into |
| this script. You SHOULD, and MUST babysit this script. |
| |
| YOU HAVE BEEN WARNED |
| |
| You MUST read the instructions in the thread related to this |
| script. To find the details on how to set up the script, please |
| visit : |
| [url]http://villavu.com/forum/showthread.php?t=77529[/url] |
| |
| |
| Mahogany |
| Table |
| Maker : This script will make mahogany plank in a dinning room pretty |
| much as fast as it can get. The script use simulated mousekeys, |
| timeOut FailSafe and recursivity. Only the demon Butler is |
| suported. |
| HAPPY BONUS XP WEEKEND! |
| |
{==============================================================================|
| CHANGE HISTORY |
|==============================================================================|
| |
| V0.1 : * Initial release |
| |
| V0.2 : * Removed DTM and replaced them with TPA. Failing to find the butler |
| should be a thing of the past. |
| |
| V.03: * Made proper ATPA, failing to find the butler should REALLY be a | |
| thing of the past now. |
| * Fixed a small graphical glitch that was causing the on screen |
| progress report to go negative once you reach 600k+ xp. | |
| * Slowed down the mouse. I think it was causing alot of problem with |
the UpText. |
| * The LAG_FACTOR is now applied anywhere there is a Wait() |
| * Removed SRL Stats since they can't work with this script anyway | |
| (XP rate is too high and SRL Stats refuse to accept the data) |
| * Adjusted some Wait() and fixed some dead code that had the task to |
| search for the butler again if it wasn't found the first time. |
| |
| V0.4 * Added a color check before attemping to build or destroy a table. |
| That should fix most of the timing problems and increase XP/hour |
| since the bot should never missclick and go through the timeout |
| failsafe of some loops. |
| * Changed and removed some wait in an attempt to fix timing issues. |
| * We only call the butler every 4 cycle instead of 3. This increase |
| the XP/hour and decrease the cost of the butler over time |
| * Added a constant WAIT_FOR_BUTLER to help user fix their timing |
| problems with the butler interupting them. |
| |
-------------------------------------------------------------------------------}

{-------------------------------------------------------------------------------
| * * * * * * * * * * * * * DO NOT CHANGE THOSE * * * * * * * * * * * * * * |
-------------------------------------------------------------------------------}
var// |
loopTimeOut: integer;// |
{------------------------------------------------------------------------------}


{-------------------------------------------------------------------------------
| * * * * * * * * * * * * * Adjust as needed * * * * * * * * * * * * * * * *|
-------------------------------------------------------------------------------}
const
// Change this if you are laging.
LAG_FACTOR = 1; // Are you lagging? 1 = no lag, 5 = WTF LAG!!!
// Increase this if the bot often missclick even
// if you don't seem to be really lagging.
// Obviously, a LAG_FACTOR of 1 will give you the
// best XP/hour if your computer can support it.

// Change this if the butler interupt you!
WAIT_FOR_BUTLER= 700; // 1000 = 1 seconds.
//
// If the butler interupt you while you are
// destroying a table, REDUCE this until the
// script is done destroying the table once the
// butler comes back. If it still dosen't work at 0,
// INCREASE this until the script attempt to
// destroy the table once the butler comes back.
//
// If the butler interupt you while you are BUILDING
// a table, INCREASE this until the script is done
// destroying the table once the butler comes back.

procedure LoadUserVars;
begin
// Smart_Server := 0; // The server you want to login into. 0 = random
end;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // 3-4 lower case letters of your character's name
Pin := ''; // Bank pin
Member := True;
Active := True;
end;
end;

{*******************************************************************************
* * * * DO NOT CHANGE ANYTHING BELLOW UNLESS YOU KNOW WHAT YOU ARE DOING * * * *
*******************************************************************************}
var
timeSinceLastCommit,
oldXP, previousXP, x, y, xxx1, yyy1, xxx2, yyy2,
failToFindButlerCount, failToBuildTableCount, failToDestroyTableCount: integer;

const
SCRIPT_NAME = 'MahoganyTableMaker';
SCRIPT_VERSION = 'V0.4';
SIGNED = True;
DrawDebugs = True;
ATTEMPT_TIMEOUT = 10;


// *****
// * FindMahoganyTableBuilt : Returns true if it find the table color.
// *
function FindMahoganyTableBuilt: Boolean;
var
CTS: Integer;
begin
CTS := GetColorToleranceSpeed; // To restore the color tolerance later
SetColorspeed2Modifiers(0.1, 0.2);
Result:= FindColorTolerance(x, y, 3491678, xxx1, yyy1, xxx2, yyy2, 15)
ColorToleranceSpeed(CTS); // Restore previous color tolerance speed
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

// *****
// * BuildTable : Find the table hotspot using blind check, then use mousekeys
// * to quickly build a table.
// *
procedure BuildTable;
var t: integer;
begin
if failToBuildTableCount > ATTEMPT_TIMEOUT then
begin
Writeln('Couldn''t build tables for ' + inttostr(ATTEMPT_TIMEOUT)
+ ' attempts, loging out.');
LogOut;
TerminateScript;
end;

MarkTime(t);

repeat
until not FindMahoganyTableBuilt
or (TimeFromMark(t) > loopTimeOut)

if not (TimeFromMark(t) > loopTimeOut) then
begin
MouseBox(xxx1, yyy1, xxx2, yyy2, 3);
previousXP:= GetXPBarTotal;

if IsUptext('alk here / 2 more options') and not FindMahoganyTableBuilt then
GetMousePos(x, y);
Mouse(x, y, 0, 0, False); // Right click
Wait(LAG_FACTOR * 20 + Random(20));
MoveMouse(x, y+42); // Simulate mouse key jump to the second option.
Wait(LAG_FACTOR * 50 + random(20));
ClickMouse2(true); // Left click on whatever option was there.

Wait(LAG_FACTOR * 100 + 400 + Random(50));
end;

MarkTime(t);

repeat
until FindWindow('elect a piece of furniture to build.')
or (TimeFromMark(t) > loopTimeOut)

if FindWindow('elect a piece of furniture to build.') then
begin
Wait(LAG_FACTOR * 100 + Random(20));
MouseBox(290, 128, 320, 152, 3);
Wait(LAG_FACTOR * 30 + Random(20));


MarkTime(t);

repeat
until IsUpTextMultiCustom(['ahogany', 'table'])
or (TimeFromMark(t) > loopTimeOut)

if IsUpTextMultiCustom(['ahogany', 'table']) then
begin
ClickMouse2(true);
Wait(LAG_FACTOR * 100 + 100 + Random(100));

if(previousXP < GetXPBarTotal) then
failToBuildTableCount:= 0 // Reset
end else
begin
inc(failToBuildTableCount);
end;
end else
begin
if FindNPCChatText('Yes', Nothing) then
begin
TypeSend('1');
Wait(LAG_FACTOR * 200 + Random(300));
inc(failToBuildTableCount);
end;
end;
end;


// *****
// * DestroyTable : Find the table hotspot using blind check, then use mousekeys
// * to quickly destroy the table.
// *
procedure DestroyTable;
var t: integer;
begin
if failToDestroyTableCount > ATTEMPT_TIMEOUT then
begin
Writeln('Couldn''t destroy the table for ' + inttostr(ATTEMPT_TIMEOUT)
+ ' attempts, loging out.');
LogOut;
TerminateScript;
end;

MarkTime(t);
repeat
until FindMahoganyTableBuilt
or (TimeFromMark(t) > loopTimeOut)

if not (TimeFromMark(t) > loopTimeOut) then
begin
Wait(LAG_FACTOR * 50 + Random(50));
MouseBox(xxx1, yyy1, xxx2, yyy2, 3);

if IsUptext('alk here / 2 more options')
and FindMahoganyTableBuilt then
begin

GetMousePos(x, y);
Mouse(x, y, 0, 0, False); // Right click
Wait(LAG_FACTOR * 20 + Random(20));
MoveMouse(x, y + 42); // Simulate mouse key jump to the option.
Wait(LAG_FACTOR * 50 + random(20));
ClickMouse2(true); // Left click on whatever option was there.

Wait(LAG_FACTOR * 100 + Random(50));
end;

MarkTime(t);

repeat
until FindNPCChatText('Yes', Nothing) or (TimeFromMark(t) > loopTimeOut)

if TimeFromMark(t) < loopTimeOut then
begin
if FindNPCChatText('Yes', Nothing) then
begin
Wait(LAG_FACTOR * 50 + Random(50));
TypeSend('1');
Wait(LAG_FACTOR * 100 + RandomRange(300, 500));//(700, 900));
failToDestroyTableCount:= 0; // We reset
end else
begin
inc(failToDestroyTableCount);
end;
end else
begin
if FindWindow('elect a piece of furniture to build.') then
begin
MouseBox(290, 128, 320, 152, 3);
Wait(LAG_FACTOR * 100 + Random(20));

MarkTime(t);

repeat
until IsUpTextMultiCustom(['ahogany', 'table'])
or (TimeFromMark(t) > loopTimeOut)

if IsUpTextMultiCustom(['ahogany', 'table']) then
begin
ClickMouse2(true);
failToBuildTableCount:= 0 // Reset
end;
end;
end;
end;
end;


// *****
// * LocateButler : Return true if it found location of the demon butler using
// * TPAs.
// *
// * Originaly named: TPAFinder
// * By: ProphesyOfWolf
// * Edited by: Sir_eska_eau
// *
function LocateButler(x, y: Integer): Boolean;
var
CTS, I, B: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed; // To restore the color tolerance later
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.52, 5.16);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2371157, MSX1, MSY1, MSX2, MSY2, 5);
ColorToleranceSpeed(CTS); // Restore previous color tolerance speed
ATPA := TPAToATPAEx(TPA, 20, 20);

B:= High(ATPA);

For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);

Wait(LAG_FACTOR * 100);
If(IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler'])) then
begin
Result := True;
GetMousePos(x, y);
Break; // We found the object so we exit the loop
end;
end;
end;


// *****
// * FindButler : Return true if it found the demon butler. Fetch plank from the
// * bank and pays the butler if needed.
// * By: Ashaman88
// * Edited by: Sir_eska_eau
// * Description: Edited to fit my needs, comply with my standards, add timeout
// * failsafe, add recursivity, add mousekeys and add a little
// * optimisation.
// *
function FindButler: Boolean;
var
x, y, t: Integer;
foundButler: Boolean;
begin
if failToFindButlerCount > ATTEMPT_TIMEOUT then
begin
Writeln('Couldn''t find the demon butler 5 times. Loging out.');
LogOut;
TerminateScript;
end;

if not LoggedIn then
TerminateScript;

foundButler:= LocateButler(x, y);

if not foundButler then
begin
Writeln('Coudn''t find demon butler.');
MMouse(200,200,100,100);
inc(failToFindButlerCount);
Result := False;
end else
begin

GetMousePos(x, y);
if (IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler'])) then
begin
Wait(LAG_FACTOR * 100 + Random(50));
ClickMouse2(false); // Right click
Wait(LAG_FACTOR * 100 + Random(10));
MoveMouse(x, y + 42); // Simulate mouse key jump to the option.
Wait(LAG_FACTOR * 300 + Random(50));
ClickMouse2(true); // Left click on whatever option was there.

Wait(LAG_FACTOR * 100 + 200+Random(50));
end;

MarkTime(t);

repeat
until ((FindNPCChatText('coins', nothing))
or (FindNPCChatText('nother', nothing))
or (TimeFromMark(t) > loopTimeOut));


if (FindNPCChatText('coins', nothing)) then
begin
ClickContinue(true, true);
Wait(LAG_FACTOR * 50 + Random(50));
TypeSend('1');
Wait(LAG_FACTOR * 100 + RandomRange(700, 900));
MMouse(x, y, 2, 2);
Wait(LAG_FACTOR * 50 + Random(50));

MarkTime(t);

repeat
MMouse(x, y, 5, 5);
Wait(LAG_FACTOR * 100);
until (IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler']))
or (TimeFromMark(t) > loopTimeOut);

if (IsUpTextMultiCustom(['emon', 'butler', 'utler', 'tler'])) then
begin
Wait(LAG_FACTOR * 50 + Random(50));
ClickMouse2(false); // Right click
Wait(LAG_FACTOR * 100 + Random(50));
MoveMouse(x, y + 42); // Simulate mouse key jump to the option.
Wait(LAG_FACTOR * 100 + Random(50));
ClickMouse2(true); // Left click on whatever option was there.
end;
end;

MarkTime(t);
repeat
until (FindNPCChatText('nother', nothing))
or (TimeFromMark(t) > loopTimeOut);

if (FindNPCChatText('nother', nothing)) then
begin
TypeSend('1');
Wait(WAIT_FOR_BUTLER + Random(100));
failToFindButlerCount:= 0; // reset because the butler is on the way.
Result := true;
end;

if not foundButler or (TimeFromMark(t) > (loopTimeOut + 2000)) then
begin
Result:= false;
inc(failToFindButlerCount);
FindButler; // Recursivity
end;
end;
end;

// *****
// * DisplayOnScreenProgressReport : Display some interesting information
// * directly on the runescape client.
// *
procedure DisplayOnScreenProgressReport;
var
infoTimeRunning, infoTotalXp, infoXpHour: String;
background, currentXP: integer;
begin
currentXP:= GetXPBarTotal;

infoTimeRunning:= 'Running for ' + TimeRunning;
infoTotalXp:= 'Total xp gained ' + inttoStr(currentXP - oldXP) + 'xp';
infoXpHour:= 'Currently gaining ' + inttoStr(Round(((currentXP - oldXP)
/ (GetTimeRunning / 1000)) * 3600))
+ 'xp per hour';

background:= BitmapFromString(24, 21, 'meJxjYBgFo2AUjIJRMJwBAAXoAAE=');
SMART_DrawBitmap(true, background,Point(5,290));
FreeBitmap(background);

SMART_DrawText(8,270,SmallChars,infoTimeRunning,clAqua);
SMART_DrawText(8,290,SmallChars,infoTotalXp,clAqua);
SMART_DrawText(8,310,SmallCharsNS,infoXpHour,clAqua);
end;



procedure MainLoop;
var i: integer;
begin
repeat
inc(i);
previousXP:= GetXpBarTotal;
BuildTable;
Wait((LAG_FACTOR * 100) + 900 + Random(300));

if FindBlackChatMessage('ou don') then
FindButler;

if (GetXPBarTotal = previousXP) then
begin
inc(failToBuildTableCount);
end else
begin
failToBuildTableCount:= 0;
end;

DisplayOnScreenProgressReport;
DestroyTable;
Wait((LAG_FACTOR * 100) + Random(200));

if(i = 3) then
FindButler;

until (i = 4);
end;


// *****
// * SetUpScript : Define some mandatory variables for the script
// *
procedure SetUpScript;
begin

ClearReport;
ClearDebug;

SetupSRL;
ActivateClient;
DeclarePlayers;
LoadUserVars; // Load user defined bariables

MouseSpeed:= 12 + Random(3);
SetupRandomTool(10000 + Random(10000), 2, 'C:/Simba/alarm.wav');

if not (LoggedIn) then
LoginPlayer;

wait(LAG_FACTOR * 100 + 400 + random(400));
ToggleXPBar(True);
wait(LAG_FACTOR * 100 + 400 + random(400));

If IsXPBarOpen Then OldXP := GetXPBarTotal;

failToFindButlerCount:= 0;
failToBuildTableCount:= 0;
failToDestroyTableCount:= 0;
MarkTime(timeSinceLastCommit);

loopTimeOut:= ((((LAG_FACTOR * LAG_FACTOR) * 4) // *FailSafe* To break out of
/ (1 + LAG_FACTOR)) * 1000); // loops when something
// goes wrong.

xxx1:= MSCX-15; // To find the table.
xxx2:= MSCX+15; // To find the table.
yyy1:= MSCY+20; // To find the table.
yyy2:= MSCY+60; // To find the table.


if (LAG_FACTOR < 1) then
begin
WriteLn('LAG_FACTOR cannot be lower than 1, go change it.');
TerminateScript;
end;
Wait(LAG_FACTOR * 100 + 400 + Random(1000));
end;


// *****
// * Main program
// *
begin
SetUpScript;

If IsXPBarOpen Then OldXP := GetXPBarTotal;
repeat
MainLoop;
until(not LoggedIn);

end.


Omg testing right now i spent hours last night trying i alredy gained 5m legit and cant go any longer my head and hand will explode hopefully this works

0blivian

2012-10-27 20:11:15

It wont build a table it removes it fine and opens the menu to build but then fks off ple'aseeeeeee

eska

2012-10-30 12:49:53

I will no longer support this script.

First, as you can see from my activity bar, I am no longer active on this forum. This is due to me quiting runescape after achieving 99 in all stats using script from SRL or script I made.
Second, it was made 'quick and dirty' (eg it use 'box' instead of actualy finding the table) and I never intended to keep it working for an extended period of time. The idea was to get this script ready in a few hours for the bonus xp weekend 6-7 months ago.

You should look into Ashaman88's oak larder script. It's much more stable and Ashaman88 still support it.