Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2011, 12:27 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default Create NPC that is kos?

This must be something simple, but I can't get it working, and I can't find the answer anywhere.

I created an NPC but he's indifferent and will not attack. Other mobs in the zone will attack, but the one I made does not.

Here's the script I used to make him:
Code:
SET @NpcId = 620501; -- Always check both npcID and spawngroupID for availability
SET @SpawnGroupId = 620501; -- Always check both npcID and spawngroupID for availability
SET @NpcName = 'The_Big_Bad_Wolf';
SET @NpcLastname = 'Zone Boss';
SET @Zone = 'dawnshroud';

SET @SpawngroupName = CONCAT(@NpcName, ", ", @Zone);

INSERT INTO npc_types (id, name, lastname, 
	race, class, level, 
	bodytype, gender, texture, size, 
	face, luclin_hairstyle, luclin_haircolor, luclin_eyecolor, luclin_eyecolor2, 
	armortint_red, armortint_green, armortint_blue, npcspecialattks, 
	hp, AC, runspeed,
	STR, STA, DEX, AGI, _INT, WIS, CHA,
	MR, CR, DR, FR, PR)
VALUES (@NpcId, @NpcName, @NpcLastname, 
	14, 1, 41, 
	1, 2, 0, 20, 
	1, 1, 1, 4, 4, 
	0, 0, 0, "", 
	100, 789, 2,
	75, 75, 75, 75, 75, 75, 75,
	75, 75, 75, 75, 75);
	
INSERT INTO spawngroup (id , name)
	VALUES (@SpawnGroupId, @SpawngroupName); -- name = varchar(50)
INSERT INTO spawn2 (spawngroupID , zone , x, y, z, heading, respawntime)
	VALUES (@SpawnGroupId, @Zone, 0, 0, 0, 0, 1);
INSERT INTO spawnentry (spawngroupID , npcID , chance)
	VALUES (@SpawnGroupId, @NpcId, 100);
After he didn't aggro, I searched around the forums and found info about the "npc_faction_id" column, and set it to 19471 (also tried 19472), and it looks like other mobs are using that number successfully. Then I saw the "aggroradius" column while I was there and set it to 200.

Still indifferent, still won't attack, what the heck am I missing?
Reply With Quote
  #2  
Old 04-23-2011, 12:39 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

you really entering all that data by hand? You are a true hero
But I suggest getting Georges' NPC editor

Just copying down a faction number from a mob you know for sure is KOS should be enough. Make sure to zone out, to reset the zone

Also, if you have GM flag on, the npcs will not agro, but will con KOS
Also - do other npcs agro? Cause if they don't - then you maybe be missing server map files.
Reply With Quote
  #3  
Old 04-23-2011, 04:00 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
you really entering all that data by hand? You are a true hero
...yeah...
1. I like to write SQL scripts <shrug>, at least for now.
2. It is also nice to have a record of things I have changed/done. Maybe there's a better way, but this is one reason I've been doing it this way.
3. It has taught me a lot about SQL.


Quote:
Originally Posted by ChaosSlayerZ View Post
But I suggest getting Georges' NPC editor
I've got George's tools (Awesome btw) and I use them but I am still learning them.


Quote:
Originally Posted by ChaosSlayerZ View Post
Just copying down a faction number from a mob you know for sure is KOS should be enough. Make sure to zone out, to reset the zone
Bingo! Thanks Chaos, I knew it was something obvious I should have thought of. Thank you! I did that and it worked.

A couple questions:
1. Let's say, for example, I use George's Tools and make a whole bunch of changes to the database. And let's say there's a whole bunch of updates for the db. How do you guys reconcile the two? I know there's update SQL scripts, are you just running those on your db? What if one breaks something you made? So do you scrutinize the update before you run it? I've really been wondering about this, what do you guys do?

2. How do you make a NPC move? Walk a route? Run? I don't need all the details, I just don't know where to start.
Reply With Quote
  #4  
Old 04-23-2011, 06:54 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

if you referring to sql updates posted when new server version comes out, then:

George tools only edits the data in the DB, while sql updates that posted with server updates change the DB structure
usually they do not collide in anyway, but sometime sql update changes something significant after which George editor becomes no longer compatible, in which case you bug George to update it =)

There was a small guide on how to make Grid paths...

commands you need:

#grid - will give you list of options

#grid max - shows largest id of used grid number

#grid add X A B
X - new grid ID where X should be max+1
A - wander type
B - pause type

Wander Types

0: Circular. NPC will cycle waypoints in order, then head back to the first waypoint.
1: Random 10. NPC will pick a random of the nearest 10 waypoints and go to it.
2: Random. NPCwill pick a random waypoint in the grid and go to it.
3: Patrol. NPC will walk the waypoints to the end, then turn and backtrack.

Pausetype
0: Random half. NPC pauses for half of it's pause time + random of half it's pause time.
1: Full. NPC pauses for full pause time.
2: Random. NPC pauses for random of it's pause time.


once new grid id have been created you need waypoints for path


#wp add/delete grid_num pause wp_num (Pause=seconds, waypoints must start at 1)
#gassign gridnum (selected NPC will be assigned this gridnum)

so:

#wp add X (as X used in grid above) 30 (which means 30 seconds) Z

where Z is way point id - this can usually be omitted, in which case command will use next available.

the loc of way point stored - is where your char is currently standing.


so you stand where mob spawns and do:

#grid max
see whats the value is - now your X will be that value+1

now
#grid add X 3 2

now

#wp X 30

now move to some distance and do

#wp X 30

now target mob and do #gassign X
now zone out and back

What will happen:

mob will spawn, wait between 0 and 30 sec and then walk to way point you set.
there he will wait between 0 and 30 sec, and then walk back, etc
Reply With Quote
  #5  
Old 04-24-2011, 09:41 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

Wow. Awesome Chaos. I really appreciate the info. EQEmu is something I fit in amongst several other more important things, so my progress is always slow...but always steady because I enjoy it so much. I can't wait to get going moving my NPCs all over the place. Thanks again.

P.S. Not sure what your role is over at THF but I've played on that server and it is awesome.
Reply With Quote
  #6  
Old 04-24-2011, 11:30 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

No problem

For about a year I helped as a content developer on THF server. My most significant work is the Alternative Progression part of the server
Reply With Quote
  #7  
Old 05-16-2011, 07:21 PM
Dragonthorne
Fire Beetle
 
Join Date: Jul 2010
Posts: 5
Default

Just wanna follow up with this as I encountered it. Most might already know, but it could help a few

Before adding an NPC to a grid as Chaos mentioned, you have to first add the NPC to the database (if doing it entirely within the game).

Spawn your NPC, then #npcspawn create while targeting the NPC. Then do a #repop , and you can then #gassign ###
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 06:13 PM.


 

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