Graal Forums

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

Gunderak 12-17-2011 07:58 AM

Inventory System
 
2 Attachment(s)
About:
This is just something I made up when I was bored.
It would be useful for Dev servers who are sick of the default Q Menu.
The script is attached.

How to use it:
First download the script.txt file attached and then upload it as a weapon on you're server.
Add it to all players on login or whom you wish to have this.
To use it simple press Q and then select a weapon.
You can search through you're weapons by clicking the Search bar and typing a name and pressing the enter key.

Updated:
1. Added a search bar at the top.
2. You now only have to single click to select a weapon.
3. Changed .onAction to .onKeyUp so when you release a key it starts searching.

Tricxta 12-17-2011 08:09 AM

kavans is better. Maybe you should've decided on a kinda tab format as well o_0

Gunderak 12-17-2011 08:11 AM

But how would tab's benefit...
My approach on this was simplicity, to make it as easy to understand how to use.
You just have to simply press Q and double click a weapon.

Fulg0reSama 12-17-2011 08:27 AM

How about adding a search bar for weapons? That would be pretty simple for use and click enter on what you want rather then double click.

Gunderak 12-17-2011 08:30 AM

That's actually a really neat idea.
I'll start now.

Emera 12-17-2011 12:36 PM

All it is is a GUI window with your inventory items listed in it. It's not exactly something new is it. Like trix said, you should study kavan's code and add some extra features to it. Also, you could make your GUI look more visually appealing. It looks simple and horrible.

Quote:

But how would tabs help?
Almost every good inventory system has some sort of category system. Even the default inventory has one. If you don't categorise your items and you have a lot of weapons, you will find locating a specific one pretty hard. It's a nice, but very very basic code you have there.

Gunderak 12-17-2011 01:47 PM

What type of tabbing does the default inventory have......?

Emera 12-17-2011 02:08 PM

Quote:

Originally Posted by Gunderak (Post 1678277)
What type of tabbing does the default inventory have......?

It doesn't and I never said it did. It sorts items into "sacks" depending on their weapon name.

Gunderak 12-17-2011 02:17 PM

Hmmm, I don't know how you would achieve that though.
I'm just sticking with things I know how to do for now.

Emera 12-17-2011 02:24 PM

Quote:

Originally Posted by Gunderak (Post 1678281)
Hmmm, I don't know how you would achieve that though.
I'm just sticking with things I know how to do for now.

Then you won't learn anything new if you're not willing to try anything new.

Gunderak 12-17-2011 04:18 PM

I have been trying and am willing to, but for material being released I would prefer to not put odd coding that is probably wrong in it.

Emera 12-17-2011 04:24 PM

Quote:

Originally Posted by Gunderak (Post 1678290)
I have been trying and am willing to, but for material being released I would prefer to not put odd coding that is probably wrong in it.

Debug then. That's the best way to learn.
Quote:

Originally Posted by Thomas Edison
I have not failed. I've just found 10,000 ways that won't work.


Crow 12-17-2011 04:38 PM

Just do it. Doesn't matter if your code sucks. Work until it works. Then rewrite it, improve it, make things better. That's the only way to improve, really.

scriptless 12-26-2011 08:03 PM

Quote:

Originally Posted by Crow (Post 1678292)
Just do it. Doesn't matter if your code sucks. Work until it works. Then rewrite it, improve it, make things better. That's the only way to improve, really.

Thats exactly how I script.. once thru sloppy just get it to work.. then once again after I can visualize the script better in my head.


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

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