View Single Post
  #7  
Old 02-17-2012, 06:32 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Crow View Post
No But this line:
PHP Code:
if (player.x in this.xthis.this.width | && player.y in this.ythis.this.height|) { 
Doesn't make sense if you have width/height as 32, which you did.
Finally fixed this :P Thanks for your help crow (+rep)
PHP Code:
/*
Timer is the amount of time it takes
to warp around the room. The higher the
timer, the longer the warp session is.
*/
function onPlayerChats() {
  if (
player.guild != "Events Team") {
    return;
  }

  if (
player.chat == ":warp") {
    
triggeraction(this.x,this.y,"start",NULL);
  }
}

//#CLIENTSIDE

const TIMER 50;

function 
onCreated() {
  
setTimer(0.05);
  
setshape(1,32,32);
  
dontblock();
  
this.ox this.x;
  
this.oy this.y;
}

function 
onTimeout() {
  if (
this.on == 1) {
    
this.timer -= 1;
    
this.random(3.5,57.5);
    
this.random(18,46);
    if (
player.x in this.1this.| && player.y in this.1this.|) {
      
player.30;
      
player.7;
    }
  }
  if (
this.timer == 0) {
    
this.on 0;
    
// Set back to original positions.
    
this.this.ox;
    
this.this.oy;
  }
  
setTimer(0.05);
}

function 
onActionstart() {
  
this.on 1;
  
this.timer TIMER;

__________________

Last edited by Emera; 02-17-2012 at 08:50 PM..
Reply With Quote