Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-19-2008, 08:23 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Questions about a Skateboard Class NPC

Control-NPC:
PHP Code:
function onPlayerLogOut(pl)
{
  if(
pl.client.RideStatus == 1)
  {
    
pl.client.CurrentRide.destroy();
    
triggerserver("weapon","-System/Main","boardstay",pl);
  }

-System/Main Weapon:
PHP Code:
function onActionServerSide(id)
{
  switch(
id)
  {
    case 
"boardstay":
      
temp.pl params[1];
      
temp.putnpc2(temp.pl.x,temp.pl.y,"join(\"object_rideitem\");");
      
temp.r.owner temp.pl.account;
      
temp.r.ani "silence_woodenboardidle2";
      
temp.pl.client.CurrentRide temp.r;
    break;
  }

It gave me a error trying to use the "putnpc2" command in the Control-NPC, so I tried to get around it by making the Control-NPC send a triggerserver to another Weapon, in this case (-System/Main). However, it is never received. (Checked with echo multiple times). How would I get around this?

I need this because I don't want the skateboard to disappear after the player logs out while is on the skateboard.

triggerserver gives an error too.

Last edited by Stryke; 05-20-2008 at 01:22 AM..
Reply With Quote
 


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 02:42 AM.


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