SRL Archive - MSI Bugs

Switching to PvP world


Markus

2011-01-16 06:10:12

Seriously, is this script on crack?????
Due to some other unknown bug (read: it was standing in the mining guild and NOT in Edgeville) it didn't really log in though.
Edit: seems it also got stuck in Arnav.

silor

2011-01-16 06:31:31

Happens to me too sometimes, it tries logging into bounty worlds even though in RandomWorld the PVP parameter is false then it just sits there because of the warning message.

NCDS

2011-01-16 12:04:54

From: Markus
Seriously, is this script on crack?????
Due to some other unknown bug (read: it was standing in the mining guild and NOT in Edgeville) it didn't really log in though.
Edit: seems it also got stuck in Arnav.


From: silor
Happens to me too sometimes, it tries logging into bounty worlds even though in RandomWorld the PVP parameter is false then it just sits there because of the warning message.


WorldSwitcher.scar is in SRL..

Markus, do you not set things up right or something? You seem to always have the most outrageous problems that no on else ever has. Perhaps try a fresh install?

Also, is the account still in Arnav? :redface:

I just woke up, but if you can post some debug I can look into it a bit..

Gu3st...

2011-01-16 12:06:02

RandomWorld works just fine

NCDS

2011-01-16 12:09:49

I run this day after day and never have a problem.

Markus, did you set PvP true by accident? (Stupid question, I know, but I don't know what else it could be).

Nava2

2011-01-16 12:10:00

Make sure your worlds.ini is up to date..

Nava2

2011-01-16 12:22:31

So, I've found the issue.. SRL's UpdateWorlds is broken, its not parsing correctly. Its not noticing that ``Bounty World'' is still PvP.

I'll work on this soon.

Narcle

2011-01-16 13:00:00

From: Nava2
So, I've found the issue.. SRL's UpdateWorlds is broken, its not parsing correctly. Its not noticing that ``Bounty World'' is still PvP.

I'll work on this soon.


I added 'Bounty' into the pvp detection system but it doesn't put it in the worlds.ini which its basing it off from. Should do a double check using the function.

Markus

2011-01-16 14:12:08

I am running a 100% clean install of SRL/Simba. In fact, I installed them only yesterday in a new folder and updated them using the built-in updater. I didn't make any modifications at all besides adding the script record (which works fine).
You can see it is detecting the world as a PvP world (it clearly says so in the debug log).
Oh and you can say to me 'Turn PvP off', but that's not really user-friendly is it ;)
And I solved the Arnav right-away.
Another bug: the track object really likes to confuse the three rocks at Varrock East. I already lowered the mining time-out to fifteen seconds (instead of 60) but maybe the so-called "artificial intelligence features" could know that no one mines iron for 60 seconds, not even at level 15. Wizzup's MM defaults Iron to 8 secs and coal to 16, which works fine. It also tracks a bit wrong at the mining guild but it's less there.
Idea: when tracking, the shape of the object usually stays the same. Maybe you could use the shapes to find out which object to track instead of mere distance to some searchbox?

NCDS

2011-01-16 15:22:06

From: Markus

You can see it is detecting the world as a PvP world (it clearly says so in the debug log).
Oh and you can say to me 'Turn PvP off', but that's not really user-friendly is it ;)

Should be set to false by default AFAIK.
From: Markus

And I solved the Arnav right-away.

Bummer :(

From: Markus

Another bug: the track object really likes to confuse the three rocks at Varrock East. I already lowered the mining time-out to fifteen seconds (instead of 60) but maybe the so-called "artificial intelligence features" could know that no one mines iron for 60 seconds, not even at level 15. Wizzup's MM defaults Iron to 8 secs and coal to 16, which works fine. It also tracks a bit wrong at the mining guild but it's less there.
Idea: when tracking, the shape of the object usually stays the same. Maybe you could use the shapes to find out which object to track instead of mere distance to some searchbox?

I've been dabbling with TrackObject a bit the past few days. Once I make some decent progress I'll be sure to let everyone know. :)

Coh3n

2011-01-16 17:42:39

Markus, can you stop saying things like "Is this script on crack" when clearly it's not a problem with MSI. You did it before with other problems you were having (not exactly the same scenario, but I'm sure you know what I mean), and it is actually quite annoying.

Randoms ~ not MSI's fault. Read this if you haven't already. About object tracking: I was actually talking to NCDS about this the other day. After seeing how well Camaro's walking worked and how simple it is got me thinking about other things we did. Maybe the whole idea of tracking the object was way over-complicating everything. There are a few things I want to try with color/reflection hybrid stuff, so when I have more time in a couple weeks I can try that out. Our object tracking should be able to be tweaked enough to work better, though.

Sir R. M8gic1an

2011-01-16 17:56:13

Is does track the shape Markus. It can't track the shape the way you'd do it because the shapes change as you move, due to distance to endpoint.

Also, 60 seconds has nothing to do with object tracking. Any kid knows how do find that in WaitWhileMining.

I'm glad you've shown you made it through a few tutorials while using MSI.

Also, it's not the tracking, it's WaitWhileMining.

And oh yeh, I agree with Coh3n, 80-90% accuracy in tracking is nothing compared to what could be done with hybrid :)


{******************************************************************************}
{ 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));

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;

I've been better than you since MR Alcher. oops. Didn't mean to say that.
However I guess we could capture the shape and project it on the predicted line of the rock (object) and look for an instance of it there, rather than expecting the shape to be at point x.


I'm not sure how you'd triangulate your way out of this one, but I guess you could.