Page 1 of 1

KillSpawn() Repops

Posted: Mon Jan 12, 2009 11:10 am
by Scatman
When using KillSpawn(), does the spawn that was killed repop? Doing the burn tent and destroy totem quests, I use KillSpawn() in the spell scripts to kill the tent and totem to get the quest updates. I've been sitting here for over 5 minutes, but no repops yet.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 11:36 am
by John Adams
All the current Tess spawns are set to 300 seconds (5 minutes) respawn timer, except those few we have adjusted to 30 seconds. So it they are not respawning, chances are this is a bug just not letting World know to start counting for that spawn.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 11:52 am
by Scatman
I set the totems to 30 second respawn time to make sure I was waiting long enough, and it's been well over 2 minutes now with no repop.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 3:35 pm
by LethalEncounter
Yes KillSpawn makes the spawns respawn normally. Check the spawn details. I have a feeling the respawn time isnt what you want.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 3:46 pm
by Scatman
It's not :) Using /spawn details with respawn set to 30 in the zonespawns table, the reported repsawn is 0(sec). Using 300000 in the zonespawn table, /spawn details still reports a 0(sec) respawn time.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:11 pm
by LethalEncounter
Ahh, this is for a Non-NPC spawn. Currently only the NPCs have respawn times. I'll add it to other spawns as well.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:14 pm
by Scatman
Oops, I guess I should've told you that they were objects in the beginning :P

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:20 pm
by LethalEncounter
Heh my fault, guess I should have realized since you were talking about a tent :P Anyways, I checked the changes in.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:22 pm
by John Adams
Haha taught him everything I know!

Hopefully Scat has already brought up the thing about objects and appearances, otherwise I guess I will. And you KNOW how much LE likes getting info from me.........

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:25 pm
by LethalEncounter
Object appearances?

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:28 pm
by John Adams
Yup. See, since the only way to get a spawn to react to things like 'burn tent' or "Help Down" is that they are Objects, we have a short, black hobbit stuck up in a tree in Queen's Colony that cannot be any other color or appearance than 0,0,0.

So what's easier... allowing all spawns to be interactable with the cast bar/spell thingy, or inventing a way to assign appearances to NPC-like objects?

;)

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 4:35 pm
by Scatman
Oops, I totally forgot, sorry. Yeah we ran into a problem with a poor halflling stuck in the tree on the Queen's Colony. We originally set him as an NPC but then the "Help Down" command spell would not cast. The right-click menu would open, but no cast. Once John changed him back to an Object, it cast fine. We were hoping we could leave him as an object when stuck in the tree, and then despawn and respawn him as an NPC on the ground with a quest feather and dialog and such. Only problem is, he is the wrong color because he's an object, I guess because objects have no appearances?

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 5:49 pm
by LethalEncounter
John Adams wrote:Yup. See, since the only way to get a spawn to react to things like 'burn tent' or "Help Down" is that they are Objects, we have a short, black hobbit stuck up in a tree in Queen's Colony that cannot be any other color or appearance than 0,0,0.

So what's easier... allowing all spawns to be interactable with the cast bar/spell thingy, or inventing a way to assign appearances to NPC-like objects?

;)

Ahh I see the point to your madness :P Allowing you to cast spells from NPCs will actually be easier for me if you guys are fine with that? What I can do is if the command given via the right click menu doesn't have a handler (like the / commands), then I can attempt to call the spell if found

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 6:04 pm
by LethalEncounter
I went ahead and implemented as follows. If the spawn is an NPC and a player clicks the right click menu command (or clicks it for it's default command) the following checks occur:

1. It tries to use the command as if the player tried the command themselves (ie as an ordinary / command).
2. If the slash command doesnt exist it tries to locate a spell by the command name.
3. If the spell doesn't exist and the NPC has a spawn script associated to it, it tries to call the function name as specified by the command name. This didn't exist for the old implementation, but I'll add the functionality to it as well. The parameters it passes the function are the Spawn and the Player that clicked the command.

I am about to check it in if you wanted to try it out.

Re: KillSpawn() Repops

Posted: Mon Jan 12, 2009 7:52 pm
by John Adams
Sure, that sounds good. I will grab the new code and put the Qeynosian Scout back to an NPC for Scat to play with.

Thanks, LE.