SRL Archive - Reflection

Obstical Solver V0.1


sm0k3

2011-04-26 08:20:52

OBSsolver V0.1


What is IT : Its An include To Solve Obsticals

How Does It Work : You include it in your
Script and call it with SolveOBS(); Often in your Walking Proceedure
To Add Obsticals edit the OBST.ini file and add you obsticals there in the following format:


[0] // increase Buy 1 for each new obstical
COLORS=9688284,10940407,10742771 // Colors To Look For
UPTEXT=Door,oor // The First Var in full as name second and any more are uptext to look for.

at the top of OBST.ini

change the following


[OBSTICALS]
COUNT=1 // increase buy 1 for each new obstical

Extract OBSTsolver.zip to Includes/ then include With {.include /OBSTsolver/OBSTsolver.simba}

Sir R. M8gic1an

2011-04-26 08:29:31

Why does this sound like an MSI rip off?

~RM

YoHoJo

2011-04-26 08:31:24

Oh Cmon Rasta, it's just an object solver, not a Multi-Script-Include.
He's just offering a cool/neat tool for people to use!

NCDS

2011-04-26 08:32:40

From: Sir R. M8gic1an
Why does this sound like an MSI rip off?

~RM


Same basic concept; just we use our TMSObject record and he uses an ini file. (Note: I didn't look at te code, just judging from the post)

Daniel

2011-04-26 09:06:32

From: Sir R. M8gic1an
Why does this sound like an MSI rip off?

~RM


Oh c'mon!

Who cares if it even is? He/she is attempting something, so let them? I mean, Simba is supposedly a rip off of SCAR…

Sorry, but to me you just seemed really negative with that post, discouraging him/her from improving his/her scripting ability…

sm0k3

2011-04-26 09:36:45

Well to be honest i dont see what the fuss is about

I have made this script to do one thing:

Get past an OBSTICAL ie a door ..

some bots get stuck if a door closes behind them ..
if so .. add the door to the ini
include the script

there you go it opens the door . Thats all and nothing more !

Floor66

2011-04-26 09:50:01

Cool but what exactly is an obstical. Something in RS?

HarryJames

2011-04-26 09:52:11

Ignore the RS part, it's just an obstacle. Something that's going to be in the way of what you want, whether it's a door or a low wall, which needs to be climbed over!

Home

2011-04-26 09:53:59

From: Floor66
Cool but what exactly is an obstical. Something in RS?


Probaly Doors. Walls, etc.

Well done mate. Good to see some contributing (RM.. Cheer up).


~Home

sm0k3

2011-04-26 10:04:47

Yes Weather its a Wall or a door it will find it theValidate the uptext if both match an obstical in the INI it will click on the obstical

the neat thing is you can add Obsticals during runtime and the script will pick up on the changes and use them

also it will find any obsticals that are in the INI on each run

i will add a way to pass an obstical name to the Script so you can search a single obstical

yes this can find objects as well if you add a rune or somthing it will find them aswell..

Floor66

2011-04-26 10:16:23

Oh rofl I was thinking all complicated like some minigame.

Just a heads up the word isn't Obstical but ObstAcLE :p

Flight

2011-04-26 10:22:41

Definitely a different way of detecting closed doors, but do you really think it's worth the effort to make an include and parsed INI file? Why not simply add your few procedures to Mapwalk? Or am I missing the critical reason it should be built in an include?

Markus

2011-04-26 10:50:59

Every script is an MSI Rip, because most of them mine, woodcut or do something else MSI can do -.-'

Good job, but why use INI files? I'd stick to just a few arrays :)

Naum

2011-04-26 13:40:34

From: Markus
Every script is an MSI Rip, because most of them mine, woodcut or do something else MSI can do -.-


LOL, true!

I dont really see the point of making it an include, after all its just a couple of procedures, but good job nonetheless.

sm0k3

2011-04-26 14:21:00

The general idea is that at any point during the script the ini can be changed without restarting the script .

lets say rs change a door and your script thats been running for 8 hours now cant get through the door just change the collor for the door and change uptext if needed an the script will go through the door . no restarting the script

also i believe an ini is easier to update for new people than editing a possibly long and complicated script .

also it just seemed like a good idea at the time and i am finding it usefull

im sure other people will

at the end of the day the script / include is just a tool that loads colors a nd uptext from a file and clicks them if found on runtime.. :)

i will be expanding this to support other ways of getting past obstacle's for example traversing boats nd spirit trees and maby fairy rings

Overtime

2011-04-26 14:59:34

Cool sounds like something MSI needs, since (iirc) said that we can leave MSI running on forever and come back next year and it will still be running.

Although i find that invalid, since their is always a RS update almost every week and something breaks.

Good job smoke, don't listen to these Seniors. Do what you do best.

Troll

2011-04-26 15:18:28

Looks good although i feel its more to do with the script not the incude, however well done, your better then me :)

From: Markus
Every script is an MSI Rip, because most of them mine, woodcut or do something else MSI can do -.-'

Good job, but why use INI files? I'd stick to just a few arrays :)


No not true, because woodcutter and miners where here first however MSI was the first to really make a obstical part of an include. So MSI rips off everyone :p but this rips off MSI However im for this and think you have done great and im also not agaisnt MSI its great. And ive just been side tracked sorry for the oftopic

Gu3st...

2011-04-26 15:37:43

From: Troll
No not true, because woodcutter and miners where here first however MSI was the first to really make a obstical part of an include. So MSI rips off everyone :p but this rips off MSI However im for this and think you have done great and im also not agaisnt MSI its great. And ive just been side tracked sorry for the oftopic
AFAIK, what Markus said was a joke :rolleyes:

Markus

2011-04-26 15:39:04

From: Troll
No not true, because woodcutter and miners where here first however MSI was the first to really make a obstical part of an include. So MSI rips off everyone :p but this rips off MSI However im for this and think you have done great and im also not agaisnt MSI its great. And ive just been side tracked sorry for the oftopic


l2sarcasm. Oh wait, you're a troll! :p

Troll

2011-04-26 15:43:42

From: Markus
l2sarcasm. Oh wait, you're a troll! :p


God i feel silly now, not seeing the sarcasm :p Sorry

Flight

2011-04-26 20:13:50

From: Troll
God i feel silly now, not seeing the sarcasm :p Sorry


That's okay, I missed it as well. I was planning to bring up some points of the order of which scripts were developed, but I guess it would have been irrelevant. :rolleyes:

grats

2011-04-26 21:14:23

Hey smok3, how could this be used with the hiker? I was thinking of adding to the Gnome tree entrance.


the red is where the door is:


the two x's are spots I'd like to add to my fullrswebber


(the red is where a door is that you just need to click)

sm0k3

2011-04-27 11:07:37

Grats you will need to Add this Modified WalkPath to the top of WebWalk.Simba
as The Existing WalkPath in Reflection that WebWalk Uses Wont do the job


// Reflection WalkPath But this includes SolveOBST(); So to work with OBSTsolver
function WEB_WalkPath(Tiles: TTileArray): boolean;
var
i, t, attempts: integer;
P: TPoint;
next: boolean;
label
ProcStart;
begin
Inc(attempts);
ProcStart:
i := -1;
Result := false;
if(DistanceFrom(Tiles[High(Tiles)]) < 6)then
begin
Result := true;
Exit;
end;

//Getting the starting index.
for i := High(Tiles) downto 0 do
if(TileOnMM(Tiles[i]))then
begin
i := i;
Break;
end;
if(i = -1)then
Exit;

//Walk remainder of the path.
for i := i to High(Tiles) do
begin
next := false;
if not(TileOnMM(Tiles[i]))then
begin
Writeln('Tile not on MM.');
break;
end;
P := TileToMM(Tiles[i]);
Mouse(P.x, P.y, 1, 1, true);
while(DistanceFromFlag <> 0)do
begin
if not WaitToMove(2500)then
begin
MarkTime(t);
while(TimeFromMark(t) < 3500)do
if(WaitToMove(1000))then break;
if(TimeFromMark(t) >= 3500)then
begin
Writeln('***Didn''t move for 10 seconds. Find Obstical***');
SolveOBS();
next := false;
break;
end;
end;
if(i < High(Tiles))then
begin
if(TileOnMM(Tiles[i+1]))then
begin
next := true;
break;
end;
end;
end;
if(i < High(Tiles))then
if(TileOnMM(Tiles[i+1]))then
next := true;
if not next then
break;
end;
Result := DistanceFrom(Tiles[High(Tiles)]) <= 5;
if not Result then
begin
if(attempts > 7)then
begin
Writeln('Failed more than ten attempts.');
Exit;
end;
While(GetSpeed > 0)do wait(100+Random(100));
goto ProcStart;
end;
While(GetSpeed > 0)do wait(100+Random(100));
end;

you need to change all occurences of WalkPath() in WebWalk.simba to
WEB_WalkPath();

then you should be able to Add the Doors color and uptext in OBSTsolver's ini

now when you get to the door OBSTsolver Should do its job and use the door

worked for me so if you have any problems just ask .
i find it works nicely but to be honest most of the FullRSWebber paths dont need it lol