SRL Archive - Jr. Member OSR Outdated Scripts

[C/R]Nature-crafter (general store method)


Flight

2013-08-04 09:36:14

So here's one for your Jr. Members. I originally made this a while back, months infact, and it worked off SPS but only for 30-60 minutes before the color shifts were too radical for SPS to handle. The walking is the only part done in reflection, the rest is all color. I'm not going to bother making a fancy thread for this. The script is super simple and maybe later I'll clean it up and add some nice features.

This script uses reflection for walking only so should the client update again (and while we don't have an official reflection include yet) you'll need to update the hooks in "R_GetTileGlobal" as well as "R_TileToMM".

You'll need "AL_Functions.simba" & "C_AntiRandoms.simba", both of which I'll attach to this post. Download "AL_Functions.simba" and stick it in "Includes > SRL-OSR > SRL > misc/" and stick "C_AntiRandoms.simba" in "Includes > SRL-OSR > SRL > core > antirandoms/". This script will also take breaks that you specify near the top.

Let's see what else… In-game you need to have atleast 1 nature rune in your inventory (preferably the first slot but whatever), a handful of coins to buy-back the noted pure essence, and of course a good amount of noted Pure Essence. The script will walk to the general store, trade that shop person, sell 25 essence and buy it back. Then run to the nature altar far south-east of there and craft the runes then return for a rinse & repeat. Oh yeah, don't forget to wear your nature tiara!

I'm not sure but because of the text is handled in this version of AL_Functions you may need to use Simba 992 with the older 07UpChars font set, which I have also included.

NKN

2013-08-04 09:39:49

Nice release man. :)

First script in awhile to use reflection?

Flight

2013-08-04 09:45:25

From: NKN
Nice release man. :)

First script in awhile to use reflection?


Mm no doubt. I actually first used the reflection walking for Al-Cooker as an experiment. It uses (D)DTMs and they're already accurate so not really needed. :/ Nature runes are incredibly high and SPS just can't quite handle such a long path. It's wonderful to have even accurate walking. :thumbsup:

rj

2013-08-04 09:50:36

Gratz on release!!! I wish I still had a mems account to use this on (other than my friends which I may test it out)

Solar

2013-08-04 11:04:49

This is great. I have downloaded but will hold off from using it for now for a couple of reasons.
Firstly I want to get 99 in a couple of skills beforehand, and secondly, I don't know anything about reflection and whether it would mean a higher chance of a ban rate.
I like that it takes time to set up by getting the right version of simba, downloading and moving files into the right folders and setting up reflection. Hopefully this will deter some leechers (I know it's in the Jr. members section).

Justin

2013-08-04 18:43:04

Fantastic work Flight! Nice to see some reflection in there :)

Sjoe

2013-08-04 18:56:21

Nice Flight, would u mind if I used your antirandoms? Wanna release a flaxpicker one of these days.

Flight

2013-08-04 20:18:25

From: Sjoe
Nice Flight, would u mind if I used your antirandoms? Wanna release a flaxpicker one of these days.


Nah mate go for it. Those are always open for the public.

Nebula

2013-08-04 22:17:56

Sorry but I'm a reflection noob… could you expand more on the whole reflection thing

if you got reflection working for this script, why is it taking nkn and jj to get the entire reflection include working?

and if rs updates again and the code or whatever changes for the reflection stuff, how would you fix it, like how did you know what strings and integers to use here?
Result.X := (SmartGetFieldInt(0, 'd.cy') * 670470189) + (SmartGetFieldInt(Me, 'z') * -344898115) div 128;

Flight

2013-08-04 22:28:43

From: Nebula
Sorry but I'm a reflection noob… could you expand more on the whole reflection thing

if you got reflection working for this script, why is it taking nkn and jj to get the entire reflection include working?

and if rs updates again and the code or whatever changes for the reflection stuff, how would you fix it, like how did you know what strings and integers to use here?
Result.X := (SmartGetFieldInt(0, 'd.cy') * 670470189) + (SmartGetFieldInt(Me, 'z') * -344898115) div 128;


I personally wouldn't be able to update it. This script will only be that that stage of stability when it's running on an official reflection include, which at the moment, is not ready, so for the time being this script is working on a raw version of reflection and will indeed break upon the next client update.

They're moving right along on the include. Luckily the majority of the actual include is already there from SRL's previous reflection; the difficulty now lies in making an auto-update for grabbing all of the reflection hooks we need to feed the soon-to-be reflection library. This hands down is the most difficult part and they're working vigilantly on it.

What I have, in reflection, is only for tile positioning and tile-to-MM conversion (for walking and such). Brandon was kind enough to post these functions for us with the correct hooks and math formulas; I (we) owe him for that. The script was already made, I had this script developed for many months but working only off SPS with not such stable walking, so the hard part was already done.

Check it out fellas:

[=======================================]
[ NatCrafter Dev ]
[ by Flight ]
[=======================================]
[ Script Run Time : 12 Hr 35 Min 46 Sec ]
[ Breaks : 3 ]
[ Runecrafting XP : 51,975 (4,126/Hr) ]
[ Runes Crafted : 5,775 (458/Hr) ]
[ Total Runs : 244 ]
[=======================================]
[ NatCrafter Dev ]
[=======================================]
Time until break: 02:57:19

Random event during walking got me.

Turpinator

2013-08-12 13:32:39

From: Flight
Check it out fellas:

[=======================================]
[ NatCrafter Dev ]
[ by Flight ]
[=======================================]
[ Script Run Time : 12 Hr 35 Min 46 Sec ]
[ Breaks : 3 ]
[ Runecrafting XP : 51,975 (4,126/Hr) ]
[ Runes Crafted : 5,775 (458/Hr) ]
[ Total Runs : 244 ]
[=======================================]
[ NatCrafter Dev ]
[=======================================]
Time until break: 02:57:19

Random event during walking got me.


DOUBLE POST!
jk jk.

Looks nice. Started playing 07 recently, so once i get the RC for nats i will def be using it. Thanks. :)

Solar

2013-08-12 14:19:48

Hot damn! Going to get crafting these nats after I'm done with cooking, (so close!)
Awesome proggy Flight.

Syntax

2013-08-12 20:11:27

Nice job Flight. Going to use this script as a reference for reflection walking will give credits to you flight.

Flight

2013-08-12 20:45:38

From: Turpinator
DOUBLE POST!
jk jk.

Looks nice. Started playing 07 recently, so once i get the RC for nats i will def be using it. Thanks. :)


I'll go ahead and merge them now.

From: Solar
Hot damn! Going to get crafting these nats after I'm done with cooking, (so close!)
Awesome proggy Flight.


Nice. :D There's still much room for improvement here actually. I'm planning on making an AIO Runecrafter when we have an official reflection include running.

From: Syntax
Nice job Flight. Going to use this script as a reference for reflection walking will give credits to you flight.


Give credit to Brandon, he's the one who posted the methods for getting our player's tile location as well as converting a tile to a MM point.

Syntax

2013-08-12 20:49:15

Ok will do thanks flight.

Solar

2013-08-13 05:54:27

Sorry for being one of those noobs, but how do I get reflection for OSRS? I got the reflection2 file from github and extracted it to SRL-OSR. What am I doing wrong?

Hoodz

2013-08-13 07:22:38

From: Solar
Sorry for being one of those noobs, but how do I get reflection for OSRS? I got the reflection2 file from github and extracted it to SRL-OSR. What am I doing wrong?


You just need smart 8.2

Link to thread: http://villavu.com/forum/showthread.php?t=104778

Solar

2013-08-13 10:32:32

From: hoodz
You just need smart 8.2

Link to thread: http://villavu.com/forum/showthread.php?t=104778


Ah right, thanks hoodz, should have remembered that. :(

Edit: With SMARTv8.2 and using the old 07 chars folder I am not getting anything, just shuts down:
Compiled successfully in 2355 ms.
SRL Compiled in 16 msec
Paired with SMART[4424]
Custom Anti-Randoms setup
Loaded Font UpChars07_s
Shutdown
Successfully executed.
Is this because I am using Simba 993?


Edit 2: Didn't know I should have been logged in until looking through the script. :p Sorry about that.
Running ATM and seems to be going great, except when at the store it sometimes moves the mouse over me then the storekeeper, and repeats a few times. Probably my characters colours and clothing.

Lastly, is there anything to prevent dying should there be monsters at the Tai Bwo camp?

Flight

2013-08-13 21:09:14

From: Solar
Ah right, thanks hoodz, should have remembered that. :(

Edit: With SMARTv8.2 and using the old 07 chars folder I am not getting anything, just shuts down:
Compiled successfully in 2355 ms.
SRL Compiled in 16 msec
Paired with SMART[4424]
Custom Anti-Randoms setup
Loaded Font UpChars07_s
Shutdown
Successfully executed.
Is this because I am using Simba 993?


Edit 2: Didn't know I should have been logged in until looking through the script. :p Sorry about that.
Running ATM and seems to be going great, except when at the store it sometimes moves the mouse over me then the storekeeper, and repeats a few times. Probably my characters colours and clothing.

Lastly, is there anything to prevent dying should there be monsters at the Tai Bwo camp?


I think there's some snakes near the rock outcrops that seem to attack low level'd players, but I see many level 3 bots running back and forth on the same path with no problem.

Solar

2013-08-14 10:02:56

I was talking more about the broodoo victims that can spawn when other people are playing the Tai Bwo cleanup minigame, but it hasn't happened since I've been using it so I suppose it's less common than I thought.

As for the script, it ran for over 4 hours today, but I came back and it had logged out at the shop. I think this could be because of my characters colours though as I said in my previous post.
Will continue to use, but maybe not that much since I have reached my main goal for RC with this already. Thank you Flight.

Flight

2013-08-14 22:00:40

From: Solar
I was talking more about the broodoo victims that can spawn when other people are playing the Tai Bwo cleanup minigame, but it hasn't happened since I've been using it so I suppose it's less common than I thought.

As for the script, it ran for over 4 hours today, but I came back and it had logged out at the shop. I think this could be because of my characters colours though as I said in my previous post.
Will continue to use, but maybe not that much since I have reached my main goal for RC with this already. Thank you Flight.


Oh very good, congratulations. :)

prostaker

2013-08-17 14:30:14

Very nice script. Actually I was in the middle of making one Nature Runner script myself back when 07 first came out… After a while I discovered that it's almost impossible, since I couldn't get the walking working. The distance was just too much for color based walking/or maybe I couldn't script so good yet :)

Anyway a week ago I was surfing the inter-webs and discovered that there is now reflection based walking… I tought: "what if…"
So I did. I dug out my old nature script and started tweaking it for [R]-walking. I got it working - kinda.. I still had some bugs but I tought I head to forums for some help. Maybe somebody can help me - you never know :)

I used "Search" and found this thread. Exactly what I was trying to do, already done. I tested your script out and it worked pretty much flawlessly.

So in conclusion. I wanted to thank you. Since you scripted the exactly same thing, that I was trying to do, then I managed to get rid of my nasty buggs quite fast. Thank you for helping me complete my very first script :)

Solar

2013-08-17 14:34:42

Just a little bug I suppose you could call it. When walking to the altar from the shop, I saw the script walking just inside the fenced off camp (red fence on the minimap), walking inside the camp, clicking outside of the fenced area (further to the south east), and then because you have to go north to go around the fence you end up cycling back and forth.

Very rare, but thought you'd like to know.


Edit: Also got this
Error: Exception: The Points you passed to DrawATPA exceed the bitmap's bounds at line 1021

When I logged in I was at the store with a part inventory of essence.
Again, very rare occurrence.

Flight

2013-08-17 21:17:08

From: prostaker
Very nice script. Actually I was in the middle of making one Nature Runner script myself back when 07 first came out… After a while I discovered that it's almost impossible, since I couldn't get the walking working. The distance was just too much for color based walking/or maybe I couldn't script so good yet :)

Anyway a week ago I was surfing the inter-webs and discovered that there is now reflection based walking… I tought: "what if…"
So I did. I dug out my old nature script and started tweaking it for [R]-walking. I got it working - kinda.. I still had some bugs but I tought I head to forums for some help. Maybe somebody can help me - you never know :)

I used "Search" and found this thread. Exactly what I was trying to do, already done. I tested your script out and it worked pretty much flawlessly.

So in conclusion. I wanted to thank you. Since you scripted the exactly same thing, that I was trying to do, then I managed to get rid of my nasty buggs quite fast. Thank you for helping me complete my very first script :)


Oh very good then. :smile: I'm glad it helped you out in your own script, and I'm very pleased to see more people with initiative to create their own work. :thumbsup:

From: Solar
Just a little bug I suppose you could call it. When walking to the altar from the shop, I saw the script walking just inside the fenced off camp (red fence on the minimap), walking inside the camp, clicking outside of the fenced area (further to the south east), and then because you have to go north to go around the fence you end up cycling back and forth.

Very rare, but thought you'd like to know.


Edit: Also got this
Error: Exception: The Points you passed to DrawATPA exceed the bitmap's bounds at line 1021

When I logged in I was at the store with a part inventory of essence.
Again, very rare occurrence.


This is because my walking method will create a brand-new, randomized walking path each time your player walks, so while I try to keep the randomness within reason there's still a chance one of the randomize tiles would be inside that fenced area. Something I did (since releasing this script) to decrease the likeliness of this is give a slight adjustment to the Tile_Village tile.

Go down to line 67 I believe, inside your LoadVars, and find "Tile_Village := Point(2812, 3077);", replace it with this:

Tile_Village := Point(2811, 3078);

I made the walking back and forth use 3 tiles rather than just the two (Shop & Ruins) because from the shop to the altar ruins is not a straight path and the walking tile generator would surely pick a tile within that fenced area. So to work around it I have, first, the player walk to the center point, between the woodcutting area and the fenced-in area, where it's a straight path from either the shop of the ruins. Then the walking generates another random path to the final destination, hopefully excluding the fenced-in area. Make sense?

Solar

2013-08-18 02:35:39

:) Yep that makes sense, thanks. I'll give the small change a try too.

Edit: Seems like something has changed and I can't figure out what. When I'm at the shop it keeps walking to nearest NPC.
After closing simba and SMART and reloading it up it works again. Strange huh?

Edit2: Nice proggy for you Flight. :)
[======================================]
[ A Nat-Crafter V.0.1 ]
[ by Flight ]
[======================================]
[ Script Run Time : 9 Hr ** Min ** Sec ]
[ Breaks : * ]
[ Runecrafting XP : 37,*** (*,***/Hr) ]
[ Runes Crafted : 4,*** (***/Hr) ]
[ Total Runs : 2** ]
[======================================]
[ A Nat-Crafter V.0.1 ]
[======================================]

Haxz

2013-09-11 21:32:41

I wish reflection was here months ago. Nice script Flight!

leeds4eva

2013-11-17 06:24:51

[Error] C:\Users\user\Downloads\NatCrafter(V.0.1) (1).simba(93:12): Variable Expected at line 93
Compiling failed.

Sable

2014-06-13 20:43:46

script doesn't work
[Error] C:\Simba\Includes\SRL-OSR\SRL\core\antirandoms\C_AntiRandoms.simba(3:3): Duplicate identifier 'DTM_Royal_Frog' at line 3

Athylus

2014-06-25 07:17:59

You can replace the random with another one Yuri…

Sable

2014-06-25 14:13:48

Well fix it then

mod edit

kriss1993

2014-06-26 01:46:33

Im a beginner scriper (not rly) been scripting for a year actually but I been using the easy functions so to say been lazy to learn new tricks now im reading other scripts like yours and im LIKE WTF i cant even read the script, also quick question is there a function that works that counts item amount in the bank? thats what I was looking for rly and I think that the function is oudated for OSR

Haxz

2014-06-26 01:50:24

From: kriss1993
Im a beginner scriper (not rly) been scripting for a year actually but I been using the easy functions so to say been lazy to learn new tricks now im reading other scripts like yours and im LIKE WTF i cant even read the script, also quick question is there a function that works that counts item amount in the bank? thats what I was looking for rly and I think that the function is oudated for OSR


Don't think its broken, I just used it to count my items for proggies, works fine for inventory, not sure about bank though.

function ItemAmount(area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer;

kriss1993

2014-06-26 01:54:10

I pretty much tried all of thoese count functions what I wanna do is basicly If ItemCount < Then (do this do that) else (do that do this);
just cant find a working funtion to count something in the bank or inv or store etc.etc.

Flight

2014-06-26 01:56:38

Definitely out-dated and won't be updated until AeroLib has the next color-based positioning system.

Haxz

2014-06-26 02:06:41

From: Flight
Definitely out-dated and won't be updated until AeroLib has the next color-based positioning system.


Sorry for off-topic, does that means AeroLib can do positioning and walkings with color? I'm currently using the reflection walking, can't really say its perfect, but it certainly did solved my problems for walking and positioning.

Flight

2014-06-26 02:23:25

From: Haxz
Sorry for off-topic, does that means AeroLib can do positioning and walkings with color? I'm currently using the reflection walking, can't really say its perfect, but it certainly did solved my problems for walking and positioning.


Indeed, so far it just utilizes a modified version of SPS for positioning but hopefully in the near future there will be a more accurate alternative to SPS.