Thread: os-scape 171 server

Page 6 of 10 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 97
  1. #51  
    Registered Member
    Join Date
    Apr 2015
    Posts
    170
    Thanks given
    30
    Thanks received
    5
    Rep Power
    15
    Quote Originally Posted by Shadowpker View Post
    that moment when Attached image

    the only thing we had trouble doing was logging in. so if anyone can direct me to fixing this, that'd be sweet. i have it connecting to postgres/imported the schema also the redis server.
    how did u connect Postgres? my server gets stuck here
    Attached image
    Reply With Quote  
     

  2. #52  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Quote Originally Posted by Slam Way View Post
    how did u connect Postgres? my server gets stuck here
    Attached image
    little bit of your time, it could really depend on your pc performance, as mine took like 10 mins to boot and my friends then took like 8-12 minutes. Try upping the memory?
    Reply With Quote  
     

  3. Thankful user:


  4. #53  
    Registered Member
    Join Date
    Apr 2015
    Posts
    170
    Thanks given
    30
    Thanks received
    5
    Rep Power
    15
    Quote Originally Posted by Shadowpker View Post
    little bit of your time, it could really depend on your pc performance, as mine took like 10 mins to boot and my friends then took like 8-12 minutes. Try upping the memory?

    pretty sure there is something wrong with connecting at this point..
    Attached image
    Reply With Quote  
     

  5. #54  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Quote Originally Posted by Slam Way View Post
    pretty sure there is something wrong with connecting at this point..
    Attached image
    What my friend did is he reinstalled his Java, jdks, sdks and also IntelliJ with fresh copy of server and source. Try that

    I also ran Postgres pgadmin and import schema there using query tool.

    Then for redis use the command prompt tool in their package:

    Code:
    $redis-cli 
    Example
    
    Following example explains how we can start Redis client.
    
    To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can run any command.
    
    $redis-cli 
    redis 127.0.0.1:6379> 
    redis 127.0.0.1:6379> PING  
    PONG
    Reply With Quote  
     

  6. #55  
    Registered Member
    Join Date
    Nov 2020
    Posts
    78
    Thanks given
    41
    Thanks received
    2
    Rep Power
    21
    Quote Originally Posted by Spooky View Post
    import the schema

    What is that?
    Reply With Quote  
     

  7. #56  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Quote Originally Posted by Ilgaz View Post
    What is that?
    the sql included in source package.
    Attached image

    upload to your pgadmin root using querytool+run it to import its in the menubar. itll look like a router control panel.

    if anyone has issues establishing any connection with postgres after doing so from the installer, go to C:/Program Files/Postgres folder/data/ and open this file > pg_hba.conf
    and open with notepad++ or someshit.

    Youll see something like this;
    Code:
    # Allow any user from any host with IP address 192.168.93.x to connect
    # to database "postgres" as the same user name that ident reports for
    # the connection (typically the operating system user name).
    #
    # TYPE  DATABASE        USER            ADDRESS                 METHOD
    host    postgres        all             192.168.93.0/24         ident
    where it says method, change all the column values to trust so it looks like this:

    Code:
    # Allow any user from any host with IP address 192.168.93.x to connect
    # to database "postgres" as the same user name that ident reports for
    # the connection (typically the operating system user name).
    #
    # TYPE  DATABASE        USER            ADDRESS                METHOD
    host    postgres        all             192.168.93.0/24        trust
    To make sure its connected, use the sql shell included in your postgres installation directory. Just click enter the whole way through.,

    Then try again. Hope this helps.

    ================================================== ================

    For any REDIS help:

    download redis for windows:

    https://github.com/ServiceStack/redis-windows

    Go to package and extract redis-latest

    Run the redis-server file.

    ================================================== ================

    Postgres default db info to use:

    user: postgres
    pass: postgres
    port is 5432

    and for your pgadmin you will need to set an admin pass. I just did admin123 for this. Make sure your server.conf sql info looks like mine after setting up PostgresSQL:

    Code:
      { // PostgreSQL
        class = nl.bartpelle.veteres.services.sql.PgSqlService
        host = "localhost"
        port = 5432
        user = "postgres"
        pass = "postgres"
        database = postgres
        quickstart = true
      }
    Last edited by Shadowpker; 02-18-2021 at 09:22 PM.
    Reply With Quote  
     

  8. Thankful users:


  9. #57  
    Registered Member
    Join Date
    Sep 2011
    Posts
    7
    Thanks given
    0
    Thanks received
    2
    Rep Power
    0
    Thanks Shadow! Now we just need a fix for the login? Has anyone figured out a work around for character logins? I know the owner of this thread isn't giving any tips on this but has anyone else figured this out? Thanks in advance would love to sift through this.
    Reply With Quote  
     

  10. #58  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by Knight Wing View Post
    Thanks Shadow! Now we just need a fix for the login? Has anyone figured out a work around for character logins? I know the owner of this thread isn't giving any tips on this but has anyone else figured this out? Thanks in advance would love to sift through this.
    Only thing you need to do is set

    Code:
    public static boolean disableIngameCreation = true;
    to false

    Spoiler for For the friends part of the game to work correctly, these following postgres functions need importing with the schema.:

    Code:
    create function canprivatemessage(my_id integer, their_name citext)
      returns TABLE(target_id integer, result boolean)
    language plpgsql
    as $$
    DECLARE their_id INTEGER;
    BEGIN
    
    
        SELECT id
        INTO their_id
        FROM accounts
        WHERE displayname ILIKE their_name;
    
    
        RETURN QUERY SELECT their_id as target_id, (CASE
                                                    --Couldn't find player
                                                    WHEN (their_id IS NULL)
                                                        THEN FALSE
    
    
                                                    --They aren't even online
                                                    WHEN (SELECT count(*)
                                                          FROM online_characters oc
                                                          WHERE oc.account_id = their_id) <= 0
                                                        THEN FALSE
    
    
                                                    --On their ignore list
                                                    WHEN (SELECT count(*)
                                                          FROM ignores
                                                          WHERE account_id = their_id AND friend_id = my_id) > 0
                                                        THEN FALSE
    
    
                                                    -- PMStatus Offline
                                                    WHEN (SELECT pmstatus
                                                          FROM characters c
                                                          WHERE c.account_id = their_id AND c.id = (SELECT oc.character_id
                                                                                                    FROM online_characters oc
                                                                                                    WHERE oc.account_id = their_id)) =
                                                         2
                                                        THEN FALSE
    
    
                                                    -- PMStatus Friends only
                                                    WHEN (SELECT pmstatus
                                                          FROM characters c
                                                          WHERE c.account_id = their_id AND c.id = (SELECT oc.character_id
                                                                                                    FROM online_characters oc
                                                                                                    WHERE oc.account_id = their_id)) =
                                                         1
                                                        THEN (CASE WHEN (SELECT count(*)
                                                                         FROM friends f2
                                                                         WHERE f2.account_id = their_id AND f2.friend_id = my_id) > 0
                                                            THEN TRUE
                                                              ELSE FALSE END)
    
    
                                                    -- Otherwise we can pm them :)
                                                    ELSE TRUE
                                                    END) AS result;
    END;
    $$;
    
    
    create function getfriendsfor(my_id integer)
      returns TABLE(accout_id integer, friend_id integer, world_id integer, service_id integer, character_id integer, displayname character varying, lastname character varying, rights smallint, clanrank integer)
    language plpgsql
    as $$
    BEGIN
        RETURN QUERY SELECT
                         f1.account_id,
                         f1.friend_id,
                         (CASE
                          WHEN ch.pmstatus = 2 --Offline
                              THEN 0
                          WHEN ch.pmstatus = 1 --Friends only
                              THEN (CASE WHEN (SELECT count(*)
                                               FROM friends f2
                                               WHERE f2.account_id = f1.friend_id AND f2.friend_id = f1.account_id) > 0
                                  THEN oc.world_id
                                    ELSE 0 END)
                          ELSE oc.world_id --Normal
                          END) AS world_id,
                         oc.service_id,
                         oc.character_id,
                         a.displayname,
                         a.lastname,
                         a.rights,
                         f1.clanrank
                     FROM friends AS f1
                         LEFT JOIN online_characters AS oc
                             ON oc.account_id = f1.friend_id
                         LEFT JOIN accounts AS a
                             ON f1.friend_id = a.id
                         LEFT JOIN characters AS ch
                             ON ch.id = oc.character_id
                     WHERE f1.account_id = my_id;
    END;
    $$;
    
    
    create function getfriendsfor(my_id integer, pmstatus integer)
      returns TABLE(accout_id integer, friend_id integer, world_id integer, service_id integer, character_id integer, displayname character varying, lastname character varying, rights smallint, clanrank integer)
    language plpgsql
    as $$
    BEGIN
        RETURN QUERY SELECT
                         f1.account_id,
                         f1.friend_id,
                         CASE
                         WHEN oc.world_id IS NULL OR oc.world_id = 0
                             THEN oc.world_id --If their world is null or 0 they are offline already
    
    
                         WHEN pmstatus = 1 AND (SELECT count(*)
                                                FROM friends AS f2
                                                WHERE f2.friend_id = f1.account_id AND f2.account_id = f1.friend_id) > 0
                             THEN oc.world_id --If other person is friends only and we are on their friends list then show the real world
    
    
                         WHEN pmstatus != 1
                             THEN oc.world_id --Other person isn't on friends only, we all good :)
    
    
                         ELSE 0 --Other person is friends only and we are no on their friends list. make them appear offline
    
    
                         END AS world_id,
                         oc.service_id,
                         oc.character_id,
                         a.displayname,
                         a.lastname,
                         a.rights,
                         f1.clanrank
                     FROM friends AS f1
                         LEFT JOIN online_characters AS oc
                             ON oc.account_id = f1.friend_id
                         LEFT JOIN accounts AS a
                             ON f1.friend_id = a.id
                     WHERE f1.account_id = my_id;
    END;
    $$;


    I downloaded from the thread, unpacked, imported both projects into intellij, fixed utf-8 encoding using the same fix here, imported the scheme into my postgres database, changed disableIngameCreation and was done.
    Last edited by Spooky; 02-19-2021 at 12:19 PM.
    Reply With Quote  
     

  11. #59  
    Registered Member
    Join Date
    Feb 2021
    Posts
    38
    Thanks given
    16
    Thanks received
    6
    Rep Power
    4
    Quote Originally Posted by Spooky View Post
    Only thing you need to do is set

    Code:
    public static boolean disableIngameCreation = true;
    to false

    Spoiler for For the friends part of the game to work correctly, these following postgres functions need importing with the schema.:

    Code:
    create function canprivatemessage(my_id integer, their_name citext)
      returns TABLE(target_id integer, result boolean)
    language plpgsql
    as $$
    DECLARE their_id INTEGER;
    BEGIN
    
    
        SELECT id
        INTO their_id
        FROM accounts
        WHERE displayname ILIKE their_name;
    
    
        RETURN QUERY SELECT their_id as target_id, (CASE
                                                    --Couldn't find player
                                                    WHEN (their_id IS NULL)
                                                        THEN FALSE
    
    
                                                    --They aren't even online
                                                    WHEN (SELECT count(*)
                                                          FROM online_characters oc
                                                          WHERE oc.account_id = their_id) <= 0
                                                        THEN FALSE
    
    
                                                    --On their ignore list
                                                    WHEN (SELECT count(*)
                                                          FROM ignores
                                                          WHERE account_id = their_id AND friend_id = my_id) > 0
                                                        THEN FALSE
    
    
                                                    -- PMStatus Offline
                                                    WHEN (SELECT pmstatus
                                                          FROM characters c
                                                          WHERE c.account_id = their_id AND c.id = (SELECT oc.character_id
                                                                                                    FROM online_characters oc
                                                                                                    WHERE oc.account_id = their_id)) =
                                                         2
                                                        THEN FALSE
    
    
                                                    -- PMStatus Friends only
                                                    WHEN (SELECT pmstatus
                                                          FROM characters c
                                                          WHERE c.account_id = their_id AND c.id = (SELECT oc.character_id
                                                                                                    FROM online_characters oc
                                                                                                    WHERE oc.account_id = their_id)) =
                                                         1
                                                        THEN (CASE WHEN (SELECT count(*)
                                                                         FROM friends f2
                                                                         WHERE f2.account_id = their_id AND f2.friend_id = my_id) > 0
                                                            THEN TRUE
                                                              ELSE FALSE END)
    
    
                                                    -- Otherwise we can pm them :)
                                                    ELSE TRUE
                                                    END) AS result;
    END;
    $$;
    
    
    create function getfriendsfor(my_id integer)
      returns TABLE(accout_id integer, friend_id integer, world_id integer, service_id integer, character_id integer, displayname character varying, lastname character varying, rights smallint, clanrank integer)
    language plpgsql
    as $$
    BEGIN
        RETURN QUERY SELECT
                         f1.account_id,
                         f1.friend_id,
                         (CASE
                          WHEN ch.pmstatus = 2 --Offline
                              THEN 0
                          WHEN ch.pmstatus = 1 --Friends only
                              THEN (CASE WHEN (SELECT count(*)
                                               FROM friends f2
                                               WHERE f2.account_id = f1.friend_id AND f2.friend_id = f1.account_id) > 0
                                  THEN oc.world_id
                                    ELSE 0 END)
                          ELSE oc.world_id --Normal
                          END) AS world_id,
                         oc.service_id,
                         oc.character_id,
                         a.displayname,
                         a.lastname,
                         a.rights,
                         f1.clanrank
                     FROM friends AS f1
                         LEFT JOIN online_characters AS oc
                             ON oc.account_id = f1.friend_id
                         LEFT JOIN accounts AS a
                             ON f1.friend_id = a.id
                         LEFT JOIN characters AS ch
                             ON ch.id = oc.character_id
                     WHERE f1.account_id = my_id;
    END;
    $$;
    
    
    create function getfriendsfor(my_id integer, pmstatus integer)
      returns TABLE(accout_id integer, friend_id integer, world_id integer, service_id integer, character_id integer, displayname character varying, lastname character varying, rights smallint, clanrank integer)
    language plpgsql
    as $$
    BEGIN
        RETURN QUERY SELECT
                         f1.account_id,
                         f1.friend_id,
                         CASE
                         WHEN oc.world_id IS NULL OR oc.world_id = 0
                             THEN oc.world_id --If their world is null or 0 they are offline already
    
    
                         WHEN pmstatus = 1 AND (SELECT count(*)
                                                FROM friends AS f2
                                                WHERE f2.friend_id = f1.account_id AND f2.account_id = f1.friend_id) > 0
                             THEN oc.world_id --If other person is friends only and we are on their friends list then show the real world
    
    
                         WHEN pmstatus != 1
                             THEN oc.world_id --Other person isn't on friends only, we all good :)
    
    
                         ELSE 0 --Other person is friends only and we are no on their friends list. make them appear offline
    
    
                         END AS world_id,
                         oc.service_id,
                         oc.character_id,
                         a.displayname,
                         a.lastname,
                         a.rights,
                         f1.clanrank
                     FROM friends AS f1
                         LEFT JOIN online_characters AS oc
                             ON oc.account_id = f1.friend_id
                         LEFT JOIN accounts AS a
                             ON f1.friend_id = a.id
                     WHERE f1.account_id = my_id;
    END;
    $$;


    I downloaded from the thread, unpacked, imported both projects into intellij, fixed utf-8 encoding using the same fix here, imported the scheme into my postgres database, changed disableIngameCreation and was done.
    There is an option to disable this sqls and run it from character in data folder? I don't understand in scheme and these apps that not related to rsps.
    Ik it's more cleaning through scheme and all the sqls but I don't need it from there, only from the folder like other rsps.
    Reply With Quote  
     

  12. #60  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by OSRS. View Post
    There is an option to disable this sqls and run it from character in data folder? I don't understand in scheme and these apps that not related to rsps.
    Ik it's more cleaning through scheme and all the sqls but I don't need it from there, only from the folder like other rsps.
    You'd be better off using Kronos. Check the serializers package for different implementations.
    Reply With Quote  
     

Page 6 of 10 FirstFirst ... 45678 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 100
    Last Post: 12-28-2019, 01:13 AM
  2. OS-Scape ECO server gp for sale!! 150m!!
    By lary_30 in forum Selling
    Replies: 13
    Last Post: 06-20-2016, 05:19 PM
  3. OS-Scape Blood Money (PvP Server)
    By Affliction in forum Buying
    Replies: 6
    Last Post: 03-19-2016, 03:55 AM
  4. Maulzz-Scape 508 Server Release !
    By Lenin in forum Downloads
    Replies: 47
    Last Post: 08-17-2009, 11:28 PM
  5. Legend-Scape - ::Pickup Server -
    By Smithy in forum Advertise
    Replies: 1
    Last Post: 05-15-2009, 09:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •