View Single Post
  #2  
Old 12-23-2007, 12:06 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
adding a function to another NPC:
(note, -HolyAddHere is an existing weapon that i have got on my char)

PHP Code:
//#CLIENTSIDE
function onCreated()
  {
  (
"-HolyAddHere").onTestingTrigger = function()
    {
    
player.chat "b";
    };
  (
"-HolyAddHere").trigger"TestingTrigger""" );
  } 
another test:

<some npcs script>
PHP Code:
//#CLIENTSIDE
function onCreated()
  {
  (
"-HolyAddHere").BTestingTrigger = function()
    {
    
player.chat "b";
    };
  (
"-HolyAddHere").callFunction"BTestingTrigger" );
  } 
<script of -HolyAddHere>
PHP Code:
//#CLIENTSIDE
public function callFunctionfuncN )
  {
  (@ 
funcN)();
  } 
should work serverside and with TServerNPCs etc too
Reply With Quote