WareHouse ID of your House

06/20/2012 02:35 marlyandedsel#1
I have manage to add House systems

Now I am going to add WareHouse in the House system, can anyone have idea on how to add it just a clue to lead me on how to code this one....
06/20/2012 05:37 .Kinshi#2
I have a table in my database for the warehouse. It'll be set to the NPC's ID. So if I put it in the market warehouse, and that NPCs id is say, 44, then the warehouse will be 44.
So when you place the itembox in the house it'll have a ID, just use that ID.
It's extremely simple.
06/20/2012 05:45 Zeroxelli#3
Totally missed this topic. But yes, as Kinshi said, the ID is exactly the same as the NPC ID. Just remember to send the GeneralData packet just like you do with all other warehouses. It's best to use an additional handler to work with your NPCs, to make it dynamic like you had to do with the maps to get houses working. Adding the IDs manually is useless.
06/20/2012 06:26 marlyandedsel#4
thanks
06/20/2012 06:29 Zeroxelli#5
No problem. Good luck getting houses working, since that's one of the more ignored features imo.
06/20/2012 14:52 marlyandedsel#6
it's kinda hard making Dynamic Npcs
06/20/2012 15:03 Zeroxelli#7
Not really. The NPCs don't have to exist in the database at all, but are simply spawned based on the unique map ID of the map.
06/20/2012 16:47 marlyandedsel#8
yes I know but I have created some function in form of static and the map npc is not Need to convert them to static in order to work, I might ruin the project anyway I will just have to try ....
06/20/2012 21:35 pro4never#9
There's no difference between static and dynamic npcs... They should be using the same NPC ID regardless of their dynamic map ID and therefor will result in the same warehouse ID.

Now the trick is to make sure you display the items from the correct owner, THAT is where the dynamic map ID comes into play (allowing spouses to use your house and item box)
06/21/2012 03:48 marlyandedsel#10
thanks pro,,,, i have now the Idea I use same ID for the WareHouse for all Owner of it ...

and I want to talk to you in Private if its okay for you coz I just dont want to post code here... just have little error which make me crazy .....

#edit : Warehouse house system is now fix... i have manage to do it by my self....anyway Thanks for giving some clue..... pro4never
, .Kinshi and Zeroxelli

here is the result
[Only registered and activated users can see links. Click Here To Register...]