View Single Post
  #15  
Old 08-24-2002, 02:49 AM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
Quote:
Originally posted by emortylone
LOL, Never dis an NPC Server or the mighty Kaimetsu will open a can =P The NPC Server does not necessarily create a ton of LAG, but it can be laggy if your scripts suck x.X If you get to know it you'll love it XP. if you put:
NPC Code:

//#CLIENTSIDE
if (whatever)
{ triggeraction 0,0,serverwarp,;}


it will trigger the Control-NPC Serverside is the only thing that goes to the CURRENT NPC. If you put serverwarp, it goes to the control-npc. putting 0,0 as the x,y will make it go serverside btw.

NPC Code:

if (actionserverside)
{ setlevel2 onlinestartlocal.graal,30,30;
}
//#CLIENTSIDE
if (playerchats && strequals(#c,warp))
{ triggeraction 0,0,serverside,Ring1,;}


will make it warp the player to OSL @ 30,30 if the NPC Name is Ring1. Ta-da XP You're welcome, all part of the job =P
---Shifter
The ring wouldnt work since the action part is part of the weapon The action would have to be in the control npc for that to work. But having that in the control npc isnt very good since it gets very confusing later.

NPC Code:

if (actionserverside) setlevel2 onlinestartlocal.graal,30,30;
//#CLIENTSIDE
if (weaponfired) {
triggeraction playerx+1.5,playery+2,serverside,Warp Ring,0;
}



If the weapon name is Warp Ring, the ring will warp the player to onlinestartlocal with the x and y at 30. That script is a weapon and nothing needs to be placed in the Control-NPC.