Page 1 of 2

Implementing: Housing

Posted: Sat Aug 14, 2010 6:07 pm
by bolly
I really want to get this working. I know it's not at the top of the list or probably anywhere near the list but I would really like to take a stab at it.

My problem is though, I am just not sure how to understand how people like scat look at packets and figure out the order things should be going on. Should I be using something like wireshark? How do you see what's inside the data?

Re: Housing

Posted: Sun Aug 15, 2010 10:29 am
by Zcoretri
bolly wrote:I really want to get this working. I know it's not at the top of the list or probably anywhere near the list but I would really like to take a stab at it.

My problem is though, I am just not sure how to understand how people like scat look at packets and figure out the order things should be going on. Should I be using something like wireshark? How do you see what's inside the data?
People like scat and LE it seems to come naturally to them, where as I have to work hard at learning stuff. :mrgreen:
If John and myself knew how to code in C++ good, this emulator would have been a lot farther along...but even though we are pretty smart in stuff, we just can't seem to get C++, lol.

You don't really need to look at the low level data (data packets), I can do that and come up with the structs needed...it's using the structs in the C++ code that we really need.

Re: Housing

Posted: Sun Aug 15, 2010 12:48 pm
by bolly
Hey!

Great, ok :-) So I guess to start with we just need the basic logic of buying and entering as well as being able to interface with the door.

------------------

Tasks
-------

Add door type and assign it to a test door (I guess this needs a certain 'type' to show the correct mouse icon when hovering over)

Give the door a house entity command for click

Assign the housing type to that door

Code the entity command to check who the clicker is, show the visitor/owner enter window depending (i guess this is another packet)

If they do not own the instance show BUY, if they do show them ENTER

If they chose Visitor show list of owners that have public visit

If they chose Tour simply enter template instance of the house

----------------

If BUY

Check if they can afford it

Remove the cost

Create an entry for the instance in the database, assign the owner and the zone id template for the house (a table)

Leave wall, floor decorations as blank (another table)

Boot up the instance

Load player into instance

--------------

If ENTER

Check they are still the owner or have the right access

Find the entry for the instance in the database

Check if the instance is already up

If not - start the instance

Load the floor/wall decorations

Load the interiors

Load the player into the house

--------------

Re: Housing

Posted: Sun Aug 15, 2010 1:02 pm
by bolly
To start with, since I need to know about the opcode side of things, how about you tell me how to get my server to tell my client to pop up the House dialog box?

Re: Housing

Posted: Sun Aug 15, 2010 9:12 pm
by John Adams
Image had done some Instancing work about 18 mos ago. Never got to test it out, and can't find him anymore to ask if what the status was... but apparently there's code in there to support instancing (somewhat).

Bolly, you could always write the C++ for the routines to do all the logical checking, ignoring client input for the time being... unless that would just be harder. Ie., you could assume some fake data just to get it working.

Re: Housing

Posted: Mon Aug 16, 2010 10:11 am
by bolly
I could do an entity command for the door and hook that into the existing instancing system

Is there a zone entry for the door? Like how do I know which zone file to load as the instance?

Re: Housing

Posted: Mon Aug 16, 2010 11:31 am
by John Adams
I imagine it could be any player housing zone in the entire library of player housing zones ;) The Instancing Image set up probably wasn't about player housing though... so I am not sure how much more work is needed. You'd likely need tables for things like `character_house` and the items within `character_house_items` and `character_house_access` etc. These were all a part of the DB design originally, but were removed due to the fact we really didn't have a design yet.

Re: Housing

Posted: Tue Aug 17, 2010 1:15 pm
by Zcoretri
So far I have had no luck in getting the "Buy" window to open. I may need some more packet collections on this.
I'll post screen shots later when I get home from work, on what I CAN do and post screen shot on what I CAN"T do.

Re: Housing

Posted: Tue Aug 17, 2010 1:45 pm
by bolly
I was looking at this but couldn't find the world structs

Just looking at SetupInstance and CreateNewInstance which seem to be tied into pre-defined instances from the zones tables

Re: Housing

Posted: Tue Aug 17, 2010 5:34 pm
by Zcoretri
bolly wrote:I was looking at this but couldn't find the world structs

Just looking at SetupInstance and CreateNewInstance which seem to be tied into pre-defined instances from the zones tables
You won't find world structs because I have been creating them when this topic came up :mrgreen:

Re: Housing

Posted: Mon Oct 29, 2012 12:21 pm
by John Adams
Resurrecting this old thread for 2 reasons:

1) We are currently collecting data for functionality, and if there is something more needed for housing purchases and the like, our collectors need to know.

2) Jab, with the discovery of Instancing working (ish), can I ask that we go as far as the "Access" handler being implemented in 0.7.2? I don't want to take Housing further than that, as we have plenty to do in this cycle, but getting the Access option to generate a personal housing instance (no money involved or other features, just the zone-in), would be slick.

ProjMan - Housing Access Option

Let me know if you think this should wait. Seems simple enough.


PS: I will go back through Bolly's list above and add records for all the details on housing into ProjMan.

Re: Implementing: Housing

Posted: Mon Oct 29, 2012 2:17 pm
by alfa
viewtopic.php?f=17&t=3253&p=24780#p24780
alfa wrote:Well, regarding Jab is near to done with instance, if I correctly remember times ago L.E. have find way to move object in game, so I prevent a great idea of John about housing, maybe it will be done in years, but data are here anyway :p
Héhé !

Re: Implementing: Housing

Posted: Mon Oct 29, 2012 3:01 pm
by Jabantiz
I honestly haven't put any thought into what this will take. Getting a window to pop up shouldn't be to difficult, how to store the data to make it functional might be another issue. I can look into it and see what I can come up with and let you know if 7.2 is possible after we are done collecting.

Re: Implementing: Housing

Posted: Mon Oct 29, 2012 4:20 pm
by Zcoretri
Well what do you know, i did commit some housing structs already :)

Code: Select all

<Struct Name="WS_DisplayVisitScreen" ClientVersion="1096" OpcodeName="OP_DisplayInnVisitScreenMsg">

Code: Select all

<Struct Name="WS_DisplayHouseStatus" ClientVersion="1096" OpcodeName="OP_PlayerHouseDisplayStatusMsg">
Of course there maybe more needed for this implementation.

Re: Implementing: Housing

Posted: Mon Oct 29, 2012 4:45 pm
by John Adams
Yes, to all 3 of you ;) I know Z did some structs work, I know alfa mentioned housing, and I know Jab is busy collecting (which we'd rather have first).

Again, I am not interested in housing in general... just getting that damn Right-Click "Access" to do more than blink at me. Since the Instance code is already there, I was hoping it would be as simple as creating the instance, then simply moving the player into it... nothing more than that for 0.7.2.