Nova Posted April 7, 2015 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Share Posted April 7, 2015 (edited) Someone recently requested this from me so I figure I'd share it with the community. Be very careful about randomly throwing this on your own real server please, and warn your players about it. - script PERMANENTDEATH -1,{ end; OnPCDieEvent: set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; end; OnInit: setarray .char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; end; } I was thinking about adding an NPC that would set a character variable to select if they wanted to opt-in to "Hardcore" mode, and give them benefits for doing so, and having people without the character variable not be affected by it, but that should be easy to add. The only detail is I get a "[Error]: chrif_ack_login_req failed - player not online." but I believe it might be because I have other OnPCDieEvent labels that are attempting to run, didn't have time to confirm if this was the problem or not. But the deletion goes through just fine and the server doesn't seem to be affected by it at all. Enjoy! (Yay my first public release) Edit: Thanks to my friend Tokei for making me use better loops. Here's the version for the upgraded script engine: - script PERMANENTDEATH -1,{ end; OnPCDieEvent: set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; end; OnInit: setarray .char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","char_reg_str","char_reg_num","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; end; } Have not tested this one, but it should work fine :] Edited November 25, 2015 by Nova 2 Quote Link to comment Share on other sites More sharing options...
Stolao Posted April 24, 2015 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Yesterday at 01:58 PM Share Posted April 24, 2015 <3 Hardcore Mode Quote Link to comment Share on other sites More sharing options...
Diconfrost VaNz Posted November 25, 2015 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 996 Reputation: 47 Joined: 11/13/11 Last Seen: Saturday at 06:24 PM Share Posted November 25, 2015 This is too hardcore <3 Quote Link to comment Share on other sites More sharing options...
Nova Posted November 25, 2015 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Author Share Posted November 25, 2015 Added a slightly modified version for people running with the script engine upgrade below. :] Quote Link to comment Share on other sites More sharing options...
Diconfrost VaNz Posted March 15, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 996 Reputation: 47 Joined: 11/13/11 Last Seen: Saturday at 06:24 PM Share Posted March 15, 2016 is this one still working? HAHA Quote Link to comment Share on other sites More sharing options...
photo41 Posted April 20, 2016 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 3 Reputation: 1 Joined: 07/12/13 Last Seen: July 8, 2016 Share Posted April 20, 2016 So hardcore but really Like this haha 1 Quote Link to comment Share on other sites More sharing options...
Nova Posted April 21, 2016 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Author Share Posted April 21, 2016 is this one still working? HAHA Should be working! If it's not, let me know and I'll fix it up. Quote Link to comment Share on other sites More sharing options...
noonbora Posted May 24, 2016 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 04/16/16 Last Seen: October 23, 2024 Share Posted May 24, 2016 it's sooooooooooo cooooool !!! thx Quote Link to comment Share on other sites More sharing options...
AngelaKiss Posted March 18, 2019 Group: Members Topic Count: 66 Topics Per Day: 0.01 Content Count: 223 Reputation: 4 Joined: 02/23/12 Last Seen: March 8 Share Posted March 18, 2019 On 4/21/2016 at 6:36 PM, Nova said: Should be working! If it's not, let me know and I'll fix it up. could you add that only delet the char if dies in certain map Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.