Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
11,255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.70 KB | None | 0 0
  1. const EGClient = require('epicgames-client').Client;
  2. const Fortnite = require('epicgames-fortnite-client');
  3. const { ESubGame } = Fortnite;
  4. const { EPlatform } = require('epicgames-client');
  5. const { EInputType } = require('epicgames-client');
  6.  
  7. let eg = new EGClient({
  8. email: '',
  9. password: '',
  10. debug: console.log
  11. });
  12.  
  13.  
  14. eg.init().then(async (success) => {
  15.  
  16. var current_party;
  17.  
  18. if(!success)
  19. throw new Error('Cannot initialize EpicGames launcher.');
  20.  
  21. if(!await eg.login())
  22. throw new Error('Cannot login on EpicGames account.');
  23.  
  24. const fortnite = await eg.runGame(Fortnite);
  25. const br = await fortnite.runSubGame(ESubGame.BattleRoyale);
  26.  
  27.  
  28. fortnite.communicator.on('party:member:joined', async (member) => {
  29. let CID = "CID_313_Athena_Commando_M_KpopFashion";
  30. let BID = "BID_138_Celestial";
  31. let EID = "EID_KPopDance03";
  32. fortnite.party.me.setOutfit("/Game/Athena/Items/Cosmetics/Characters/" + CID + "." + CID);
  33. fortnite.party.me.setEmote("/Game/Athena/Items/Cosmetics/Dances/" + EID + "." + EID);
  34. fortnite.party.me.setBackpack("/Game/Athena/Items/Cosmetics/Backpacks/" + BID + "." + BID);
  35. fortnite.party.me.setPickaxe("/Game/Athena/Items/Cosmetics/Pickaxes/" + PICKAXE_ID + "." + PICKAXE_ID);
  36. fortnite.party.me.setBattlePass(true, 100, 999999999, 999999999);
  37. console.log(`Member#${member.id} joined!`);
  38. console.log(`Members count: ${fortnite.party.members.length}`);
  39. if (member.id === eg.account.id) {
  40. }
  41. });
  42.  
  43. fortnite.communicator.on('party:invitation', async (invitation) => {
  44. current_party = invitation.party;
  45. await invitation.accept()
  46. });
  47.  
  48. fortnite.communicator.on('friend:request', async (friendops) => {
  49. let friendid = lookup(friendops);
  50. eg.communicator.sendMessage(friendid, "Sorry, Syfe's Private Bot Doesn't Accept Friend Requests.")
  51. eg.communicator.declineFriendRequest(friendid)
  52. });
  53.  
  54.  
  55.  
  56. eg.communicator.on('friend:message', async (data) => {
  57. var args = data.message.split(" ");
  58. if(args[0].includes('CID_')){
  59. CID = args[0];
  60. try {
  61. fortnite.party.me.setOutfit("/Game/Athena/Items/Cosmetics/Characters/" + args[0] + "." + args[0]);
  62. eg.communicator.sendMessage(data.friend.id, "Skin set to " + args[0]);
  63. } catch {
  64. eg.communicator.sendMessage(data.friend.id, "Please use CID");
  65. }
  66. }
  67.  
  68. if(args[0].includes('EID_')){
  69. EID = args[0];
  70. try {
  71. fortnite.party.me.setEmote("/Game/Athena/Items/Cosmetics/Dances/" + args[0] + "." + args[0]);
  72. eg.communicator.sendMessage(data.friend.id, "Emote set to " + args[0]);
  73. } catch {
  74. eg.communicator.sendMessage(data.friend.id, "Please use EID");
  75. }
  76. }
  77.  
  78. if(args[0].includes('Pickaxe_ID_')){
  79. let PICKAXE_ID = args[0];
  80. try {
  81. fortnite.party.me.setPickaxe("/Game/Athena/Items/Cosmetics/Pickaxes/" + args[0] + "." + args[0]);
  82. eg.communicator.sendMessage(data.friend.id, "Pickaxe set to " + args[0]);
  83. } catch {
  84. eg.communicator.sendMessage(data.friend.id, "Please use Pickaxe_ID");
  85. }
  86. }
  87.  
  88. if(args[0].includes('BID_')){
  89. BID = args[0];
  90. try {
  91. fortnite.party.me.setBackpack("/Game/Athena/Items/Cosmetics/Backpacks/" + args[0] + "." + args[0]);
  92. eg.communicator.sendMessage(data.friend.id, "Backbling set to " + args[0]);
  93. } catch {
  94. eg.communicator.sendMessage(data.friend.id, "Please use BID");
  95. }
  96. }
  97.  
  98. if (args[0] == "!status"){
  99. var mess = data.message.replace("!status", "");
  100. fortnite.communicator.updateStatus(mess);
  101. communicator.sendMessage(data.friend.id, 'Status set to ' + mess + "!");
  102. }
  103.  
  104. if(args[0] == "!banner"){
  105. try {
  106. fortnite.party.me.setBanner(100, args[1], args[2]);
  107. eg.communicator.sendMessage(data.friend.id, "Banner set to " + args[1] + " " + args[2]);
  108. } catch {
  109. eg.communicator.sendMessage(data.friend.id, "Please use !banner BANNER COLOR");
  110. }
  111. }
  112.  
  113. if(args[0] == "!sbp"){
  114. try {
  115. fortnite.party.me.setBattlePass(true, 100, 999999999, 999999999);
  116. eg.communicator.sendMessage(data.friend.id, "BP set to 'true, 100, 999999999, 999999999'");
  117. } catch {
  118. eg.communicator.sendMessage(data.friend.id, "Please use !bp");
  119. }
  120. }
  121.  
  122. if(args[0] == "!bp"){
  123. try {
  124. fortnite.party.me.setBattlePass(args[1], args[2], args[3], args[4]);
  125. eg.communicator.sendMessage(data.friend.id, "BP set to " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + "!");
  126. } catch {
  127. eg.communicator.sendMessage(data.friend.id, "Please use !bp TRUE/FALSE LEVEL SELFXP FRIENDXP");
  128. }
  129. }
  130.  
  131. if(args[0] == "!stop"){
  132. try {
  133. fortnite.party.me.clearEmote();
  134. eg.communicator.sendMessage(data.friend.id, "Emote cleared!");
  135. } catch {
  136. eg.communicator.sendMessage(data.friend.id, "Please use !stop");
  137. }
  138. }
  139.  
  140. if(args[0] == "!platform"){
  141. try {
  142. fortnite.party.me.setPlatform(args[1]);
  143. eg.communicator.sendMessage(data.friend.id, "Set Platform to " + args[1] + " !");
  144. } catch {
  145. eg.communicator.sendMessage(data.friend.id, "Please use !platform PLATFORM");
  146. }
  147. }
  148.  
  149. if(args[0] == "!input"){
  150. try {
  151. fortnite.party.me.setInputType(args[1]);
  152. eg.communicator.sendMessage(data.friend.id, "Set Input to " + args[1] + " !");
  153. } catch {
  154. eg.communicator.sendMessage(data.friend.id, "Please use !input INPUTTYPE");
  155. }
  156. }
  157.  
  158. if(args[0] == "!ready"){
  159. try {
  160. fortnite.party.me.setReady(args[1]);
  161. eg.communicator.sendMessage(data.friend.id, "Set Ready to " + args[1] + " !");
  162. } catch {
  163. eg.communicator.sendMessage(data.friend.id, "Please use !ready TRUE/FALSE");
  164. }
  165. }
  166.  
  167. });
  168.  
  169. fortnite.communicator.updateStatus('MRmodbot | Is Awesome!');
  170. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement