-
Posts
518 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Articles
Posts posted by jahangir13
-
-
no
ceil((random 199) +1)
How can you get 0-10 in your command ,)
-
If something is about size, it's about performance.
To make it short ,)
-
Always add +1 and you will never got 0.
Maybe easier than to check and then react ;) And do a random 7 if you add 1.
-
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 ;)
-
I found this example:
_percent = 50;
hint parseText format["<t> Percent: %1%</t>", _percent];you can try with the html % tag. I guess this should also work in the debug monitor.
-
"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.
-
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?)!
-
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.
-
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.
-
Scripter Skype Group. Never heard about it ;) ?
-
@Donnovan: what is the purpose of doing so?
-
Yes yes...that was no complain ;)) Just wondering. Don't know how many code lines I have which are not needed but contained in whatever script I've just copied.
-
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! ,))
-
Yes, there are always scripts doing similar tasks. I did not want to click on the map (just on the key directly as I wanted to know where this specific key belongs to) and I wanted vehicles which are near (in your car park) to show up with a sign instead of showing these on the map. So this is a similar script which handles things a bit different.
-
Yes, thanks a lot ebaydayz!
-
I have added a version which should work with servers using the Masterkey mod for having 1 key for several vehicles.
Updated the OP which that.
-
What do you want to hear? That what you've added has an error or something and now the server does not run properly. ;)
-
Why not using my statement? Which is what you wanted without the inventory?!
-
Lol, nothing for everyone.
In the Linux server version you define your date the map is running in the start script.
I used 2010/26/6 instead of 2010/6/26 which causes this ;)
strange
-
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?
-
The charID field is filled(<> 0) if the vehicle has a key. Walls and other building stuff have the charID of the one who build them I guess. So these should also have the filed <> 0.
-
I guess CharacterID is 0 for these, last_updated > 10 days.
Something like this:
DELETE FROM `Object_DATA`
WHERE CharacterID = 0 AND `last_updated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY);I am not sure if other builds could aso have a charID = 0; I do not have any.
-
You can delete all filters and you will never get kicked for anything...but I guess this is not what you want ;)
It should be figured out why the standard filters are not working for you on a fresh installation.
-
Hm, is dayz_server_pbo extracted? Maybe others? Don't know if that works. With the mission this does not work for me. There needs to be the pbo only.
Usage of the RANDOM variable
in Scripting
Posted
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.