Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-21-2013, 11:30 PM
Tim_Rocks Tim_Rocks is offline
a true gentlemen
Tim_Rocks's Avatar
Join Date: Aug 2008
Location: USA
Posts: 1,863
Tim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to behold
My suggestion should work. Here, I will prove it to you.

I would add the putNPC2 in a weapon of some sort.
PHP Code:
function onPlayerChats() {
  if (
player.chat == ":dropitem") {
    
    
with (putNPC2(player.3player.1"join item;")) { //I would change this to your class.
      
this.owner player.account;
    }
  
    
player.chat "I dropped the item!";
  }

The class for the item will look like this, only you will be able to see it.
PHP Code:
function onCreated() {
  
this.attr[5] = this.owner;
  
  
this.setimg("block.png");
}

function 
onActionGrab() {
  if (
player.account != this.owner) {
    return; 
//Prevents other players from taking the item.
  
}
  
  
player.chat "Item added!";
  
  
//Item adding will go here.
  
  
this.destroy();
}

//#CLIENTSIDE
function onCreated() {
  if (
player.account != this.attr[5]) {
    
this.hide();
  } else {
    
this.show();
  }

Hopefully this was helpful.
__________________
Reply With Quote
Reply

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 10:54 PM.


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