I know, I suck at Lua, rofl. This worked. They're all channeling this spell on me. Now what do we do?
P.S. Thank you for your patience and help. If I could rep you more, I would.
I know, I suck at Lua, rofl. This worked. They're all channeling this spell on me. Now what do we do?
P.S. Thank you for your patience and help. If I could rep you more, I would.
Ok, so we know everything works fine. That means we just need to fix the target.
Try this script:
Change the 50 to the npcid of the person being channeled at.Code:local target = nil -- Do not touch this local npcid_channeler = 91011 -- This is the id of the person who will be channeling local npcid_target = 50 -- Change this to the id of the person you want to channel onto function NPCCHANNEL(pUnit, Event) pUnit:RegisterEvent("Check_For_Target_zzz", 2500, 0) end function Check_For_Target_zzz(pUnit) if target ~= nil then pUnit:ChannelSpell(47855, target) pUnit:RemoveEvents() end end RegisterUnitEvent(npcid_channeler, 18, "NPCCHANNEL") function target_on_load(pUnit, Event) target = pUnit end RegisterUnitEvent(npcid_target, 18, "target_on_load")That should work.
Alright. Changing and loading. 1 minute.
---------- Post added at 03:25 PM ---------- Previous post was at 03:14 PM ----------
AMG, it works. Thank you so very much lol.
Final Outcome:
You know... I could use someone with your skills for my server... Hehe
Glad to see it works.
The reason it was working before is because, I assume, the creature was trying to channel the spell before it had properly spawned. This is why most people tend to register another event on spawn to happen in a second or two, so that it has a chance to load properly.
Oh I see. Sounds similar to my NPCs not staying on custom objects, because they load quicker than the object itself.
I love the new, .npc ongameobject 1
Lol. Interested in a Dev position? I could really use one.
I'm afraid I'm busy on a variety of projects/servers already.
Take a look at: http://www.mmowned.com/forums/world-...nt-thread.html