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
  #1  
Old 05-19-2002, 11:23 PM
GrowlZ1010 GrowlZ1010 is offline
defunct
Join Date: May 2002
Posts: 187
GrowlZ1010 is on a distinguished road
Calling NPCServer commands

If you have a normal non-weapon NPC, how does IT trigger p2p events? I know that weapons use "triggeraction serverside,0,0,#w", but I have no idea how to make non-weapon NPCs use serverside features. Could I use a function, as in:

NPC Code:

//#SERVERSIDE
function addmeaweapon(){
addweapon Trading Item;
}
//#CLIENTSIDE
if (playertouchsme){
addmeaweapon();
}



... or would something else be necessary? I tried using triggeraction serverside, but it didn't do anything, so I tried removing the addweapon command and used setplayerprop #c,Trading Item!; as a test, but that didn't work either.. what would I need to do?
  #2  
Old 05-20-2002, 12:14 AM
kittygirl765 kittygirl765 is offline
tapatapatapa
kittygirl765's Avatar
Join Date: Dec 2001
Location: Caught in a tree
Posts: 70
kittygirl765 is on a distinguished road
Send a message via ICQ to kittygirl765
Quote:
Originally posted by GrowlZ1010
If you have a normal non-weapon NPC, how does IT trigger p2p events? I know that weapons use "triggeraction serverside,0,0,#w", but I have no idea how to make non-weapon NPCs use serverside features. Could I use a function, as in:

NPC Code:

//#SERVERSIDE
function addmeaweapon(){
addweapon Trading Item;
}
//#CLIENTSIDE
if (playertouchsme){
addmeaweapon();
}



... or would something else be necessary? I tried using triggeraction serverside, but it didn't do anything, so I tried removing the addweapon command and used setplayerprop #c,Trading Item!; as a test, but that didn't work either.. what would I need to do?
To trigger an action from the client side part of the script, to the server side part of the script, you first have to make the event to be triggered that starts with actionserver (ex: if(actionserverfoggy)). Then to make the thing be triggered, use "triggeraction x,y,serverfoggy,;". =)

It would be somethin liek this
NPC Code:

if(actionserverfoggy) {
addweapon Trading;
}
//#CLIENTSIDE
if(playertouchsme) {
triggeraction 0,0,serverfoggy,;
}



But if I were you, i would just do this:
NPC Code:

if(playerenters) {
setshape 1,32,32;
}
if(playertouchsme) {
addweapon Trading;
}


Instead of doing the triggeraction =P
__________________
I <3 UN
I <3 Shadow Strip Entertainment City Shangri-La
I <3 gscript2

Last edited by kittygirl765; 05-20-2002 at 08:16 AM..
  #3  
Old 05-20-2002, 12:59 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
Re: Calling NPCServer commands

Quote:
Originally posted by GrowlZ1010

//#SERVERSIDE

Jagen:
There is no such thing as //#SERVERSIDE, if you don't have the npc clientsided, the npc server will automatically run it
 

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 09:34 AM.


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