Thread: NPC warping
View Single Post
  #16  
Old 12-23-2004, 06:39 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by falco10291029
It attaches, but doesn't warp, here's the script, I can't see what's wrong:
PHP Code:
 else if (players[i].x in |x-3,x+3|&&players[i].y in |y-3,y+3|) {
this.w=int(random(0,1000));
copylevel neutral-battle.nw,neutral-battle#v(this.w).nw;
canwarp;
      
with(players[i]) {
attachplayertoobj 0,id;
setlevel2 neutral-battle#v(this.w).nw,30,20;
detatchplayer;
   }

timeout=1;


The first thing thats wrong is not using KSI-GS.

PHP Code:
} else {
if (
players[i].x in |x-3,x+3| && players[i].y in |y-3,y+3|) {
  
this.w=int(random(0,1000));
  
copylevel neutral-battle.nw,neutral-battle#v(this.w).nw;
  
canwarp;
  
with (players[i]) { // don't you mean getplayer(#a(i)) or allplayers[i]
    
attachplayertoobj 0,id;
    
setlevel2 neutral-battle#v(this.w).nw,30,20;
    
detatchplayer;
  }
  
timeout 1;

Reply With Quote