PDA

View Full Version : Possibilities of SendInterSCARMessage?



IronTeapot
10-29-2006, 09:22 PM
Would it be possible to have the main script walk to locations, and have the helper script looking for land marks? For example: The main script uses RadialRoadWalk to get from Lumbridge castle to the chicken pen accross the river, while the helper script keeps an eye out for the dairy cows and the dairy churn along the way. Once each one is found, it stops walking and does the desired action, whatever that may be (milking a cow, churning butter, etc.) and then moves onto the next location.

I suppose this would sort of be like getting to way points.

What other powers could SendInterSCARMessage have? Ive noticed that it is starting to surface in some scripts by Boreas and solarwind's JESSI.

Boreas
10-29-2006, 09:46 PM
I'm working on dual script with ISM stuff (mousehelper til I think of a better name). Scripters will be able to write scripts that make use of it. My first version had the helper script doing the looking/searching etc while the main script did the mouse moving. However I had to write a very specific function into the helper (for my bankfinder) and in the main script there was a couple mmouses, command sending and receiving stuff. This setup is not as good as the version I am writing now. It will have mouse functions in the helper script, and then scripters can use them however they want and put searching/looking/monitoring functions in their main script. Likewise, I suggest you have the helper script use RRW and the main script looking for landmarks.

I'll pm you mousehelper when I finish this version to explain in more detail, but it's basically like this. The main script sends a message as a string, like 'mmouse*250*250*5*5'. Then the helper script interprets the first section as which proc to use, and the otheres as the parameters. You could do the same thing with RRW.

Also, Yakman informed me that WAAMP uses ISM. That might give you other ideas about what it can do.

IronTeapot
10-30-2006, 01:55 AM
WAAMP? I did a search for it on here, and nothing came up, and only archive files came up when I did a google search. Is it a SRL members script?

lardmaster
10-30-2006, 02:04 AM
WAAMP is a scar include, i think it might be in the normal includes download.

IronTeapot
10-30-2006, 02:10 AM
Ahh so it is... I even did a search through my scar folder and nothing came up, and looking manually I guess i didnt look down far enough. Thank you.

EDIT: A quick question. If in my main .scar, if it sees the 'landmark' can it just send an ISM to the helper, and the helper script will immediately act according to the message? For example;

Main:The land mark is here!
helper:*im just walking to somewhere*, "OMG the landmark!", * stops that walking procedure(even if there is more lines to go) and begins the procedure for what to do at the landmark?

Boreas
10-30-2006, 02:53 AM
Yes. You need something like

if not(ReadInterSCARMessage('SomeID')='LandMarkFound' ) then


between the lines the lines.

Edit: thats if the walking procedure has multiple actions. If you have a walking procedure that clicks somewhere and then use countflag then you need to make a modified version of countflag. Give me an example of the walking proc, landmark finding proc, and what to do when landmark found proc and I can explain better.

IronTeapot
10-30-2006, 03:19 AM
Im using something like this right now, I thought of this as I was typing this reply. This is just simplified with one RRW, instead of the individual road walking procedures.



Repeat
RadialRoadWalk(RoadColor,290,380,30,0,0);//Keep walking north for example
Until (FindSymbol(x,y,'churn'));//until the churn symbol is seen.
MouseFlag(x,y,0,0);//click the churn symbol to walk to it


Originally I had it like



RoadColor:=6776943;
RadialRoadWalk(RoadColor,270,360,30,0,0);
RadialRoadWalk(RoadColor,270,360,30,0,0);
RadialRoadWalk(RoadColor,360,300,30,0,0);
FindSymbol(x,y,'churn');
MouseFlag(x,y,0,0);
MakeCompass('E');


Although the problem with this is it would sometimes over shoot the churn symbol, depending on where it started from. So I was thinking of using ISM to stop the character walking when the churn is visible and not keep walking, but then i thought that maybe the first code snippit above would work aswell.

EDIT: Which brings me to the idea of way points. Have one script walking along and the other script looking out for landmarks(such as npc's or MM symbols) and change direction or do an action based on where it is.

Boreas
10-30-2006, 05:08 AM
Yea the first one should work. Actually now that I think of it searching for symbols while the minimap is moving might not be a good idea anyway.

Wizzup?
10-30-2006, 07:27 AM
lI actually got as far as letting SCAR run 2 script at the same time..but it seemed to be quite buggy...You have to edit alot of the core functions... ;)

Gilbert
10-30-2006, 11:23 AM
Yeah, and some of the functions will interfere, and that would be a big problem.

Spky
10-30-2006, 08:13 PM
It's nice to visit SRL and see new, enthusiastic scripters :).
I tried to make a script based on SendInterSCARMessage but like many projects I start, I got bored. Good stuff though.

Btw: Iron Teacup.. or whatever, what's 'Ogre' about :o ?

Edit: Nm, I worked tit out.

IronTeapot
10-30-2006, 09:08 PM
I'm an Ogre now, but soon it will say SRL Member instead :D...At least I think it will. If I can finish a full script lol. I seem to be like you, get bored before the job is done.