SRL Archive - MSI Archives

Fishing.simba is working


3Garrett3

2010-09-01 13:37:45

Okay, so fishing.simba works. There are tons of debugs in it still, and it isn't flawless (obv). I have a script, SCRIPT_POWER_NET which can power net. I think we'll have to rewrite the function which determines which gear to use, because to make a SCRIPT_POWER_FISH it will have to decide based on the gear in the inventory.

So, I have no idea what I did to make it not crash. It could have actually been one of the random things that Coh3n had to fix, it could have been an SRL bug, Simba bug, or something completely random, but it works now, compiles, etc.

I tested a couple loads. I had it set to do 10 loads, but each time it did 1 then logged out and said "Finished all loads" or whatever MSI is supposed to say :p. So that might need fixing somewhere..

I also think that the TItems need fixing, it didn't properly count the shrimps/anchovies in the inventory.. That will need to be corrected. I'd like someone to do this, because I'm currently packing/moving so I wont have much time for the rest of the week.

Also, the fishing spot detection is weak, it usually guesses right, but it just basically guesses based on this logic:

Find the directions of water
[INDENT]
-It searches a small box to the 4 directions around the player, the spots are carefully picked boxes which will only ever contain water/fishes.
-If there isn't any water, there obviously isn't a fishing spot
-The water count (length of the water TPA) is recorded, for use in the next step
-It returns a TBool array of where there is water.
-Right = 0, Left = 1, Down = 2, Up = 3, correct me if I remembered wrong.
-The returned booleans represent if there is water in that direction[/INDENT]

Using water direction, find the side that there is fish on.
[INDENT]
-If there is only one true boolean returned, then it will simply use that side. Having water on only one side means that there can only be a fishing spot on one side.
-If there is multiple, it will rotate the camera to the optimal position (I've decided to make it so that the fishing spot it is watching for is always to the right of the character).
-It will do a count of the water, and if the water count varies from what it was when it was first found by a set amount, there is likely a fishing spot in the spot, or a person in the spot (leaning over the water). I'd like to set something else to do this, free time is limited though
-It returns a string, 'n', 's', 'e', 'w' depending on which way will make the fishing spot on the right, based on where it determines there is fish.
[/INDENT]

So the system there is pretty flawed. I'd love to see someone else put time into fixing that up :)

Thanks for people pushing me to finish, I'm pretty happy that it at least compiles.

Blumblebee

2010-09-01 15:01:20

I don't like the camera rotation thing, its too obvious a bot. I am also confused as to why we are not simply finding the fishing spot via a TPA considering it's not a difficult task to do

3Garrett3

2010-09-01 15:19:03

From: Blumblebee
I don't like the camera rotation thing, its too obvious a bot. I am also confused as to why we are not simply finding the fishing spot via a TPA considering it's not a difficult task to do


Well if you can come up with some expert tracking and locating, waiting, without it, I'd love to see it ;).

This is the best I could come up with, and it works alright..

Blumblebee

2010-09-01 15:27:25

From: 3Garrett3
Well if you can come up with some expert tracking and locating, waiting, without it, I'd love to see it ;).

This is the best I could come up with, and it works alright..


okie, well I'll try to look for something different than camera angling, that's the only part I don't like, aside from that really good job, congrats :)

3Garrett3

2010-09-01 15:33:40

From: Blumblebee
okie, well I'll try to look for something different than camera angling, that's the only part I don't like, aside from that really good job, congrats :)


Camera angling just worked better because the counts of colour/shifts weren't really accurate for each direction, so it was better to keep it looking for the same thing.

Or do you mean for the finding the direction? If you mean that then yeah, I dislike it too, I want that part rewritten. I thought you meant the making it a standard side to look at, I find that part easier.

Sir R. M8gic1an

2010-09-01 21:53:38

:) Glad it works. Leave the debugs in there. They're not harmful - very on the contrary. And with the current debug system they aren't difficult to ignore. Removing the debugs is a common mistake >.> The best way to test your scripts is to watch them and read the debug at the same time, to see if the actions add up.

~RM

3Garrett3

2010-09-01 22:03:02

Note to everyone to read this:

http://villavu.com/forum/showthread.php?t=58322

Cstrike

2010-09-01 23:22:55

This rotates? I always was thinking of having rotating as an integration– I find that I actually rotate a lot while I'm walking (aka: playing the 'legit' way according to jagex). I'd like to make a fishing script now, maybe a shark fishing script :)

3Garrett3

2010-09-01 23:24:11

From: cstrike
This rotates? I always was thinking of having rotating as an integration– I find that I actually rotate a lot while I'm walking (aka: playing the 'legit' way according to jagex). I'd like to make a fishing script now, maybe a shark fishing script :)


Well it rotates the camera so that the fishing spot is always on the right, it makes it easier to find out if we are fishing or not.

Sir R. M8gic1an

2010-09-02 00:08:44

I don't find rotating to be a bad thing, I used to do it legit quite often.

~RM

3Garrett3

2010-09-02 00:10:03

From: Sir R. Magician
I don't find rotating to be a bad thing, I used to do it legit quite often.

~RM


Not to mention that I dont have time to develop an uber l33t system, and nobody else seems to be available either. This will have to do for a bit.

Sir R. M8gic1an

2010-09-02 12:16:21

What about MSI's track object?

~RM

3Garrett3

2010-09-02 20:08:06

From: Sir R. Magician
What about MSI's track object?

~RM


The distance is usually very short, and a flag rarely shows up. So it makes more sense to just wait until after the movement, etc. then look for the nearest fishing spot.

Sir R. M8gic1an

2010-09-02 22:58:28

From: 3Garrett3
The distance is usually very short, and a flag rarely shows up. So it makes more sense to just wait until after the movement, etc. then look for the nearest fishing spot.


You could say the same thing about mining or woodcutting or anything really :rolleyes:

~RM