Author Topic: Event: SetItem / SetInventory (V2)  (Read 11490 times)

THANK YOU!!!! jeez i was gonna request

THANK YOU!!!! jeez i was gonna request

I was about to request it myself, but I figured it'd be faster to rip apart other Add-Ons, look at how the parts work, and then piece together something like this. And wow, it actually worked. :)


lol nice wish i knew how to make addons/scripts =(

finally! great for DM's

messageClient(%client,'MsgItemPickup','',%slot,%item.getID());

If the item is None, it may show an error like "Unable to find object '0' calling 'getID'" when you try to use it.

You should have a check to see if it's "NONE", so you can use 'MsgDropItem' rather than 'MsgItemPickup'.

Ah, I see what you mean now. Thanks.
I'll whip up a quick fix and re-upload the files.

Edit:

messageClient(%client,'MsgItemPickup','',%slot,%item.getID());

If the item is None, it may show an error like "Unable to find object '0' calling 'getID'" when you try to use it.

When you call getID for "NONE," it returns a value of "-1".
Which, of course, it can't find.

You should have a check to see if it's "NONE", so you can use 'MsgDropItem' rather than 'MsgItemPickup'.

If the check returns it IS "-1," and I'd use MsgDropItem, what would I tell it to drop?
I tested "%player.tool[%slot].getID()" but it returned a syntax error.
« Last Edit: November 01, 2008, 12:53:23 PM by Truce »

This is exactly what i needed

Lol I was waiting in the server while you were making it and chatting with the console


I've been wanting this :D

Lol I was waiting in the server while you were making it and chatting with the console

It wasn't just you I was talking to though :|


woot im downloading then reopening my class battle YAY here is reward from teh gamer:  :nes: