FaceMelter

Member
So, with some help from many of you guys, I've almost got a completely working hotbar for the classic client. The only thing that's not working is the Max Item limit. It's possible to crash if you have more than 10 items in the bag.

I'd like you all to test this out and tell me what you think! And if you have any advice on how I could tackle the max items issue please advise!

Spawn the Pouch (CaptureItemIDPouch) and Double click it to get the hotbar.
Drop things in the pouch and the bar will update in real time.
 

Attachments

  • Hotbar.png
    Hotbar.png
    115 KB · Views: 63
  • TheHotBarGump.cs
    11.5 KB · Views: 9
  • CaptureItemID.cs
    2.5 KB · Views: 8
This is an awesome idea. So basically you place items inside a special bag and those items get auto added to the hotbar? trying to figure out how it works exactly. Is this bag blessed or do you designate the bag? I would hate for players to have a free blessed bag.

If it is a bag that's used what happens when they die or take the bag out of there pack?

Lastly if it does use a bag, we can just set the bag limit to 10 to "temperaily" fix the issue but it's prolly just a check issue.

I will do some testing of this when I get home tonight it looks like an great idea. Those were just some preliminary thoughts I had. :)
 
You have to use the CaptureItemIDPouch for the hotbar. It's only looking for things in that bag.

The bag is not blessed.
 
OK, got the last bug. As a reminder people, if you have 10 items in an array, don't forget that it starts at 0. o_O
Bug squashed. So, if you have any suggestions on how specific items could be handled, or have a general comment,
have at it! I'm in feedback mode on this now! Try and break it!

Also made it reject any containers that may be put into it, as other containers only counted as one item. YIKES.
Maybe I need to make a version for just other containers? For organization? :eek:

Here's the updated files!
 

Attachments

  • CaptureItemID.cs
    2.8 KB · Views: 13
  • TheHotBarGump.cs
    11.5 KB · Views: 13
I think it would be pretty cool if you made it a command and then the command let you target any bag you had and it used that bag. (turning the targeted bag into the proper bag and making sure it's empty) I think that will help with players being organized and it would help players get it set up easier instead of having to get that specific bag.
 
The only reason I have a 10 item limit is that I cannot add buttons to the Gump on the fly. I tried that initially, but it didn't seem to register the buttons. One could easily extend this to 20 items if they needed, but the container is what is pumping the ID's to the gump.
They would also need to modify the Gump too. You would probably need to make a Gump for EVERY container size, and call the correct Gump based on the item limit.

Emptying the bag wouldn't matter due to the way it refreshes the Gump.
 
No, I'm sorry let me try and clarify.

Instead of making a player get a special bag (containerID Pouch) to use the hotbar, let them enter a command such as [hotbar Then the command makes them target a bag they want to use as the pouch, If the container the target is empty it then makes that container the designated container for the hotbar.

You can change the container item limit to 10 once it is selected. This is just an extra step so new players and anyone that accidently destroys the specific "pouch" can easily make a new one on the fly.

I didn't mean to extend it or anything. I think 10 is more than enough. Just an easier way to get a bag. You could also make it so typing [hotbar would just give them the bag they needed but then that would be a free source of bags. I hope I clarified it a bit better.
 
Ah, I see what you are saying now. I've never made a command before. Let me look at some examples and I'll see what I can do.
 
It'd be pretty cool if you put the item amounts at the corner of some of those tiles.

If you also made each of the hotbar points equivalent to a command (maybe dynamically created commands for each hotbar instance you make). That way people can type in a string (e.g. "*hotbar*1*item*5*") or something like that, and it would use it for them. This would allow macros to be coded for each slot in the hotbar pretty easily!
 
I had attempted to put counters on the bar, but was not successful. I know it can be done, but I'm having issues with the AddHTML command for the Gump. It's on the todo list! Thanks for taking the time to try it out!
 
I think i might play with your script a bit.
I think the way i would do it is:
Have a command [hotbar to bring up the menu.
The menu has the 10 squares and small arrows, they are all empty.
Clicking on the arrow gives a target, the player can target something in their pack, or something they are wearing.
The items get added to the hotbar menu.
The items on the hotbar list an amount if available.
The player can d-click items on the hotbar to use them, or use macroable commands to use each slot: [hb1, [hb2 - [hb10.
Internally when the hotbar menu is opened, d-clicked or the command [hb1 is used the hotbar does a quick check of the players inventory and updates the amounts, then uses the item. A timer could even be used to keep updating the amounts continually.
Clicking the arrow would remove the item from the slot.

this gets away from having to rely on a special bag.
 
Hey Rex, hope you don't mind me coming in to criticise some of your suggestions! ;)

I agree with your suggestions apart from the following two.

The player can d-click items on the hotbar to use them

Double clicking will be difficult to do, especially over connections with high pings.

Internally when the hotbar menu is opened, d-clicked or the command [hb1 is used the hotbar does a quick check of the players inventory and updates the amounts, then uses the item. A timer could even be used to keep updating the amounts continually.

I'd make it so that the "Use" command from Mobile would link into this (as well as lift, drop etc.) , check if the hotbar needs updating, if it does, then close and send the gump immediately, otherwise, don't bother updating.

If it's on a timer, you'll be creating a bunch of issues. Either your timer will be too slow, in which case, the hotbar will feel laggy. If your timer is too fast, then you're spending way too much time processing stuff redundantly and causing lag. Best thing would be to monitor all the functions that could potentially result in the numbers changing and just resending the gump every time those change. That means that the recounts could be happening once every couple of seconds for a player who's actively bandaging/casting spells or just never for someone who's running around not using their items. It becomes an on-demand service - which would be a lot better :)
 
If it's on a timer, you'll be creating a bunch of issues. Either your timer will be too slow, in which case, the hotbar will feel laggy. If your timer is too fast, then you're spending way too much time processing stuff redundantly and causing lag. Best thing would be to monitor all the functions that could potentially result in the numbers changing and just resending the gump every time those change. That means that the recounts could be happening once every couple of seconds for a player who's actively bandaging/casting spells or just never for someone who's running around not using their items. It becomes an on-demand service - which would be a lot better :)
This makes a lot of sense.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back