Likes: 0
Results 1 to 2 of 2
Thread: Mutiple Npc(s) Announcer(s)!
-
13-01-09, 02:11 PM #1
Mutiple Npc(s) Announcer(s)!
Register to remove this adHey guys! Well, I'm going to release something cool today! It's going to be a mutiple announcer npc's. Why Npc(s)? Well it's a huge script which you can put alot of npc's to announce at least 4-5 npc's. I will show you how to edit it: NOTE: THE THINGS IN RED YOU NEED TO CHANGE
Code:--[[ -- ]] --NPCNAMEHERE RegisterUnitEvent(Npc Spawn ID, 18, "NPCNAMEHERE") RegisterUnitEvent(Npc Spawn ID, 4, "NPCNAMEHERE_Died") function NPCNAMEHERE_Died(Unit, event, player) Unit:RemoveEvents() end function NPCNAMEHERE(Unit, event, player) Unit:RegisterEvent("NPCNAMEHERE_Say",45000, 0) end function NPCNAMEHERE_Say(Unit, event, player) local chance = math.random(1,3) if(chance == 1) then Unit:SendChatMessage(14, 0, "Text Here(What you want him to say)") end if(chance == 2) then Unit:SendChatMessage(14, 0, "Text Here (What you want him to say)") end if(chance == 3) then Unit:SendChatMessage(14, 0, "Text Here (What you want him to say)") end end --NPCNAMEHERE RegisterUnitEvent(Npc spawn Id, 18, "NPCNAMEHERE") RegisterUnitEvent(Npc Spawn ID, 4, "NPCNAMEHERE_Died") function NPCNAMEHERE_Died(Unit, event, player) Unit:RemoveEvents() end function NPCNAMEHERE(Unit, event, player) Unit:RegisterEvent("NPCNAMEHERE_Say",65000, 0) end function NPCNAMEHERE_Say(Unit, event, player) local chance = math.random(1,3) if(chance == 1) then Unit:SendChatMessage(14, 0, "Text here" ) end if(chance == 2) then Unit:SendChatMessage(12, 0, "Text Here") end if(chance == 3) then Unit:SendChatMessage(12, 0, "Text Here") end end --NPCNAMEHERE RegisterUnitEvent(NPC Spawn ID, 18, "NPCNAMEHERE") RegisterUnitEvent(Npc Spawn ID, 4, "NPCNAMEHERE_Died") function NPCNAMEHERE_Died(Unit, event, player) Unit:RemoveEvents() end function NPCNAMEHERE(Unit, event, player) Unit:RegisterEvent("NPCNAMEHERE_Say",49000, 0) end function NPCNAMEHERE_Say(Unit, event, player) local chance = math.random(1,3) if(chance == 1) then Unit:SendChatMessage(12, 0, "Text HERE") end if(chance == 2) then Unit:SendChatMessage(12, 0, "TEXT HERE") end if(chance == 3) then Unit:SendChatMessage(12, 0, "TEXT HERE") end end --NPCNAMEHERE function NPCNAMEHERE_Died(Unit, event, player) Unit:RemoveEvents() end function NPCNAMEHERE(Unit, event, player) Unit:RegisterEvent("NPCNAMEHERE_Say",28000, 0) end function NPCNAMEHERE_Say(Unit, event, player) local chance = math.random(1,3) if(chance == 1) then Unit:SendChatMessage(12, 0, "NPC TEXT HERE") end if(chance == 2) then Unit:SendChatMessage(12, 0, "NPC TEXT HERE") end if(chance == 3) then Unit:SendChatMessage(12, 0, "NPC TEXT HERE") end end RegisterUnitEvent(NPC SPAWN ID, 18, "NPCNAMEHERE") RegisterUnitEvent(NPC SPAWN ID, 4, "NPCNAMEHERE_Died") --NPCNAMEHERE RegisterUnitEvent(Npc Spawn ID, 18, "NPCNAMEHERE") RegisterUnitEvent(Npc SPAWN ID, 4, "NPCNAMEHERE_Died") function NPCNAMEHERE_Died(Unit, event, player) Unit:RemoveEvents() end function NPCNAMEHERE(Unit, event, player) Unit:RegisterEvent("NPCNAMEHERE_Say",68000, 0) end function NPCNAMEHERE_Say(Unit, event, player) local chance = math.random(1,4) if(chance == 1) then Unit:SendChatMessage(12, 0, "Text here" ) end if(chance == 2) then Unit:SendChatMessage(12, 0, "TEXT HERE") end if(chance == 3) then Unit:SendChatMessage(12, 0, "TEXT HERE") end if(chance == 4) then Unit:SendChatMessage(12, 0, "TEXT HERE") end end --NPCNAMEHERE RegisterUnitEvent(Npc Spawn ID, 18, "NPCNAMEHERE") RegisterUnitEvent(Npc SPAWN ID, 4, "NPCNAMEHERE_Died") function NPCNAMEHERE_Died(Unit, event, player) Unit:RemoveEvents() end function NPCNAMEHERE(Unit, event, player) Unit:RegisterEvent("NPCNAMEHERE_Say",69000, 0) end function NPCNAMEHERE_Say(Unit, event, player) Unit:SendChatMessage(12, 0, "TEXT HERE") end
Now lets say you want to put more text on the npc.
How? Good question, but i will show you! Please read carefully.
Lets say you already have some text like this:
Code:function NPCNAMEHERE_Say(Unit, event, player) local chance = math.random(1,4) if(chance == 1) then Unit:SendChatMessage(12, 0, "Text here" ) end if(chance == 2) then Unit:SendChatMessage(12, 0, "TEXT HERE") end if(chance == 3) then Unit:SendChatMessage(12, 0, "TEXT HERE") end if(chance == 4) then Unit:SendChatMessage(12, 0, "TEXT HERE") end end
Code:local chance = math.random(1,4)
See there is 4 lines of chance == 4 Add another line.
Code:if(chance == 5) then Unit:SendChatMessage(12, 0, "TEXT HERE") end
Code:local chance = math.random(1,5)
Congrats! You have another line of text that the npc will say!
DOWNLOAD LINK:
Filebeam:
http://filebeam.com/98c13526e40a53985570e2f877208f5e
Filefront:
http://files.filefront.com/UNIT+Chat.../fileinfo.html
› See More: Mutiple Npc(s) Announcer(s)!Trinity C++ Event Scriptor, ArcEmu C++ Event Scriptor. I have done countless projects to entertain people, so many nostalgic moments, but the best has soon to come.
-
10-02-09, 01:04 AM #2
Register to remove this adThx using this now!!