Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const EGClient = require('epicgames-client').Client;
- const Fortnite = require('epicgames-fortnite-client');
- let eg = new EGClient({
- email: 'd',
- password: 'd'
- });
- eg.init().then(async (success) => {
- if(!success)
- throw new Error('Cannot initialize EpicGames launcher.');
- if(!await eg.login())
- throw new Error('Cannot login on EpicGames account.');
- const fortnite = await eg.runGame(Fortnite);
- fortnite.communicator.on('friend:request', async data => {
- data.accept();
- });
- fortnite.communicator.on('party:invitation', async data => {
- data.party.me.setBRCharacter('/Game/Athena/Items/Cosmetics/Characters/CID_029_Athena_Commando_F_Halloween.CID_029_Athena_Commando_F_Halloween');
- await data.accept();
- data.party.me.setEmote('/Game/Athena/Items/Cosmetics/Dances/EID_KPopDance01.EID_KPopDance01');
- });
- fortnite.communicator.on('party:member:joined', async data => {
- console.log(data);
- });
- fortnite.communicator.on('friend:message', async data => {
- let author = await eg.getProfile(data.friend.id);
- let emotemessage;
- let skinmessage;
- let backmessage;
- let id = data.friend.id;
- console.log(author.displayName + ': ' + data.message);
- // Message reader^
- let args = data.message.split(" ");
- let command = args[0];
- let cosmeticid = args[1];
- let passLevel = args[1];
- if(command == "MOOG>playemote"){
- activeparty.members.forEach(async member => {
- emotemessage = cosmeticid;
- member.setEmote("/Game/Athena/Items/Cosmetics/Dances/" + "EID_" + emotemessage + "." + "EID_" + emotemessage, member.jid);
- })
- }
- else if (command == "MOOG>setskin"){
- activeparty.members.forEach(async member => {
- skinmessage = cosmeticid;
- member.setBRCharacter("/Game/Athena/Items/Cosmetics/Characters/" + skinmessage + "." + skinmessage, member.jid);
- })
- }
- else if (command == "MOOG>stopemote"){
- activeparty.members.forEach(async member => {
- member.clearEmote(member.jid)
- })
- }
- else if (command == "MOOG>setlevel"){
- activeparty.members.forEach(async member => {
- passmessage = passLevel;
- member.setBattlePass(true, passmessage, passmessage, passmessage, member.jid)
- console.log("set level to" + " " + passmessage)
- })}
- else if (command == "MOOG>backbling"){
- activeparty.members.forEach(async member => {
- backmessage = cosmeticid;
- member.setBackpack("/Game/Athena/Items/Cosmetics/Characters/" + backmessage + "./Game/Athena/Items/Cosmetics/Characters/" + backmessage, member.jid);
- })
- }
- else{
- fortnite.communicator.sendMessage(id, "Insert an emote or skin please");}
- });
- /*
- let parties = {};
- let party_members;
- fortnite.communicator.on('party:joinacknowledged:response', async data => {
- party_members = parties[data.partyId].members;
- party_members.forEach(async member => {
- member.setBRCharacter("/Game/Athena/Items/Cosmetics/Characters/CID_022_Athena_Commando_F.CID_022_Athena_Commando_F", member.jid)
- member.setEmote("/Game/Athena/Items/Cosmetics/Dances/EID_HiLowWave.EID_HiLowWave", member.jid)
- });
- });
- /*fortnite.communicator.on("party:joinacknowledged:response", async data => {
- let party_member;
- let parties = {};
- party_member = parties[data.partyId].members;
- party_member.forEach(async member => {
- member.SetBRCharacter("/Game/Athena/Items/Cosmetics/Characters/cid_070_athena_commando_m_cupid.cid_070_athena_commando_m_cupid", member.jid);
- });
- });
- /*
- fortnite.communicator.on("party:joinacknowledged:response", async data => {
- console.log('Joined Party!');
- member = await eg.PartyMember(data.PartyMember);
- console.log(data);
- member.forEach(async data => {
- member.SetBRCharacter("cid_070_athena_commando_m_cupid ", member.jid); */
- fortnite.communicator.updateStatus("Follow https://twitter.com/LeaksMoog for more information on the bot.")
- });
Add Comment
Please, Sign In to add comment