1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Server Scripting] SM Tiers

Discussion in 'Server and Client Scripting' started by Binix, Feb 27, 2017.

Tags:
  1. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    Hey I tried adding SM to my server, the server application is up to date but when ever I try to add the main server tiers to mine, it's not working.

    I'm updating through /updatetiers through my github, here's the link: https://github.com/Binix/CaloTown-Server-Scripts/blob/master/tiers.xml

    When I update using /updatetiers, I get this:
    (10:40:33) ±GengarBot: Fetching tiers...
    (10:40:33) ±GengarBot: Fetching tiers from https://raw.githubusercontent.com/Binix/CaloTown-Server-Scripts/master/tiers.xml

    It doesn't update though, does anybody know the solution to this? Thanks.

    Sorry if I put this in the wrong forum, didn't know whether to put it in Help or here.
     
  2. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    Any feedback from your server console?
     
  3. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    No there is not actually, here's the screenshot:
    [​IMG]

    Odd. :(
     
  4. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
  5. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    Nope, I tried /updateplugin RPG.js it said it was downloading the modue, never said it downloaded the module though, checked the server console and didn't get any feedback, just me typing in the command, I've had this issue here and I don't remember how i fixed it rip
     
  6. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    Well technically you could update your scripts by editing the local copy of the files but it will require a server restart to take effect and is undesirable in the long run.

    Could you try running the evalp command? I suspect the issue is that your webcalls are not working.

    https://github.com/Binix/CaloTown-Server-Scripts/blob/master/scripts/ownercommands.js#L430

    it's hard coded to be usable by these 2 users only so you will need to do some editing

    Code (text):
    1. if (sys.ip(src) == sys.dbIp("kase") || sys.name(src).toLowerCase() == "neos" || script.cmp(sys.name(src), "binix")) {
    update your local ownercommands.js, restart the server and run
    If you are unable to get a response then issue can be narrowed down to this function.
     
  7. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    I'm running an old PO script that I have edited with those 2 people you listed so I don't think /evalp exists then, I could add it through the local files do you have the code to add it, if you could list it that would be great. and yeah I will go ahead and edit that to where I am listed, didn't know I wasn't tbh, thanks for all your help.

    --- Post updated ---
    Also what line did you find that in? To save me time for looking for it.
     
  8. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    Assuming the script on your pc is the same as on github then you should have /evalp, look under ownercommands.js

    Code (text):
    1.     if (sys.ip(src) == sys.dbIp("kase") || sys.name(src).toLowerCase() == "neos") {
    2.         if (command == "eval") {
    3.             eval(commandData);
    4.             return;
    5.         }
    6.         else if (command == "evalp") {
    7.             var bindChannel = channel;
    8.             try {
    9.                 var res = eval(commandData);
    10.                 sys.sendMessage(src, "Got from eval: " + res, bindChannel);
    11.             }
    12.             catch (err) {
    13.                 sys.sendMessage(src, "Error in eval: " + err, bindChannel);
    14.             }
    15.             return;
    16.         }
    17.     }
    it looks like this, changing the first line into

    Code (text):
    1. if (sys.ip(src) == sys.dbIp("kase") || sys.name(src).toLowerCase() == "neos" || script.cmp(sys.name(src), "binix")) {
    will allow you to use it
     
  9. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    ok so from using the /evalp command i got
    Got from eval:

    so yeah it was blank, which means i got nothing/
    anyway i did /updatetiers followed up by a /updatescripts after that and still no luck ;

    --- Post updated ---
    it also shows that the tiers are up to date in the server files:
    [​IMG]
     
  10. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    Hm, well that's weird. tiers.xml is exactly the same as the one on github? Could you check again?

    I can't say I really know how to resolve the webcall problem. I have a theory that it might be an outgoing port issue but it seems unlikely.
     
  11. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    I rechecked through and it is the exact same, maybe the server isn't update I'm sure it is because when I go to add a tier in through the console it gives me sun/moon as an option.
     
  12. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    I don't understand how it's updating when your webcalls don't return anything, really. Maybe change the local copy slightly and run /updatetiers again to be sure?
     
  13. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    I changed it up a bit by putting Aegislash back in ORAS OU, not only did it not fix to let SM become available but it also didn't detect I made the change. sigh, this is a pain in the ass.

    --- Post updated ---
    Yeah so it's not working at all, I just changed the original /ranking command which i had at /ladder back to /ranking and it didn't detect the change it is still /ladder. what kinda frustrates me is that I've had this issue before and I fixed it, I just don't remember how :(

    --- Post updated ---
    Is there any chance whatsoever the server isn't updated, I mean it does show Sun/Moon from a drop down menu so I figured it was, but I don't know if it is for sure because I don't actually host the server, the only way I can go into the server console and stuff is through teamviewer.
     
  14. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    ok so somewhat good news @Strudels
    SM has been added to the server and is working, I couldn't do this through github though, I had to manually go in and do it which sucks, so now just my main problem is getting the web to work, thanks for all your help.
     
  15. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    I was under the impression you were the server host. If you want to check server version then /evalp sys.serverVersion()
     
  16. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    Version 2.70, is that up-to-date?
    Pretty sure it is, but then again not so sure.
     
  17. Strudels

    Strudels ・◡・ Super Moderator Server Administrator Super Moderator Server Administrator

    Joined:
    Oct 31, 2013
    Messages:
    259
    Likes Received:
    1,005
    PO Trainer Name:
    Ripper Roo
    Latest version should read 2.7.1
     
  18. Binix

    Binix work drugs

    Joined:
    Jun 13, 2014
    Messages:
    60
    Likes Received:
    11
    This issue randomly solved itself, not sure how, but it did, somebody can close this if they want I guess.