1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Guest, PO has ceased our separate tiering and adopted Smogon tiers for SM. More information and updates here.

    Dismiss Notice

[Client Scripting] Poke Talk Client Script

Discussion in 'Server and Client Scripting' started by Nightfall Alicorn, Oct 11, 2014.

  1. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    After seeing users roleplaying as Pokemon in Pokemon Online unofficial channels. I thought I try to make a bot so users didn't have to type the Pokemon speech in each message they send. I had succeeded.

    This is a script that automatically adds Pokemon speech to your messages.

    Example:
    Saying "Hello." in chat, with this Pikachu template, will actually send "(00:00:00) Nightfall Alicorn: Pika. (Hello.)" instead. The Pokemon speech is random by the way.

    Installing & Setting Up the Script
    The instructions on how to install and setup the script are found in the code in the links below.

    Download:
    v1.02
    Main: http://pastebin.com/BKHrrHkD
    Raw Code: http://pastebin.com/raw.php?i=BKHrrHkD

    Updates:
    v1.02 - Cleaned up the script to more JSLint standard. Replaced tabs with 4 spaces. Added all official channels that weren't on before. Removed unnecessary if condition block. Added the missing full stop in the Pikachu quotes. Updated variable name for official channels.
    v1.01 - Fixed typos in comments of the code.
    v1.00 - First release.

    Questions & Answers:
    Q: What does this script do?
    A: It simply puts Pokemon speech into your messages, with your messages being enclosed in circler brackets after.

    Q: Where are the instructions to install and setup the script?
    A: They are found at the top of the script's code itself, with the settings you can edit under it. Saves users having to rapidly find this page.

    Q: I don't want to have to keep opening the plugin window and editing the code. Will there be a command line in the future to save multiple entries and switch between them when I want?
    A: At this time, not at the moment. I'm not very experienced with controlling objects in code.

    Q: Can I use samples of your code?
    A: Of course. I be happy if you can make something good with it.

    Q: The script isn't working.
    A: There are many reasons for this, here's the main ones:
    - Make sure you had copied all the raw code given from the link, even the instructions part.
    - If you had opened 2 server tabs on PC, try closing and opening Pokemon Online.
    - Make sure you pasted the code in the client script window and not the battle one by mistake.
    - Make sure Safe Scripts is off and Show Warnings is on, in the plugin script window, since Safe Scripts can disable functionality I think.
    - The script is set by default not to work in Pokemon Online's official channels. Also, it doesn't work in PM.
    - Are you getting a code line error? If so check that line of the code. You may had deleted something you shouldn't had.
     
    Last edited: Apr 13, 2015
    Jethalal, Pokemonistan and Strudels like this.