Adding a new list as server command

Discussion in 'Server and Client Scripting' started by jomplox, Sep 9, 2012.

  1. jomplox

    jomplox New Member

    Joined:
    Apr 1, 2012
    Messages:
    20
    Likes Received:
    0
    These are the scripts I'm currently using on my server:
    https://github.com/lamperi/po-server-goodies

    I want to make a custom text list for every guest to see when sending a certain command, just like the /league and /rules commands.
    Is it possible to achieve this? How can I do it?
    Thanks in advance to anyone who can take the time to explain this to me <3
     
  2. jomplox

    jomplox New Member

    Joined:
    Apr 1, 2012
    Messages:
    20
    Likes Received:
    0
    If you happen to stumble on this thread, this is how I made it possible:

    First of all, switch to TheUnknownOne's server scripts. They are much more user friendly.
    http://pokemon-online.eu/forums/showthread.php?8632-TheUnknownOne-s-Server-Script

    Once the new scripts are ready, search in the code for this line:

    league: function()

    Next, look for that particular function's ending, which is marked by the following sign:

    },

    Add a new line after the function ending with the following template:

    customcommand: function () {
    var t = new Templater('ListTitle');

    t.register("<b>CustomTextField</b>. " + playerInfo("PlayerUsername"));

    t.render(src, chan);
    },

    You can repeat t.register("<b>CustomTextField</b>. " + playerInfo("PlayerUsername")); as many times as you want.
    make sure you put them before the t.render(src, chan);

    All credit goes to TheUnknownOne who taught me the method.