Tricks & Tips

General Chat, Comments
Post Reply
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Tricks & Tips

Post by KyleMassacre »

I want to maybe start a little series here for NWE on some tricks and tips. Maybe some will be vid tuts and maybe some will be text tuts but I'll start with a text tut for now.

I want to show you something that I thought of real quick so I will call this:

Item Packs
I was thinking of altering the donation module to allow for multiple items in a donation package until I thought of this route:
First thing you may wish to do is create a new object type called Packs or whatever you wish. And in case you didn't know there are actions set up in the database which is easy to create and maybe I will talk about that next time. But inside your actions all you have to do is add the action to add item and select the item(s) that you want to give with the pack. Here is a screen shot: http://imgur.com/H8xWl23

One thing to do though is you can either save the object and go back into it remembering your object id and add an action to remove that item from the inventory when used, or when you create your new type you can automatically do this by adding in the usage code: Item::InventoryRemove($object->id,$object->object_health,1); But to do that you must either do it in your database or set the useTableEditorWizards configuration key to false and do it in you object type table editor.

Your all set to create multiple items in one item now to use for donations or whatever you wish.
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Admin Table Editor

Post by KyleMassacre »

There has been some talk on how to join tables from the database into your own module so here is a short lame video on it:
https://youtu.be/leJTHTLIGzs
Post Reply

Return to “General”