MoogLeaks

df

Apr 21st, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. const EGClient = require('epicgames-client').Client;
  2. const fortnite = require('epicgames-fortnite-client');
  3. const Discord = require("discord.js")
  4. const bot = new Discord.Client()
  5.  
  6. client.on('message', msg => {
  7. if (msg.content === 'ping') {
  8. msg.reply('Pong!');
  9. }
  10. });
  11.  
  12. client.login('NTY5NTM3MjUwMDExMTE5NjE5.XLyFIw.qccAZIjE0uyINdcIhCa69AufQvs');
  13. const Fortnite = require('epicgames-fortnite-client');
  14. const { ESubGame } = Fortnite;
  15. let activeparty;
  16. const jid = "322accaecfbb44b7a952f845cf77f046@prod.ol.epicgames.com"
  17. let eg = new EGClient({
  18.  
  19.  
  20. email: 'isadasdasdom',
  21. password: 'Fedasdsadsad10'
  22. });
  23. //const member = EGClient
  24.  
  25.  
  26.  
  27.  
  28. eg.init().then(async (success) => {
  29.  
  30. if (!success)
  31. throw new Error('Cannot initialize EpicGames launcher')
  32.  
  33. if (!await eg.login())
  34. throw ('Error while initialize or login process.');
  35.  
  36. console.log("logged in")
  37. const fortnite = await eg.runGame(Fortnite);
  38. const br = await fortnite.runSubGame(ESubGame.BattleRoyale)
  39. let xd = await br.getPlaylist(true);
  40.  
  41. console.log("Playlists Loaded");
  42. const party = await fortnite.communicator.makeParty({
  43. typeId: 286331153,
  44. appId: "MzQ0NmNkNzI2OTRjNGE0NDg1ZDgxYjc3YWRiYjIxNDE6OTIwOWQ0YTVlMjVhNDU3ZmI5YjA3NDg5ZDMxM2I0MWE",
  45. buildId: "ZWM2ODRiOGM2ODdmNDc5ZmFkZWEzY2IyYWQ4M2Y1YzY6ZTFmMzFjMjExZjI4NDEzMTg2MjYyZDM3YTEzZmM4NGQ",
  46.  
  47. });
  48. fortnite.communicator.on("friend:request", request => {
  49. console.log("Friend Request Accepted")
  50. request.accept()
  51.  
  52. })
  53. fortnite.communicator.on("party:invitation", invitation => {
  54. invitation.accept()
  55. console.log("The invitation was accepted")
  56. activeparty = invitation.party;
  57. })
  58. fortnite.communicator.on("party:member:data", async data => {
  59. //console.log(data);
  60. //member.setBrBanner(, )
  61.  
  62. eg.communicator.on('friend:message', async data => {
  63. let author = await eg.getProfile(data.friend.id);
  64. let emotemessage;
  65. let skinmessage;
  66. let backmessage;
  67. let id = data.friend.id;
  68. console.log(author.displayName + ': ' + data.message);
  69.  
  70. // Message reader^
  71. let args = data.message.split(" ");
  72. let command = args[0];
  73. let cosmeticid = args[1];
  74. let passLevel = args[1];
  75. if(command == "!play"){
  76. activeparty.members.forEach(async member => {
  77. emotemessage = cosmeticid;
  78. member.setEmote("/Game/Athena/Items/Cosmetics/Dances/" + "EID_" + emotemessage + "." + "EID_" + emotemessage, member.jid);
  79. })
  80. }
  81. else if (command == "!skin"){
  82. activeparty.members.forEach(async member => {
  83. skinmessage = cosmeticid;
  84. member.setBRCharacter("/Game/Athena/Items/Cosmetics/Characters/" + skinmessage + "." + skinmessage, member.jid);
  85. })
  86. }
  87. else if (command == "!stop"){
  88. activeparty.members.forEach(async member => {
  89. member.clearEmote(member.jid)
  90. })
  91. }
  92. else if (command == "!level"){
  93. activeparty.members.forEach(async member => {
  94. passmessage = passLevel;
  95. member.setBattlePass(true, passmessage, passmessage, passmessage, member.jid)
  96. console.log("set level to" + " " + passmessage)
  97. })}
  98.  
  99. else if (command == "!back"){
  100. activeparty.members.forEach(async member => {
  101. backmessage = cosmeticid;
  102. member.setBackpack("/Game/Athena/Items/Cosmetics/Characters/" + backmessage + "." + "/Game/Athena/Items/Cosmetics/Characters/" + backmessage, member.jid);
  103. })
  104. }
  105.  
  106. else{
  107. fortnite.communicator.sendMessage(id, "Insert an emote or skin please");
  108. }})
  109.  
  110. fortnite.communicator.on('friend:message', async data => {
  111. data.reply('hi');
  112. })
  113. })})
Add Comment
Please, Sign In to add comment