Jump to content

FeRkEl

Members
  • Posts

    136
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by FeRkEl

  1. After more than 10h the memory usage didn't change with more than 65000 item in auction DB.

    I repeat i am waiting for any other feedback from anyone of you :) When the code will be under_review i will be probably too busy with optimising and making integration succefull to the core.

    is there anywhere an overview about the features ? and how it will be handled?

    e.g. wiki or github/rep/wiki?

    would be nice.

    my bad i couldn't follow your changes in last time and first post isn't from you so there i can't find a full feature list.

    i remember an feature request about ignore item list or something similar

    best regards

  2. We can't use uptime table because, with the actual system, it update the row, and remove the last value.

    And insert a new row in uptime table at each time is stupid.

    It's not "live" data, it's to have a collection of values to make graphs or tables.

    jeah i actually know that, but infact you could make a switch, so u can decide if you want just latest /highest data or those of all 5mins

  3. i think fregah meant that you should make an extra field into the uptime table and could change with config setting if you'll insert all X minutes the current count (max count since last ?) or just update as before....

    so you don't need another table and more flexible ...

    just one tipp use the [ u r l ][ / u r l ] tags :-)

  4. There's I believe already existing code for this that could be improved, not much people know about it - "uptime" table in "realmd" database. It seems to log the maximum number of players each 10 minutes (default), though the column name might be misleading.

    You could modify it to log the "current" number of players instead of "max reached so far". I guess that could even be accepted to master.

    öhm but it updates the table till server crashs and doesn't insert new rows...

    handled in : /game/World.cpp

  5. ty,mangos for your promt reply :)

    I think the problem was that my mangos was 10553 3.3.5 and I was

    extracting 3.3.5a dbc and maps so it was not happy with the db

    because it was expecting a 3.3.5 db structure.

    idk because I need to change my wow to 3.3.5 to test this.

    how can I find out the wow version needed from the mangos

    core release number. :)

    tree :)

    3.3.5a is right client version,

    it seems more that you need to patch your MySQL Database

    tha table db_version tells you what was the latest SQL patch applied...

    MfG

  6.   case 4:
          player->ADD_GOSSIP_ITEM( 0, player->GetLatestNews()[0], GOSSIP_SENDER_SERVER_MENU, 3);
          player->ADD_GOSSIP_ITEM( 0, player->GetLatestNews()[1], GOSSIP_SENDER_SERVER_MENU, 3);
          player->ADD_GOSSIP_ITEM( 0, player->GetLatestNews()[2], GOSSIP_SENDER_SERVER_MENU, 3);
          break;
    

    what do you want to do here?

    you will access element 0 1 and 2 from an array? but you'll return just one const char* (res[3]) in your function?

    you execute the function 3 times (don't know if it even works!) , it would better to save return value localy and access the returned array )

    const char* GetLatestNews() {
      QueryResult* result = SiteDatabase.PQuery("SELECT user, title, message FROM news ORDER BY date DESC LIMIT 1");
      Field *fields = result->Fetch();
      const char *res[3] =
       {
       fields[0].GetString(), fields[1].GetString(), fields[2].GetString()
       };
    
      return res[3];
    }

    WHAT IS THE PROBLEM?

    C++ CANT EVEN READ ARRAYS LOL

    error LNK2019: unresolved external symbol "public: char const * __thiscall Player::GetLatestNews(void)" (?GetLatestNews@Player@@QAEPBDXZ) referenced in function "void __cdecl SendServerMenu(class Player *,class Creature *,unsigned int)" (?SendServerMenu@@YAXPAVPlayer@@PAVCreature@@I@Z)
    1>..\\..\\..\\..\\bin\\win32_release/MaNGOSScript.dll : fatal error LNK1120: 1 unresolved externals
    

  7. yeah that works, now a full php script :)

    <?PHP
    require_once ( 'config.php');
    
    mysql_connect ("$host","$user","$pass");
    mysql_select_db ("$mangoscharacters");
    
    $result = mysql_query (" insert here the working SQL Query ");
    
    $row = mysql_fetch_array($result)
    print_r($row);
    
    ?>
    

    you can change the print_r($row) with something like echo "GMs online: ".$row['count'] ; // 'count' is the column name!!!!

  8. The way I think it can be done (I'm no script genius), is to add a second filter to this line:-

    $result = mysql_query ("SELECT name, race, class, level, map, gender FROM characters WHERE online = 1");

    Something like $result = mysql_query ("SELECT name, race, class, level, map, gender FROM characters WHERE online = 1 AND Realmd/Tables/Account GMlevel >0");

    Hopefully someone will...um..adjust my attempt :D

    think this should work:

    .....
    
    $result = mysql_query ("SELECT name, race, class, level, map, gender FROM characters WHERE online = 1[/b] and accid in([color=blue]select accid from realmd where gmlevel >0)[/color];
    

    not tested

    it has nothing todo with PHP just SQL :)

    not working, and the another tips dont work too ( i need only a number, how many gms are online or not )

    i'm not sure of the columns/table spelling, so pls verify for using this sql statement in your PHP

    .....
    
    $result = mysql_query ("SELECT count(*) FROM characters WHERE online = 1[/b] and account in([color=blue]select id from realmd.account where gmlevel >0)[/color];
    

  9. level 4 to show all 3 players.. not just on

    the problem is you show 1 player not 1 per gm level

    you haven't any loop in the script...

    Mfg

    try this:

                                      <?PHP
    require_once ( 'config.php');
    
    mysql_connect ("$host","$user","$pass");
    mysql_select_db ("$mangoscharacters");
    
    $result = mysql_query ("SELECT name FROM characters WHERE account IN (SELECT id FROM $mangosrealm.account WHERE gmlevel > 3 ORDER BY NAME)");
    
    while( $row = mysql_fetch_array($result))
    {
     $t_name = $row['name'];
       echo "[b]<span style='color: #B00000'>$t_name[/b]</span>";
    }
    
    ?>   

  10. Heya

    who can help me with a GM online check ( online check, if online a gm on my server )

    regards

    Betaman

    The way I think it can be done (I'm no script genius), is to add a second filter to this line:-

    $result = mysql_query ("SELECT name, race, class, level, map, gender FROM characters WHERE online = 1");

    Something like $result = mysql_query ("SELECT name, race, class, level, map, gender FROM characters WHERE online = 1 AND Realmd/Tables/Account GMlevel >0");

    Hopefully someone will...um..adjust my attempt :D

    think this should work:

    .....
    
    $result = mysql_query ("SELECT name, race, class, level, map, gender FROM characters WHERE online = 1[/b] and accid in([color=blue]select accid from realmd where gmlevel >0)[/color];
    

    not tested

    it has nothing todo with PHP just SQL :)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use