View Single Post
  #2  
Old 01-15-2002, 12:04 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Re: Warping with NPC server...

Quote:
Originally posted by G_yoshi
ok...I am sure it's been gone over before but how do I use an NPC to warp a player?

I have done
NPC Code:

triggeraction 0,0,warp,olsl.nw,30,30;


in one NPC...and in the control-NPC I have
NPC Code:

if (actionwarp) {
with (getplayer(#a)) {
setlevel2 #p(0),#p(1),#p(2);
}
}



What am I doing wrong?
setlevel2 #p(0),#p(1),#p(2); <-- there is something wrong in it (that would only affect the x and y of the player)

needs to be ...strtofloat(#p(1)), strtofloat(#p(2));
but I have not enough experience with NPC-Servers to get the other error (if there is one)

edit:
um could it be possible that NPC-Server doesn't know the players account if u trigger it? u Could use #a as a triggeraction param:

triggeraction 0,0,#a,warp,olsl.nw,30,30;
and read it out with #p(0)
__________________
No Webhost at the moment
Reply With Quote