i saw that gnome in ironforge and i was wonder could i make npcs yell like that? anyway to do that? if so how?
i saw that gnome in ironforge and i was wonder could i make npcs yell like that? anyway to do that? if so how?
.npc yell blah blah blah.
or is it .yell blah blah blah
One of those should work.
no i mean how in ironforge the npc walks around and yells stuff without the use of commands
If you make a dll script like this:
he'd yell the message every 30 seconds.Code:class randomnpc : public CreatureAIScript { public: ADD_CREATURE_FACTORY_FUNCTION(randomnpc); randomnpc(Creature* pCreature) : CreatureAIScript(pCreature) { RegisterAIUpdateEvent(30000); } void AIUpdate() { _unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "I like to say random things!"); } void OnDied(Unit * randomnpc) { RemoveAIUpdateEvent(); } }; mgr->register_creature_script(npcidhere, &randomnpc::Create);
You could and should do this via other means (database or LUA) but I have DLL on my brain right now =X
Last edited by Spectre90; 01-22-2008 at 03:11 AM.
Or will .lua Scripts, Try this \/ Change the Things in Red
It is hard, might need to Ask Gastric PM him here > Herefunction NpcName_Event (pUnit, Event)
pUnit:SendChatMessage (5, 0, "What you wont your Npc to say")
end
function NpcName_Event (unit, event, miscunit, misc)
print "NpcName_Event initiated"
unit:RegisterEvent("NpcName_Event ",15000,0)
end
RegisterUnitEvent(Npc Spawn ID,1,"NpcName")
Good luck