Advertisement
kolton

Untitled

Jul 31st, 2014
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // player 1
  2. var charname;
  3.  
  4. function copyDataEvent(mode, msg) {
  5. if (mode === 77) { // unique number to avoid going over copydata sent from d2bot# or other setups like automule etc.
  6. charname = msg;
  7. }
  8. }
  9.  
  10. charname = false;
  11.  
  12. if (sendCopyData(null, player2profile, 77, me.profile)) { // returns false if the window with player2profile title doesn't exist
  13. delay(100); // delay to allow charname var to be changed by the event
  14. }
  15.  
  16. print(charname);
  17.  
  18.  
  19.  
  20. // player 2
  21. function copyDataEvent(mode, msg) {
  22. if (mode === 77) {
  23. // player 1 sent his own profile name as msg. send copydata to that profile
  24. sendCopyData(null, msg, 77, me.charname);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement