Jump to content
  • 0

Help with chat room script


GreenMagic793

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Hey guys,

 

I have this script for a chat room. Basically, the idea is that by using this NPC, you can write or read messages for other players. However, I'm encountering a problem. What I want is for each NPC I place to have a separate chat log. Instead, each time I copy this NPC, it has the same chat log. In other words, if I have 2 of these NPC's, and I type "Hello world!", in one of them, that message also appears in the other. How can I make these chat rooms separate?

 

I want to make it so that each chat room is individual. I've attached my script so you can hopefully tell me what to do. I don't mind making separate files for each NPC (I don't care about duplicating), but I can't seem to get this to work. The script itself works fine, but no matter what I try, having more than one of these NPC's results in them all sharing the same chat log. Any help is appreciated.

 

 

 

ChatRoom.txt

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Don't use global variable, use NPC variable instead.

And why you don't use the chat channel system /?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Can you point out the particular part of the script you're referring to? I'm not an expert by any means, forgive my ignorance.

 

Also, these aren't intended to work like main chat or something. They're supposed to be boards scattered across the overworld that allow you to leave hints and little cryptic messages for players when you find one. Think of it like writing on the bathroom wall, heh.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Here you go good sir.

https://rathena.org/wiki/Variables

Don't need to apologize, everybody starts from scratch my good sir. Basically what nana is saying is change those $ to .

$ = Global
. = NPC

Hope that clears it up.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...