Thread: Plane
View Single Post
  #22  
Old 10-14-2005, 10:17 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by excaliber7388
yup, thats what I have, this bugs me
NPC Code:
if (timeout && this.inuse == 1 && isonmap) {
setani idle,;
disabledefmovement;
triggeraction 0,0,serverside,Plane,fly;//records current x,y, and level

more script;
}
if(timeou t&& this.inuse==1 && !isonmap){
triggeraction 0,0,serverside,Plane,warp;
}

For one, you could condense both your timeout (and your timeou t) into one check.

Two, you only need to check this.inuse == 1 once.
NPC Code:
if (timeout)
{
if (this.inuse == 1)
{
if (isonmap)
{
setani idle,;
disabledefmovement;
triggeraction 0,0,serverside,Plane,fly; //records current x,y, and level

//more script;
}
else
{
triggeraction 0,0,serverside,Plane,warp;
}
}
}



Also, bear in mind that a timeout only occurs once unless you set it again.
__________________
Skyld
Reply With Quote