SRL Archive - MSI Suggestions

Varrock East Woodcutter


Coh3n

2009-12-07 21:14:40

Varrock East Woodcutter


Alright, so I thought it may be a good idea to start a new thread, and assign people to different areas of their interest. We can post all the different code on this thread, but it may be more organized if we made a separate thread in either this section, or the SVN Commits section.

We need to cover the following:
  • Banking - Naum
  • Walking - Blumblebee/NCDS
  • Detecting trees - marpis
  • WhileCutting - marpis
  • Progress Report - Coh3n
  • MSI's Playerform - Naum
  • Main Loop - Cohen

EDIT: This script is now in the testing stage. Refer to this thread.

Coh3n

YoHoJo

2009-12-07 21:29:47

Varrock Road Autocolor:
SetColorSpeed2Modifiers(12.16, 0.84);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 8948099, MMX1, MMY1, MMX2, MMY2, 4);
It works very very well for me, I've used it many times over a week, and have been adding to color list, works very often.
Should always work, if not, let me know a color to add, but here's my list if anyone is interested:
8620683
8752269
8489097
8291717
8160131
8357511
8818318
8949648
8816777
8422019
8947853
8555145
8094342
8686479
9013897
8947848
8487296
9145489
8947337
9013386
9013388



This procedure clicks (roughly) the middle of Varrock east bank. It autoclors the 9 shrubs/bushes around the bank, makes them a TPA, and clicks the middle, it works 100% of the time I've tested it and I love it.

Procedure MiddleBank;
var TreePts:TPointArray;
TreePtsBox: T2DPointArray;
MidBankPt: TPoint;
Sex:Integer;
Begin
// If Not(LoggedIn) Then Exit;
//StatsGuise('Searching BankMiddle');
MarkTime(sex)
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.84, 2.04);
FindColorsSpiralTolerance(MMCX,MMCY,TreePts,3632972,MMX1, MMY1, MMX2, MMY2, 2);
SetColorSpeed2Modifiers(0.2,0.2);
ColorToleranceSpeed(1);
TreePtsBox:= TPAtoATPAEx(TreePts,60,60);
DebugATPA(TreePtsBox,'');
MidBankPt:=MiddleTPA(TreePtsBox[0]);
Mouse(MidBankPt.x,MidBankPt.y,0,0,True);
Writeln('Found VEB Center: '+IntToStr(TimeFromMark(sex))+'ms');
End;

I really don't know MSI standards or whatnot, but hopefully these will help you guys :D! And I'll read around some and help even more soon!

Coh3n

2009-12-07 21:35:13

I'm not sure if anyone has discussed autocoloring or not. But, I was thinking we could use the AutoColoring functions Nava made in this thread. I also have a script that he made where you enter an array of colors (we could use all the colors YoHoJo posted), and it will get the RBG ranges from those colors.

Nava's function is very fast and works every time. What do you guys think?

@YoHoJo - I wasn't trying to bring your function down or anything because I'm sure it does work really well. :smile: Nava's is just faster and more accurate if the minimap colors were to change. ^^

Blumblebee

2009-12-07 21:38:41

sure idc. I'll do walking if no one else wants it.

YoHoJo

2009-12-07 21:38:49

Also if you do at colors to the list I posted, make sure they DO NOT also result in the color of the wall around Varoock. I specifically picked/checked colors that pikc up only the rad, and not other gray stuff on the minimap!
Also, whats wrong with just setting ColorSpeed2Modifiers and find color tolerance? If Navas is more accurate/faster sure though, just wondering that's all :D. But FindColorTol is as simple as it gets? Ad Its accurate.

Coh3n

2009-12-07 21:42:37

From: YoHoJo
Also if you do at colors to the list I posted, make sure they DO NOT also result in the color of the wall around Varoock. I specifically picked/checked colors that pikc up only the rad, and not other gray stuff on the minimap!
Also, whats wrong with just setting ColorSpeed2Modifiers and find color tolerance? If Navas is more accurate/faster sure though, just wondering that's all :D. But FindColorTol is as simple as it gets? Ad Its accurate.

You're right, it is simple, and I did basically the same thing when I made my own AutoColoring function a while back. You would have to ask Nava for a good explanation of why FindColorTol isn't the best autocoloring method. I think it's because you're searching a certain color with a tolerance which may make it less accurate.

The only thing I know for sure is that it's super fast, which is always good. :tongue:

@Bumblebee - I'll assign you to the walking for now. If someone wants to help, I'm sure that'll be okay?

YoHoJo

2009-12-07 21:45:21

Yeah I understand the less accurate part, but ACA was picking up only road with those colors, so it works well, but whatever flys with you guys is a-ok.

Coh3n

2009-12-07 21:47:41

From: YoHoJo
Yeah I understand the less accurate part, but ACA was picking up only road with those colors, so it works well, but whatever flys with you guys is a-ok.

Which is good, that's what we want. Basically what the script Nava gave me does is gets the RGB ranges for all the colors in the array. So, I would put in all the colors you posted, hit run, and it would give me the best ranges for the function to get the road color every time. :smile:

Nava2

2009-12-07 21:47:53

Mine compares XYZ and RGB ranges to make sure they are within range, then uses the colour with the highest count :>

IDK, I still think mine is slow.. :p

Coh3n

2009-12-07 21:49:43

From: Nava2
Mine compares XYZ and RGB ranges to make sure they are within range, then uses the colour with the highest count :>

IDK, I still think mine is slow.. :p

Yeah well if you want, you can make it faster, but I'm not about to try. :tongue:

I'd say 19ms is pretty quick…

NCDS

2009-12-07 22:51:15

I'm assuming marpis will have the WhileCutting covered with his new animation functions.

If not, anyone can do it with them. Assuming they are stable that is.


My idea for detecting trees that I'm using for the WC script I'm currently writing is to find the tree color, Check the distance to make sure it is the closest tree, then make a box around the point. Count the tree color in that box, then when the color count drops, the tree is clearly gone.

Just my 2 cents for now. I'm sure one of you will top that times 10. I'll just help with little things for the moment as I'm a bit busy this week.

Coh3n

2009-12-07 22:55:53

From: NCDS
I'm assuming marpis will have the WhileCutting covered with his new animation functions.

If not, anyone can do it with them. Assuming they are stable that is.


My idea for detecting trees that I'm using for the WC script I'm currently writing is to find the tree color, Check the distance to make sure it is the closest tree, then make a box around the point. Count the tree color in that box, then when the color count drops, the tree is clearly gone.

Just my 2 cents for now. I'm sure one of you will top that times 10. I'll just help with little things for the moment as I'm a bit busy this week.

Exactly what I did:

function Chop_IsTreeDown: Boolean;
var
inBox: TPointArray;
Tree: TTree;
begin
if not LoggedIn or InvFull then Exit;
Tree := Load_TreeRecords;

ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Tree.Hue, Tree.Sat);

FindColorsTolerance(inBox, Tree.Color, TrackPoint.x - 15, TrackPoint.y - 15,
TrackPoint.x + 15, TrackPoint.y + 15, Tree.Tol);
Result := Length(inBox) < 20;
{ Writeln('Length inside Box: ' + IntToStr(Length(inBox)) + '.'); }

if Result then
Writeln('Tree has been cut down!');

SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
end;
It would have to be modified of course to fit our needs, but basically the same idea.

NCDS

2009-12-07 23:06:25

This is what I have so far for mine. It's not finished and I believe error's right now but I'm thinking your's is probably faster.

function N_PointToBox(Point: TPoint; W, H: Integer): TBox;
var
a, b: Integer;
begin
a := W / 2;
b := H / 2;
with Result do
begin
x1 := Point.x - a;
y1 := Point.y - b;
x2 := Point.x + a;
y2 := Point.y + b;
end;
end;

function FindTree(Clrs: TIntegerArray): TBox;
var
Arr: array of TPoint; i: Integer;
begin
if not LoggedIn then
Exit;

for i := 0 to High(Clrs) do
begin
FindColorsSpiralTolerance(MSCx, MSCy, Arr, Clrs[i], MSx1, MSy1,
MSx2, MSy2, 2);
if Length(Arr) > 0 then
Break;
if i = High(Clrs) then
begin
Writeln('Failed to find tree''s.');
Exit;
end;
end;

SortTPAFrom(Arr, Point(MSCx, MSCy));
Result := N_PointToBox(Point(Arr[3].x, Arr[3].y), 15, 15);
//Debug
Writeln(IntToStr(Arr[3].x)+', '+IntToStr(Arr[3].y)+';');
end;

If you made your's so there was a param to edit the box size I think it would be more functional. I like it though!

Blumblebee

2009-12-07 23:34:41

its Blumblebee not Bumblebee ;) (offtopic spam post for me :p)

Coh3n

2009-12-07 23:57:04

From: Blumblebee
its Blumblebee not Bumblebee ;) (offtopic spam post for me :p)

Lmao, I never noticed the 'l' there. :tongue:

From: NCDS
If you made your's so there was a param to edit the box size I think it would be more functional. I like it though!

Yeah for sure, it wouldn't be too hard. But if marpis has animating functions coming, there won't be any need. :tongue:

Also, what do you guys thing about an AutoColors.scar? I can take care of it easily if we agree that it's a good idea to have one since the SRL ones don't work. Let me know what you think.

marpis

2009-12-08 03:19:41

I can do the WaitWhileChopping; procedure, I'm pretty good at those things :) Detecting when the tree's been cut.
And for finding the bank I suggest to use the FindMMLocation I wrote.

And yea we do need autocolors for walking, not for any MS object. It's just useless.

Sir R. M8gic1an

2009-12-08 05:33:12

guys…

TMSObj and MSI_FindMSObj anyone? Or ar we not having a global TMsObj function? If so, using the TMSObj type would still not be a bad idea.

Also, for sakes of ease, we probably should have a MSI_FindMSObj function, but one that just simply calls the specific functions… as in:

Function MSI_FindMSObj(ObjType, WhichObj: integer): boolean;
begin
case ObjType of
Obj_Tree: Result := FindTree(WhichObj);
Obj_Rock: Result := FindRock(whichObj);
end;
end;

just so it's easy on everyone to only have to call one functions throughout the whole of MSI.

Good Idea, bad idea?

~RM

Coh3n

2009-12-08 10:55:59

From: marpis
I can do the WaitWhileChopping; procedure, I'm pretty good at those things :) Detecting when the tree's been cut.
And for finding the bank I suggest to use the FindMMLocation I wrote.

And yea we do need autocolors for walking, not for any MS object. It's just useless.

Okay sounds good, and I can start working on the AutoColors.scar, even though there's not a hole lot to do, but I'll get it working.

From: Rasta Magician
Good Idea, bad idea?

~RM

Good idea. ;) Was it NCDS who was working on it? I'm not sure what happened with it.

NCDS

2009-12-08 18:47:28

From: Coh3n

Was it NCDS who was working on it? I'm not sure what happened with it.


Yes, I was doing it. I posted one a week or so back that I really was never satisfied with, it was just…something until I thought of a better way to go about it.

The past week I have been pretty caught up with moving but, thing's are calming down again.

I really like how marpis did the MSObj functions he posted earlier today though. I think we should just work with that.

Coh3n

2009-12-08 21:00:58

From: NCDS
Yes, I was doing it. I posted one a week or so back that I really was never satisfied with, it was just…something until I thought of a better way to go about it.

The past week I have been pretty caught up with moving but, thing's are calming down again.

I really like how marpis did the MSObj functions he posted earlier today though. I think we should just work with that.

Yeah, may as well. He seems to know what he's talking about. :rolleyes:

marpis

2009-12-12 14:53:09

WhileCutting done. Released MSI_FindObject, now there's no excuse to postpone writing ChopTree(Tree: TMSObject) ;)

Coh3n

2009-12-12 15:00:14

From: marpis
WhileCutting done. Released MSI_FindObject, now there's no excuse to postpone writing ChopTree(Tree: TMSObject) ;)

Thanks marpis. :)

EDIT: The AutoColor.scar is turning into a larger project, that may take a little longer. Nava and myself are making it easier to update and more user-friendly. Shouldn't be too much longer before it's done.

Blumblebee

2009-12-12 18:23:58

I've just realized i never asked where this was supposed to be walking to…the normal tree's above the bank?

Coh3n

2009-12-12 18:51:26

From: Blumblebee
I've just realized i never asked where this was supposed to be walking to…the normal tree's above the bank?

To my knowledge, it's just outside Varrock. I guess there are some Oak/Normal trees there.

Sir R. M8gic1an

2009-12-12 20:31:04

From: Coh3n
To my knowledge, it's just outside Varrock. I guess there are some Oak/Normal trees there.


that ^

~RM

marpis

2009-12-13 06:55:58

I'm almost done with MSI_ChopTree, MSI_ChopInvFull and MSI_PowerChop :)
Going to commit then today, there we have a working powerchopper.

OK, added MSI_PowerChop!
It's still very basic with no good failsafes etc, but it works. Now let's get started with the walking and we'll have a working WoodCutterAndBanker loop by janurary!

Coh3n

2009-12-13 10:42:14

From: marpis
I'm almost done with MSI_ChopTree, MSI_ChopInvFull and MSI_PowerChop :)
Going to commit then today, there we have a working powerchopper.

OK, added MSI_PowerChop!
It's still very basic with no good failsafes etc, but it works. Now let's get started with the walking and we'll have a working WoodCutterAndBanker loop by janurary!

Awesome, you seem to really be working your ass off. :p

One thing, instead of having MSI_PowerChop, why don't we make a universal MSI_Drop function, so it can drop whatever item we have in out ItemInfo.scar? That way we don't have to have an MSI_PowerMine, etc.

Just a thought. ^^

marpis

2009-12-13 12:04:41

From: Coh3n
Awesome, you seem to really be working your ass off. :p

One thing, instead of having MSI_PowerChop, why don't we make a universal MSI_Drop function, so it can drop whatever item we have in out ItemInfo.scar? That way we don't have to have an MSI_PowerMine, etc.

Just a thought. ^^


Check Objects.SCAR :rolleyes:
MSI_ClickItems(Which: TIntegerArray; Option: String);

I'm thinking of having the mainloop go something like

Repeat
Case Players[Currentplayer].Integers[P_CurrentActivity] Of
Act_WoodCutting_Power: MSI_PowerChop(Players[CurrentPlayer].Arrays[P_SkillObjects], {Loop time});
Act_Mining_Power: MSI_PowerMine(Players[CurrentPlayer].Arrays[P_SkillObjects], {Loop time});
Act_Varrock_WoodCutting_East: MSI_VarrockEastWoodCutting(Players[CurrentPlayer].Arrays[P_SkillObjects], {Loop time});

End;
Until(Something);

This way there will be many many functions, but it's easier to do like this. People can work on these more independently.

Sir R. M8gic1an

2009-12-13 13:14:54

From: marpis
Check Objects.SCAR :rolleyes:
MSI_ClickItems(Which: TIntegerArray; Option: String);

I'm thinking of having the mainloop go something like

Repeat
Case Players[Currentplayer].Integers[P_CurrentActivity] Of
Act_WoodCutting_Power: MSI_PowerChop(Players[CurrentPlayer].Arrays[P_SkillObjects], {Loop time});
Act_Mining_Power: MSI_PowerMine(Players[CurrentPlayer].Arrays[P_SkillObjects], {Loop time});
Act_Varrock_WoodCutting_East: MSI_VarrockEastWoodCutting(Players[CurrentPlayer].Arrays[P_SkillObjects], {Loop time});

End;
Until(Something);

This way there will be many many functions, but it's easier to do like this. People can work on these more independently.


err…….
horrible.

Gotta have some vision man!



function SetMeUp: boolean;
begin
case Players[CurrentPlayer].Skill of
SKILL_WC : Result := SetupWC(Insert info here);
SKILL_MINING : Result := SetupMining(Insert info here);
end;


end;

begin
//start of mainloop stuff..
repeat
if not SetMeUp then
begin
PlayerImpossible(Players[CurrentPlayer].Integers[P_Activity]);
SwitchPlayerActivity;
continue;
end;

if not WalkToPlace then
begin
MSI_Debug('Impossible to walk: ' + Players[CurrentPlayer].Integers[P_WalkTo]);
PlayerWalkImpossible(Players[CurrentPlayer].Integers[P_WalkTo]);
SwitchPlayerLocation;
continue;
end;

if not ActivityMainloop then
begin
WalkToBack;
PlayerImpossible(Players[CurrentPlayer].Integers[P_Activity]);
SwitchPlayerActivity;
continue;
end;

if not WalkToBack then
begin
MSI_Debug('Impossible to walk: ' + Players[CurrentPlayer].Integers[P_WalkBack]);
PlayerWalkImpossible(Players[CurrentPlayer].Integers[P_WalkBack]);
SwitchPlayerLocation;
continue;
end;

if not BankAtPlace then
begin
MSI_Debug('Impossible to bank: ' + Players[CurrentPlayer].Integers[P_BANK]);
ImpossibleToBank(Players[CurrentPlayer].Integers[P_BANK]);
SwitchPlayerBank;
continue;
end;

Proggie;
SwitchPlayers;
until(false)
end.

~RM

marpis

2009-12-13 14:24:41

Should we use function variables like this

var
WalkToLocation: Function: Boolean;
ActivityMainLoop: Function: Boolean;
Banking: Function: Boolean;
WalkToBank: Function: Boolean;

Case Players[CurrentPlayer].Integers[P_CurrentActivity] Of
Act_Varrock_WoodCutting_East:
Begin
WalkToLocation := @MSI_Walk_Varrock_East_BankToTrees;
WalkToBank := @MSI_Walk_Varrock_East_TreesToBank;
ActivityMainLoop := @MSI_MainLoop_WoodCutting_VarrockEast;
Banking := @MSI_Banking_WoodCutting;
End;
End;

???

Cause I think we should have a separate function for each walking path. Not anything like MSI_Walk(Varrock_Bank_East, Varrock_Trees_East), that would be so complicated to do.

Sir R. M8gic1an

2009-12-13 14:55:55

From: marpis
Should we use function variables like this

var
WalkToLocation: Function: Boolean;
ActivityMainLoop: Function: Boolean;
Banking: Function: Boolean;
WalkToBank: Function: Boolean;

Case Players[CurrentPlayer].Integers[P_CurrentActivity] Of
Act_Varrock_WoodCutting_East:
Begin
WalkToLocation := @MSI_Walk_Varrock_East_BankToTrees;
WalkToBank := @MSI_Walk_Varrock_East_TreesToBank;
ActivityMainLoop := @MSI_MainLoop_WoodCutting_VarrockEast;
Banking := @MSI_Banking_WoodCutting;
End;
End;

???

Cause I think we should have a separate function for each walking path. Not anything like MSI_Walk(Varrock_Bank_East, Varrock_Trees_East), that would be so complicated to do.



How would that be hard….?


function MSI_Walk(from, to: integer): boolean;
begin
case from of
//...
LOC_VEB:
case to of
//...
LOC_VEM: Result := {code here in ref or} MSIVEBToVEM;
end;
end;
end;

I think the most important thing is to have a well layered include, which allows for easier changing, if we ever have the need for change.

~RM

marpis

2009-12-13 15:24:36

From: Rasta Magician
How would that be hard….?


function MSI_Walk(from, to: integer): boolean;
begin
case from of
//...
LOC_VEB:
case to of
//...
LOC_VEM: Result := {code here in ref or} MSIVEBToVEM;
end;
end;
end;

I think the most important thing is to have a well layered include, which allows for easier changing, if we ever have the need for change.

~RM


Oh you're right, it's not hard like that. Just write all the separate functions as I said and put them in a case… lawl me. :spongebob:

Coh3n

2009-12-13 22:50:30

From: Rasta Magician
I think the most important thing is to have a well layered include, which allows for easier changing, if we ever have the need for change.

~RM

Not to mention having it nice an neat, for EVERYONE to understand exactly what's going on.

Also, sorry I haven't been doing much lately, I have a couple other things I'm trying to finish, one of which will benefit MSI. I also have had a bunch of real life stuff I'm busy with. I'm just glad marpis can pick up the slack. ;)

Coh3n

2010-01-23 10:33:00

Update guys? What's everyone's status?

Blumblebee and Naum: How're the form/walking coming?

Blumblebee

2010-01-23 13:23:40

its coming basic skeleton is done, fixing it up making it pretty ect.

question though, if no one is going to make a new autocolor then can I just add the one I made myself?

edit: I also have dimploma exams all this week and the next so my time is limited atm, but I'll do my best to get this finished.

Coh3n

2010-01-23 14:38:14

You'd have to ask Nava, but the new Autocolor.scar we made (not the one in MSI), I think is going to be in SRL 5.

Blumblebee, if your autocolor is better, then by all means add it :)

Coh3n

2010-02-09 12:13:46

Updated the first post. I think we're ready to start writing the Main Loop. I have some time later today to start. If no one else does, I'll make a thread when I get back from school.

NCDS

2010-02-09 13:37:02

I haven't tested the walking since the update but I will in a bit here to make sure it's still working.

Blumblebee

2010-02-23 17:11:41

thought I'd bring this up. I know we're all busy with other projects but I think we should finish this up.

I have a few questions, as I am looking through the includes and stuff. For the walking, are we going to add all the functions I use in my walking, or should we rewrite the walking to fit the functions make in the include already (example FindMMlocation).

I would like to see this rolling again as it's sat dormant for a while now.

Coh3n

2010-02-23 17:44:43

From: Blumblebee
thought I'd bring this up. I know we're all busy with other projects but I think we should finish this up.

I have a few questions, as I am looking through the includes and stuff. For the walking, are we going to add all the functions I use in my walking, or should we rewrite the walking to fit the functions make in the include already (example FindMMlocation).

I would like to see this rolling again as it's sat dormant for a while now.

Lol, I was just talking to NCDS about this. Update your MSI, I just finished doing a whole bunch of stuff. Hopefully everyone approves. I didn't do anything out of line (I don't think :p).

Check it out.

Blumblebee

2010-02-23 17:57:34

From: Coh3n
Lol, I was just talking to NCDS about this. Update your MSI, I just finished doing a whole bunch of stuff. Hopefully everyone approves. I didn't do anything out of line (I don't think :p).

Check it out.


checked. I like it :) So is there anything left for the script to run then?

Coh3n

2010-02-23 18:07:52

From: Blumblebee
checked. I like it :) So is there anything left for the script to run then?

Yeah, the main loop needs to be finished. I just kind of started. I think if you (or someone else) was to continue, it wouldn't be hard. It's pretty basic. If no one continues, I will later tonight or tomorrow.

I also have an army of 8 that I can test with when it's up and running.

Blumblebee

2010-02-23 18:17:16

From: Coh3n
Yeah, the main loop needs to be finished. I just kind of started. I think if you (or someone else) was to continue, it wouldn't be hard. It's pretty basic. If no one continues, I will later tonight or tomorrow.

I also have an army of 8 that I can test with when it's up and running.


alright, I have training tonight but I think I could put some effort towards it.

Coh3n

2010-02-23 21:11:41

From: Blumblebee
alright, I have training tonight but I think I could put some effort towards it.

I updated the first post, and committed the last of the mainloop. It really wasn't that hard considering all the functions were already written. :p

Again, I haven't tested anything yet, but I will later on when I have more time. Anyone who can test, should, and should post about it here.

Thanks,
Coh3n

NCDS

2010-02-23 21:23:34

From: Coh3n
I updated the first post, and committed the last of the mainloop. It really wasn't that hard considering all the functions were already written. :p

Again, I haven't tested anything yet, but I will later on when I have more time. Anyone who can test, should, and should post about it here.

Thanks,
Coh3n


Code looks fine at a glance.

I'll test and edit here in a minute..

marpis

2010-02-24 13:02:30

Successfully walked from bank to the trees and chopped inventory full of logs. WaitWhileChopping doesn't detect wheter the tree still exists very well, can be probably fixed by changing trees' TMSObject info. Beautifully walked back to bank, but bank opening was kinda ucky. started hovering places before player had stopped, and opened bank but still kept searching while the bankscreen was already open. Most likely a problem in SRL bank functions. Anyways, it finally noticed that the bank is open and successfully deposited all logs, and didn't deposit the axe that was in the 1st inv slot.
Then this happened:


[Runtime Error] : Out Of Range in line 192 in script C:\Users\Matias Blomqvist\Documents\SCAR\includes\srl\srl\MSI\Debug.scar

?!?!

the problematic line is this:

for i:= 0 to (HowManyPlayers - 1) do
begin
MyName := ProgressReportArray[i].PlayerName; // <--- 192

Sir R. M8gic1an

2010-02-24 13:04:07

From: marpis
Successfully walked from bank to the trees and chopped inventory full of logs. WaitWhileChopping doesn't detect wheter the tree still exists very well, can be probably fixed by changing trees' TMSObject info. Beautifully walked back to bank, but bank opening was kinda ucky. started hovering places before player had stopped, and opened bank but still kept searching while the bankscreen was already open. Most likely a problem in SRL bank functions. Anyways, it finally noticed that the bank is open and successfully deposited all logs, and didn't deposit the axe that was in the 1st inv slot.
Then this happened:


[Runtime Error] : Out Of Range in line 192 in script C:\Users\Matias Blomqvist\Documents\SCAR\includes\srl\srl\MSI\Debug.scar

?!?!

the problematic line is this:

for i:= 0 to (HowManyPlayers - 1) do
begin
MyName := ProgressReportArray[i].PlayerName; // <--- 192


SetLength(ProgressReportArray, HowManyPlayers);

~RM

Coh3n

2010-02-24 13:07:01

From: Rasta Magician
SetLength(ProgressReportArray, HowManyPlayers);

~RM


Yes, I have been working on getting the progress report working this morning. I am at school right now, but I'll be able to finish and commit in a couple hours.

I just have to test everything. An issue I keep running into is having the Players.Arrays as a Variant array instead of an Integer array (which is what we use for all the object finding functions). Right now, I have a try except statement converting to integers, except it doesn't really work. It worked when I put it right in the MSI_DoSkill procedure, but I separated it to get the objects no matter the skill. It stopped working then.

You guys have any better ideas?

EDIT: For the banking issue, I think we should make a TMSObject record for the bank booth, and use the object finding functions to open the bank. I use my own banking booth finding function in my Draynor script, and it works really well. What do you guys think?

EDIT2: I got the object finding working.

EDIT3: Go to this thread - http://villavu.com/forum/showthread.php?t=55157