Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2011, 06:28 PM
Astal
Hill Giant
 
Join Date: Mar 2010
Posts: 236
Default Spawning mobs every x amount of steps a person takes?

Would this be possible using emus perl scripting?

Like an old Final Fantasy RPG. Every so many steps a random NPC type is spawned.

Would it also be possible to add arguements to make it so they only spawn if another npc isnt near, or sometimes 2 spawn ect...., or so only the group leaders steps count towards spawning npcs, it could get messy if each player in the group spawned em.
Reply With Quote
  #2  
Old 08-16-2011, 07:07 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Astal View Post
Would this be possible using emus perl scripting?

Like an old Final Fantasy RPG. Every so many steps a random NPC type is spawned.

Would it also be possible to add arguements to make it so they only spawn if another npc isnt near, or sometimes 2 spawn ect...., or so only the group leaders steps count towards spawning npcs, it could get messy if each player in the group spawned em.
You could achieve this in the player.pl.

On EVENT_ENTERZONE you can start a timer to start counting the units of distance a player has moved, and then add the if checks and arguments appropriately.
Reply With Quote
  #3  
Old 08-16-2011, 08:25 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, it would be possible, but it may be tough to tweak it to work exactly as you intend. Spawning an NPC or 2 if no others are near shouldn't be too hard if you just do an NPC List search and check a set distance around the player to see if any NPCs are already within that range.

You will also need to consider stuff like NPCs spawning inside walls. If you are picky (like me), you would need to also make sure NPCs don't spawn facing a wall or in an awkward looking position. You can do a FindGroundZ() and CheckLoS() from the player to make sure the NPCs aren't spawned inside of a wall, but they may still be spawned close enough to a wall that they look like they are partially in it. You can also set the heading of the NPC to face toward the player so they aren't at a bad heading, but it might look a bit odd having all NPCs spawn facing the character.

I have some scripts I recently created to spawn an entire dungeon and it works pretty well. I made some plugins that can move the NPCs away from walls and also make them face away from walls as well. It isn't perfect yet, but it looks decent enough. I may submit the scripts here sometime after I get them tweaked enough. They are a bit complex though and are pretty resource intensive so I wouldn't really recommend them for regular use. I mostly created them for development purposes so I could do something like spawn an entire LDoN zone and save the spawns to the DB after for permanent use. Then with a little cleanup (mostly #spawnfix and pathing) we could have a fully spawned zone from scratch with minimal effort and time.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 08-16-2011, 09:02 PM
Astal
Hill Giant
 
Join Date: Mar 2010
Posts: 236
Default

Quote:
Originally Posted by trevius View Post
Yeah, it would be possible, but it may be tough to tweak it to work exactly as you intend. Spawning an NPC or 2 if no others are near shouldn't be too hard if you just do an NPC List search and check a set distance around the player to see if any NPCs are already within that range.

You will also need to consider stuff like NPCs spawning inside walls. If you are picky (like me), you would need to also make sure NPCs don't spawn facing a wall or in an awkward looking position. You can do a FindGroundZ() and CheckLoS() from the player to make sure the NPCs aren't spawned inside of a wall, but they may still be spawned close enough to a wall that they look like they are partially in it. You can also set the heading of the NPC to face toward the player so they aren't at a bad heading, but it might look a bit odd having all NPCs spawn facing the character.

I have some scripts I recently created to spawn an entire dungeon and it works pretty well. I made some plugins that can move the NPCs away from walls and also make them face away from walls as well. It isn't perfect yet, but it looks decent enough. I may submit the scripts here sometime after I get them tweaked enough. They are a bit complex though and are pretty resource intensive so I wouldn't really recommend them for regular use. I mostly created them for development purposes so I could do something like spawn an entire LDoN zone and save the spawns to the DB after for permanent use. Then with a little cleanup (mostly #spawnfix and pathing) we could have a fully spawned zone from scratch with minimal effort and time.
That would be very nice, I HATE spawning npcs, its my most hated thing ever lol
Reply With Quote
  #5  
Old 08-16-2011, 11:22 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I went ahead and posted the plugins and scripts as I currently have them. They could probably use some tweaks, but they should be good enough to help with what you are trying to do already.

http://www.eqemulator.org/forums/sho...329#post202329
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


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 05:19 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3