Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Inventory script help! (https://forums.graalonline.com/forums/showthread.php?t=86691)

[email protected] 07-04-2009 05:02 AM

Inventory script help!
 
2 Attachment(s)
Hi, I have here a inventory script. It drops items right (Most of the time), but when the item is on the ground after dropping it, and you actiongrab it (press a to pick it up), it stays on the ground and doesn't delete from the map, and add the weapon back to your player like I wanted.

Here is the Weapon, called "-System/Inventory".

Attachment 48851

Now, heres the class that the weapon joins to called "object_droppeditem".

Attachment 48850

So to recap, The problems are labeled below from least of worries to worst of worries:

1:) The items Don't always drop. They drop sometimes.

2:)BIGGEST PROBLEM) When the item drops on the ground, when you go to actiongrab the item to pick it up and put it back in your inventory, it stays on the ground and doesn't add the weapon to the player that picks it up.

I appreciate it if someone helps me. Thanks.

-Jamerson

Ronnie 07-04-2009 06:04 AM

If you can seclude the problem areas in different text files, it wld be easier to help you.

fowlplay4 07-04-2009 06:15 AM

1. Implement debug messages and trace through your script, perhaps it's going wrong somewhere and not triggering.

2. Implement echo's or other debug messages so you can see if it's even getting grabbed. After that check your script that triggers action grab, perhaps it's not working.

I.e:

PHP Code:

function onActionGrab() {
  echo(
"omg worked!"); // would echo on NC


Future note for drop logs, you may want to have them for each individual because a masterlog that holds ALL drops will get very messy and useless. ( Zodiac's Master Drop Log is like 700 MB lol )

DustyPorViva 07-04-2009 06:27 AM

I'd particularly be interested in debugging the data you are sending to the putnpc2. It'd be the first place I'd check.


All times are GMT +2. The time now is 06:06 AM.

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