PDA

View Full Version : AntiBans, Randoms, Newbie Questions :)



Kaladin
01-22-2014, 03:25 AM
Hi guys, I'm looking at writing a script for fun and to mess around with another language for abit, my questions are.

In RS3, is there still random events? Does the SRL library have random events already in?
When I am testing my script, which things should I focus on first (Antibans etc, basic tips) because I will be testing this account on a mid level members account so I'd like take as many precautions as possible.

When searching for things like the bank, or rare trees, should I be searching for the bmp icon or just colors? If I need to use BMP's could somebody point my in the right direction so I can learn about how to do so please.

Thank you :)
(Apologies for any hap-hazard and lazy typing, it is too late to be grammatically correct)


EDIT: Hi, so after much reading I now believe SPS is what we use to create DTM's which are then used like bmps? right? I checked out some DTM includes but they are no longer relevant with SRL6? I can already seem numerous posts asking about SPS but I would like to add, that I too would love to see a tutorial for this, I'm incredibly keen to write some scripts but would like some insight into the tools before that is possible.

Kaladin
01-22-2014, 08:56 AM
Okay. So following this guide: http://villavu.com/forum/showthread.php?t=84360&highlight=photoshop

I managed to get this, had to tweak abit due to SRL6 which took me considerably longer than it should have xD Anyhow, what exactly does $DEFINE SMART do? Just open the Smart window and nothing further?
I tried running this after I had logged in manually but nothing happened, so I'm just trying to figure out why :)


{$DEFINE SMART} //< Edit this out if using Rs Client
{$i SRL-6/SRL.simba}
{$i sps/lib/sps-rs3.simba}

var //{path name}
//{delcare the sps variable}
walkpath: tpointarray;

procedure iniPath;
begin
walkpath := [Point(225, 197), Point(220, 203), Point(201, 216), Point(212, 223), Point(219, 242), Point(220, 273), Point(220, 298), Point(200, 296)] ;
end;
procedure testpath;
begin
sps.walkPath(walkpath);
end;
begin

setupsrl;
iniPath; //{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps.setup('edge', RUNESCAPE_SURFACE, 4, 600.0, 0.40);
testpath;
repeat
until(false)
end.

Spartan 117
01-22-2014, 09:05 AM
Can you post what the debug says?
If it's not giving much info change
Sps.walkpath(walkpath);
To
Writeln(Sps.walkpath(walkpath));
Then see what the debug says
That should still call the function but May or may not give some more info
My guess is that it is not finding enough similar points on the spa map. Is it a custom map?
Also why is there an unused repeat loop? Maybe put your testpath call in there

Kaladin
01-22-2014, 09:14 AM
I was thinking it was more of an issue with not properly logging in before attempting to navigate said path?

I took this snippet directly from the link I posted above concerning SPS and adapted it so there may be leftover snippets that do nothing :P

I changed to what you said and it just reads false, so I tried this;


{$DEFINE SMART} //< Edit this out if using Rs Client
{$i SRL-6/SRL.simba}
{$i sps/lib/sps-rs3.simba}

var //{path name}
//{delcare the sps variable}
walkpath: tpointarray;

procedure iniPath;
begin
walkpath := [Point(225, 197), Point(220, 203), Point(201, 216), Point(212, 223), Point(219, 242), Point(220, 273), Point(220, 298), Point(200, 296)] ;
end;
procedure testpath;
begin
Writeln(Sps.walkpath(walkpath));
end;
begin

setupsrl;
iniPath; //{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps.setup('edge', RUNESCAPE_SURFACE, 4, 600.0, 0.40);
repeat
if (isLoggedIn()) then
testpath;
until (false)
end.


The debug file for that produces this;

---- initSmart()
---- Waiting up to 5 minutes for RS to load...
---- Client is ready.
---- Setup SRL in 14899ms.
-- setupSRL(): True
-- sps.init()
---- Path exists (C:\Simba\Includes\SPS\img\runescape_surface\edge. png)
---- Setup area "edge" in 16ms
-- sps.init()

(Note, I manually logged in after starting it)
If I don't log in it will just say "Waiting 5 minutes for RS client to ready" :)

Thank you.

Spartan 117
01-22-2014, 09:21 AM
In the loop(for debugging purposes) add
Writeln('we are logged in');

And in the testpath function add this line
Writeln('trying to walk');

I'd like to see what the debug says for that.

Did you make sure you are using OpenGL and your in game graphics are setup correctly?

Kaladin
01-22-2014, 09:27 AM
Yes my friend, I tested out a script all last night which has inspired me to get creative ;)

Ater adding said changes the debug consists of rapidly alternating;

Walking da path mon
False

What I reallllly don't understand here, is that if it is able to call the testpath procedure many times, why is it not also writing "we are logged in"?

Hoodz
01-22-2014, 09:36 AM
this is how i make my scripts: first i make the procedures that are the 'main procedures' in my script: the main procedures in a fighting script would be eating + attack procedure. after i made those i make a mainloop, but i begin at the end of what you would really do: instead of attacking a monster i would first check if you have food, then if you have food then you check if you are in combat > if not then attack and else you can enter a antiban procedure or just sleep. while in fight you can also check your hp for eating.

Spartan 117
01-22-2014, 09:38 AM
Yes my friend, I tested out a script all last night which has inspired me to get creative ;)

Ater adding said changes the debug consists of rapidly alternating;

Walking da path mon
False

What I reallllly don't understand here, is that if it is able to call the testpath procedure many times, why is it not also writing "we are logged in"?

Hard to say. If I looked at your newest addition to the code I could tell.
One thing is I always write isLoggedIn rather than isLoggedIn()
I'm not sure what the difference would be to be completely honest.
One thing that is pretty obvious is that it's not finding the map.
Repost your latest edition of the code and we will go from there!

Kaladin
01-22-2014, 09:39 AM
this is how i make my scripts: first i make the procedures that are the 'main procedures' in my script: the main procedures in a fighting script would be eating + attack procedure. after i made those i make a mainloop, but i begin at the end of what you would really do: instead of attacking a monster i would first check if you have food, then if you have food then you check if you are in combat > if not then attack and else you can enter a antiban procedure or just sleep. while in fight you can also check your hp for eating.

Looks like a good way of thinking about things, thanks hoodz :)
Appreciate the insight, right now I'm trying to figure out how to accomplish various tasks and then I can see about fitting it all together :)

Hoodz
01-22-2014, 09:41 AM
Looks like a good way of thinking about things, thanks hoodz :)
Appreciate the insight, right now I'm trying to figure out how to accomplish various tasks and then I can see about fitting it all together :)

i find making the mainloop the hardest thing to do.

Kaladin
01-22-2014, 09:42 AM
Hard to say. If I looked at your newest addition to the code I could tell.
One thing is I always write isLoggedIn rather than isLoggedIn()
I'm not sure what the difference would be to be completely honest.
One thing that is pretty obvious is that it's not finding the map.
Repost your latest edition of the code and we will go from there!

:) I only added what you said, the two writelns for debuggings, I've also just tested without the () but it made no difference, here is the code:


{$DEFINE SMART} //< Edit this out if using Rs Client
{$i SRL-6/SRL.simba}
{$i sps/lib/sps-rs3.simba}

var //{path name}
//{delcare the sps variable}
walkpath: tpointarray;

procedure iniPath;
begin
walkpath := [Point(225, 197), Point(220, 203), Point(201, 216), Point(212, 223), Point(219, 242), Point(220, 273), Point(220, 298), Point(200, 296)] ;
end;
procedure testpath;
begin
Writeln(Sps.walkpath(walkpath));
Writeln('Walking da path mon');
end;
begin

setupsrl;
iniPath; //{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps.setup('edge', RUNESCAPE_SURFACE, 4, 600.0, 0.40);
repeat
if (isLoggedIn) then
Writeln('Yesss mon we are logged in!"');
testpath;
until (false)
end.


And the debug;

False
Walking da path mon
False
Walking da path mon
False
Walking da path mon
False
Walking da path mon
False
Walking da path mon
False
Walking da path mon
False
Walking da path mon
False
-- Freeing the minimap mask
-- Succesfully freed SMART[11160]
Successfully executed.

Kaladin
01-22-2014, 09:44 AM
i find making the mainloop the hardest thing to do.

Haha no doubt, right now I can't even get the mainloop to check if logged in and walk 4 steps xD

The Mayor
01-22-2014, 09:47 AM
If you wait a few days for me to release my tutorial, it has a section on how to turn a script idea into a working script :) Also has a section on SPS and DTMs and various other things for RS3.

Spartan 117
01-22-2014, 09:49 AM
Since you do not have a begin after you if then statement it only uses the writeln that is not being outputted. Since that line is not going to the output we know that it is not detecting that your are logged in. My only guess would be make sure you are on min graphics settings, open gl, and old school preset. The way you wrote the script doesn't seem to be the problem though so that's some good news!

Kaladin
01-22-2014, 09:52 AM
If you wait a few days for me to release my tutorial, it has a section on how to turn a script idea into a working script :) Also has a section on SPS and DTMs and various other things for RS3.

Great I look forward to it :)
I actually study programming currently and this is giving me some motivation which is awesome
I have a fairly good idea of what needs doing for a simple Edge Yew chopper but obviously there is a lot to learn beforehand :)

The one thing that severely confuses me is things like the minor problem above;

The loop clearly is repeating yet the Writeln before the procedure call never ever gets called... why? :S :S
Explodes my head :D

The Mayor
01-22-2014, 09:55 AM
If you're talking about the if isLogged in then writeLn() then it mustn't be recognizing you're logged in. Make sure your graphics settings are correct, and reset you interfaces back to oldschool

Kaladin
01-22-2014, 09:56 AM
Since you do not have a begin after you if then statement it only uses the writeln that is not being outputted. Since that line is not going to the output we know that it is not detecting that your are logged in. My only guess would be make sure you are on min graphics settings, open gl, and old school preset. The way you wrote the script doesn't seem to be the problem though so that's some good news!

Thanks very much for your help Spartan, I wasn't aware you needed a begin and end for if statements?
Thats why I wanted to know what the Smart initialization does, because do I not need another few procedures such as Log in/click play button?
Perhaps its the manual interference that is messing it up... who knows XD

Kaladin
01-22-2014, 09:57 AM
YES ! You are completely right guys, I am so sorry!

I changed my minimap size to get the SS and I've already read that the Login uses the compass to check? Either way my bad completely, really gotta stop staying up all night... haha :D

EDIT: And I'm sure that, after all this... you'll all be glad to know the DTM worked flawlessly, can't believe pathing is so freaking easy BRB SCRIPTING TIME :D

Spartan 117
01-22-2014, 10:04 AM
YES ! You are completely right guys, I am so sorry!

I changed my minimap size to get the SS and I've already read that the Login uses the compass to check? Either way my bad completely, really gotta stop staying up all night... haha :D

EDIT: And I'm sure that, after all this... you'll all be glad to know the DTM worked flawlessly, can't believe pathing is so freaking easy BRB SCRIPTING TIME :D

Glad it worked for you! And glad I could help. Also on Villavu double posting is frowned upon so next time to avoid breaking rules use the edit post instead if posting twice in a row!

Kaladin
01-22-2014, 10:10 AM
One final nub post I promise (for the next 6 hours max xD), randoms aren't IG in RS3 yet? Or am I just lucky enough not to have found one yet :D

And, with SPS, do I need to check I am in a certain location before starting a walkpath or will it do it automatically? I've kinda answered my own question but I want to double check, when I run this;


{$DEFINE SMART} //< Edit this out if using Rs Client
{$i SRL-6/SRL.simba}
{$i sps/lib/sps-rs3.simba}

var //{path name}
//{delcare the sps variable}
walkpath: tpointarray;
walkpath2: tpointarray;

procedure iniPath;
begin
walkpath := [Point(225, 197), Point(220, 203), Point(201, 216), Point(212, 223), Point(219, 242), Point(220, 273), Point(220, 298), Point(200, 296)] ;
walkpath2 := [Point(198, 289), Point(217, 294), Point(216, 237), Point(196, 204), Point(223, 193)] ;
end;
procedure testpath;
begin

Writeln(Sps.walkpath(walkpath));
Writeln('Walking da path mon');
sleep(5000);
Writeln(Sps.walkpath(walkpath2));
end;
begin

setupsrl;
iniPath; //{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps.setup('edge', RUNESCAPE_SURFACE, 4, 600.0, 0.40);
repeat
if (isLoggedIn) then
Writeln('Yesss mon we are logged in!');
testpath;
until (isLoggedIn)
end.


It skipped the first walkpath because I wasn't in the bank, yet executed the 2nd one because I was near the tree... Therefore, is it NOT neccessary to include checks such as?


If getPlayerPos() = (nearTree) then
walkpath = toBank
else If getPlayerPos() = (nearBank) then]
walkpath = toTree

(Pseudo-ish)