Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-17-2011, 07:28 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Unhappy Triggering DB-NPCs

Okay, so this has been annoying me for a while now.
Basically, I want to trigger a script in a DB-NPC called... Test, let's say.

I want to trigger it from a class NPC, if this is possible.
I've seen the triggersever() command used like this:

NPC Code:
triggerserver("npc",name,...);



Does the "npc" part trigger DB-NPCs, and as for the string variable in the triggerserver command, does it need to be the name of the DB-NPC you want to trigger?

And one more thing, is there a certain command I would need to put into the DB-NPC to make it work?

Thanks!
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #2  
Old 05-17-2011, 09:10 PM
Seich Seich is offline
Noctorious' NeoHunter
Seich's Avatar
Join Date: Jun 2008
Location: Honduras
Posts: 193
Seich will become famous soon enough
Send a message via MSN to Seich Send a message via Yahoo to Seich
If I am not wrong, you can do something like this on the serverside:
PHP Code:
Test.someFunction(); 
Reply With Quote
  #3  
Old 05-17-2011, 09:34 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
whenever triggerserver is used, it always passed to the event

PHP Code:
onActionServerside(params
to write the triggerserver, you would use

PHP Code:
triggerserver("npc""TestNPC""test""foo"); 
after doing this, onActionServerside would be invoked in that NPC, with params[0] being "test", and params[1] being "foo".


If all this is already happening on the serverside instead of the clientside, as Seich said, you can directly access the function in the NPC itself as long as the function is defined as a public function
Reply With Quote
  #4  
Old 05-17-2011, 11:00 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Thanks very much!
I love you guys!
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
Reply


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 05:30 PM.


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