SRL Archive - Senior Scripts and Snippets

Revive Private Chat Project


WT-Fakawi

2007-10-10 08:08:45

Now we are all running on two or more clients simultaneously, I suggest we blow life into the ChatBase project: bots communicating with each other via Private Chat.

I took some steps for this project Here. The idea is as follows:
  • One Master, one Slave account
  • Via InterScarMessages the Master controls the text to be send to the slave.
  • The slave signals the master when a text is send.
  • chat can be SQL-controlled through a server(the hard way) or plain text attached in a local include (simple way)

The chat will be coherent. I have currently approx 50 convos in ChatBase. If people want to add, it might be an idea to set it up here @ srl-forums, but not sure what Dank's thoughts are on this matter.


I dont have much time at hand at the momemt, so I will be just tossing ideas

The Un-Named

2007-10-10 08:49:17

I was thinking, rather than both scripts knowing what to say, the master could control what the slave says, this way, there's no need for funny text finding to see what he says and decide what to appropriately say.

WT-Fakawi

2007-10-10 09:26:52

From: The Un-Named
I was thinking, rather than both scripts knowing what to say, the master could control what the slave says, this way, there's no need for funny text finding to see what he says and decide what to appropriately say.


Thats what I ment :)

The Un-Named

2007-10-10 09:47:19

From: WT-Fakawi
Thats what I ment :)


Oh, I see. Well, if you need chats, I can setup 5 smarts to log convos in lumby for an hour(5 hours worth of logging). Perhaps we could also add it so say, the master adds the slave and messages him with something like "hey man!", and the slave acts clueless. It's happened a lot of times to be before.

pwnaz0r

2007-10-10 18:04:55

OK, well i recently did some work on this (not great but it was some), and I found my self getting frustrated with setting up the SQL. I have to admit, I'm not great in SQL in the first place. I think designing the system would be a little difficult to make failsafe. Anyways, If we it is made, we should put alot of emphasis on it, else it will turn out like the Remote Control. Most users don't even know how to use it and it is rarely used except in some good scripters scripts.

The Un-Named

2007-10-10 18:37:38

I'm not good with MYSQL databases either, however I know enough to know it wouldn't be a good way of doing it. I could write a lame php script(with a tool to add chats) right now to provide chats at one's GetPage desires, but then the functions to send the chats would need to randomize them an awful lot. I reckon an ideal situation would be for the chats on the webpage would be written in almost perfect English, the script can replace you with u ect, misspell some common words and such.

I doubt it would be hard to do, again, ideally it would be something like this:

function PCProjSend(toplayer : string; chatsto, chatsfrom : TStringArray) : Boolean;

And you would use it something like this:

if PCProjSend('zezima', Random(20000) + 1000, ChatsTo, ChatsFrom) then
Writeln('Project Private Chat initialized, will now send random chats from the ChatsTo array to player ' + Player);

And would send random chats and be replied to after a few seconds/half a minute/in minutes.

Wizzup?

2007-10-11 03:01:52

I'm learning mySQL atm. :D

WT-Fakawi

2007-10-11 04:00:22

IMHO, there is no need for SQL. You could format the convos Pascal-style and send them from an includefile via interSCARMessage,

Wizzup?

2007-10-11 04:12:17

From: WT-Fakawi
IMHO, there is no need for SQL. You could format the convos Pascal-style and send them from an includefile via interSCARMessage,


What about multiple scripts? All needing a different ID and stuff.
It could be done by parsing text, but it's easier to do it in PHP and only send the Recipient and text to SCAR IMO. :)

The Un-Named

2007-10-11 07:21:23

From: Wizzup?
What about multiple scripts? All needing a different ID and stuff.
It could be done by parsing text, but it's easier to do it in PHP and only send the Recipient and text to SCAR IMO. :)


Couldn't you possibly add a number at the message to be sent so the receiving SCAR's know what to do? For example, using 3, all 3 have a unique number, say 11 for the master, 22, 33 for the two slaves, and at the start of the message the master adds the number so either of the slaves know what to send and delete the number.

Wizzup?

2007-10-11 09:02:52

From: The Un-Named
Couldn't you possibly add a number at the message to be sent so the receiving SCAR's know what to do? For example, using 3, all 3 have a unique number, say 11 for the master, 22, 33 for the two slaves, and at the start of the message the master adds the number so either of the slaves know what to send and delete the number.


Well I guess you could parse alot of text.
(You read a responce, and see what answer fits)
Would only require 1 php/mysql script that simply send and receives between 2 scars, or use Sockets.

I want to learn stuff in MySQL anyway, not sure if I can make it…

The Un-Named

2007-10-11 11:38:52

I'm not sure for one person, but I've had a brilliant idea through 2-3 computers(yes, uberly anti-macro), using RegeX's Java <-> SCAR, it would be pretty simple for someone to just add a system to connect to someone else's IP and communicate with their SCAR's, then for an easy way, save the chats to a local file on the "Hosting" app's computer(Not really hosting, this would be the one that connects to the other pc first).