| Mirage Source http://www.miragesource.net/forums/ |
|
| How to save inventory? http://www.miragesource.net/forums/viewtopic.php?f=201&t=3529 |
Page 1 of 1 |
| Author: | Stomach Pulser [ Thu Mar 27, 2008 2:36 am ] |
| Post subject: | How to save inventory? |
Well, I finished my visual inventory and, when I move things around (click and drag), the image updates, also, I set the players inventory to the new spaces, but when I exit/reopen the game, it doesn't save the spaces. Is their an existing packet I can't find, or do I have to make a new one? |
|
| Author: | Lea [ Thu Mar 27, 2008 12:15 pm ] |
| Post subject: | Re: How to save inventory? |
There's existing inventory code you can modify. |
|
| Author: | Stomach Pulser [ Thu Mar 27, 2008 8:12 pm ] |
| Post subject: | Re: How to save inventory? |
Where might this sub be (the one that saves player things, client side)? |
|
| Author: | William [ Thu Mar 27, 2008 8:14 pm ] |
| Post subject: | Re: How to save inventory? |
Code: SendSaveItem
|
|
| Author: | Stomach Pulser [ Thu Mar 27, 2008 8:21 pm ] |
| Post subject: | Re: How to save inventory? |
That is for saving an item from the item editor. I want to save where an item is in the players inventory. |
|
| Author: | Asrrin29 [ Thu Mar 27, 2008 8:49 pm ] |
| Post subject: | Re: How to save inventory? |
I = GetPlayerInvNum(inventory_slot_to_be_saved) SendSaveItem(Item(I).Num) At least I think that's what you should do, off the top of my head. Grab the slot number you need, feed it through the GetPlayerInvNum to find the Item number of the item in that slot, and then feed it through the SendSaveIem function. |
|
| Author: | Stomach Pulser [ Thu Mar 27, 2008 9:14 pm ] |
| Post subject: | Re: How to save inventory? |
Again, the sendsaveitem call saved the item itself, from the item editor...it doesn't save any of the player's inventory... |
|
| Author: | William [ Thu Mar 27, 2008 9:56 pm ] |
| Post subject: | Re: How to save inventory? |
lol, what was I thinking about.. just press on the inventory slot and look at the sending packet. |
|
| Author: | Stomach Pulser [ Fri Mar 28, 2008 1:38 am ] |
| Post subject: | Re: How to save inventory? |
What? Explain please. At the moment I set the players inventory slots to switch items, but it is only client side and doesn't save it to the player's .ini |
|
| Author: | Stomach Pulser [ Fri Mar 28, 2008 3:02 am ] |
| Post subject: | Re: How to save inventory? |
Instead of bothering with this, I just made a packet that saves the player's inventory. If you find an existing packet, do tell me. Now, the visual inventory works perfectly! Just need to add in special affects later XP. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|