Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. Yes, as I said. If it does not matter that you don't get all the numbers between 0 and 200, take what you have.

    If it matters, don't take it ,)

    I guess Zupa wanted 1000,2000,3000 and so on only. He cannot get other values. Random x gets you a number between 0 and x. If you multiply that with something else (e.g. 2 as the lowest next meaningful number) you already only get half of the numbers between 0 and x.

  2. Are you using the Epoch events from here?

    https://github.com/vbawol/DayZ-Epoch/blob/master/Server%20Files/SQL/add_recommended_mysql_events.sql

    -- ----------------------------
    -- Event structure for removeObjectEmpty
    -- ----------------------------
    DROP EVENT IF EXISTS `removeObjectEmpty`;
    DELIMITER ;;
    CREATE EVENT `removeObjectEmpty` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes abandoned storage objects and vehicles' DO DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') )
    ;;
    DELIMITER ;
    

    Are these your objects that are gone? All objects not changed/updated for 14 days, 24 days old and inventory empty? Sounds so.

    Although I have no guess for the sandbags...maybe these got shot often and updated the damage ;)

  3. "character_data AS tmpcharacter_data" means: take the character_DATA table and make a so to say copy to 'shadow' or virtual table tmpcharacter_data (in memory I guess). That's then internally used in the query for comparison.

    So nothing to do on your side. Just make sure you use the correct table name notation (Character_DATA / character_data / ...).

     

    But before you use something you should at least understand a bit what it does ,))

     

    DELETE FROM `character_data` (delete rows from table character_data)
    USING character_data, character_data AS tmpcharacter_data (use 2 tables for value comparison: character_data and a copy of it with name tmpcharacter_data)
    WHERE NOT character_data
    .CharacterID=tmpcharacter_data.CharacterID (character ID of the row in character_data shall be unequal to the  characterID in tmpcharacter_data table)
    AND character_data.CharacterID<tmpcharacter_data.CharacterID (character ID of the row in charater_data should be smaller than the ones in tmpchar-table if there are any)
    AND (character_data.PlayerUID=tmpcharacter_data.PlayerUID) (Player ID shall be the same of both rows in char_data and tmpchar_data table)

     

    So line 1 in character_data table is the first row in question: delete row or not

    In the where clause all 3 lines need to be true that data to delete is returned.

    So if in our copied table tmpchar_data are rows available which are from the same player (same PlayerUID as in our row in question) AND these row(s) have a higher Char ID than the one in question AND the Char ID is NOT the same (as that would be bad as we may delete the only row).

    ...then delete this row in character_data.

     

    Take second row in character_data and do the same checks and so on.

     

    So in the end you always have the newest character row of each player left. There can still be characters with Alive=0...if there was no row available already with Alive=1 (player died and logged out or something).

    If there is one or more with Alive=0 and 1 with Alive=1 (the new one) available, then we delete all the ones with Alive=0.

  4. Can you manually insert/delete/change rows in your db?`So it's not a db issue itself?

     

    If not the game may not be able to update anything there anymore. Is the user/passwort and connection details still correct? Any errors in any log file (server/client)?

     

    Or is it only the backup that does not work when you try to import it into your db? Same rows with same values might not be able to get imported into tthe DB, if there are existing rows with same values.

    You need to clear the tables and import your backup then. But I do not know what kind of backup you have (nmysql dump od everything?)!

  5. I don't know where this is from but with this: Damage`=0.1

    ...you add exactly 0.1 damage to the object. If you want to get old objects removed (with another event or query which deletes objects where damage = 1) you will need to add 0.1 each time you execute this.

    So like Damage`= Damage + 0.1

     

    For 3 days: this query takes into account that the object has not been 'touched' or changed for 3 days. The event itself will run every day once. And as I said above: damage will never get higher than 0.1 with this query.

  6. Hi Sandbird,

     

    I do the second so...it also deletes players where the character is deleted. These [] for Inventory and Medical tells me that players have not been able to connect at all (wrong mods or something):

    DELETE FROM Character_DATA, Player_DATA USING Character_DATA, Player_DATA
                   WHERE Character_DATA.LastLogin < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 2 DAY)
                   AND Worldspace = '[]'
                   AND Medical = '[]'
                   AND Character_DATA.PlayerUID = Player_DATA.PlayerUID;

     

     

    For the first I have an Alive within the query:

    DELETE from Character_DATA
                   USING Character_DATA, Character_DATA as tempchartable
                   WHERE (Character_DATA.PlayerUID = tempchartable.PlayerUID)
                   AND (NOT Character_DATA.alive = tempchartable.alive)
                   AND (Character_DATA.alive = 0)";

     

    So only if there is a Alive = 1 line for this character it will delete all the Alive = 0 lines/rows. So if for whatever reason the player just died and did not login again when the query is executed (and the is no new line for the player with Alive = 1).

    So humanity is kept for this player.

     

    Ah, what I forgot: I have a seperate table 'All_time_players' which keep the players who logged in whenever. It's a trigger on the normal player_data table which just inserts a new row in the all_player_table whenener a new one is inserted in player_data table. It's just that I know how many players and who have been there and to keep the player_data table small as we need to load in any row via file system in the linux server version.

  7. Interesting that all these deploy scripts have this line (or several):

    r_interrupt = false;

     

    Which I guess is just ballast if not used in a loop where building/deploying can be cancelled. In school they would say: you copied your homework from somebody else! ,))

  8. Hi,

     

    since today when I login to my server, and I join into the map everything is just flickering (so whole screen).

    I am not sure if there was any Steam update and after that this happened. I did not change anything.

     

    When I leave the server it's still flashing in the game menus.

     

    https://www.youtube.com/watch?v=pozjzSh3i_M&feature=youtu.be

     

    Maybe someone has the same issue?

×
×
  • Create New...