Blizzhackers

Home of the Dupe since 2001

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


It is currently Sat Nov 25, 2017 6:31 am


All times are UTC [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Creating a function for sendcopydata / ReceiveCopyData
PostPosted: Sun Nov 05, 2017 9:53 am 
 
User
User

Joined: Wed Oct 11, 2017 5:04 am
I'm wanting to setup my mfhelper to take tp's / kill bosses without chat spamming.

I was told instead of having the leader spam "Kill 243" into chat, that d2bs can communicate to each other from d2bs instead of chat.

addEventListener('copydata', ReceiveCopyData); this is suppose to be for mfhelper profile correct? not 100% sure

but I think the one made for leader such as mephisto needs a function with multiple lines?

starts off with function ReceiveCopyData(msgID, msg) {

after that, I don't have a clue on what to do.

any help on this I would highly appreciate!

Top
 Profile  
 Post subject: Re: Creating a function for sendcopydata / ReceiveCopyData
PostPosted: Sun Nov 05, 2017 1:33 pm 
 
User
User

Joined: Wed Oct 11, 2017 5:04 am
var inputMode = 1337, // some number of your choice
inputMsg = "hej"; // some message

sendCopyData(null, profileName, inputMode, inputMsg);

addEventListener('copydata', // for recipient
function receiveCopyData(mode, msg) {
if (mode === inputMode && msg === inputMsg) { // check input data (msg) & mode
doSomething();
}
}
);


Ok I notice I'm going to have to figure out how to use this.

I don't know exactly what to do and If this is made for only 1 profile (mf leader) to make this work or if this is for both (leader / helper)?

If someone could give me an example I would appreciate it.


Last edited by ReDRuM711 on Sat Nov 11, 2017 8:09 am, edited 2 times in total.
Top
 Profile  
 Post subject: Re: Creating a function for sendcopydata / ReceiveCopyData
PostPosted: Mon Nov 06, 2017 12:19 am 
 
User
User

Joined: Wed Oct 11, 2017 5:04 am
` var inputMode = 1337, // some number of your choice
inputMsg = "hej"; // some message

sendCopyData(null, profileName, inputMode, inputMsg);

addEventListener('copydata', // for recipient
function receiveCopyData(mode, msg) {
if (mode === inputMode && msg === inputMsg) { // check input data (msg) & mode
doSomething();
}
}
);`


I'm having a hard time, I'm not really good at this stuff.

Does all of this go into 1 file or is this suppose to be for the send data (running mf script)

and the addeventlistener (running mfhelper) ?

Or does the mfleader only need to edit his file to only send the messages to the other window(will he receive it if she does that?)because it only needs to recognize "kill 243" to take a TP or whichever run it's doing?

var inputMode = 1337, // is this the name of the function?
inputMsg = "hej"; // some message is this the number you want the leader to type?

sendCopyData(null, CsBarb, inputMode, Kill 243); ? I'm really bad at this..

I don't have a clue on how to go about and for a moron like me would have too many variables before I could even start testing by trial and error for a very long time before I could possibly get something to run correctly.

I see this in d2botlead(I know profiles have to talk to each other from there)

` case 4: // Heartbeat ping
if (msg === "pingreq") {
sendCopyData(null, me.windowtitle, 4, "pingrep");
}`

I don't understand what's going on there either.

`function main() {
debugLog(me.profile);
addEventListener('copydata', ReceiveCopyData);
addEventListener('scriptmsg', ScriptMsgEvent);
`

If I could get an example on how to do one, I could probably do the others.

` if (Config.MFLeader) {
Pather.makePortal();
say("kill " + meph.classid);
}`

` function ChatEvent(name, msg) {
if (!player) {
var i,
match = ["!kill", "!clearlevel", "!clear", "!quit", "!cows", "!council"];

if (msg) {
for (i = 0; i < match.length; i += 1) {
if (msg.match(match[i])) {
player = this.findPlayer(name);

break;
}
}
}
}`

Change this? function addEventListener(name, msg) {


This is really hard. I could try and get some d2jsp FG and pay for help for an example or two on this please.

I know I don't know what I'm doing and frustrates someone who does and says I'm not reading enough or trying but I really get confused when looking at it. It's like how some people look at calculus and their brain just waht?!!??

Top
 Profile  
 Post subject: Re: Creating a function for sendcopydata / ReceiveCopyData
PostPosted: Sat Nov 11, 2017 8:10 am 
 
User
User

Joined: Wed Oct 11, 2017 5:04 am
Yeah this is too hard, I have no clue how to do this.

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron