Hi, I've been working on a quest that when you kill one specific mob, it spawns a NPC.
Well, spawn the NPC was easy, but i can't despawn him
I thing that maybe because they are in diferent "prepositions, 'when'..." maybe the purge command can not recognize/link to the summon code or the summoned mob.
Here is my quest.
PS* the Hi! menssage is just to "see" time limit.
quest portal_to_forest begin
state start begin
when 6405.kill begin
local x = (pc.get_local_x())
local y = (pc.get_local_y())
mob.spawn(9020 , x , y , 1)
timer("timing", 5)
end
when timing.timer begin
notice_all("Hi!")
npc.purge()
end
end
end
I've already tried the following commands:
npc.purge(9020 , x , y , 1)
mob.spawn(9020 , x , y , -1) (I know but maybe it could work...)
npc.kill()
npc.kill(9020 , x , y , 1)