0% found this document useful (0 votes)
63 views2 pages

Script Hack Gramfree

This document defines a mouseEvent function that creates simulated mouse events for testing purposes. It takes in event type and coordinates, sets up an event object with relevant properties, and dispatches the event if the browser supports createEvent. The function is then used to simulate dragging by calling mouseEvent in a timed loop with incrementing coordinates.

Uploaded by

Chidera David
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Script Hack Gramfree

This document defines a mouseEvent function that creates simulated mouse events for testing purposes. It takes in event type and coordinates, sets up an event object with relevant properties, and dispatches the event if the browser supports createEvent. The function is then used to simulate dragging by calling mouseEvent in a timed loop with incrementing coordinates.

Uploaded by

Chidera David
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Function

mouseEvent(type, s x , s y, c x , cy)
{

  var ev t ;
  var e={
  bubbles:true,
  cancelable:(type!="mouemove"),
  v i e w : w i n d o w,
  detail: 0
  screenX: s x ,
  s c r e e n Y: s y ,
  clientX: cx,
  c l i e n t Y: c y,
  ctrlkey: false,
  ctrlkey: false,
  altkey: false,
  shiftkey: false,
  metakey: f a l s e ,
  button: 0,
  r e l at e dt ar g et : undefined,
};

i f ( t y p e o f ( d o c u m e n t . c r e a t e E v e n t ) == " f u n c t i o n " {
  e v t = document.createEvent("MouseEvents")

  ev.t bb ilun=ebtsm,o usee.Ecvaenncte(ltaybple, e . v i e w , e . d e t a i l ,


  e . s c r e e n X , e . s c r e e n Y, e . c l i e n t X , e . c l i e n t Y,
  e . c t r l k e y, e . c t r l k e y, e . a l t k e y, e . s h i f t k e y,
  e . m e t a k e y, e . b u t t o n , d o c u m e n t . b o d y. p a r e n t N o d e ) ;
} e l s e i f (document.createEvent b u t t o n ) {
  e v t = document.createEvent b u t t o n ( ) ;
  f o r (prop i n e ) {
 evt[prop] = e[prop] ;
}
 evt.button = { 0 : 1 , 1:4, 2:2 } [evt. button] | | evt.button;
}
return evt;
}
v a r a = document.getElementsByClassName("spin") [ 0 ]
  b = document.getElementsByClassName("lucky Number");
a.addEventlistener("mousemove", f u n c t i o n ( e ) { c o n s o l e . l o g ( " c l i e n t X : " + e . c l i e n t X
+ " , " c l i e n t Y : " + e . c l i e n t Y + " , " s c r e e n X : " + e.screenX + " , " s c r e e n Y: " + e.screenY
+ " , mouvementX:"+ e . m o u v e m e n t X ) ; }

function botRot(X,y){
  a . d i s p a t c h E v e n t ( m o u s e E v e n t ( " m o u s e m o v e " , X , Y, X , Y ) ) ;
}
function bot s t ar t ( ) {
  i f ( ( b . i n n e r H T M L . ! = " D r a g g i n g " ) && p a r s e I n t ( b . i n n e r H T M L ) < 2 0 0 0 ) {
  var x I n c i a l = 0 , y I n c i a l =0,

f o r (v ar ofParent = a ; ofParent; ofparnet = of parent .off s et par ent) {


}
a.dispatchEvent(mouseEvent("mousedown", X s [ 0 ] , Y s [ 0 ] , X s [ 0 ] , X s [ 0 ] ) ) ;
botRot( X s [ 0] , Y s [ 0 ] ) ;

setTimeout(function ( ) {
  botRot( X s [ 1] , Y s [ 1 ] ) ;
s et Ti m eout ( f unc t i on ( ) {
  botRot( X s [ 2] , Y s [ 2 ] ) ;
s e t Ti me out ( f unc t i on ( ) {
  botRot( X s [ 3] , Y s [ 3 ] ) ;

  a.dispatchEvent(mouseEvent("mouseup", X s [ 3 ] , Y s [ 3 ] , X s [ 3 ] , X s [ 3 ] ) ) ;
  } , ( c o u n t + + ) * speedBoot);
  }
}
var I n t e r v al i d = setInterval(bootstart,2000);
f u n c t i o n b o o t s t o p ( ) { / / bootstop():command s t o p t h e e x e c u t i o n o f t h e s c r i p t .
clear Interval(bootIntervalid);
}

You might also like