View Full Version : [SOLVED] Spawn mob on quest accept - only once in a lifetime.

04-19-2015, 01:20 PM
Hey guys,

so im wondering, would it be possible to spawn a creature when a quest is being accepted, only ONCE, allowing the npc the be permanent?

For example, im using my script:

function AcceptQuest(event, player, creature, quest)
if (quest:GetId() == QUESTID) then
creature:SpawnCreature(CreatureID, X, Y, Z, O, 8, 0) -- CreatureID, x, y, z, o, TEMPSUMMON, despawntimer

RegisterCreatureEvent(entryofnpc, 31, AcceptQuest)

To spawn NPC x on coords x, but I want it to ignore the feature if NPC is present on coords X with Id x.

Anyone got any idea? :)


04-19-2015, 03:08 PM
Stop redefining x mid sentence. x is NPC, coordinates and an ID :|

You could make this probably by using the global PerformIngameSpawn function and before using it, check if you can find a creature with the same entry nearby.


Why would you want this though?
Essentially the script is useless after anyone has started the quest once.

04-19-2015, 03:22 PM
Thanks, going to look into that. And I want this to create a zone like Isle of Quel'Danas, where people had to do a tons of quests to unlock different stages of the area.