Advertisement
Guest User

Makeshift perma death script..will fail.

a guest
Dec 26th, 2012
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. //the script will not run as the syntax is wrong for the query_sql parts.
  2. //but the first parts of it will owkr just fine, soo yea.
  3. // anyone that is intending to help with this.. Thanks!
  4. - script game_mechanics -1,{
  5.  
  6. OnPCDieEvent:
  7. set #id,getcharid(0); //get their character ID
  8. set #pid,getcharid(1);//get the party ID
  9. set #gid,getcharid(2); //get the guild ID
  10. set #aid,getcharid(3); //get the account ID
  11. //simple announce and kick.. works fine, intended to be there to not only announce people messing up, but
  12. // also to prevent the deletion to mess up because the character is online.
  13. announce strcharinfo(0) +" was killed by "+ rid2name(killerrid),0xFFFF00;
  14. atcommand "@kick "+#id;
  15. //the SQL parts
  16. //delete character
  17. query_sql("DELETE FROM 'global_reg_value' WHERE char_id = "#id" ");
  18. query_sql("DELETE FROM 'inventory' WHERE char_id = "#id" ");
  19. query_sql("DELETE FROM 'skill' WHERE char_id = "#id" ");
  20. query_sql("DELETE FROM 'cart_inventory' WHERE char_id = "#id" ");
  21. query_sql("DELETE FROM 'pet' WHERE char_id = "#id" ");
  22. query_sql("DELETE FROM 'friends' WHERE char_id = "#id" ");
  23. query_sql("DELETE FROM 'char' WHERE char_id = "#id" ");
  24. query_sql("DELETE FROM 'auction' WHERE char_id = "#id" ");
  25. //delete homunculus
  26. //needs check to see if they have one/are a class that uses them.
  27. query_sql("DELETE FROM 'homunculus' WHERE char_id = "#id" ");
  28. //query_sql("DELETE FROM 'skill_homunculus' WHERE homun_id = "#??" "); //how to check?
  29. //delete guild if leader
  30. //needs check
  31. query_sql("DELETE FROM 'guild' WHERE char_id = "#id" ");
  32. query_sql("DELETE FROM 'guild_alliance' WHERE guild_id = "#gid" ");
  33. query_sql("DELETE FROM 'guild_castle' WHERE guild_id = "#gid" ");
  34. query_sql("DELETE FROM 'guild_expulsion' WHERE guild_id = "#gid" ");
  35. query_sql("DELETE FROM 'guild_member' WHERE guild_id = "#gid" ");
  36. query_sql("DELETE FROM 'guild_position' WHERE guild_id = "#gid" ");
  37. query_sql("DELETE FROM 'guild_skill' WHERE guild_id = "#gid" ");
  38. query_sql("DELETE FROM 'guild_guild storage' WHERE guild_id = "#gid" ");
  39.  
  40. //need a check too see if they are just a member
  41. //deletes them from the guild.
  42. query_sql("DELETE FROM 'guild_member' WHERE char_id = "#id" ");
  43.  
  44. //delete hotkeys and other info
  45. query_sql("DELETE FROM 'hotkey' WHERE char_id = "#id" ");
  46. query_sql("DELETE FROM 'mail' WHERE char_id = "#id" ");
  47. query_sql("DELETE FROM 'memo' WHERE char_id = "#id" ");
  48. query_sql("DELETE FROM 'quest' WHERE char_id = "#id" ");
  49. query_sql("DELETE FROM 'quest_objective' WHERE char_id = "#id" ");
  50.  
  51.  
  52. end;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement