Quote:
Originally Posted by MonstersAbroad
+K, but howcome it will dissapear on ANY movment I make ???
P.S: Item commands wont work  can somone give me an example ? I am trying
@item BuriedBlade Super 12 7 255 13 13 but no luck ?
|
because on movement it checks for things to spawn... if you don't change that spawn code to include a dictionary of bots loaded on the server then it won't show them.
Think about it like this..
Sending the spawn packet to show the client the bot works... but that doesn't mean there is actually a bot on the server. It just means the client gets told "hey, there's something that looks like this on your screen!" and so it displays it. For any sort of permanence you need a dictionary to hold the entity on the server and then whenever you are updating the clients surroundings (mobs, players, npcs, items and whatever else) you will need to run through the local bots and spawn those as well.
Same with bot actions. You need to send the action to the client to display the change.
The bot itself needs no packets sent because there is no client to be updated. Packets are ONLY used to A: Update client from server and B: Update server from client.
Bots are all Server-Server meaning no packets are needed. You just change the bot variables and everything is perfect. it's the clients that need to be updated.
Again: Sorry if I got anything a bit off but that's the way I think about it. The actual method of going about it is most likely different in this source as I've done very little mucking about in the finer aspects of it as of yet.