Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-17-2001, 06:59 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
You can use with to manipulate any online player or NPC, I'll give some examples:

NPC Code:
if (playerchats) {
if (startswith(Jail player,#c)) with (getplayer(#e(12,-1,#c))
setlevel2 jail.nw,32,32;
}


Would jail the player with the account said after jail player.

NPC Code:
if (created||timeout) {
for (i=0;i<playerscount;i++) with (players[i]) {
playerx=32;
playery=32;
}
timeout=0.1;
}


Would warp all players in the level the NPC is in to 32,32

NPC Code:
  putnpc2 32,32,{join Bomb;}
i=npcscount-1;
with (npcs[i]) setstring this.power,3;

Would set the this.power string of the recently placed NPC to 3.

Do keep in mind that I've never actually worked with any of this scripts so the things I've just said might be completely wrong.
Also it can only be done by serverside NPC's.
__________________

 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.