Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 02-20-2010, 04:40 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by adam View Post
Yeah, I got to work with the npc server some before my "long vacation" if you will. Maybe it's because I was younger, but it seemed way complicated to do it with gs1 and make it look easy.

NPC Code:
    triggerServer("gui", this.name, "tell", acc, msg); 



I have been looking at this line, am I to understand "gui" refers to Weapons/Gui npc's and 'this.name' is the name of the current weapon/gui npc and that's why it triggers the 'onActionServerside' from the current weapon?

I suppose it may be obvious, but hey i'm here to get this stuff down, and I want to know exactly why i am typing something if I have to include it.
Yeah, that's correct. The parameters are:

triggerServer(type, script, param1, [...]);

'type' can be 'gui' or 'weapon' (Weapon/GUI scripts; personal preference which to use) or 'npc' (DB npc).

'script' is the name of the script. You can always use 'this.name' if triggering the same script. This is preferable since it makes it easy to change script names without a lot of refactoring.


With GS1 it was something like

PHP Code:
triggeraction 00serverside#N, param1; 
if I recall.
__________________
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:01 PM.


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