-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts scripted tarindrella #161
base: master
Are you sure you want to change the base?
Changes from all commits
3d7b6e6
c4f28a7
140f814
2ec7465
58d2d52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE `creature_template` SET `ScriptName`='npc_tarindrella' WHERE `entry`=49480; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,124 @@ EndContentData */ | |
#include "ScriptedFollowerAI.h" | ||
#include "Player.h" | ||
|
||
/*#### | ||
# npc_tarindrella | ||
####*/ | ||
|
||
enum VileTouch | ||
{ | ||
QUEST_VILE_TOUCH = 28727, | ||
|
||
EVENT_CLEANSE_SPIRIT = 1, | ||
EVENT_ENTANGLING_ROOTS = 2, | ||
EVENT_SUMMON_NATURES_BITE = 3, | ||
|
||
SPELL_ENTANGLING_ROOTS = 33844, | ||
SPELL_SUMMON_NATURES_BITE = 92573, | ||
SPELL_CLEANSE_SPIRIT = 66056 | ||
|
||
}; | ||
#define TARINDRELLA_TEXT_ON_COMPLETE "This totem has been corrupting the eggs! It seems a greater threat looms. The Gnarlpine remain tainted by something most foul." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to Creature Text There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #define TARINDRELLA_CREATURE_TEXT_ON_COMPLETE "This totem has been corrupting the eggs! It seems a greater threat looms. The Gnarlpine remain tainted by something most foul." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. creature text non exist in broadcast_text,seems wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to video,This script seems wrong. |
||
#define TARINDRELLA_TEXT_SPAWN "You've come to help, $c? Let us stay together for a while." | ||
#define TARINDRELLA_TEXT_ON_KILL "My dear friends... I'm so sorry..." | ||
class npc_tarindrella : public CreatureScript | ||
{ | ||
public: | ||
npc_tarindrella() : CreatureScript("npc_tarindrella") { } | ||
bool OnQuestComplete(Player* player, Creature* creature, Quest const* quest) OVERRIDE | ||
{ | ||
if (player->GetQuestStatus(QUEST_VILE_TOUCH) == QUEST_STATUS_COMPLETE) | ||
creature->MonsterSay(TARINDRELLA_TEXT_ON_COMPLETE, Language::LANG_UNIVERSAL, player); | ||
return true; | ||
} | ||
bool OnQuestReward(Player * player, Creature * creature, Quest const* quest, uint32 /*opt*/) OVERRIDE | ||
{ | ||
if (player->GetQuestStatus(QUEST_VILE_TOUCH) == QUEST_STATUS_REWARDED) | ||
creature->DespawnOrUnsummon(); | ||
return true; | ||
} | ||
struct npc_tarindrellaAI : public FollowerAI | ||
{ | ||
npc_tarindrellaAI(Creature* creature) : FollowerAI(creature) { } | ||
|
||
void MoveInLineOfSight(Unit* who) OVERRIDE | ||
{ | ||
FollowerAI::MoveInLineOfSight(who); | ||
} | ||
|
||
void IsSummonedBy(Unit* unit) OVERRIDE | ||
{ | ||
me->MonsterSay(TARINDRELLA_TEXT_SPAWN, Language::LANG_UNIVERSAL, unit); | ||
} | ||
|
||
void KilledUnit(Unit* /*victim*/) OVERRIDE | ||
{ | ||
me->MonsterSay(TARINDRELLA_TEXT_ON_KILL, Language::LANG_UNIVERSAL, me->GetOwner()); | ||
} | ||
|
||
void Reset() OVERRIDE | ||
{ | ||
events.ScheduleEvent(EVENT_ENTANGLING_ROOTS, 2000); | ||
events.ScheduleEvent(EVENT_SUMMON_NATURES_BITE, 6000); | ||
events.ScheduleEvent(EVENT_CLEANSE_SPIRIT, 10000); | ||
} | ||
|
||
void UpdateFollowerAI(const uint32 diff) OVERRIDE | ||
{ | ||
if (!UpdateVictim()) | ||
return; | ||
|
||
events.Update(diff); | ||
|
||
while (uint32 eventId = events.ExecuteEvent()) | ||
{ | ||
switch (eventId) | ||
{ | ||
case EVENT_ENTANGLING_ROOTS: | ||
{ | ||
DoCast(me->GetVictim(), SPELL_ENTANGLING_ROOTS); | ||
events.ScheduleEvent(EVENT_ENTANGLING_ROOTS, 10000); | ||
break; | ||
} | ||
case EVENT_CLEANSE_SPIRIT: | ||
{ | ||
if (me->HasAura(6751)) | ||
{ | ||
DoCast(me, SPELL_ENTANGLING_ROOTS); | ||
events.ScheduleEvent(EVENT_CLEANSE_SPIRIT, 10000); | ||
} | ||
else if (me->GetOwner()->HasAura(6751)) | ||
{ | ||
DoCast(me->GetOwner(), SPELL_ENTANGLING_ROOTS); | ||
events.ScheduleEvent(EVENT_CLEANSE_SPIRIT, 10000); | ||
} | ||
else | ||
{ | ||
events.ScheduleEvent(EVENT_CLEANSE_SPIRIT, 10000); | ||
} | ||
break; | ||
} | ||
case EVENT_SUMMON_NATURES_BITE: | ||
{ | ||
DoCast(me->GetVictim(), SPELL_SUMMON_NATURES_BITE); | ||
events.ScheduleEvent(EVENT_SUMMON_NATURES_BITE, 10000); | ||
break; | ||
} | ||
default: | ||
break; | ||
} | ||
} | ||
DoMeleeAttackIfReady(); | ||
} | ||
EventMap events; | ||
}; | ||
|
||
CreatureAI* GetAI(Creature* creature) const OVERRIDE | ||
{ | ||
return new npc_tarindrellaAI(creature); | ||
} | ||
}; | ||
|
||
/*#### | ||
# npc_mist | ||
####*/ | ||
|
@@ -130,6 +248,7 @@ class at_barrow_den_door : public AreaTriggerScript | |
|
||
void AddSC_teldrassil() | ||
{ | ||
new npc_tarindrella(); | ||
new npc_mist(); | ||
new at_barrow_den_door(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Her two quests show in video after 4.0.3 is different from this script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing to add code script cpp for this