rocky123xo Posted January 6, 2014 Report Share Posted January 6, 2014 I just tried this with 1.0.3.1 and the menu to remove is there, but nothing happens when I select it. Anyone have it working with the current Epoch version? Yes, use this as your remove.sqf Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted January 7, 2014 Report Share Posted January 7, 2014 Yes, use this as your remove.sqf Ok. I'll try that out. I just came here to ask a question and maybe that version will fix it. I installed this with the files from the first post and it worked. I died, changed my plot pole's characterID in the server database and it worked. Then, it stopped working so hopefully that new remove.sqf fixes this issue. Link to comment Share on other sites More sharing options...
fr1nk Posted January 7, 2014 Report Share Posted January 7, 2014 I appreciate the help, but I'm getting this error when I submit this query in Navicat. [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 9 There's a "//" missing near the bottom. This works: DELIMITER ; DROP TRIGGER IF EXISTS epoch.`update_owner`; DELIMITER // CREATE TRIGGER epoch.`update_owner` AFTER INSERT ON epoch.character_data FOR EACH ROW BEGIN UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN (SELECT CharacterID FROM player_login WHERE PlayerUID= NEW.PlayerUID) AND (Classname = 'WoodSmallWall_DZ' OR Classname = 'WoodSmallWallThird_DZ' OR Classname = 'WoodLargeWall_DZ' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'WoodLargeWallDoor_DZ' OR Classname = 'WoodSmallWallDoor_DZ' OR Classname = 'WoodStairs_DZ' OR Classname = 'WoodStairsSans_DZ' OR Classname = 'WoodSmallWallWin_DZ' OR Classname = 'WoodLargeWallWin_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'WoodRamp_DZ' OR Classname = 'WoodLadder_DZ' OR Classname = 'WoodFloor_DZ' OR Classname = 'WoodFloorQuarter_DZ' OR Classname = 'WoodFloorHalf_DZ' OR Classname = 'Wooden_shed_DZ' OR Classname ='Land_DZE_WoodDoor' OR Classname = 'Land_DZE_LargeWoodDoor' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'CinderWall_DZ' OR Classname = 'CinderWallHalf_DZ' OR Classname = 'CinderWallDoorway_DZ' OR Classname = 'CinderWallDoor_DZ' OR Classname = 'CinderWallSmallDoorway_DZ' OR Classname = 'CinderWallDoorSmall_DZ' OR Classname = 'Plastic_Pole_EP1_DZ' OR Classname = 'TentStorage' OR Classname = 'TentStorageDomed' OR Classname = 'TentStorageDomed2' OR Classname = 'LightPole_DZ' OR Classname ='SandNest_DZ' OR Classname = 'MetalFloor_DZ' OR Classname = 'Hedgehog_DZ' OR Classname = 'Sandbag1_DZ' OR Classname = 'WoodGate_DZ' OR Classname = 'Land_HBarrier1_DZ' OR Classname = 'Land_HBarrier3_DZ' OR Classname = 'Fence_corrugated_DZ' OR Classname = 'M240Nest_DZ' OR Classname = 'CanvasHut_DZ' OR Classname = 'ParkBench_DZ' OR Classname = 'MetalGate_DZ' OR Classname = 'OutHouse_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'StorageShed_DZ' OR Classname = 'StickFence_DZ' OR Classname = 'DesertCamoNet_DZ' OR Classname = 'ForestCamoNet_DZ' OR Classname = 'DesertLargeCamoNet_DZ' OR Classname = 'ForestLargeCamoNet_DZ' OR Classname = 'DeerStand_DZ' OR Classname = 'MetalPanel_DZ' OR Classname = 'WorkBench_DZ' ); END// DELIMITER ; Link to comment Share on other sites More sharing options...
rocky123xo Posted January 8, 2014 Report Share Posted January 8, 2014 There's a "//" missing near the bottom. This works: DELIMITER ; DROP TRIGGER IF EXISTS epoch.`update_owner`; DELIMITER // CREATE TRIGGER epoch.`update_owner` AFTER INSERT ON epoch.character_data FOR EACH ROW BEGIN UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN (SELECT CharacterID FROM player_login WHERE PlayerUID= NEW.PlayerUID) AND (Classname = 'WoodSmallWall_DZ' OR Classname = 'WoodSmallWallThird_DZ' OR Classname = 'WoodLargeWall_DZ' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'WoodLargeWallDoor_DZ' OR Classname = 'WoodSmallWallDoor_DZ' OR Classname = 'WoodStairs_DZ' OR Classname = 'WoodStairsSans_DZ' OR Classname = 'WoodSmallWallWin_DZ' OR Classname = 'WoodLargeWallWin_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'WoodRamp_DZ' OR Classname = 'WoodLadder_DZ' OR Classname = 'WoodFloor_DZ' OR Classname = 'WoodFloorQuarter_DZ' OR Classname = 'WoodFloorHalf_DZ' OR Classname = 'Wooden_shed_DZ' OR Classname ='Land_DZE_WoodDoor' OR Classname = 'Land_DZE_LargeWoodDoor' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'CinderWall_DZ' OR Classname = 'CinderWallHalf_DZ' OR Classname = 'CinderWallDoorway_DZ' OR Classname = 'CinderWallDoor_DZ' OR Classname = 'CinderWallSmallDoorway_DZ' OR Classname = 'CinderWallDoorSmall_DZ' OR Classname = 'Plastic_Pole_EP1_DZ' OR Classname = 'TentStorage' OR Classname = 'TentStorageDomed' OR Classname = 'TentStorageDomed2' OR Classname = 'LightPole_DZ' OR Classname ='SandNest_DZ' OR Classname = 'MetalFloor_DZ' OR Classname = 'Hedgehog_DZ' OR Classname = 'Sandbag1_DZ' OR Classname = 'WoodGate_DZ' OR Classname = 'Land_HBarrier1_DZ' OR Classname = 'Land_HBarrier3_DZ' OR Classname = 'Fence_corrugated_DZ' OR Classname = 'M240Nest_DZ' OR Classname = 'CanvasHut_DZ' OR Classname = 'ParkBench_DZ' OR Classname = 'MetalGate_DZ' OR Classname = 'OutHouse_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'StorageShed_DZ' OR Classname = 'StickFence_DZ' OR Classname = 'DesertCamoNet_DZ' OR Classname = 'ForestCamoNet_DZ' OR Classname = 'DesertLargeCamoNet_DZ' OR Classname = 'ForestLargeCamoNet_DZ' OR Classname = 'DeerStand_DZ' OR Classname = 'MetalPanel_DZ' OR Classname = 'WorkBench_DZ' ); END// DELIMITER ; Perfect! Thanks. Link to comment Share on other sites More sharing options...
rocky123xo Posted January 8, 2014 Report Share Posted January 8, 2014 Ok. I'll try that out. I just came here to ask a question and maybe that version will fix it. I installed this with the files from the first post and it worked. I died, changed my plot pole's characterID in the server database and it worked. Then, it stopped working so hopefully that new remove.sqf fixes this issue. I'm using the above solution to change PlayerID's automatically, so if you have SQL access I would try that. I don't know if it works yet, but I'll be sure to post back. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted January 15, 2014 Report Share Posted January 15, 2014 I ended up removing this mod because of problems. Notably, if a player removed their plot pole, rather than getting it back, it disappeared, just like when you deconstruct a wall. Link to comment Share on other sites More sharing options...
WEB11 Posted January 30, 2014 Report Share Posted January 30, 2014 BOOM DELIMITER ; DROP TRIGGER IF EXISTS dayz_epoch.`update_owner`; DELIMITER // CREATE TRIGGER dayz_epoch.`update_owner` AFTER INSERT ON dayz_epoch.character_data FOR EACH ROW BEGIN UPDATE dayz_epoch.object_data SET CharacterID = NEW.CharacterID WHERE CharacterID IN (SELECT CharacterID FROM character_data WHERE PlayerUID = NEW.PlayerUID); END// DELIMITER ; Can I use this with epoch 1.0.3.1 and above so players are able to remove their buildable objects after each restart? If so, how often should I run this? Link to comment Share on other sites More sharing options...
infiniti Posted February 4, 2014 Report Share Posted February 4, 2014 There's a "//" missing near the bottom. This works: DELIMITER ; DROP TRIGGER IF EXISTS epoch.`update_owner`; DELIMITER // CREATE TRIGGER epoch.`update_owner` AFTER INSERT ON epoch.character_data FOR EACH ROW BEGIN UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN (SELECT CharacterID FROM player_login WHERE PlayerUID= NEW.PlayerUID) AND (Classname = 'WoodSmallWall_DZ' OR Classname = 'WoodSmallWallThird_DZ' OR Classname = 'WoodLargeWall_DZ' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'WoodLargeWallDoor_DZ' OR Classname = 'WoodSmallWallDoor_DZ' OR Classname = 'WoodStairs_DZ' OR Classname = 'WoodStairsSans_DZ' OR Classname = 'WoodSmallWallWin_DZ' OR Classname = 'WoodLargeWallWin_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'WoodRamp_DZ' OR Classname = 'WoodLadder_DZ' OR Classname = 'WoodFloor_DZ' OR Classname = 'WoodFloorQuarter_DZ' OR Classname = 'WoodFloorHalf_DZ' OR Classname = 'Wooden_shed_DZ' OR Classname ='Land_DZE_WoodDoor' OR Classname = 'Land_DZE_LargeWoodDoor' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'CinderWall_DZ' OR Classname = 'CinderWallHalf_DZ' OR Classname = 'CinderWallDoorway_DZ' OR Classname = 'CinderWallDoor_DZ' OR Classname = 'CinderWallSmallDoorway_DZ' OR Classname = 'CinderWallDoorSmall_DZ' OR Classname = 'Plastic_Pole_EP1_DZ' OR Classname = 'TentStorage' OR Classname = 'TentStorageDomed' OR Classname = 'TentStorageDomed2' OR Classname = 'LightPole_DZ' OR Classname ='SandNest_DZ' OR Classname = 'MetalFloor_DZ' OR Classname = 'Hedgehog_DZ' OR Classname = 'Sandbag1_DZ' OR Classname = 'WoodGate_DZ' OR Classname = 'Land_HBarrier1_DZ' OR Classname = 'Land_HBarrier3_DZ' OR Classname = 'Fence_corrugated_DZ' OR Classname = 'M240Nest_DZ' OR Classname = 'CanvasHut_DZ' OR Classname = 'ParkBench_DZ' OR Classname = 'MetalGate_DZ' OR Classname = 'OutHouse_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'StorageShed_DZ' OR Classname = 'StickFence_DZ' OR Classname = 'DesertCamoNet_DZ' OR Classname = 'ForestCamoNet_DZ' OR Classname = 'DesertLargeCamoNet_DZ' OR Classname = 'ForestLargeCamoNet_DZ' OR Classname = 'DeerStand_DZ' OR Classname = 'MetalPanel_DZ' OR Classname = 'WorkBench_DZ' ); END// DELIMITER ; so if i run this as a query in my database, when people die there buildables will updated to there new player id and there is no more replacing plot pole when they die? Link to comment Share on other sites More sharing options...
fr1nk Posted February 4, 2014 Report Share Posted February 4, 2014 so if i run this as a query in my database, when people die there buildables will updated to there new player id and there is no more replacing plot pole when they die? Yup. The ownership transfer only happens after server restart though, it's not immediate. Link to comment Share on other sites More sharing options...
Cash Posted February 4, 2014 Report Share Posted February 4, 2014 so if i run this as a query in my database, when people die there buildables will updated to there new player id and there is no more replacing plot pole when they die? Close. When they respawn their buildables will be updated with the players new character ID. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 4, 2014 Report Share Posted February 4, 2014 Close. When they respawn their buildables will be updated with the players new character ID. I had heard what Fr1nk had posted, that it doesn't work until restart. Are you sure all it takes is for the player to log in again? Link to comment Share on other sites More sharing options...
fr1nk Posted February 4, 2014 Report Share Posted February 4, 2014 Pretty sure a respawn alone won't do it.. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 4, 2014 Report Share Posted February 4, 2014 Pretty sure a respawn alone won't do it.. I'm not an SQL expert by any means, but following the logic of that trigger, when a new entry is made on the character_data table, it runs the trigger to change the plot pole of the previous character ID (if there is one), so in theory, when a player repawns after death, a new entry is made on the character_data table, which should run the trigger. I've added this to my server and asked anyone that dies to check this to see if it works after respawning. Link to comment Share on other sites More sharing options...
fr1nk Posted February 4, 2014 Report Share Posted February 4, 2014 I'm not an SQL expert by any means, but following the logic of that trigger, when a new entry is made on the character_data table, it runs the trigger to change the plot pole of the previous character ID (if there is one), so in theory, when a player repawns after death, a new entry is made on the character_data table, which should run the trigger. I've added this to my server and asked anyone that dies to check this to see if it works after respawning. Yes but the trigger is really no different from a regular query...it just fires off automatically without manual intervention. It's like when you increase vendor stock with an update statement, which only takes effect following a restart. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 4, 2014 Report Share Posted February 4, 2014 Yes but the trigger is really no different from a regular query...it just fires off automatically without manual intervention. It's like when you increase vendor stock with an update statement, which only takes effect following a restart. The event that updates stock is a scheduled event, which is why it has the line "ON SCHEDULE EVERY 1 DAY", whereas the code posted above is a trigger: "AFTER INSERT ON character_data", which is set off by the action of a line being added to the character_data table. Again, I'm not an expert on SQL and I'm making assumptions here based on the code, so maybe someone that knows SQL better than me can chime in? Link to comment Share on other sites More sharing options...
fr1nk Posted February 4, 2014 Report Share Posted February 4, 2014 The event that updates stock is a scheduled event, which is why it has the line "ON SCHEDULE EVERY 1 DAY", whereas the code posted above is a trigger: "AFTER INSERT ON character_data", which is set off by the action of a line being added to the character_data table. Again, I'm not an expert on SQL and I'm making assumptions here based on the code, so maybe someone that knows SQL better than me can chime in? UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN ........ etc This is the part that updates the objects to the new character ID. Updating database entries like this requires a restart to take effect. I've never had any player report that they were able to immediately access their buildables on a respawn, before a server restart. Following a restart, they can access everything just as they could on their previous character. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 4, 2014 Report Share Posted February 4, 2014 UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN ........ etc This is the part that updates the objects to the new character ID. Updating database entries like this requires a restart to take effect. I've never had any player report that they were able to immediately access their buildables on a respawn, before a server restart. Following a restart, they can access everything just as they could on their previous character. You are correct. I was just looking at the trigger. The characterID is changed immediately by the trigger, but that part of the database isn't loaded until restart. Link to comment Share on other sites More sharing options...
Kimzer Posted February 19, 2014 Report Share Posted February 19, 2014 Is this usable with 1042? Or will it create issues? Link to comment Share on other sites More sharing options...
darksoon Posted February 19, 2014 Report Share Posted February 19, 2014 works fine on our 1.0.4.2 napf server :) Link to comment Share on other sites More sharing options...
fr1nk Posted February 20, 2014 Report Share Posted February 20, 2014 Yes, use this as your remove.sqf Any chance you updated this for 1.0.4.2? Link to comment Share on other sites More sharing options...
fr1nk Posted February 20, 2014 Report Share Posted February 20, 2014 I added almost all modular/crafting objects to rocky123xo's version of remove.sqf a little while ago, to return the constructed item upon removal (not the components). Everything works fine in 1.0.3.1 but I must have missed something while updating the 1.0.4.2 version of remove.sqf...couldn't get it to work. Anyhow, if anyone feels like helping, here's what I added: http://pastebin.com/0YWkr9Wb Thanks Capt-O and DrS8n 2 Link to comment Share on other sites More sharing options...
DrS8n Posted March 21, 2014 Report Share Posted March 21, 2014 I added almost all modular/crafting objects to rocky123xo's version of remove.sqf a little while ago, to return the constructed item upon removal (not the components). Everything works fine in 1.0.3.1 but I must have missed something while updating the 1.0.4.2 version of remove.sqf...couldn't get it to work. Anyhow, if anyone feels like helping, here's what I added: http://pastebin.com/0YWkr9Wb Thanks Any luck on the newest build getting this to work? Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted March 21, 2014 Report Share Posted March 21, 2014 This isn't needed because Epoch now has the ability to remove any buildables under your current character ID. Link to comment Share on other sites More sharing options...
fr1nk Posted March 21, 2014 Report Share Posted March 21, 2014 Any luck on the newest build getting this to work? Haven't had the time to go back and look at the file again, will probably just wait until 1.0.5. Link to comment Share on other sites More sharing options...
tkdmaster Posted April 18, 2014 Report Share Posted April 18, 2014 On 1.0.4.2 I got this mod working fine, sadly I dont have SUPER privileges on my DB, so I can't add the trigger which would transfer ownership... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now