PDA

View Full Version : Some Issues


inkubus
07-16-2007, 09:20 AM
Hi guys,

I'm currently having some issues with a server and I thought I'd put them all together in one thread. Hopefully someone can answer them.

1) Potions (distillates) are currently showing as curcharges 1 in iteminfo yet when you inspect the item or try to use them it is saying out of charges.

2) I cannot seem to get npcs to equip items, even through the loottables with the equip_item set to 1.

3) There doesn't seem to be a way to get npcs to spawn using npcspawn add. I always used to do #npcspawn create, then #npctypespawn <id> then #npcspawn add to add it to the spawn2 table. This doesn't seem to be working any more?

Thanks in advance

InKy

John Adams
07-16-2007, 10:15 AM
After you do the create, is the NPC inserted into the npc_types table correctly? I was having some difficulties creating invisible men the other night, too. But I did get them to spawn, just not persistently. Soon as my zone restarted, the invisible man wouldn't spawn.

Something could be wrong, but I am not sure there were any changes to this code recently.

inkubus
07-16-2007, 11:04 AM
I am only using 1 npcspawn create which is adding ok and adding them to the spawn2 table (annoying but that is fine). Now when i dbspawn/npctypespawn the npc i have just created and then do an npcspawn add it will add the entry to spawn2. It won't, however, add any more than 2 of the same npc in npcspawn.

I think this may be down to the spawngroup names but I am unsure.

The thing is, i really don't want to clutter my database having a million of the same npcs in npc_types. It just seems pointless and a management nightmare.

inkubus
07-16-2007, 11:18 AM
snprintf(tmpstr, sizeof(tmpstr), "%s%s%i", zone, spawn->GetName(),Timer::GetCurrentTime());

This is what was causing my problem. You guys should really remove the zone bit. Alot of people use long names in their npc's names. Perhaps just have the ZONEID instead?

sfisque
07-16-2007, 01:52 PM
I am only using 1 npcspawn create which is adding ok and adding them to the spawn2 table (annoying but that is fine). Now when i dbspawn/npctypespawn the npc i have just created and then do an npcspawn add it will add the entry to spawn2. It won't, however, add any more than 2 of the same npc in npcspawn.

I think this may be down to the spawngroup names but I am unsure.

The thing is, i really don't want to clutter my database having a million of the same npcs in npc_types. It just seems pointless and a management nightmare.

lol, dont look at the faction handling then. thats even worse. there are individual faction entries for each mob, rather than just 1 for each faction grouping. and the code assumes there are no "holes" in the table, so you cant just go deleting entries without updating the code to handle the holes, or revising the table to remove the holes. faction handling could use alot of optimization.

== sfisque

John Adams
07-17-2007, 09:46 AM
snprintf(tmpstr, sizeof(tmpstr), "%s%s%i", zone, spawn->GetName(),Timer::GetCurrentTime());

This is what was causing my problem. You guys should really remove the zone bit. Alot of people use long names in their npc's names. Perhaps just have the ZONEID instead?

What do you mean, "Long Names"? Like first and last? If so, you should use Long_Name <- underscore. The emu will remove the _ character when it displays back.

Topgun1969
07-21-2007, 04:17 PM
I keep updating to the newer binaries and the distillates still don't work, i take they are still not working?

inkubus
07-25-2007, 03:35 PM
What do you mean, "Long Names"? Like first and last? If so, you should use Long_Name <- underscore. The emu will remove the _ character when it displays back.

I mean names like A_Really_Long_Named_Npc.

gernblan
09-01-2007, 07:12 AM
For one thing, once you create an NPC, you must zone out and back in (or restart the zone) before you can do anything else, such as edit or dbspawn it's ID and add more spawnpoints.

Restarting the zone isn't optional.