Welcome to the RaGEZONE - MMORPG development forums.

GM(s) Online Count Script!

This is a discussion on GM(s) Online Count Script! within the FlyFF Releases forums, part of the Flyff category; I don't know if this was released before or this was a common script that can be found on flyff ...

Results 1 to 11 of 11
  1. #1
    ASDFGHJKL
    Rank
    Member +
    Join Date
    Apr 2010
    Location
    At your back!
    Posts
    731
    Liked
    211

    GM(s) Online Count Script!

    Click
    I don't know if this was released before or this was a common script that can be found on flyff website releases. I'm still confused if this would be useful for you too, because this was useful to me.

    Save this as useron.php. (or anything you just have to change the "require('useron.php');" )

    PHP Code:
    <?php
            $link 
    = @mssql_connect("XXX\SQLEXPRESS""SA""SQLPASS") or die ("Server is down!");
            
    $db = @mssql_select_db('ACCOUNT_DBF') or die ("Account table is missing!");
            
    $b '';
        
    $mail '';        
            
    $query mssql_query("SELECT * FROM [ACCOUNT_TBL_DETAIL] WHERE isuse = 'J' AND m_chLoginAuthority='Z'");
    ?>
    Then this script would be the main script to be use.
    PHP Code:
    <?php
    require('useron.php');
            echo 
    'GM(s) Online : <font size="2" color="green">' mssql_num_rows($query); 
    ?></font>
    But, for this to work. You should execute this query to your SQL SERVER.

    Code:
    USE [ACCOUNT_DBF] 
    GO 
    update [ACCOUNT_TBL_DETAIL] set m_chLoginAuthority = 'Z' where account = 'STAFF USERNAME' 
    GO
    This is kinda simple. But this is important to me, I don't know if this would be important to you too. Well, Thank you if you could appreciate and Still thank you if not. Because you at least viewed this.

  2. #2
    Hardcore Member
    Rank
    Member
    Join Date
    Jun 2007
    Posts
    128
    Liked
    22

    Re: GM(s) Online Count Script!

    Nice!

    off topic:
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/artfulme/public_html/index.php:1) in /home/artfulme/public_html/index.php on line 1

  3. #3
    Member
    Rank
    Member
    Join Date
    Jul 2011
    Posts
    66
    Liked
    63

    Re: GM(s) Online Count Script!

    Quote Originally Posted by rtosoftware View Post
    Nice!

    off topic:
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/artfulme/public_html/index.php:1) in /home/artfulme/public_html/index.php on line 1
    index.php first line:

    PHP Code:
    <?php ob_start();

  4. #4
    Monster
    Rank
    Member +
    Join Date
    Apr 2009
    Posts
    1,454
    Liked
    469

    Re: GM(s) Online Count Script!

    Please learn TSQL/PHP/Anything...

    PHP Code:
    $query mssql_query("SELECT COUNT(*) as GMsOnline FROM [ACCOUNT_TBL_DETAIL] WHERE [isuse] = 'J' AND [m_chLoginAuthority] != 'F'");
    $array mssql_fetch_array($query);
    echo 
    $array['GMsOnline']; 
    That was hard? That took less than 60seconds to write up. Also note that selecting all values in a table really isn't a good idea for performance.

  5. #5
    ASDFGHJKL
    Rank
    Member +
    Join Date
    Apr 2010
    Location
    At your back!
    Posts
    731
    Liked
    211

    Re: GM(s) Online Count Script!

    Quote Originally Posted by xLethal View Post
    Please learn TSQL/PHP/Anything...

    PHP Code:
    $query mssql_query("SELECT COUNT(*) as GMsOnline FROM [ACCOUNT_TBL_DETAIL] WHERE [isuse] = 'J' AND [m_chLoginAuthority] != 'F'");
    $array mssql_fetch_array($query);
    echo 
    $array['GMsOnline']; 
    That was hard? That took less than 60seconds to write up. Also note that selecting all values in a table really isn't a good idea for performance.
    Thanks for this. And I'm just trying. :))

  6. #6
    Flyff Developer
    Rank
    Moderator
    Join Date
    Apr 2009
    Posts
    1,905
    Liked
    405

    Re: GM(s) Online Count Script!

    Also, technically the m_chLoginAuthority value in ACCOUNT_TBL_DETAIL is for GM ACCOUNTS (meaning every char on the account, is considered a GM char).
    This would be better for checking if the actual GM chars are online:
    Code:
    $query = mssql_query("SELECT COUNT(*) as GMsOnline FROM [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] WHERE [m_chAuthority]!='F' AND [MultiServer]!=0"); 
    $array = mssql_fetch_array($query); 
    echo $array['GMsOnline'];

  7. #7
    MC Web Designs
    Rank
    Member +
    Join Date
    Oct 2010
    Location
    UK
    Posts
    893
    Liked
    119

    Re: GM(s) Online Count Script!

    Thanks bro.

  8. #8
    AKA SilentCoder
    Rank
    Member +
    Join Date
    Apr 2009
    Location
    Localhost
    Posts
    290
    Liked
    22
    Gamertag: xbox is gay

    Re: GM(s) Online Count Script!

    Quote Originally Posted by sagenessamerda View Post
    index.php first line:

    PHP Code:
    <?php ob_start();
    Thats horrible coding style!!!
    [SIGPIC][/SIGPIC]

  9. #9
    0xC0FFEE
    Rank
    Alpha Member
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    1,884
    Liked
    551
    Gamertag: MoonLord666

    Re: GM(s) Online Count Script!

    Not it's not.
    Output buffering is a great way to hold output until script execution is completed.
    It prevents stupid errors that aren't supposed to happen.

    There are some cases where output buffering shouldn't be used as a solution, but it's a completely acceptable way to go about doing things.
    Quote Originally Posted by DriftCity View Post
    Begging won't help and proof won't be shown. I'm leaving the Flyff Section forever and closing my project.
    missionaccomplished
    I found ragezone exploitses:
    Code:
    http://forum.ragezone.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42

  10. #10
    AKA SilentCoder
    Rank
    Member +
    Join Date
    Apr 2009
    Location
    Localhost
    Posts
    290
    Liked
    22
    Gamertag: xbox is gay

    Re: GM(s) Online Count Script!

    Quote Originally Posted by spikensbror View Post
    Not it's not.
    Output buffering is a great way to hold output until script execution is completed.
    It prevents stupid errors that aren't supposed to happen.

    There are some cases where output buffering shouldn't be used as a solution, but it's a completely acceptable way to go about doing things.
    Instead of using it to fix your headers are already send errors, you should go back and change your code, that way you won't need the ob_start();
    http headers ends once something is printed out on the screen, so fixing this is wery simple. One fix would maybe include the headers in a global file ontop of the page. Other one could be getting rid of all the echo / print in functions and use "return" instead. This way you can use a controller to generate the page in the end. This would be the hardest way of doing it but its the best way. As it will give your website several different options along with it.

    If you decide to use ob_start make sure you use flush the output to the user after with ob_end_flush();
    Last edited by dudekill; 19-08-11 at 11:42 PM.
    [SIGPIC][/SIGPIC]

  11. #11
    0xC0FFEE
    Rank
    Alpha Member
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    1,884
    Liked
    551
    Gamertag: MoonLord666

    Re: GM(s) Online Count Script!

    PHP flushes it automatically on script end so ob_end_flush is not needed.
    I can say that bad code leads to bad fixes, and using output buffering to suppress an error is not the right way to go but it's no way in hell a bad "coding style".
    Go learn PHP please.
    Quote Originally Posted by DriftCity View Post
    Begging won't help and proof won't be shown. I'm leaving the Flyff Section forever and closing my project.
    missionaccomplished
    I found ragezone exploitses:
    Code:
    http://forum.ragezone.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •