SRL Archive - General

SendInterSCARMessage - Internet/Network


Jason2gs

2007-04-14 03:39:54

I wanted to know if there was a way to send/recieve InterSCARMessages through the internet/over a network.

I was digging around in the scripts\test, and there was some really cool stuff in there! Among others, I found two scripts. One called "message_plane" and one called "message_tower". It's really cool how Send/ReadInterSCARMessage works, and I thought it would be cool to have it Send/Recieve SCARMessages, via, the internet/a wireless network.

Pentti

2007-04-14 03:41:17

Ye, I thought too it would be cool to send messages with SCAR via internet. :D

Freddy1990

2007-04-14 03:47:32

It doesn't work that way…

moparisthebest

2007-04-14 04:00:25

But…

SCAR does have socket connections and stuff to communicate over the network with, right Freddy1990? :)

Pentti

2007-04-14 04:12:40

But you could steal people Runescape passwords with SCAR scripts that way, so its not good idea.

Pinqvin

2007-04-14 05:04:03

Yeah that's true, but since all scar scripts code are viewable for everybody, the scripters little plot would fail miserably.

Freddy1990

2007-04-14 11:20:15

From: moparisthebest
But…

SCAR does have socket connections and stuff to communicate over the network with, right Freddy1990? :)


Yes, but, SCAR doesn't allow you to be a server if I'm correct, you can only use SCAR as a client…

Jason2gs

2007-04-14 18:58:00

How does Send/ReadInterSCARMessage work?

Pentti

2007-04-15 03:17:29

From: Jason2gs
How does Send/ReadInterSCARMessage work?

It can send messages just on your own computer. Look at this:
program SCAR1;
begin
SendInterScarMessage('Lol','Hi')
end.
Open up scar, run with that.

2. open up another scar, run with this:
program SCAR2;
begin
writeln(ReadinterScarMessage('Lol'))
end.

Boreas

2007-04-15 05:08:30

It's like a super global variable. With the ID being the name of the variable, and the message being the string it holds. It can be seen from different SCARs, and I believe only gets cleared when all SCARs are closed.

moparisthebest

2007-04-16 03:21:17

From: Jason2gs
How does Send/ReadInterSCARMessage work?


Using Shared Memory :)

An example of how to talk let java and SCAR talk back and forth was posted by regex on kaitnieks.com, I kept a copy here: http://www.moparisthebest.com/downloads/Java_sharedmem_Scar.rar

Interesting stuff isn't it? :stirthepot:

Jason2gs

2007-04-16 11:51:47

From: moparisthebest
Using Shared Memory :)

An example of how to talk let java and SCAR talk back and forth was posted by regex on kaitnieks.com, I kept a copy here: http://www.moparisthebest.com/downloads/Java_sharedmem_Scar.rar

Interesting stuff isn't it? :stirthepot:


Oooh, I'm gonna have some messing around to do :)

Thanks.

inSane

2007-04-22 16:53:02

Yes you could do it with PHP as the server where it writes the text and another procedure what reads it (i have private one) ;)

Smartzkid

2007-04-22 17:19:56

From: Freddy1990
Yes, but, SCAR doesn't allow you to be a server if I'm correct, you can only use SCAR as a client…


:p Jason and I figured that out after ~ an hour of trying

I guess we'd have to make a plugin to do it?

Wizzup?

2007-04-23 02:54:00

You'd have to do something with either a PHP script to handle and send SCAR Messages, or use sockets.

solemn wishes

2007-04-23 11:10:33

i made a powerminer that would do 2 accounts allmost at the same time using this.

Seaninio

2007-04-30 17:02:12

Well, it doesn't use InterSCARMessages but I came up with a little idea..

If SCAR saves the messages it wants as a file, then the file could be shared on a LAN or on a web server

Then instead of ReadInterSCARMessage, it could read the file from the place it is being shared on the other computer. (Not sure how to do that but some scripts download version numbers etc from websites.)

Would this work or is it just another one of my useless ideas?