Thread: Cheat Windows
View Single Post
  #19  
Old 12-13-2012, 02:43 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by cbk1994 View Post
..
I was trying to not confuse him since he's new to scripting. But that works better then what I suggested.

Quote:
Originally Posted by Stowen View Post
Alright guys, so I used the formula for distance that Chris has supplied me with and it works great. I get a constant moving speed of 10. Not sure what the measurement for speed on Graal would be LOL but I got 10. That's enough for me to do my work. Anyways, here's the script if anybody wishes to use it themselves.

PHP Code:
//#CLIENTSIDE

function onCreated() {
onTimeOut();
}

function 
onTimeOut() {
this.x1 player.x;
this.y1 player.y;
sleep(1);
this.x2 player.x;
this.y2 player.y;
dist(this.x1this.y1this.x2this.y2);
}

function 
dist(x1y1x2y2) { 
  
this.dist = (((x1 x2) ^ 2) + ((y1 y2) ^ 2)) ^ 0.5;
  
player.chat this.dist;
  
setTimer(0.05);

Normally you set the timer at the end of the timeout function itself..

and sleep(1).. isn't needed.. let me adjust it a little.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.x1 player.x;
  
this.y1 player.y;
  
setTimer(1);
}

function 
onTimeOut() {
  
dist(this.x1this.y1player.xplayer.y);
  
// set the values to current position
  
this.x1 player.x;
  
this.y1 player.y;
  
setTimer(1);
}

function 
dist(x1y1x2y2) { 
  
this.dist = (((x1 x2) ^ 2) + ((y1 y2) ^ 2)) ^ 0.5;
  
player.chat this.dist;

The reason I changed it like this is becasue if you set the variables after you check the distance.. the next time the script runs the dist() function it will be using the old values.. then updating them after the comparison. also sleep causes script problems.. you can just set the timer to 1 second intervals and not need sleep() or waitfor()
Reply With Quote