New question
Gary Brown
13 May 2005, 21:15How could I used #quest.thing# to go through a players inventory when they're logging off to move it all to a specific room in order to put it back when they log back on? Once I was aware of the variable, it was a breeze to use it to go thorough the objects in a room, but for the life of me, I can't figure out a way to use it with a players inventory.
Gary
Gary
Cryophile
13 May 2005, 21:44Player's Inventories are rooms as well 

Gary Brown
13 May 2005, 22:07Oh. So I could just use the same thing as before. The "run a script for each object in a room. Cool. Errr..... Is there a built in variable to refer to the inventory room?
Gary
Gary
METALGod32
14 May 2005, 01:48Thats what i was saying in my post...Objects dont save...unless of course you move them then find a way to give it back to that player.
Gary Brown
14 May 2005, 02:31Objects do save. What I'm talking about is moving the stuff in a players inventory to a room to transfer them back to them when they reconnect.
Gary
Gary
METALGod32
14 May 2005, 05:34How would i save a Object in the players inventory on Questnet?, i had a char on once, it had a object in the inventory, i logged off then logged on with another char...it had that object in inventory to because both used the same userid.
i understand now about objects and the properties...saving a char's stats etc like that, but how do i save a object in the inventory of a certain player?
Thanks, and sorry for turning your Question thread into mines, i just felt the need to ask here since i'm on the subject on this thread.
i understand now about objects and the properties...saving a char's stats etc like that, but how do i save a object in the inventory of a certain player?
Thanks, and sorry for turning your Question thread into mines, i just felt the need to ask here since i'm on the subject on this thread.
Gary Brown
14 May 2005, 12:07I'm sorry. I misunderstood you. My fault.
As far as I can tell, you're right. You can't save the inventory directly on the player itself. That's what I was trying to work out. To make a room specificly for a player and move their inventory to it when they disconnect and then, move it back to them when they reconnect.
So, what you were talking about b/4 with player accounts would work well, if you have a room that keeps the players stats and other account info. then you also have somewhere to keep their inventory.
Gary
As far as I can tell, you're right. You can't save the inventory directly on the player itself. That's what I was trying to work out. To make a room specificly for a player and move their inventory to it when they disconnect and then, move it back to them when they reconnect.
So, what you were talking about b/4 with player accounts would work well, if you have a room that keeps the players stats and other account info. then you also have somewhere to keep their inventory.
Gary
METALGod32
14 May 2005, 12:10ahhhh ok, Thats what i'm trying to figure out to...LOL, if i get a idea on how to do this i'll make a post.
I think Im Dead
15 May 2005, 22:50Use the disconnect script, to specify that for each object in player%userid% do something like give it a property/value called "belongsto=PLAYERSNAME" or something similar, then move it to any other room. Then with the connect script, check each object in game if it has a property "belongsto" that is equal to $name%userid%$ and if so give it to the player.
Of course that's an unoptimized way of doing it, but you should get the idea from that.
Of course that's an unoptimized way of doing it, but you should get the idea from that.
METALGod32
16 May 2005, 05:14Yeah thats what i'm working on now...the Disconnect and connect scripts.
METALGod32
16 May 2005, 05:17we'll needa write a if statement for every object, on exit and connect...but it's doable...just time consuming.
and to avoid the game going slow we can wait and have the player type any key...this will allow the game enough time to run through the statements.
and to avoid the game going slow we can wait and have the player type any key...this will allow the game enough time to run through the statements.
francisstokes
16 May 2005, 06:20Sorry if im wasting your time imhalf asleep but couldnt you just put that into a procedure and apply it to every object?
METALGod32
16 May 2005, 07:21yup that's what i was thinking....but the game still needs to run the entire procedure....so i'll make a load var....that counts to 10 or something before the player connects.