Public feed
#603048
/* Copyright (C) 2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../sc_defines.h"
//based on miner script
//THIS SCRIPT IS UNDER DEVELOPMENT
struct MANGOS_DLL_DECL thomas_milleAI : public ScriptedAI
{
thomas_milleAI(Creature *c) : ScriptedAI(c) {EnterEvadeMode();
}
void EnterEvadeMode()
{
m_creature->RemoveAllAuras();
m_creature->DeleteThreatList();
m_creature->CombatStop();
DoGoHome();
}
};
void UpdateAI(const uint32 diff, uint32 Shout_Timer, Creature *_Creature)
{
// Add shout once every 30 mins here
if (Shout_Timer < diff)
{
_Creature->Yell("Fresh Bread for Sale, Get it while its hot.", LANG_UNIVERSAL, NULL);
Shout_Timer = 1800000;
}else Shout_Timer -= diff;
}
CreatureAI* GetAI_thomas_mille(Creature *_Creature)
{
return new thomas_milleAI (_Creature);
}
void AddSC_thomas_mille()
{
Script *newscript;
newscript = new Script;
newscript->Name="thomas_mille";
newscript->GetAI = GetAI_thomas_mille;
m_scripts[nrscripts++] = newscript;
}