Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-17-2011, 07:58 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Inventory System

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.
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	174
Size:	11.8 KB
ID:	54091  
Attached Files
File Type: txt script.txt (2.7 KB, 259 views)
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 12-17-2011 at 02:07 PM..
Reply With Quote
  #2  
Old 12-17-2011, 08:09 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
kavans is better. Maybe you should've decided on a kinda tab format as well o_0
Reply With Quote
  #3  
Old 12-17-2011, 08:11 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
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.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #4  
Old 12-17-2011, 08:27 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
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.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #5  
Old 12-17-2011, 08:30 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
That's actually a really neat idea.
I'll start now.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #6  
Old 12-17-2011, 12:36 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
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.
__________________
Reply With Quote
  #7  
Old 12-17-2011, 01:47 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
What type of tabbing does the default inventory have......?
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #8  
Old 12-17-2011, 02:08 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Gunderak View Post
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.
__________________
Reply With Quote
  #9  
Old 12-17-2011, 02:17 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Hmmm, I don't know how you would achieve that though.
I'm just sticking with things I know how to do for now.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #10  
Old 12-17-2011, 02:24 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Gunderak View Post
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.
__________________
Reply With Quote
  #11  
Old 12-17-2011, 04:18 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
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.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #12  
Old 12-17-2011, 04:24 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by Gunderak View Post
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.
__________________
Reply With Quote
  #13  
Old 12-17-2011, 04:38 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
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.
Reply With Quote
  #14  
Old 12-26-2011, 08:03 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
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.
Reply With Quote
Reply


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 11:34 PM.


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