SRL Archive - MSI Bugs

Diary of an MSI user


Markus

2011-01-16 15:24:51

I posted most of this in some other random places here, but I thought it might be useful if I structure my rant/constructive criticism here. Some of it might already be resolved, if it is and you got mod powers, just use the strike tags.
Hey! :)

Until recently, I ignored these fora a lot. I didn't auto, thus I didn't care about MSI. But I started to come back to autoing around one or two weeks ago so I was looking for a script.
A quick glance at villavu showed me that nowadays that there was only one way to go: MSI. It looked great, supported tons of locations/scripts and it could use both colour/reflection. That's awesome, I thought!
I freshly installed Simba 0.95RC, enabled SRL/Reflection.sex, installed them and verified it to be working fine by running an old script of mine (which also seems to use reflection for a few parts nowadays). Then I ran Runme.simba

Immediately I was presented with a nice form! Really, it gave me a good impression. I turned breaking on, world switching on, then entered my character details and said I wanted to use the Varrock East Miner. Location was set (defaulted!) to: 'The Wonderful World of Runescape!'. Looked great to me, my char is somewhere in Runescape and the script will know where.
Or at least, that's what I thought;

#1: MSI uses wicked default location settings
After I posted something, I heard that that mode was strictly meant for powermining. How should I know? I just know MSI thinks I'm somewhere in Runescape. Reflection was up, why can't it use reflection to figure out where I am?
Even Wizzup's multiminer can do that using colour. Of course I can be anywhere, but detecting if I'm either at mine, bank, or unknown location isn't too hard and with reflection it's trivial.

So I fixed that, but I accidentally logged out my player. I was hoping it would log in (I set my user/pass), but I forgot to enter something in the form. What happened?
#2: MSI doesn't use it's brains for the form settings
I got an error out of range in loginplayer.scar! But, I am using one player? Do I really have to set it?
I guess so. Worst of all: it doesn't even save that 0 I set there, so I have to enter that every single time. No press run at Simba, press load+run at form, no I actually have to switch to the keyboard to enter that 0! Really, after 20 times that really gets annoying.


So I figured this out and was like, ok! |Let's get some mining levels!
I started the script and watched it for a moment. One thing really annoyed me:
#3: MSI's tilewalking is very un-humanlike.
It might be hard to explain, but there's one main problem and that's that it always clicks at the same tiles and it sometimes misses the next tile (read: it clicks at a tile 4 pixels away from Minimap center, now THAT is human-like), pauses for a second to check for randoms, stuff like that. That is really not human-like:

Suggestion: Many scripts (at least mining, for example varrock east, lumby swamp) just need to walk in a few straight lines. How about having the script record only include those 'corner' tiles and using r_WebWalk to walk between them? You can script VEM in only 4 tiles then and be a bit more human-like:
If you're really cool you add the bright red control points to create some cool bezier splines like I did for the orange path. The green path should do though. But please do something, as this is extremely detectable
.
After it walked to VEM, it was standing there with a couple of other bots and it happily started mining. However, after a few rocks, it was standing there doing nothing.
I looked at debug, which said:

[ @@@ ] ---- MSI_WaitWhileMining
[ @@@ ] ------ InvCount: 5
[ @@@ ] ------ Entering loop
[ @@@ ] ---------- MSI_AntiBan
And it took a while. A quick glance at the debug drawing was clear: it was tracking the wrong rock which no one was mining. It seems I was not the only one having this problem as a couple of other botters were also standing there with exactly the same problem I had.
#4: MSI's object tracking does some really weird things at times, causing massive drop in xp-rates.
Luckily another botter managed to mine that rock (the rock it was tracking) and suddenly my character (and one or two others) came to live!
This wasn't an isolated case, I think it cuts my iron mining rate at least by 30%. This also happens in the mining guild, but due to all rsbotters/ibotters the wrong rock gets mined away earlier. This is *really* annoying. If you could fix this problem I'd love you.
Problem also occurs when someone else mines the rock while we are still walking towards it. You'll stop walking and what does MSI think? That I'm mining some rock at the corner of my mainscreen.
I managed to reduce this a bit by setting a lower time-out in mining.scar but the problem is still there, which also leads me to #5

#5: MSI thinks it takes 60 seconds to mine an iron ore at mining level 80.
In fact it doesn't even take longer than 10 at mining level 15. Can't the "Artificial Intelligence" figure out that that's ridiculous??


I switched off my PC and switched to my laptop, a Toshiba Tecra m2 (upgraded to 1gb RAM). It's singlecore and I really suffered from that:
#6: The object tracking wastes so much CPU time that there's nothing left for the client.
This also causes me to lag a lot. It also made it literally impossible to use the guild miner. Not because it can't mine, but because it can't walk back to the bank! This problem occurs at any pc which isn't dualcore and it also decreases efficiency when trying to run multiple scripts at a pc.


I'll edit this post with a couple of debug logs in a minute from that laptop.

[ Ine ] -- MSI_Walk
[ Ine ] ------ MSI_WaitWhileResting
[ Ine ] ---- Player's Location = Mining Guild
[ Ine ] ---- MSI_PerfomWalk
[ Ine ] ------ MSI_ReflectionWalk
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is on the minimap
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is on the minimap
[ Ine ] -------- Tile(3021, 9739) is on the minimap
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 47
[ Ine ] ---------- Flag distance: 30
[ Ine ] ---------- Flag distance: 15
[ Ine ] -------- MSI_SolveObstacle
[ Ine ] ---------- Mining Guild: Ladder Up's tile is visible
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] ------------ 5 objects found!
[ Ine ] ------------ MSI_Track Object
[ Ine ] -------------- ~ Track Record
[ Ine ] -------------- ~ ~ TrackObject
[ Ine ] -------------- ~ ~ Searches: 99
[ Ine ] -------------- ~ ~ Successes: 81
[ Ine ] -------------- ~ ~ Success %: 81
[ Ine ] ------------ MSI_TrackObject: True
[ Ine ] ---------- MSI_FindObjectsIn: True
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] ------------ 4 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: True
[ Ine ] ---------- Found mirror object: Mining Guild Ladder: Down
[ Ine ] ------------ Player is on end tile
[ Ine ] -------- MSI_SolveObstacle: True
[ Ine ] ---------- Distance from player to location: 71
[ Ine ] -------- Tile(3012, 3355) is not on the minimap
[ Ine ] -------- Tile(3023, 3352) is on the minimap
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 60
[ Ine ] ---------- Flag distance: 62
[ Ine ] ---------- Flag distance: 63
[ Ine ] ---------- MSI_AntiBan
[ Ine ] ---------- Flag distance: 58
[ Ine ] ---------- Flag distance: 45
[ Ine ] ---------- Flag distance: 34
[ Ine ] ---------- Flag distance: 24
[ Ine ] ---------- Distance from player to location: 42
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is not on the minimap
[ Ine ] -------- Tile(3042, 9737) is not on the minimap
[ Ine ] -------- Failed to walk leg 0 of script: Mining Guild Miner
[ Ine ] ------ MSI_ReflectionWalk: False
[ Ine ] ------ MSI_ColorWalk
[ Ine ] ------ MSI_ColorWalk: False
[ Ine ] ---- MSI_PerformWalk: False
[ Ine ] -- MSI_Walk: False
[ Ine ] -- MSI_UnsetPlayer
[ Ine ] ---- Failed to walk to bank
[ Ine ] ---- MSI_SetSkillLevels
[ Ine ] ------ Mining level hasn't changed
[ Ine ] ---- MSI_SetSkillLevels: Finished
[ Ine ] ---- MSI_SetSkillLevels
[ Ine ] ------ Mining level hasn't changed
[ Ine ] ---- MSI_SetSkillLevels: Finished
[ Ine ] ---- Cleared file: C:\Simba\Includes\MSI\Remote.txt
Another one which failed when walking back to bank:

[ Ine ] -- MSI_Walk
[ Ine ] ------ MSI_WaitWhileResting
[ Ine ] ---- Player's Location = Mining Guild
[ Ine ] ---- MSI_PerfomWalk
[ Ine ] ------ MSI_ReflectionWalk
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is on the minimap
[ Ine ] ---------- Flag distance: 56
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 43
[ Ine ] ---------- Flag distance: 35
[ Ine ] ---------- Flag distance: 21
[ Ine ] -------- Tile(3021, 9739) is on the minimap
[ Ine ] ---------- Flag distance: 48
[ Ine ] ---------- Flag distance: 37
[ Ine ] ---------- Flag distance: 24
[ Ine ] -------- MSI_SolveObstacle
[ Ine ] ---------- Mining Guild: Ladder Up's tile not on the MainScreen
[ Ine ] ---------- Tile(3019, 9741) is on the minimap
[ Ine ] ------------ Flag distance: 10
(I know it's incomplete, idk why).

One good thing: it *does* work. Just not too great. The quirks really make it a lot less fun to use MSI :(

Just my $0.07, but I hope the MSI devs could use this constructively :)

- Markus

Edit: I even left that PvP world issue out of this.

Sir R. M8gic1an

2011-01-16 16:55:15

Great feedback and great debug to go with it. WebWalk is still not in the reflection include unfortunately, and I should really have a look at TrackObject then. And we need to figure out if that looping through all the different object finders is normal or not, but as far as I remember it is.

and hip hip for hybrid colour debugging and manipulating.

~RM

mormonman

2011-01-16 17:07:48

From: Sir R. Magician
Great feedback and great debug to go with it. WebWalk is still not in the reflection include unfortunately, and I should really have a look at TrackObject then. And we need to figure out if that looping through all the different object finders is normal or not, but as far as I remember it is.

and hip hip for hybrid colour debugging and manipulating.

~RM


It is in the include.

Coh3n

2011-01-16 18:18:41

From: Markus

#1: MSI uses wicked default location settings

#2: MSI doesn't use it's brains for the form settings

Thanks for the feedback, but ^ that? Cmon, screw off. Is that really necessary? Heaven forbid that with all the things MSI does, we actually forgot a couple things. OMG it's the end of the world!

From: Markus
Location was set (defaulted!) to: 'The Wonderful World of Runescape!'. Looked great to me, my char is somewhere in Runescape and the script will know where.
Or at least, that's what I thought;

#1: MSI uses wicked default location settings
After I posted something, I heard that that mode was strictly meant for powermining. How should I know? I just know MSI thinks I'm somewhere in Runescape. Reflection was up, why can't it use reflection to figure out where I am?
Even Wizzup's multiminer can do that using colour. Of course I can be anywhere, but detecting if I'm either at mine, bank, or unknown location isn't too hard and with reflection it's trivial.

This part surprised me. I would think that a smart guy like you may figure out that he should set the location to one from the list of dozens of locations on the location tab. And just for the record, I don't like how the location is set by default. I'm going to change that when I can.

From: Markus

So I fixed that, but I accidentally logged out my player. I was hoping it would log in (I set my user/pass), but I forgot to enter something in the form. What happened?
#2: MSI doesn't use it's brains for the form settings
I got an error out of range in loginplayer.scar! But, I am using one player? Do I really have to set it?
I guess so. Worst of all: it doesn't even save that 0 I set there, so I have to enter that every single time. No press run at Simba, press load+run at form, no I actually have to switch to the keyboard to enter that 0! Really, after 20 times that really gets annoying.

I fixed this the first time you reported it… weeks ago I think? Please tell me if it didn't. But it seems to be working with one player fine for me (I just ran Rimmington Yews a few times on one character).

From: Markus

#3: MSI's tilewalking is very un-humanlike.
It might be hard to explain, but there's one main problem and that's that it always clicks at the same tiles and it sometimes misses the next tile (read: it clicks at a tile 4 pixels away from Minimap center, now THAT is human-like), pauses for a second to check for randoms, stuff like that. That is really not human-like:
Suggestion: Many scripts (at least mining, for example varrock east, lumby swamp) just need to walk in a few straight lines. How about having the script record only include those 'corner' tiles and using r_WebWalk to walk between them? You can script VEM in only 4 tiles then and be a bit more human-like:
If you're really cool you add the bright red control points to create some cool bezier splines like I did for the orange path. The green path should do though. But please do something, as this is extremely detectable

Can't be that detectable. Haven't heard of anyone getting banned yet. Also, it doesn't click the same tiles every time, there is randomness to it. And think about it, a human player is walking the same path over and over again; the majority of their clicks are going to be around the same place. It's not like they're walking somewhere different.

And I've never heard of this WebWalk thing; something to look into I guess.

From: Markus

I managed to reduce this a bit by setting a lower time-out in mining.scar but the problem is still there, which also leads me to #5
#5: MSI thinks it takes 60 seconds to mine an iron ore at mining level 80.
In fact it doesn't even take longer than 10 at mining level 15. Can't the "Artificial Intelligence" figure out that that's ridiculous??

No, it doesn't think it takes 60 seconds to mine a rock. That timer is there as a failsafe for if the object tracking failed. No one ever suggested (or thought) that specific rocks should have their own "maxed time". I actually like that idea, and think it could be added as an attribute in TMSObject.

From: Markus

I switched off my PC and switched to my laptop, a Toshiba Tecra m2 (upgraded to 1gb RAM). It's singlecore and I really suffered from that:
#6: The object tracking wastes so much CPU time that there's nothing left for the client.
This also causes me to lag a lot. It also made it literally impossible to use the guild miner. Not because it can't mine, but because it can't walk back to the bank! This problem occurs at any pc which isn't dualcore and it also decreases efficiency when trying to run multiple scripts at a pc.

I didn't know this. No one's said anything about this before. I really don't know much about this subject, but it seems like it's definitely something that needs to be improved.

From: Markus


[ Ine ] -- MSI_Walk
[ Ine ] ------ MSI_WaitWhileResting
[ Ine ] ---- Player's Location = Mining Guild
[ Ine ] ---- MSI_PerfomWalk
[ Ine ] ------ MSI_ReflectionWalk
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is on the minimap
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is on the minimap
[ Ine ] -------- Tile(3021, 9739) is on the minimap
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 47
[ Ine ] ---------- Flag distance: 30
[ Ine ] ---------- Flag distance: 15
[ Ine ] -------- MSI_SolveObstacle
[ Ine ] ---------- Mining Guild: Ladder Up's tile is visible
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] ------------ 5 objects found!
[ Ine ] ------------ MSI_Track Object
[ Ine ] -------------- ~ Track Record
[ Ine ] -------------- ~ ~ TrackObject
[ Ine ] -------------- ~ ~ Searches: 99
[ Ine ] -------------- ~ ~ Successes: 81
[ Ine ] -------------- ~ ~ Success %: 81
[ Ine ] ------------ MSI_TrackObject: True
[ Ine ] ---------- MSI_FindObjectsIn: True
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] ------------ 6 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: False
[ Ine ] ---------- MSI_FindObjectsIn
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] -------------- MSI_FindObjectsTPA: Not enough points!
[ Ine ] ------------ 4 objects found!
[ Ine ] ---------- MSI_FindObjectsIn: True
[ Ine ] ---------- Found mirror object: Mining Guild Ladder: Down
[ Ine ] ------------ Player is on end tile
[ Ine ] -------- MSI_SolveObstacle: True
[ Ine ] ---------- Distance from player to location: 71
[ Ine ] -------- Tile(3012, 3355) is not on the minimap
[ Ine ] -------- Tile(3023, 3352) is on the minimap
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 60
[ Ine ] ---------- Flag distance: 62
[ Ine ] ---------- Flag distance: 63
[ Ine ] ---------- MSI_AntiBan
[ Ine ] ---------- Flag distance: 58
[ Ine ] ---------- Flag distance: 45
[ Ine ] ---------- Flag distance: 34
[ Ine ] ---------- Flag distance: 24
[ Ine ] ---------- Distance from player to location: 42
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is not on the minimap
[ Ine ] -------- Tile(3042, 9737) is not on the minimap
[B][ Ine ] -------- Failed to walk leg 0 of script: Mining Guild Miner[/B]
[ Ine ] ------ MSI_ReflectionWalk: False
[ Ine ] ------ MSI_ColorWalk
[ Ine ] ------ MSI_ColorWalk: False
[ Ine ] ---- MSI_PerformWalk: False
[ Ine ] -- MSI_Walk: False
[ Ine ] -- MSI_UnsetPlayer
[ Ine ] ---- Failed to walk to bank
[ Ine ] ---- MSI_SetSkillLevels
[ Ine ] ------ Mining level hasn't changed
[ Ine ] ---- MSI_SetSkillLevels: Finished
[ Ine ] ---- MSI_SetSkillLevels
[ Ine ] ------ Mining level hasn't changed
[ Ine ] ---- MSI_SetSkillLevels: Finished
[ Ine ] ---- Cleared file: C:\Simba\Includes\MSI\Remote.txt

The bolded line doesn't seem right. It said it walked to the mine (which is leg 0), going down the ladder is in between leg 0 and 1, so I'm actually not sure what happened there. I'll have to look into that also. Or is that a debug of it not walking back to the bank? If so, there may be a problem when it "inverses" the TPA. It may be inversing the entire thing rather than just the points in each leg; although that doesn't make sense because people have been using is and it's worked fine.

Just to clarify, that only happens on your laptop?

From: Markus

Another one which failed when walking back to bank:

[ Ine ] -- MSI_Walk
[ Ine ] ------ MSI_WaitWhileResting
[ Ine ] ---- Player's Location = Mining Guild
[ Ine ] ---- MSI_PerfomWalk
[ Ine ] ------ MSI_ReflectionWalk
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is on the minimap
[ Ine ] ---------- Flag distance: 56
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 43
[ Ine ] ---------- Flag distance: 35
[ Ine ] ---------- Flag distance: 21
[ Ine ] -------- Tile(3021, 9739) is on the minimap
[ Ine ] ---------- Flag distance: 48
[ Ine ] ---------- Flag distance: 37
[ Ine ] ---------- Flag distance: 24
[ Ine ] -------- MSI_SolveObstacle
[ Ine ] ---------- Mining Guild: Ladder Up's tile not on the MainScreen
[ Ine ] ---------- Tile(3019, 9741) is on the minimap
[ Ine ] ------------ Flag distance: 10
(I know it's incomplete, idk why).

Like in the file it just stops? Or was there an error in Simba (if there was I'm sure you would have said so, I'm just checking)?

From: Markus

One good thing: it *does* work. Just not too great. The quirks really make it a lot less fun to use MSI :(

Every program has it's bugs. ;) It's hard for us to catch them all when we don't get very much feedback like you're giving us. Not to mention we only have a few people working on MSI. It's hard to keep up with everything that needs to be done. We already have a list of probably 20+ things to be done.

From: Markus

Edit: I even left that PvP world issue out of this.

Again, it's in SRL, but I'm sure you read that from the other thread.

Overall, even though I don't like how you worded some of it, I appreciated the detailed feedback. Thanks. :)

Sir R. M8gic1an

2011-01-16 18:26:55

From: mormonman
It is in the include.


My bad, cheers :)

I don't think it was when we first did walking. This was pre-Drags era

~RM

NCDS

2011-01-16 19:02:43

From: Markus

#1: MSI uses wicked default location settings
After I posted something, I heard that that mode was strictly meant for powermining. How should I know? I just know MSI thinks I'm somewhere in Runescape. Reflection was up, why can't it use reflection to figure out where I am?
Even Wizzup's multiminer can do that using colour. Of course I can be anywhere, but detecting if I'm either at mine, bank, or unknown location isn't too hard and with reflection it's trivial.


We currently support 5 skills in a wide variety of locations with usually at most three active MSI dev's. I don't think asking a user to check a box is too much to ask in exchange for us to be able to stay on top of bug fixes, updates, adding new skills,new locations, etc. I understand it is easily done, and I may actually get to it tonight.

From: Markus

#2: MSI doesn't use it's brains for the form settings
I got an error out of range in loginplayer.scar! But, I am using one player? Do I really have to set it?
I guess so. Worst of all: it doesn't even save that 0 I set there, so I have to enter that every single time. No press run at Simba, press load+run at form, no I actually have to switch to the keyboard to enter that 0! Really, after 20 times that really gets annoying.
As Coh3n said, this was fixed a while back.

From: Markus

#3: MSI's tilewalking is very un-humanlike.
It might be hard to explain, but there's one main problem and that's that it always clicks at the same tiles and it sometimes misses the next tile (read: it clicks at a tile 4 pixels away from Minimap center, now THAT is human-like), pauses for a second to check for randoms, stuff like that. That is really not human-like:

That happens because the next tile is not yet on the MM, meaning the two tiles are simply too far apart. The beauty of MSI is that YOU CAN CHANGE THAT several different ways: edit the problem tile, change the FLAG_TOLERACE const in Globals.Simba to a lower number to be sure the next tile is visible.
From: Markus

After it walked to VEM, it was standing there with a couple of other bots and it happily started mining. However, after a few rocks, it was standing there doing nothing.
I looked at debug, which said:

[ @@@ ] ---- MSI_WaitWhileMining
[ @@@ ] ------ InvCount: 5
[ @@@ ] ------ Entering loop
[ @@@ ] ---------- MSI_AntiBan
And it took a while. A quick glance at the debug drawing was clear: it was tracking the wrong rock which no one was mining. It seems I was not the only one having this problem as a couple of other botters were also standing there with exactly the same problem I had.

I always thought I had added an IsAnimating check in the WaitWhile*Skill functions, but I suppose not. I'll do that tonight as well.

I've been tweaking TrackObject the past couple days, but am not yet satisfied with the Results. They will be committed when I am though.

I would just like to remind everyone that this was meant to be a community project. Meaning everyone reading this is more than welcome to make changes and additions with things they don't like, not just us SL's.

Anyways, Markus, I really wish more people would make posts like this honestly. People learn from mistakes and criticism, not being told "awesome job!" every time, though those comments are nice sometimes too. :)

Thanks though, gives me something else to focus on.

Nava2

2011-01-16 19:50:35

Why has no one looked into the system Zeph and I made!!!

Its so much better than the typical ways, randomized, cleaner, and just UGHHHHHHHHHHHH.

… :(

Coh3n

2011-01-16 19:58:15

From: Nava2
Why has no one looked into the system Zeph and I made!!!

Its so much better than the typical ways, randomized, cleaner, and just UGHHHHHHHHHHHH.

… :(

Not many people know about it?

kitchenrange

2011-01-16 19:58:41

What system is this?

Nava2

2011-01-16 20:01:14

function FindTileOnPath(var Index: integer; Path: TTileArray; P: TTile; MaxDist: Integer): Boolean;
var {Find the closest tile in a path within MaxDist}
I, H, DistC, DistS, T: integer;
begin
T := GetTimeRunning;
H := High(Path);
Index := -1;
if (H < 0) then Exit;

DistS := Distance(P.x, P.y, Path[0].x, Path[0].y); //Distance from Current Tile

for I := 0 to H do //Looks for the Closest Tile
begin
DistC := Distance(P.x, P.y, Path[I].x, Path[I].y);
if DistC <= DistS then
begin
DistS := DistC;
Index := I;
end;
end;

Result := DistS <= MaxDist;
if not Result then Index := -1;
WriteLn('FindTileOnPath: Index = ' + IntToStr(Index) + ' Time: ' + IntToStr(GetTimeRunning - T) + ' ms');
end;

function FurthestVisibleTile(tPath: TTileArray; P: TTile; sTile, eTile: Integer): Integer;
var {Returns the Index of the furthest tile in a path }
H: Integer; {between given indices that is still on the MM}
begin
SetLength(tPath, eTile + 1); //Removes tiles not in range
InvertPath(tPath);
SetLength(tPath, Length(tPath) - sTile);
InvertPath(tPath);

H := High(tPath);
for Result := H downto 0 do //Finds the furthest visible tile.
if (Sqrt(Sqr((tPath[Result].X - P.X) * 4.0) + Sqr((tPath[Result].Y - P.Y) * 4.0)) < 69.0) then
begin
IncEx(Result, sTile);
Exit;
end;
Result := -1;
end;

{
Creates a TPA between points, tDist intervals, Rand randonmness (Tiles)
}
function CreatePathBetween(fT, tT: TTile; tDist, Rand: Integer): TTileArray;
var
hyp, xR, yR: Extended;
l: Integer;
begin
if not LoggedIn then Exit;

{ Set Result Length and first point at initial tile. }
SetLength(Result, Ceil(Distance(fT.X, fT.y, tT.X, tT.Y) * 1.0 / tDist) + 1);
Result[0] := fT;

{ If no need for intermediate tiles then nvm. :) }
if (Distance(fT.X, fT.Y, tT.X, tT.Y) <= tDist) then
begin
Result[High(Result)] := tT;
Exit;
end;

{ Ratios for 'Similar Triangles' maths. }
hyp := Hypot(fT.X - tT.x, fT.Y - tT.Y);
xR := (tT.X - fT.X) / hyp;
yR := (tT.Y - fT.Y) / hyp;

{ Set points. }
for l := 1 to High(Result) - 1 do
begin
Result[l].X := Round(fT.X + l * tDist * xR) + RandomRange(-Rand, Rand);
Result[l].Y := Round(fT.Y + l * tDist * yR) + RandomRange(-Rand, Rand);
end;

{ Last point is tT. }
Result[High(Result)] := tT;
end;

{
Expands ctrlPoints into a path with tDist intervals and Randomness
}
function ExpandPath(ctrlTiles: TTileArray; tDist, Randomness: Integer): TTileArray;
var
i, h: Integer;
t: T2DPointArray;
begin
Result := [];
h := High(ctrlTiles);
SetLength(t, h);

for i := 1 to h do
t[i - 1] := CreatePathBetween(ctrlTiles[I - 1], ctrlTiles[I], tDist, Randomness);

Result := MergeATPA(t);
end;

{
Walks to a path.
}
function EnterPath(Path: TTileArray): Boolean;
var
I: Integer;
tmpPath: TTileArray;
begin
if (FindTileOnPath(I, Path, GetMyPos, 50)) then
begin
{ Create path between current tile and closest path tile }
tmpPath := CreatePathBetween(GetMyPos, Path[I], 3, 5);
Result := WalkPath(tmpPath);
if (Result) then Exit;
end;
WriteLn('Could not enter path!');
end;

{
Walk to a tile.
}
function WalkTile(T: TTile): Boolean;
begin
Result := EnterPath([T]);
end;

{
Walk to a path.
}
function Walk(Path: TTileArray; Destination: Integer): Boolean;
var
P, DTile: TTile;
H, D, tileInd, pInd, Attempts, time: Integer;
begin
time := GetTimeRunning;

H := High(Path);
if (H < 0) then Exit;

if (Destination = -1) then
D := H
else
D := Destination;

{ Expands path and finds new destination index }
DTile := Path[D];
Path := ExpandPath(Path, 1, 3);
H := High(Path);
FindTileOnPath(D, Path, DTile, 3);

{ Finds you on a path and attempts to walk to it if possible }
if (not(EnterPath(Path))) then
begin
p := GetMyPos;
WriteLn('E:: Lost en route. ' + IntToStr(p.x) + ', ' + IntToStr(p.y));;
LogOut;
Exit;
end;

FindTileOnPath(pInd, Path, GetMyPos, 5);
if (pInd > D) then
begin
{ Sorts out walking direction }
InvertPath(Path);
D := H - D;
pInd := H - pInd;
end;

P := GetMyPos;
{ Loops through the tiles and walks :) }
while (Distance(P.X, P.Y, Path[D].X, Path[D].Y) > 3) and (Attempts < 5) do
begin
tileInd := FurthestVisibleTile(Path, P, pInd, D);
{ If the furthest tile is found, Walk to it! }
if (tileInd > -1) then
begin
WriteFMT('Next Tile: %d (%d, %d)',
[tileInd, Path[tileInd].X, Path[tileInd].Y]);
if (WalkToTile(Path[tileInd],
0,
RandomRange(1, 4)*Integer(Random(20)<>0))) then
begin
Attempts := 0;
Wait(100 + Random(100));
P := GetMyPos;
FindTileOnPath(pInd, Path, P, 5);
end;
end;
Inc(Attempts);
end;

R_FFlag(0);
Result := (DistanceFrom(Path[D]) <= 5);
if (not(Result)) then
WriteLn('Walk failed');
end;


You basically give the Walk() function control points, aka the longest straight path available, then it will fill in the rest randomly each time. It will *always* get within the passed distance to the final point.

This means that the walk from the varrok east mine to bank was only.. 4 tiles. But it clicks about 7 times ;)

Sir R. M8gic1an

2011-01-16 20:04:05

U ok with that being used in MSI and possibly put in the reflection include?

~RM

Nava2

2011-01-16 20:05:56

From: Sir R. Magician
U ok with that being used in MSI and possibly put in the reflection include?

~RM


Of course!

I actually meant to modify the freaking reflection includes WalkPath.. its awful right now.

mormonman

2011-01-16 21:04:18

From: Nava2
Of course!

I actually meant to modify the freaking reflection includes WalkPath.. its awful right now.


Go for it, drags did a mediocre job tbh.

Boreas

2011-01-16 23:36:45

FWIW, fantastic thread. IMHO the more diaries for Simba, SRL, MSI, and other scripts, the better, especially as we are expecting an influx of activity in the next 6 months.

Markus

2011-01-17 10:50:59

From: Coh3n
Thanks for the feedback, but ^ that? Cmon, screw off. Is that really necessary? Heaven forbid that with all the things MSI does, we actually forgot a couple things. OMG it's the end of the world!

Hey, I know. You guys are really doing an awesome job and the scripts seem to work fine for the most part (automatic resting when the run level drops too low, just genius :D) and they are pretty stable (did 1k iron yesterday at a character of mine and it mined just fine).

This part surprised me. I would think that a smart guy like you may figure out that he should set the location to one from the list of dozens of locations on the location tab. And just for the record, I don't like how the location is set by default. I'm going to change that when I can.
You know, I do know how it works. But when you open the form and I pick a script, the default checkbox is at 'The Wonderful world of Runescape!'. From the perspective of an average end-user that's weird =/
Suggestions: don't use checkboxes but radiobuttons and only show the useful locations. There could also be some clarification that TWwoRS means powerskilling.
I haven't checked in if you actually fixed those bugs (but I did notice some code being added as I wanted to fix it myself yesterday) but it really screwed it as a first impression :( You can only make the first impression once.

Can't be that detectable. Haven't heard of anyone getting banned yet. Also, it doesn't click the same tiles every time, there is randomness to it. And think about it, a human player is walking the same path over and over again; the majority of their clicks are going to be around the same place. It's not like they're walking somewhere different.
The paths may be ok, but please take a look at this:
http://www.youtube.com/watch?v=8oJ945lAELg
That's not really humanlike is it?

No, it doesn't think it takes 60 seconds to mine a rock. That timer is there as a failsafe for if the object tracking failed. No one ever suggested (or thought) that specific rocks should have their own "maxed time". I actually like that idea, and think it could be added as an attribute in TMSObject.
Glad to see this is useful, although it seems trivial in my eyes. The problem is the object tracking fails a bit too often while mining (seems to work fine at yews though) so it *really* is necessary to have proper time-out,


Just to clarify, that only happens on your laptop?
Like in the file it just stops? Or was there an error in Simba (if there was I'm sure you would have said so, I'm just checking)?
Only happens at that laptop which isn't the fastest. And yes it's just EOF after that. The report is already from like one or two weeks ago but it was really screwing up I think so I quit Simba prematurely (it lagged like hell or something like that).

Overall, even though I don't like how you worded some of it, I appreciated the detailed feedback. Thanks. :)
Your welcome. About my wording: I might be a bit harsh but you can't hate something you don't love ;) I'd really like to see MSI becoming even better than it is now and imho it's sad that it misses a few opportunities.


NCDS: It is all about the first impression you make to the end-user. If the script works the first time but not too great, that's fine. He will discover the settings later.
If the script, however, fails to do something and you are literally spending 30 minutes in getting it working (it took me a bit more than that, though I blame alcohol), then it's really annoying and you just give up.


That happens because the next tile is not yet on the MM, meaning the two tiles are simply too far apart. The beauty of MSI is that YOU CAN CHANGE THAT several different ways: edit the problem tile, change the FLAG_TOLERACE const in Globals.Simba to a lower number to be sure the next tile is visible.
GREAT THAT I CAN CHANGE THAT! But am I supposed to change that? Doesn't it suck I have to change MSI to have it actually working? Can't it be right by default? The average user can't do this. I'm not familiar with MSI so I don't know what my changes will affect and I'm very reluctant messing around with it.
Besides that it's ugly that everyone has to change it. Really, take a look at that vid. It's far from humanlike.

Remember: the reason I am saying this is because I love the idea, the concept and some things implemented. But we've got to keep each other on our toes! With wildy returning in exactly two weeks we need to be prepared.

3Garrett3

2011-01-17 11:44:17

I was going to suggest using the tile walking that I've used in my KARAMJA script for this *humanlike* problem, but I think what Nava has offered is much better.

For those interested, however


Function AnyStep(Path: TTileArray; dir: Integer): Integer;
Var
i, h: Integer;
Begin
h := High(Path);
Case Dir Of
ToStore: //Start looking at the end of it (Dock)
Begin
For i := h Downto 0 Do
If TileOnMM(Path[i]) Then //Finds the closest tile to the end of the path and makes it the first start
Begin
Result := i;
Exit;
End;
End;
ToDock: //Start at the beginning (Shop or Stiles)
Begin
For i := 0 To h Do
If TileOnMM(Path[i]) Then
Begin
Result := i;
Exit;
End;
End;
End;
End;

Function WalkStep(Fails: Integer; Step: TTile; FinalStep: Boolean): Boolean;
Var
i, Dist: Integer;
Begin
If Not LoggedIn Then Exit;
i := 0;
For i := 0 To Fails Do //Will try until 'i' reaches the amount of Fails set in the parameters
Begin
If Not LoggedIn Then break;
Case FinalStep Of //The final step needs to be more accurate than the rest of the steps
true:
Begin
WalkToTile(Step, 1, 0); //Walks the step with a small amount of randomness, to be accurate
R_Flag;
Wait(RandomRange(200, 300));
Dist := DistanceFrom(Step);
Result := (Dist < 3); //We should be within a reasonable distance to be considered successful
If Not Result Then inc(i) Else Break;
End;
false:
Begin
WalkToTile(Step, 2, 1);
Wait(RandomRange(25, 100)); //Should walk before the char stops completely
Dist := DistanceFrom(Step);
Result := (Dist < 5); //Can be relatively far from the desired position and still be on the right track
If Not Result Then inc(i) Else Break;
End;
End;
End;
End;

Function Walk(Dir: Integer): Boolean;
Var
i, j, Start, Ending, Dist: Integer;
Begin
If Not LoggedIn Then Exit;
DoRandom;
Case Dir Of
ToDock:
Begin
SetRun(True);
Debug('Walking To Dock');
For j := 0 To 2 Do // 3 Paths
Begin
Start := AnyStep(Path[j], 0); //Picks the optimal step to start walking
Ending := (High(Path[j]) - 1); //The end is one tile from the end (so that we can walk the last step separately later)
For i := Start To Ending Do
Begin
DoRandom;
If Not LoggedIn Then Break;
Result := WalkStep(2, Path[j][i], False); // If it makes it the whole way, one step away from last
If Not Result Then Break; // Breaks out and checks if it's close enough to walk to last step
End;
Result := WalkStep(2, Path[j][High(Path[j])], True); //Walk the final step
If Result Then Break; // Doesn't move to next path
End;
Wait(RandomRange(250, 500));
Dist := DistanceFrom(Path[0][High(Path[0])]);
Debug('Distance to Dock := ' + ToStr(Dist));
Result := SpotFinder(Spot_Dock); //Result is the result of finding the dock
SetRun(False);
End; //End of walking to dock
ToStore:
Begin //Store/Stiles walking works the same as dock walking
SetRun(True);
Debug('Walking To Shop/Trade');
For j := 0 To 2 Do
Begin
Start := AnyStep(Path[j], 1);
Ending := 1;
For i := Start Downto Ending Do
Begin
DoRandom;
If Not LoggedIn Then Break;
Result := WalkStep(2, Path[j][i], False);
If Not Result Then Break;
End;
Result := WalkStep(2, Path[j][0], True);
If Result Then Break;
End;
Wait(RandomRange(250, 500));
Dist := DistanceFrom(Path[0][0]);
Debug('Distance to Shop/Trade := ' + ToStr(Dist));
Result := SpotFinder(SellTrade + Spot_Shop);
End; //End of Store/Stiles walking
End;
End;

It works very humanlike for myself, and it could be adapted to look for NextStep each step, so it only walks the furthest from the player (using the least amount of tiles possible) each step.

Sir R. M8gic1an

2011-01-17 14:16:07

I just watched the video and I don't like the way it stops at every step…

~RM

NCDS

2011-01-17 15:23:13

From: Markus

NCDS: It is all about the first impression you make to the end-user. If the script works the first time but not too great, that's fine. He will discover the settings later.
If the script, however, fails to do something and you are literally spending 30 minutes in getting it working (it took me a bit more than that, though I blame alcohol), then it's really annoying and you just give up.

Really? 30 mins? I would have never thought for it to take anyone that long to set up.

From: Markus

GREAT THAT I CAN CHANGE THAT! But am I supposed to change that? Doesn't it suck I have to change MSI to have it actually working? Can't it be right by default? The average user can't do this. I'm not familiar with MSI so I don't know what my changes will affect and I'm very reluctant messing around with it.
Besides that it's ugly that everyone has to change it.

We (me and Coh3n) have talked about possibly adding an 'Advanced Options' tab to the form to make it easier for users to edit FLAG_TOLERANCE, MIN/MAX_ENERGY, etc.

From: Markus

Really, take a look at that vid. It's far from humanlike.

I can mess with the FLAG_TOLERANCE I guess. It doesn't seem to do it nearly as bad for me as it does for you though, but perhaps my tol is different than yours. I don't remember if I've changed it or not.

From: Markus

Remember: the reason I am saying this is because I love the idea, the concept and some things implemented. But we've got to keep each other on our toes! With wildy returning in exactly two weeks we need to be prepared.

It honestly is appreciated. :)

From: Markus

(automatic resting when the run level drops too low, just genius :D)
Thanks ;)

Gu3st...

2011-01-17 16:46:58

I must say I love this thread.

I support some of your points, Markus. I also responded on your video @ YouTube :)

Coh3n

2011-01-18 00:42:15

From: Markus
But when you open the form and I pick a script, the default checkbox is at 'The Wonderful world of Runescape!'. From the perspective of an average end-user that's weird =/

Yeah you're right. Before the form was finished the user had to enter LOC_POWER_SKILL, which made a lot more sense. The actual location's name was "The Wonderful World of Runescape", which served no purpose other than showing on the progress report. It can easily be changed in the record (Locations.simba), and I'll do so as soon as I can.


From: Markus
Suggestions: don't use checkboxes but radiobuttons and only show the useful locations. There could also be some clarification that TWwoRS means powerskilling.

Is there a TRadioCheckBox? Also, is there a difference between the two other than they look different? Finally, showing only the locations specific to the players script is on the list of suggestions here I just haven't actually gotten around to doing it yet.

From: Markus

I haven't checked in if you actually fixed those bugs (but I did notice some code being added as I wanted to fix it myself yesterday) but it really screwed it as a first impression :( You can only make the first impression once.
The paths may be ok, but please take a look at this:
http://www.youtube.com/watch?v=8oJ945lAELg
That's not really humanlike is it?

I've actually never seen it that bad. I can't recall it being like that for me but nevertheless, you're right, it needs to be changed. Shouldn't be too difficult. I used SRL's Flag the other day when I was testing my auto-generated color walking and it seemed to still work well, so maybe we should use that instead. Hopefully there's an SRL_Proc for OnFlagCall so we can add our antiban and randoms calls. If not, I can always add it.

From: Markus

Glad to see this is useful, although it seems trivial in my eyes. The problem is the object tracking fails a bit too often while mining (seems to work fine at yews though) so it *really* is necessary to have proper time-out,

Yeah, RM has said he's going to work on a reflection/color IsMining thing, but if he gets busy I'll see what I can do when I get home next week.

From: Markus

Only happens at that laptop which isn't the fastest. And yes it's just EOF after that. The report is already from like one or two weeks ago but it was really screwing up I think so I quit Simba prematurely (it lagged like hell or something like that).

May have to consult someone who knows more about speed to see if we can fix this.

From: Markus

Your welcome. About my wording: I might be a bit harsh but you can't hate something you don't love ;) I'd really like to see MSI becoming even better than it is now and imho it's sad that it misses a few opportunities.

Can't get everything perfect right away. It's a price to pay when there's only a few developers, but I am glad to see more people providing quality feedback.

From: Markus

Remember: the reason I am saying this is because I love the idea, the concept and some things implemented. But we've got to keep each other on our toes! With wildy returning in exactly two weeks we need to be prepared.

I agree. :) Since I don't have any classes this semester I'll have more time than usual (hopefully) and I'm hoping to knock a lot of things off my list.

On another note, I think I'm going to impliment Nava and Zeph's tile walking when I start adding the new color walking. I'm rewriting one, I may as well get the entire walking hybrid system up and running. :)

Markus

2011-01-18 16:03:45

Aw, c'mon, it was standing in the guild at the ladder.

[0:36:01]: [ Ine ] ---- MSI_WaitWhileMining
[0:36:01]: [ Ine ] ------ InvCount: 27
[0:36:01]: [ Ine ] ------ Entering loop
[0:36:01]: [ Ine ] ---------- MSI_AntiBan
[0:36:03]: [ Ine ] -------- OldInvCount < InvCount
[0:36:03]: [ Ine ] ------ Out of loop
[0:36:03]: [ Ine ] ---- MSI_WaitWhileMining: Finished
[0:36:03]: [ Ine ] -- MSI_AutoObjects: True
[0:36:04]: [ Ine ] -- MSI_Walk
[0:36:04]: [ Ine ] ------ MSI_WaitWhileResting
[0:36:12]: [ Ine ] ---- Player's Location = Mining Guild
[0:36:12]: [ Ine ] ---- MSI_PerfomWalk
[0:36:17]: [ Ine ] ------ MSI_ReflectionWalk
[0:36:17]: [ Ine ] -------- Tile(3021, 9739) is on the minimap
[0:36:18]: [ Ine ] -------- MSI_SolveObstacle
[0:36:18]: [ Ine ] ---------- Mining Guild: Ladder Up's tile not on the MainScreen
[0:36:18]: [ Ine ] ---------- Tile(3019, 9741) is on the minimap
[0:36:20]: [ Ine ] ------------ Scanning for randoms...
[0:36:20]: [ Ine ] ------------ Flag distance: 28
[0:36:21]: [ Ine ] ------------ Flag distance: 17
[0:36:22]: [ Ine ] ------------ Flag distance: -1
Error: Type Mismatch at line 115
The following DTMs were not freed: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, SRL - Lamp bitmap]
The following bitmaps were not freed: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 18-01-11 0.txt] has not been freed in the script, freeing it now.

repeat
with MSI_Obstacles[Obs] do
begin
{$IFDEF REFLECTION}
// Check to see if any of the obstacle tiles are on the main screen
for i := 0 to High(StartTiles) do
begin
if (TileOnMS(StartTiles[i], 0)) then
begin
MSI_Debug(Name+'''s tile is visible');
onMS := True;
Break;
end else
if (i = High(StartTiles)) then
begin
MSI_Debug(Name+'''s tile not on the MainScreen');

// Walk to tile if it can't be seen
if (MSI_WalkToTile(StartTiles[i], 3, 0)) then
Break
else
Exit;
end;
end;

// If tile isn't on MS, try again after walking to the tile
if (not onMS) then
Continue;
{$ENDIF}

if (MSI_FindObject(ObjConst, ClickLeft)) then
if (MSI_WaitForMirror(Obs)) then
begin
Result := True;
Break;
end;
end;
115: until(Result or (GetSystemTime > t));
end;

Coh3n

2011-01-18 16:11:09

Obstacles.simba hasn't been changed in probably close to a month. It doesn't make sense that that would all of the sudden happen…

NCDS

2011-01-18 16:13:43

From: Markus
Aw, c'mon, it was standing in the guild at the ladder.

[0:36:01]: [ Ine ] ---- MSI_WaitWhileMining
[0:36:01]: [ Ine ] ------ InvCount: 27
[0:36:01]: [ Ine ] ------ Entering loop
[0:36:01]: [ Ine ] ---------- MSI_AntiBan
[0:36:03]: [ Ine ] -------- OldInvCount < InvCount
[0:36:03]: [ Ine ] ------ Out of loop
[0:36:03]: [ Ine ] ---- MSI_WaitWhileMining: Finished
[0:36:03]: [ Ine ] -- MSI_AutoObjects: True
[0:36:04]: [ Ine ] -- MSI_Walk
[0:36:04]: [ Ine ] ------ MSI_WaitWhileResting
[0:36:12]: [ Ine ] ---- Player's Location = Mining Guild
[0:36:12]: [ Ine ] ---- MSI_PerfomWalk
[0:36:17]: [ Ine ] ------ MSI_ReflectionWalk
[0:36:17]: [ Ine ] -------- Tile(3021, 9739) is on the minimap
[0:36:18]: [ Ine ] -------- MSI_SolveObstacle
[0:36:18]: [ Ine ] ---------- Mining Guild: Ladder Up's tile not on the MainScreen
[0:36:18]: [ Ine ] ---------- Tile(3019, 9741) is on the minimap
[0:36:20]: [ Ine ] ------------ Scanning for randoms...
[0:36:20]: [ Ine ] ------------ Flag distance: 28
[0:36:21]: [ Ine ] ------------ Flag distance: 17
[0:36:22]: [ Ine ] ------------ Flag distance: -1
Error: Type Mismatch at line 115
The following DTMs were not freed: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, SRL - Lamp bitmap]
The following bitmaps were not freed: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 18-01-11 0.txt] has not been freed in the script, freeing it now.

repeat
with MSI_Obstacles[Obs] do
begin
{$IFDEF REFLECTION}
// Check to see if any of the obstacle tiles are on the main screen
for i := 0 to High(StartTiles) do
begin
if (TileOnMS(StartTiles[i], 0)) then
begin
MSI_Debug(Name+'''s tile is visible');
onMS := True;
Break;
end else
if (i = High(StartTiles)) then
begin
MSI_Debug(Name+'''s tile not on the MainScreen');

// Walk to tile if it can't be seen
if (MSI_WalkToTile(StartTiles[i], 3, 0)) then
Break
else
Exit;
end;
end;

// If tile isn't on MS, try again after walking to the tile
if (not onMS) then
Continue;
{$ENDIF}

if (MSI_FindObject(ObjConst, ClickLeft)) then
if (MSI_WaitForMirror(Obs)) then
begin
Result := True;
Break;
end;
end;
115: until(Result or (GetSystemTime > t));
end;


Clearly that's not the actual line of the error (Simba always does that with 'error' lines for whatever reason (doesn't accommodate for commented lines I think?)), this is the next function:

{******************************************************************************}
{ function MSI_DoObstacle(Obs: Integer): Boolean; }
{ By: Coh3n }
{ Date: 02 December 2010 }
{ Description: For some reason I was getting Type mismatch errors now matter }
{ where I put MSI_CloseHeader in MSI_SolveObstacle, so I wrote }
{ this so we can have proper debugging }
{******************************************************************************}
function MSI_DoObstacle(Obs: Integer): Boolean;
begin
MSI_AddHeader('MSI_SolveObstacle');

Result := MSI_SolveObstacle(Obs);

MSI_CloseHeader('MSI_SolveObstacle: ' + BoolToStr(Result));
end;
I'm assuming it still has something to do with that but I'll have to mess with it a bit. I didn't plan on having much time today, but it's looking like I might after all, so I'll get into some things.

Markus

2011-01-18 16:31:34

I saw it before coh3n, just the first time that I managed to trap it.
Wait a sec, that incomplete log I posted a few posts back also had an error at that part.

Sir R. M8gic1an

2011-01-18 17:00:52

if waitForMirror then

else continue?

a whole loop could / should be done just on solving the obstacle.


repeat
if not CloseToObstacle then break & walk to object
if clickObject then WaitForObject
if not OnMirrorSide then
begin
inc(tries);
if tries > 3 then break; //give error
else continue
end else break;
until (tries > 3)

~RM

Coh3n

2011-01-18 17:21:36

Markus, do you mind removing lines 81-106 in MSI_SolveObstacle (basically, the reflection part) and try again? I cannot see what would cause a type mismatch. :(

Markus

2011-01-19 10:15:00


{----------------------------------------------------------------}
{ MSI Phoenix Short Report }
{------------------------- Revision 000 -------------------------}
{ Time Running: 8 Hours, 28 Minutes and 17 Seconds }
{----------------------------------------------------------------}
{ }
{ Totals: }
{ - Players: 1 }
{ - Player Time: 04m 16s }
{ - Randoms Solved: 0 }
{ - Randoms Failed: 0 }
{ - Loads: 3 }
{ - Experience: 3,590 }
{ - Rocks Mined: 70 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}

{----------------------------------------------------------------}
{ MSI Phoenix Player Report }
{------------------------- Revision 000 -------------------------}
{ Time Running: 8 Hours, 28 Minutes and 17 Seconds }
{----------------------------------------------------------------}
{ }
{ Player 0: @@@@@@@@@@@@ }
{ Location: Lost }
{ Time: 04m 16s }
{ Active: False }
{ Reason: Failed to solve obstacle: Mining Guild: Ladder Down}
{ }
{ Script: Mining Guild Miner }
{ Time: 04m 16s }
{ Skill: Mining }
{ Exp: 3,590 }
{ Level: 79 }
{ Loads: 3 }
{ Item: Coal ore }
{ Amount: 67 }
{ Item: Mithril ore }
{ Amount: 3 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}
Seems there's still some work to do on obstacle handling..

coh3n: removed them but I will not run again today, tomorrow I will :)

Coh3n

2011-01-19 12:22:23

From: Markus

Seems there's still some work to do on obstacle handling..

coh3n: removed them but I will not run again today, tomorrow I will :)

Okay thanks. :)

And that time it just failed I'm assuming and didn't get the error? Also, was the Guild Miner ever working for you? Last time I tested it worked awesome, but that was a long time ago (obviously it's changed).

Markus

2011-01-19 12:26:59

I had a couple of nice runs with it. This one was without any error whatsoever (besides it failing ofc) but I wasn't around so I didn't see what it was doing..

Coh3n

2011-01-19 12:51:50

Okay thanks. I have some ideas to change the looping in the actual solving methods. Now that I think about it, its done poorly (especially the reflection hybrid part). I'll hopefully be able to write it up but I won't be able to test until I get home next week.

Sir R. M8gic1an

2011-01-19 13:03:42

From: Coh3n
Okay thanks. I have some ideas to change the looping in the actual solving methods. Now that I think about it, its done poorly (especially the reflection hybrid part). I'll hopefully be able to write it up but I won't be able to test until I get home next week.


SmartColors. U pass by it on everyone load.

This is probably what SmartColors is best used for. It's useful for finding rocks n trees and stuff, but for that it doesn't have all the other features MSI Object finders do

~RM

Coh3n

2011-01-19 13:09:35

From: Sir R. Magician
SmartColors. U pass by it on everyone load.

This is probably what SmartColors is best used for. It's useful for finding rocks n trees and stuff, but for that it doesn't have all the other features MSI Object finders do

~RM

I pass the ladders each load? SmartColors improves the objects the more they're found, correct? I'll have to try it out. :)

E: Markus: The lagging you get on your laptop, is that only with the Guild Miner? Or all scripts?

Markus

2011-01-19 13:57:17

I only tried the guildminer to be honest, nothing else of MSI (I did try some other script of mine and that one worked fine although a bit slower than it should).

Also please try to avoid this kind of situations:)
Just add some bounds so it doesn't exceed MSX2/MSY2.

Coh3n

2011-01-19 14:03:20

Uhm wtf? I have NEVER seen that happen before and I've run MSI a lot. And we do have the main screen bounds. Check MSI_FindObjects (I think its the one being used).

Sir R. M8gic1an

2011-01-19 14:06:32

Markus, posting the debug is essential, as it shows exactly what did what when …..

~RM

Markus

2011-01-19 14:13:50

Well I've seen that a lot more than that case, the problem is that it's really hard to find the appropriate part in the debuglog, unless you'd like to weed through 16k lines, in that case, good luck. It should be around 15 mins away from the last message (at 1h30mins somewhere).

1. The text that you have entered is too long (640384 characters). Please shorten it to 100000 characters long.

See attachment.
Edit: This is btw a bug in the object-tracking, NOT the object finding.

Sir R. M8gic1an

2011-01-19 14:23:26

function BindBoxByBox(BindBox, MyBox: TBox): TBox;
begin
Result.x1 := Max(BindBox.x1, MyBox.x1);
Result.y1 := Max(BindBox.x1, MyBox.x1);
Result.x2 := Min(BindBox.x2, MyBox.x2);
Result.y2 := Min(BindBox.y2m MyBox.y2);
end;


{******************************************************************************}
{ function MSI_TrackObject(var ObjInfo: TMSObject): boolean; }
{ By: marpis & Sir R. Magician }
{ Date: 09 August 2010 }
{ Description: Follows object while moving (ObjInfo.X, ObjInfo.Y) }
{******************************************************************************}
function MSI_TrackObject(ObjID: integer): boolean;
var
ATPA: T2DPointArray;
TPA: TPointArray;
CTS, T, Tries: integer;
B: TBox;
Previous: TPoint;
BreakNext: boolean;
DistMultiplier: extended;
begin
MSI_AddHeader('MSI_Track Object');
Result := true;
Track_Search(T_TrackObject);

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(MSI_Objects[ObjID].Hue, MSI_Objects[ObjID].Sat);

//Preparing vars for loop
DistMultiplier := Distance(MSCX, MSCY, MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y) / 40;
if DistMultiplier < 1.0 then DistMultiplier := 1.0;
BreakNext := false;
Previous := Point(MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y);
T := GetSystemTime + 30000;

repeat
B := MSI_MakeBox(Point(MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y),
round(MSI_Objects[ObjID].W * DistMultiplier),
round(MSI_Objects[ObjID].H * DistMultiplier));

B := BindBoxByBox(MSBox, B);

if (MSI_SetupVars[SETUP_DEBUG_SMART]) then
SMART_DrawBoxEx(True, B, clYellow);

if MSI_FindObjectsTPA(TPA, ObjID, B) then
begin
ATPA := SplitTPA(TPA, MSI_Objects[ObjID].W);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
MiddleTPAEx(ATPA[0], MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y);

if tries = 1 then
begin
tries := 0;
DistMultiplier := DistMultiplier - 1.0; //setting the box back to 'normal' size
end;
end else begin
Inc(tries);
if tries = 1 then
begin
DistMultiplier := DistMultiplier + 1.0; //increasing search box
continue;
end else begin
MSI_Debug('Lost track of object');
Result := false;
break;
end;
end;

if BreakNext then Break;

if distance(Previous.X, Previous.Y, MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y) < DIST_PIXEL_MOVE then
if not FlagPresent then
if not IsMoving then
BreakNext := true;

Previous := Point(MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y);

Wait(5);
until (T < GetSystemTime);

if Result then
Track_Success(T_TrackObject);

Track_Print(T_TrackObject);

MSI_CloseHeader('MSI_TrackObject: ' + BoolToStr(Result));

SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(2);
end;

TrackObject is supposed to paint a yellow box, can't remember how that ends up being a red box. But anyway, this should fix it.

Markus

2011-01-20 07:10:02

I haven't modified anything yet, but this really makes me have to cry :'(

{----------------------------------------------------------------}
{ MSI Phoenix Short Report }
{------------------------- Revision 000 -------------------------}
{ Time Running: 5 Hours, 50 Minutes and 42 Seconds }
{----------------------------------------------------------------}
{ }
{ Totals: }
{ - Players: 1 }
{ - Player Time: 15m 43s }
{ - Randoms Solved: 0 }
{ - Randoms Failed: 0 }
{ - Loads: 3 }
{ - Experience: 3,760 }
{ - Rocks Mined: 74 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}

{----------------------------------------------------------------}
{ MSI Phoenix Player Report }
{------------------------- Revision 000 -------------------------}
{ Time Running: 5 Hours, 50 Minutes and 42 Seconds }
{----------------------------------------------------------------}
{ }
{ Player 0: @@@ @@@@@ @@ }
{ Location: Lost }
{ Time: 15m 43s }
{ Active: False }
{ Reason: Failed to walk to Falador east bank }
{ }
{ Script: Mining Guild Miner }
{ Time: 15m 43s }
{ Skill: Mining }
{ Exp: 3,760 }
{ Level: 79 }
{ Loads: 3 }
{ Item: Coal ore }
{ Amount: 72 }
{ Item: Mithril ore }
{ Amount: 2 }
{ }
{----------------------------------------------------------------}
It was standing at the south-east corner of fally bank (the first click it does after it climbs the stairs).
Debug:

[ Ine ] ---------- MSI_FindObjectsIn: True
[ Ine ] ---------- Found mirror object: Mining Guild Ladder: Down
[ Ine ] ------------ Player is on end tile
[ Ine ] -------- MSI_SolveObstacle: True
[ Ine ] ---------- Distance from player to location: 70
[ Ine ] -------- Tile(3012, 3355) is not on the minimap
[ Ine ] -------- Tile(3023, 3352) is on the minimap
[ Ine ] ---------- Flag distance: 60
[ Ine ] ---------- Flag distance: 63
[ Ine ] ---------- Flag distance: 63
[ Ine ] ---------- Scanning for randoms...
[ Ine ] ---------- Flag distance: 58
[ Ine ] ---------- Flag distance: 47
[ Ine ] ---------- Flag distance: 35
[ Ine ] -------- Tile(3012, 3355) is not on the minimap
[ Ine ] -------- Tile(3023, 3352) is on the minimap
[ Ine ] ---------- MSI_AntiBan
[ Ine ] ---------- Distance from player to location: 42
[ Ine ] -------- Tile(3021, 9739) is not on the minimap
[ Ine ] -------- Tile(3033, 9738) is not on the minimap
[ Ine ] -------- Tile(3042, 9737) is not on the minimap
[ Ine ] -------- Failed to walk leg 0 of script: Mining Guild Miner
[ Ine ] ------ MSI_ReflectionWalk: False
[ Ine ] ------ MSI_ColorWalk
[ Ine ] ------ MSI_ColorWalk: False
[ Ine ] ---- MSI_PerformWalk: False
[ Ine ] -- MSI_Walk: False
[ Ine ] -- MSI_UnsetPlayer
[ Ine ] ---- Failed to walk to bank
[ Ine ] ---- MSI_SetSkillLevels
[ Ine ] ------ Mining level hasn't changed
[ Ine ] ---- MSI_SetSkillLevels: Finished
[ Ine ] ---- Cleared file: C:\Simba\Includes\MSI\Remote.txt

NCDS

2011-01-20 15:53:43

I find it very interesting that your the only one experiencing these problems.

I have yet to have any trouble at all with the Guild Miner (last ran it on Tuesday I believe?).

Regardless, I'll have a look at the tiles and see if it skipped one or something for whatever reason.

Coh3n

2011-01-20 15:55:27

@RM: Commit that?

@Markus: I don't even know what to say to you anymore. You have somehow managed to have a dozen different problems that no one else has (that I know of). Your last debug says that none of the tiles in the path were on the minimap, and if you were standing just outside the bank that doesn't make sense because obviously it should have been on the minimap.

I'm sorry I can't look into this right now. I'm on a week road trip and I won't be back until Sunday or Monday. I will figure this whole thing out as soon as I can. Let's see if I have all the issues you were having:
  1. Out of range error when climbing the Guild ladders (please try getting rid of the reflection part if you don't mind).
  2. Failing to walk from the Guild to the bank.
  3. Tracking the object (also please try out RM's fix if he doesn't commit it).
  4. The location form thing (that's actually something I should be able to do on my laptop).
  5. All problems which seem to only be happening with the Guild Miner? Maybe you have an outdated record; although, I don't think anything has been changed regarding the TScript type since I updated the member's thread last.
I apologize for all the issues you're having. You just have to bare with us as we don't have many active developers.

From: NCDS
I find it very interesting that your the only one experiencing these problems.

Could possibly be lag issues. Either that or something went wrong in setup, but I don't see what would cause his problems. :unsuure:

Hugolord

2011-01-20 16:02:34

I actually ran the guild miner just to try it out (about 2 weeks ago) on one of my accounts and it didn't seem to function all too well while climbing down the ladders. Sometimes it would go through and then it would work flawlessly. Also I don't usually have any lag on my computer.

Coh3n

2011-01-20 16:04:15

From: Hugolord
I actually ran the guild miner just to try it out (about 2 weeks ago) on one of my accounts and it didn't seem to function all too well while climbing down the ladders. Sometimes it would go through and then it would work flawlessly. Also I don't usually have any lag on my computer.

So the main issue with you was the climbing of the ladders? Everything else seemed to work fine? I said this earlier on the page - next week I'm going to try and fix some looping in the obstacle handling and hopefully I can make it a lot better. :)

NCDS

2011-01-20 16:05:04

From: Hugolord
I actually ran the guild miner just to try it out (about 2 weeks ago) on one of my accounts and it didn't seem to function all too well while climbing down the ladders. Sometimes it would go through and then it would work flawlessly. Also I don't usually have any lag on my computer.


Would need Debug on that to really see where it went wrong. I'll set a couple accounts up tonight and run it to see what I can find, if anything.

Markus

2011-01-21 11:04:36

All the issues are only happening with the guild miner because that's the only script I use ;)
Lag issues are pretty unlikely, my computer should be able to handle it.
yesterday I had a nice run though:

{----------------------------------------------------------------}
{ MSI Phoenix Short Report }
{------------------------- Revision 000 -------------------------}
{ Time Running: 7 Hours, 11 Minutes and 3 Seconds }
{----------------------------------------------------------------}
{ }
{ Totals: }
{ - Players: 1 }
{ - Player Time: 05h 41m 21s }
{ - Randoms Solved: 1 }
{ - Randoms Failed: 0 }
{ - Loads: 35 }
{ - Experience: 50,630 }
{ - Rocks Mined: 967 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}

{----------------------------------------------------------------}
{ MSI Phoenix Player Report }
{------------------------- Revision 000 -------------------------}
{ Time Running: 7 Hours, 11 Minutes and 3 Seconds }
{----------------------------------------------------------------}
{ }
{ Player 0: @@@@@@@@@@@@ }
{ Location: Falador east bank }
{ Time: 05h 41m 21s }
{ Active: True }
{ }
{ Script: Mining Guild Miner }
{ Time: 05h 41m 21s }
{ Skill: Mining }
{ Exp: 50,630 }
{ Level: 80 }
{ Loads: 35 }
{ Item: Coal ore }
{ Amount: 891 }
{ Item: Mithril ore }
{ Amount: 76 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}
Besides I doubt I'm the only one having those issues. The form is something everyone should have and maybe I'm just the most vocal one, Besides, I like watching scripts doing their thing :) No need to apologize though, I completely understand you guys and I'm trying to help you as much as I can (without actually touching the code, coh3n you should explain it to me at msn/irc some time as it does some *really* fancy stuff at times and I'd like to add a few script records :)).
But as I said, the main issue is object tracking. Fix that (do some rewriting, use shapes, determine if it's actually a rock we are following, stuff like that) and 90% of my complaints are probably resolved, though I completely understand that it'll be not too easy to do.
Going to do some guild mining again tonight.

Coh3n

2011-01-21 14:30:38

See that's what's weird. You get a run like that but sometimes you get that out of range error or it doesn't walk all the way to the bank. Doesn't make sense to me. :(

And yeah, I'll message you on MSN sometime to answer any questions or whatever. Won't be home until Sunday, but I should be able to give you the low down. ;)

Sir R. M8gic1an

2011-01-23 23:08:24

Oh, I just found the AI thread.

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

~RM

Coh3n

2011-01-27 01:18:33

Markus,

From: Coh3n in SVN Log

- Added documentation to Walking_Reflection.simba & Obstacles.simba
- Added MSI_WaitTile that waits for the next tile in the path (should greatly improve tile walking)
- Basically rewrote MSI_ReflectionWalk (removed some parts to create MSI_HandleObstacle, placed in Obstacles.simba) to compensate for the soon to come new color walking system
- Made some adjustments to obstacle handling -> It doesn't track the obstacle after clicking (should reduce some lag) -> Got rid of a useless reflection check in MSI_SolveObstacle which hopefully got rid of an occational out of range error
- Added some misc constants to Globals.simba
- Moved MSI_AtLocation to Locations.simba


That hopefully fixed a couple issues you were having. :) I'm going to read your first post and cross out anything that needs to be.

Overtime

2011-01-27 11:13:05

Nice Coh3n :thumbsup:

Coh3n

2011-02-27 14:06:46

I've added the MaxTime to all rocks (you can edit them in Objects.simba if needed as I haven't tested all of them). All that's left is the location detection and tracking tweaks. :)

Sabzi

2011-02-27 14:29:39

Sorry if it's already like that, but it should be calculated on the way based on the players mining level. (also expecting the player using the best available pickaxe to make calculation easier?)
The max time for each ore.
Should be one line? Let me search a bit on rswiki.

edit: after a bit of searching I was unable to come up with a formula.(and just noticed the new cup so off to make thread)

Coh3n

2011-05-25 23:18:30

From: Sabzi
Sorry if it's already like that, but it should be calculated on the way based on the players mining level. (also expecting the player using the best available pickaxe to make calculation easier?)
The max time for each ore.
Should be one line? Let me search a bit on rswiki.

I suppose it could be that way. Right now it's just a set number of milliseconds for each ore.

E: Bumping as a reminder.