PDA

View Full Version : First script help



jack_herer
10-22-2014, 07:29 PM
Hi there, I'm unable to get this script to work, I've tried using different methods to no avail. One of my attempts I was able to get it to continue to clicking (it's purpose) but it wasn't able to tell me when the inventory was full. As I am new to this, I even tried having
fastClick(MOUSE_LEFT);
wait(randomRange(1500, 2500)); listed 27 times, and that did not work either. I also even removed the backpack is full and tried to have it fastclick the bank and that did not work. I am stuck. I would greatly appreciate any and all help! Thank you.
and yes, I know there is virtually no antiban aspect. This script was supposed to be simple and pretty much only click. --






script

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'x';
password := 'x';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;

procedure makeMoney();
begin
mouse(603, 361, 25, 45, MOUSE_MOVE);
repeat
fastClick(MOUSE_LEFT);
wait(randomRange(1500, 2500));
until tabBackPack.isFull();
end;




procedure attemptToBank()
begin
bankScreen.open(BANK_BOOTH);
wait(randomRange(500, 1000));
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(randomRange(1000, 3000));
end;



begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();

if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;

makeMoney();
attemptToBank();
end.


------ Succesfully initialized via spawning a new client
---- initSmart()
------ smartSetupDrawing(): Succesfully setup SMART drawing
---- Waiting up to 5 minutes for RS to load...
------ __setInputBoxes(): Set username and password boxes
---- Client is ready.
---- Setup SRL in 38 Seconds
-- setupSRL(): True
-- TPlayer.login()
---- TPlayer.loginToLobby()
------ [[[my login name]] ()
------ Entering username...
------ Entering password...
-------- TRSLobby._skipEmailScreen(): Closed validate email screen
-------- Saving screenshot: IP_address.png
------ Found lobby screen
---- TPlayer.loginToLobby(): True
------ TRSLobbyWorlds.selectRandomWorld(): Random world is 69
---- TRSLobby.getCurrentTab(): Current tab is 0
---- TRSLobby.getCurrentTab(): Current tab is 0
---- TRSLobby.getCurrentTab(): Current tab is 0
---- TRSLobby.getCurrentTab(): Current tab is 1
---- TRSLobby.openTab(): Result = True
---- TRSLobby.getCurrentTab(): Current tab is 1
---- TRSLobbyWorlds.selectWorld()
------ TRSLobby.getCurrentTab(): Current tab is 1
-------- TRSLobbyWorlds.getCurrentWorld(): Current world is 31
------ TRSLobby.getCurrentTab(): Current tab is 1
------ Scrolled to and found world 69
------ Selected world 69
---- TRSLobbyWorlds.selectWorld(): True
------ TRSLobby.findPlayButton(): result = True
---- WARNING: Unknown login string: ""
---- HINT: Please report this issue in the SRL bugs section of the forum
------ Saving screenshot: unknown_login_count.png
---- Login response: One minute as passed...
------ All players inactive...
-- TPlayer.login(): False
-- ERROR: bankScreen.clickButton(): Unable to click button since bankscreen isn't open
-- Succesfully freed SMART[76284]
Successfully executed.

I don't always get a warning, either

Lipcot
10-22-2014, 09:08 PM
....

it just that you are not repeating! you are only doing one run and its even failing to openeing to bank

you should do the following:


repeat
makemoney;
bankstuff;
until (false);

And if Open Bank_booth is not working you could make your own procedure to click the banker

jack_herer
10-22-2014, 10:07 PM
it just that you are not repeating! you are only doing one run and its even failing to openeing to bank

you should do the following:


repeat
makemoney;
bankstuff;
until (false);

And if Open Bank_booth is not working you could make your own procedure to click the banker

Hi, yes, Bank_Booth is not working. Is there a way to specify how many times to repeat a specific action? eg: fastclick

The Mayor
10-22-2014, 10:24 PM
Maybe you should tell us exactly what you're trying to do. Open bank, click preset, and then repeat clicking? clicking what?

Lipcot
10-22-2014, 10:25 PM
Hi, yes, Bank_Booth is not working. Is there a way to specify how many times to repeat a specific action? eg: fastclick

yes, in the banking procedure you can do the following:


Var {Global Var}
SomeInt: integer;

procedure domoney;
begin
end;

procedure bankstuff;
begin

//Open bank, deposit etc,

Inc(Someint);
end;

//Mainloop
begin
repeat
domoney;
bankstuff;
until SomeInt >= 60 {Will repeat until Some int reaches in this case 60. So it will do 60 runs}
end;


Did this fast since i had to leave for a footbal match in 5 mins lol, will check when i come back

jack_herer
10-24-2014, 01:00 PM
Maybe you should tell us exactly what you're trying to do. Open bank, click preset, and then repeat clicking? clicking what?
I want it to click at (603, 361) on SMART 54 times.

To be more specific, I want it to click said spot 54 times, bank, and then repeat infinitely. I get it may sound strange, but really, I am not sure who exactly reads these forums and do not want to expose anything specific as to what this is supposed to be doing other than the obvious at this time.

jack_herer
10-24-2014, 01:14 PM
yes, in the banking procedure you can do the following:


Var {Global Var}
SomeInt: integer;

procedure domoney;
begin
end;

procedure bankstuff;
begin

//Open bank, deposit etc,

Inc(Someint);
end;

//Mainloop
begin
repeat
domoney;
bankstuff;
until SomeInt >= 60 {Will repeat until Some int reaches in this case 60. So it will do 60 runs}
end;


Did this fast since i had to leave for a footbal match in 5 mins lol, will check when i come back

Thank you for you help. I am trying this out now.

Incurable
10-24-2014, 02:12 PM
I want it to click at (603, 361) on SMART 54 times.

To be more specific, I want it to click said spot 54 times, bank, and then repeat infinitely. I get it may sound strange, but really, I am not sure who exactly reads these forums and do not want to expose anything specific as to what this is supposed to be doing other than the obvious at this time.

What are you worried about, exactly? Jagex reading what you're trying to do and then banning every account they see doing it? Or that someone might steal your idea or something? :p

Relax, the best way to get help is to explain what you're actually trying to do. Anything you're trying to do has probably already been done and it's not as though you need to release your script in order get help. ;)

cosmasjdz
10-24-2014, 02:34 PM
Jack probably the eaziest thing to do is like:

procedure main();
var
i: integer;
begin

for i:=0 to 53 do
begin
Domoney;
Bank;
end;
end;

Since in the example above integers value isnt know u either need to write first line as someint: integer:=0; or something

jack_herer
10-25-2014, 05:54 AM
What are you worried about, exactly? Jagex reading what you're trying to do and then banning every account they see doing it? Or that someone might steal your idea or something? :p

Relax, the best way to get help is to explain what you're actually trying to do. Anything you're trying to do has probably already been done and it's not as though you need to release your script in order get help. ;)

Hey Incurable, thanks for the reply. No, I am not worried about Jagex reading this, however I am worried about someone easily replicating this. It is very simple. I have explained what I am trying to do though. In smart, I need it to click one area of the screen 54 times between 1.5-3 seconds between each click, then bank once inventory is full (after 54 successful clicks, it should be full, if not, oh well) and then I need it to click in that same spot again, on repeat. That's it. But I am having some trouble, I am trying to use the suggestions provided above but am completely new to this, so it's trial and error at this point. The banking methods are not working for where I'm trying to do this at. I've tried GREY and BOOTH


It has been done, but not available currently on any RS3 botting website and if it is, it is not done in this manner which is far more sufficient. The market of this could easily crash if there were a lot of people actively doing this. I am not new to the runescape cheating community, but I am new to scripting.

jack_herer
10-25-2014, 05:57 AM
Jack probably the eaziest thing to do is like:

procedure main();
var
i: integer;
begin

for i:=0 to 53 do
begin
Domoney;
Bank;
end;
end;

Since in the example above integers value isnt know u either need to write first line as someint: integer:=0; or something

Hi, thank you for the help. I am trying to implement this in my script. I am very new and only know the basics, please bear with me. =]

Incurable
10-25-2014, 06:51 AM
Hey Incurable, thanks for the reply. No, I am not worried about Jagex reading this, however I am worried about someone easily replicating this. It is very simple. I have explained what I am trying to do though. In smart, I need it to click one area of the screen 54 times between 1.5-3 seconds between each click, then bank once inventory is full (after 54 successful clicks, it should be full, if not, oh well) and then I need it to click in that same spot again, on repeat. That's it. But I am having some trouble, I am trying to use the suggestions provided above but am completely new to this, so it's trial and error at this point. The banking methods are not working for where I'm trying to do this at. I've tried GREY and BOOTH


It has been done, but not available currently on any RS3 botting website and if it is, it is not done in this manner which is far more sufficient. The market of this could easily crash if there were a lot of people actively doing this. I am not new to the runescape cheating community, but I am new to scripting.

I can't say that I agree with your justification for not telling us what you want to do, but fair enough... trust me though, you haven't given us enough information to be able to properly help you. There's a billion ways to click a point 42 times, but only a few of them are going to be good for your script...

Read this (https://villavu.com/forum/showthread.php?t=58935), then this (https://villavu.com/forum/showthread.php?t=109161), then this (https://villavu.com/forum/showthread.php?t=107757). If you can't do it after you've done all three of those tutorials then you're really going to have no choice but to explain it better (or give up). ;)

The Mayor
10-25-2014, 07:05 AM
not available currently on any RS3 botting website.

Oh so you have access to the 4 other script sections on these forums ;)

jack_herer
10-25-2014, 07:43 AM
Oh so you have access to the 4 other script sections on these forums ;)

I'm new and only looked at public on this forum. I am talking about publicly released &/or insufficient ones on others.
If there's a script section on here that is for certain ranks and above, it could very well be on there. But that does not mean I want to explain what this script produces.

The Mayor
10-25-2014, 07:47 AM
I'm new and only looked at public on this forum. I am talking about publicly released &/or insufficient ones on others.
If there's a script section on here that is for certain ranks and above, it could very well be on there. But that does not mean I want to explain what this script produces.

It just makes it harder for people to help you, but suit yourself. You can always you can always read the guides linked above and do it yourself.

jack_herer
10-25-2014, 07:47 AM
To further explain, I am trying to click the first inventory square (shows fishing bait in the picture) 54 times with a 1-2 second interval between clicks. Then have it bank at Varrock, click preset 1, then repeat clicking the inventory as listed above.
24259

Does that help?

jack_herer
10-25-2014, 07:53 AM
I can't say that I agree with your justification for not telling us what you want to do, but fair enough... trust me though, you haven't given us enough information to be able to properly help you. There's a billion ways to click a point 42 times, but only a few of them are going to be good for your script...

Read this (https://villavu.com/forum/showthread.php?t=58935), then this (https://villavu.com/forum/showthread.php?t=109161), then this (https://villavu.com/forum/showthread.php?t=107757). If you can't do it after you've done all three of those tutorials then you're really going to have no choice but to explain it better (or give up). ;)

Thank you, I will review those. I had read a beginners tutorial written by The Mayor prior, but will do in that order. My goal here isn't just to create this one script, it's to learn how to do this sufficiently and know it offhand.

I've also posted some more information on here about what I need it to do.

Cheers!

Incurable
10-25-2014, 08:00 AM
Thank you, I will review those. I had read a beginners tutorial written by The Mayor prior, but will do in that order. My goal here isn't just to create this one script, it's to learn how to do this sufficiently and know it offhand.

I've also posted some more information on here about what I need it to do.

Cheers!

You're welcome, so long as your intention is to contribute, not just take our knowledge and use it for personal gain. :)

Just so that you know, what it sounds like you want to do is actually incredibly simple and should be doable after reading just the first two tutorials I linked, possibly the third. Remember to read the SRL-6 documentation and learn how to use it to your advantage. You could probably write the whole script in 50 lines if you tried hard enough.

EDIT: Btw, try not to double-post. Instead, edit your posts like so.

Justin
10-25-2014, 10:18 AM
jack_herer;

Untested. Hope this will help you but!


program jack_herer;
{$DEFINE SMART}
{$i srl-6/srl.simba}

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'x';
password := 'x';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;

procedure doMoney;
var
i: Integer;
begin
for i := 0 to 53 do
begin
writeln('Clicking i: ' + ToStr(i));
tabBackpack.mouseSlot(1, mouse_Left);
sleep(randomRange(1200, 2300))
end;
end;

function attemptToBank(): boolean;
begin
if (bankScreen.open(BANK_NPC_BLUE)) then
begin
wait(randomRange(500, 1000));
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
if bankScreen.close() then
exit(true);
end else
begin
writeln('Failed to open with NPC_BLUE, trying bank booth');
if (bankScreen.open(BANK_BOOTH)) then
begin
wait(randomRange(500, 1000));
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
if bankScreen.close() then
exit(true);
end;
end;
begin
writeln('Unable to open banker via NPC or BOOTH!');
exit(false);
end;
end;

begin
smartEnableDrawing := True;
setupSRL();
declarePlayers();
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;
while (players.getActive() > 0) do
begin
if attemptToBank() then
doMoney();
end;
end.


You will need to add failsafes to terminate the script if things go wrong. Also it won't re-login after you are logged out :)

yourule97
10-25-2014, 03:20 PM
If you are clicking something that is in the first backpack slot, you can simply use the pre-written methods for it: http://docs.villavu.com/srl-6/backpack.html

This seems like a pretty simple botting concept. Is the bot going to be standing still in the bank? If so, you can use Justin's banking code (even though I usually like to write my own bank finding method). I think I also had some trouble with the tabBackpack.mouseSlot(1, MOUSE_MOVE) command, so you can also use DTM's to find the object you want in your backpack. The Mayor has a good guide on this.

EDIT: And just looking at your SMART example picture, you definitely have not set up the bot according to the setup guide. From a glance, I can see that you do not have slim headers one. Be sure to check your transparency settings as well as that can mess up tabBackpack.isFull().

jack_herer
10-28-2014, 07:19 AM
Thank you all for the help, it is greatly appreciated. I don't have a lot of free time, but when I get this working and learn the language, I'll release it along with anything else I make provided there are people who will use it.

I've repped all of you, if that means anything. :P