RP Chat need help please!

Discussion in 'Plugin Development' started by x_Jake_s, Sep 1, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    x_Jake_s

    Hey i'm coding a entire huge RP plugin for a new server that will go into beta in about 9 months and i am stuck at the section of instruction they gave me where it says:

    • An RP Chat aspect will also be needed, but it must be constructed in a very customisable fashion.
      • The ability to change the block distant that you are heard from must be easily toggled via your punctuation. A normal sentence ending in no punctuation or a period will only be heard within say 40-50 blocks, meanwhile adding an exclamation will turn it into a shout and make the distance your heard go up in block count, adding up to three exclamation points will be a scream, and thats as far as your text can be seen. Adding a question mark will turn it into a question like “[username] asked: [text]”.
      • A muffled speaking feature should also be added, where if you’re near someone but not enough to fully understand them it comes out like this, “[username] said: h. .. ..me .s J.h.” when if you were closer you would of heard “[username] said: hi my name is John”. Same goes for any other punctuation, the more exclamation points the more chance someone from a long distance away will hear you, or at least hear the muffled version of what you typed.
      • A language option should also be added where when you are choosing your race in the skill section you can also choose a language. This option will allow you to make your character more diverse and make your in game rping experience more interesting. If someone speaking another language is next to you it’ll come out something like this “[username] [language] said: hi -- ---- -- John” and the chat color will be paler and less noticeable compared to people speaking your own language. You’ll be able to understand simple words like hi, what, when, how, love and registered names but the rest will be filled in with dashes. Of course under the skill section you can add points to a bilingual skill no matter your race, adding points to this will make it easier to understand people who are speaking other languages and also allow you to switch to their language easily through a simple command so they can understand you. Like other skills, you can also minus points away from it, but doing this will make it hard for you to even understand your own language.
    Unfortunately i have no idea how to even start this out can someone please help me cause atm this seems impossible even if you dont want to just boost the code to me direct me to an area that i can start to look and read on how to do it?
     
  2. Offline

    fireblast709

    x_Jake_s
    • The first part is just looping over the recipients and checking their distance. If it is greater than x, do nothing
    • The second part is simply a followup from the previous. If their distance is between x and y (where y is the distance from where you can hear clearly), then the further away you are, the higher the chances are that a character is displayed as a dot.
    • The third part is pretty much checking if the other can understand the language. If not, and the word isn't whitelisted, replace with an equal amount of -
     
  3. Offline

    hintss

    *distanceSquared

    (just in case op wasn't going to)
     
  4. Offline

    fireblast709

    hintss Just a generic explanation, but thanks for the addition of efficiency :p
     
  5. Offline

    Anrza

    x_Jake_s Epic idea about languages and muffled chat. Big fan. Tell me if you don't use it and I'll steal it right away.
     
    hintss likes this.
  6. Offline

    hintss

    IDEA: caps travel further. typing in caps costs hunger. at a distance, uppercased letters start to get turned to lowercase.
     
Thread Status:
Not open for further replies.

Share This Page