Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-28-2004, 04:23 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Quote:
Originally Posted by smogo
I'm a bit confused about moving, and grids, in general. Does the logic belong to zone.exe through the DB, quests scripts, ...
Its all done in mobai.cpp. The waypoints are loaded and the destination wp is saved in the mob. The entire zone loops through all entities - doors,npcs,clients, etc - processing each in turn.

When it processes an npc, it calculates the distince it will move based on the speed. It determines the direction it is going and calculates the new position where it should be, sending a packet to the client telling it to move the npc to that position.

When it reaches a wp, it sets a timer and waits until the time is up. This means that during that time, each time it processes the npc, it does not move it. Once the time is up, it determines the next destination wp, loads that into the npc and starts moving to it.

Quote:
Could you plese point to, or post to explain how you 'd use your wish list, if it's not 'know-how secret' ?
A couple of examples might be... after talking with a player, the npc does a moveto() towards a door. When it arrives, the event_wp is triggered. It then does an opendoor(). Turns to the player using facetarget() and tells the player "what you are looking for is in here".

Another one might be use signal() and targlobal(). By setting a var to a specific value and sending it to the other npc, then doing a signal, you can create a conversation between 2 or more npcs. On event_signal, it checks the global var and does a say() depending on what is in it. Then it does a targlobal() back with a signal to that npc - who checks the var and does a say() based on what is in it... and back and forth.

zsignal() would be used by boats among other things ... but we won't go into that yet.
__________________
Maybe I should try making one of these servers...
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:27 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3