EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Code: #zonespawn function (Beta 1) (https://www.eqemulator.org/forums/showthread.php?t=4790)

Lyenu X`Arie 01-14-2003 06:44 PM

Code: #zonespawn function (Beta 1)
 
This is the first beta of my #zonespawn function. It allows you to log into the emulator and use the #spawn function to create a NPC, move it around, etc. Once you have it set up right you can target it and type "#zonespawn add". and it will add the entry for it into the database.

Note: In this version it will only save the basic mob settings. These being location/heading, name, level, class, race, gender, hp, merchant id, etc. Also this was written using the 0.4.1 code, so you may need to cut/paste the changes manually if you are using the beta of 0.4.2 (see lyenuchanges.txt for a list of what was added/changed).

IASoveraign 01-14-2003 08:07 PM

Nice. Very similar to something I was looking into. One question (without looking at the code) does #zonepawn add also perform an "update" on critters that already are in the DB?

Lyenu X`Arie 01-14-2003 08:48 PM

I think you're referring to being able to edit a spawn that is already inside the zone. The answer for that is no, it'll be done in beta 2 though. The command will be #zonespawn edit.

Shawn319 01-15-2003 07:39 AM

Loot would be easy to add (via #npcloot add #) and should be easy to save with some code changes..

Trumpcard 01-15-2003 12:49 PM

Lyn, why the bool Database::DBSpawn in the end of npc.cpp ? I think that needs to be at the end of database.cpp, and are chnages to npc.cpp really necessary in that case?

Thanks!

Lyenu X`Arie 01-15-2003 01:34 PM

If you put Database::DBSpawn() into the database.cpp file you will get all types of errors from the NPC class. This method it also used for the petition functions and everything. Also Shawn, you are right, and I will add that to the command tonight. So, expect beta 2 soon! =)

Trumpcard 01-15-2003 03:43 PM

See what ya mean.. There should be a more elegant way to do that, but it does work...

Ok.. added the initial form into the baseline.. try to pull it down from cvs and update any new additions changes in there if you dont mind, it'll make it easier to merge back in ;-)

Cool feature, thanks!

Lyenu X`Arie 01-15-2003 07:56 PM

Will do, and no problem! =)

Edgar1898 01-16-2003 02:42 AM

Dont forget to add class npc to your changelog. I was reading your log and I also had to add the class before it would work. Also you might want to update the npc's npcidtype once you assign it one from the db. If you dont it is going to be a lot harder to save loot into the db, etc.

Lyenu X`Arie 01-16-2003 09:59 PM

Where did you have to add the class NPC? Also thanks for reminding me about that, it would make my life a lot easier when edit and such gets implemented. Another thing I need to do is add the new spawn information into memory, so you don't have to restart the zone.


All times are GMT -4. The time now is 08:51 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.