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.