This Visual Inventory uses BltToDc to draw your inventory instead of picture boxes.
All Client Side
frmMirage
Add a Picture Box
Name it picVisInv
Set AutoRedraw to True
modConstants
Add the following:
Code: ' Visual Inventory
Public Const InvX As Byte = 30
Public Const InvY As Byte = 11
Public Const InvOffsetX As Byte = 17
Public Const InvOffsetY As Byte = 16
InvX and InvY are where the first item will be drawn within the picVisInv
InvOffsetX and InvOffsetY are the offsets in between the items
modDirectDraw7
Add the following sub:
[code]Public Sub BltInventory()
Dim i As Long
Dim rec As DxVBLib.RECT
Dim rec_pos As DxVBLib.RECT
If frmMirage.picVisInv.Visible Then
frmMirage.picVisInv.Cls
For i = 1 To MAX_INV
If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i) 0 And GetPlayerInvItemNum(MyIndex, i) = tempRec.Left And X = tempRec.Top And Y
To be fair... It's still very good as is.
How would you improve this?
That's not helping to improve my code haha.
You're using a custom DX8 engine you made. I'm giving people a basic visual inventory they can expand. The base code for that is very good imho.
There really isn't much more Dugor can do to improve on it. It's kickass as is.
I want to add this but my frmMIrage cant go any bigger to allow for this any ideas.
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Oh dear God, just stop posting.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
? My frmMirage wont go bigger. At all
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Awww. The fucking IDE isn't letting you drag it bigger? BAAAAAAAAAAAAW.
frmMirage.width = 9001
HOLY SHIT
THAT WAS FUCKING HARD WASNT IT.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
lol Robin, that was hilarious.
Try getting messages on MSN from him, that are ALL like that. =.= I've just blocked him now.
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Of course I get them. I'm always the first person to get all the retards adding me on msn.
Being so godly is more of a curse than anything ;-;
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Robin Wrote:Of course I get them. I'm always the first person to get all the retards adding me on msn.
Being so godly is more of a curse than anything ;-;
Doom said add you. Blame him. XD
Yeah, I was thinking of adding Giaken, and Robin, and all the other 1337 programmers to MSN, but I know what'll happen...
Well I got DFA & Robin. But Robin doesn't talk. =-p
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Nean Wrote:Yeah, I was thinking of adding Giaken, and Robin, and all the other 1337 programmers to MSN, but I know what'll happen...
Go ahead. I don't mind talking to people trying to learn.
I do care when idiots ask me retarded shit, or just don't learn at all. I've had one guy who's asked me how to add 'the way megalith does its chat box so its like over the game sorta' 3 times now.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Does this work for MS4? Because everytime I try to do this tutorial I get errors...Am i suppost to make pictures boxes 32x32 auto redraw and name it picVisInv and then picVisInv1 and so on? Or do the other option (I forgot) that names them picVisInv(0) / picVisInv(1) ...
Sorry for double post but -
Even when I compile without errors the pictures dont show up.
You don't need to make any picture boxes. Re read the tutorial.
And if I remember correctly the inventory won't update properly by just opening it. You will have to open it and then pick up or drop an item for it to blt everything.
frmMirage
Add a Picture Box
Name it picVisInv
Set AutoRedraw to True
and I already tried to pick up an item and it still didnt update.
Quote:Add a Picture Box
You only need one.
Meh, when I did this I just used the existing picInv. My mistake.
What do I do with the existing Inventory? The text one?
The item doesnt show up in the picture box. picVisInv AutoRedraw = True 32x32 but nothing changed../
Im going to ask again.
Does this work with MS4?
It's made specifically for MS4. That's why it's in the MS4 Tutorials section of the forums.
As far as I can tell, picVisInv needs to be larger than 32x32. picVisInv is not a box that displays an inventory item, picVisInv is THE box that displays ALL of your inventory items.
|