|
You last visited: Today at 18:39
Advertisement
need a smart idea for portable wh
Discussion on need a smart idea for portable wh within the CO2 Private Server forum part of the Conquer Online 2 category.
09/01/2014, 03:15
|
#1
|
elite*gold: 0
Join Date: Jun 2014
Posts: 69
Received Thanks: 13
|
need a smart idea for portable wh
im working once more on AI entities but advanced one this time, and i'm still stuck from where i've left off
problem is that i need a portable wh for my entities
there is a variable in the client which is being set on the last npc id to be used in packet 1102 (in case of sash it's being set with the sash item uid)
here how it goes (feel free to correct me)
user click wh npc
client saves that npc id (not interested from which packet)
client sends the npc dialog
source reply with data packet opendialog/4
client sends 1009 subtype money saved and 1102 (with the npc id)
so the source know which wh to show it's items from that 1102 packet
and about the sashes, i've just implemented them, client already draw their GUI (that 3/6/9 slot window) before it sends the wh 1102 packet which makes them useless to my entities as i won't be able to open sashes using a chat packet or even npc dialog
so all i want is something smart without having to RE the client (such thing could take me a week and i don't have this time)
even if you can't program and still got an idea please feel free to post it (not going to make fun of you)
|
|
|
09/01/2014, 13:02
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
why wouldn't you be able to open them using the 1102 packet since you know the sash item uid? and I still have no idea what this is all about.
|
|
|
09/01/2014, 15:56
|
#3
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
|
Msg Action Subtype RemoteCommand
Find the value for sashes done.
|
|
|
09/01/2014, 16:14
|
#4
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
Why do these AI have to physically use a warehouse?
Why can't you create a dictionary on the AI class that will act as a warehouse.
If they are just AI, and no one is going to physically see them play as if it was their own character, then they don't need to use a warehouse specifically.
Sure you can load their items in the database as if it was a real warehouse, as long as the server knows to pull those into their warehouse dictionary on load.
Then just remove and add from there as you please.
|
|
|
09/01/2014, 18:25
|
#5
|
elite*gold: 0
Join Date: Jun 2014
Posts: 69
Received Thanks: 13
|
@-impulse- because that way ill have to click the sash on the client else it won't work, i don't want the user to hold the sash for this to work, i want to open a sash from maybe an npc dialog (which will be impossible as the client must click the sash for it to open the sash gui)
@Xio. sash isn't the same as wh, you activate the wh window by sending a packet while the sash it's client side when you click the sash
@Aceking i need the AI owner (players) to be able to give health/mana pots and gears to their AIs which to why i need to have some window for that to happen, every player can own an AI, i need that gui/wh/sash for that owner not for the actual AI to use them
|
|
|
09/01/2014, 19:29
|
#6
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
what about portable itembox???
|
|
|
09/01/2014, 19:33
|
#7
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
|
I quite like that idea. You have a card for an item box, and you can put it down anywhere and use it as a portable chest. You pick it up by attacking it (it goes directly into your inventory instead of being dropped).
|
|
|
09/01/2014, 19:44
|
#8
|
elite*gold: 0
Join Date: Jun 2014
Posts: 69
Received Thanks: 13
|
@abdoumatrix , @Spirited that's such great idea
@Spirited please tell me more about attacking the itembox (does it requires pk mode to be on for the client to send attack packet instead of the npc dialog packet ?)
|
|
|
09/01/2014, 19:47
|
#9
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
Quote:
Originally Posted by Spirited
I quite like that idea. You have a card for an item box, and you can put it down anywhere and use it as a portable chest. You pick it up by attacking it (it goes directly into your inventory instead of being dropped).
|
or just pick it up with npc dialog
|
|
|
09/01/2014, 20:56
|
#10
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
|
Attackable NPCs. I'm pretty sure there's a type for attackable furniture. You'll have to check. There's definitely a way of doing it though.
|
|
|
09/02/2014, 01:56
|
#11
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
|
Quote:
Originally Posted by OverKillasdwqe
@Xio. sash isn't the same as wh, you activate the wh window by sending a packet while the sash it's client side when you click the sash
|
Yes, thats why you use the type Remote Command. 116.
It will open anything you want with the correct value.
|
|
|
09/02/2014, 07:44
|
#12
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
|
Quote:
Originally Posted by Xio.
Yes, thats why you use the type Remote Command. 116.
It will open anything you want with the correct value.
|
^ This is almost correct. You need to ensure that your source allows for dynamic npc handling. Dynamic NPCs will be the first step in doing something like this. Then, you can assign a dynamic npc flag for processing and register all active portable WHs with the warehouse NPC type (without changing the actual NPC type). That way, you can have chests but activate the chests as a different NPC type. If you don't do this, then there's no clean way of associating the NPC id with a warehouse id. General Action packet (10010) subtype 126 opens primary windows (what you're supposed to use, 116 is for performing an interface action in the client). You're looking for parameter 4.
PS: I retract my attackable NPC statement. You can't attack and open dialog for an NPC at the same time. Making it a dialog driven action would be the best means of doing this.
|
|
|
09/02/2014, 12:58
|
#13
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
Quote:
Originally Posted by Spirited
^ This is almost correct. You need to ensure that your source allows for dynamic npc handling. Dynamic NPCs will be the first step in doing something like this. Then, you can assign a dynamic npc flag for processing and register all active portable WHs with the warehouse NPC type (without changing the actual NPC type). That way, you can have chests but activate the chests as a different NPC type. If you don't do this, then there's no clean way of associating the NPC id with a warehouse id. General Action packet (10010) subtype 126 opens primary windows (what you're supposed to use, 116 is for performing an interface action in the client). You're looking for parameter 4.
PS: I retract my attackable NPC statement. You can't attack and open dialog for an NPC at the same time. Making it a dialog driven action would be the best means of doing this.
|
that why i suggest itembox as when u send from its npcdialog a datapacket with subtype 126 parameter 4.
the client will consider it as the nearest warehouse. and u can just remove it too from the same npc dialog
Q:
===
is there any offset where u send the warehouse id in the datapacket?
maybe i missed it
|
|
|
09/02/2014, 13:58
|
#14
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
|
Quote:
Originally Posted by abdoumatrix
Q:
===
is there any offset where u send the warehouse id in the datapacket?
maybe i missed it 
|
No. Which warehouse is entirely source sided. The client doesnt need to know what warehouse it is as long as the server knows. If you click NPC's with the corresponding type for warehouses, they will send the warehouse packet and their ID in it, but really, if you open the warehouse dynamically why would you need to tell the client what warehouse it is?
|
|
|
09/02/2014, 14:51
|
#15
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
Quote:
Originally Posted by Xio.
No. Which warehouse is entirely source sided. The client doesnt need to know what warehouse it is as long as the server knows. If you click NPC's with the corresponding type for warehouses, they will send the warehouse packet and their ID in it, but really, if you open the warehouse dynamically why would you need to tell the client what warehouse it is?
|
just making sure cuz when i tried to send the packet it take the nearest npcuid and send it in warehousepacket
|
|
|
All times are GMT +1. The time now is 18:40.
|
|