DB/Creature: Coosh'coosh to SAI

This commit is contained in:
Andrew Letson
2017-11-01 14:56:34 -04:00
committed by Aokromes
parent 4ddb901c36
commit 7822f058b0
2 changed files with 27 additions and 88 deletions

View File

@@ -0,0 +1,26 @@
-- Coosh'coosh
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 18586;
UPDATE `creature` SET `MovementType` = 1, `spawndist` = 8 WHERE `id` = 18586;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 18586;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(18586, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 3000, 3000, 11, 9532, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - In Combat - Cast \'Lightning Bolt\''),
(18586, 0, 1, 2, 62, 0, 100, 0, 7730, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Close Gossip'),
(18586, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 2, 45, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Set Faction Ogre'),
(18586, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Say Line 0'),
(18586, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Gossip Option 0 Selected - Start Attacking'),
(18586, 0, 5, 0, 25, 0, 100, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Reset - Set Default Faction'),
(18586, 0, 6, 0, 23, 0, 100, 0, 12550, 0, 2000, 2000, 11, 12550, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Coosh\'coosh - On Missing Buff - Cast Lightning Shield');
DELETE FROM `gossip_menu_option` WHERE `MenuID` = 7730;
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
(7730, 0, 0, 'I have been sent by Sal\'salabim to collect a debt that you owe. Pay up or I\'m going to have to hurt you.', 15560, 1, 1, 0, 0, 0, 0, '', 0, 0);
DELETE FROM `creature_text` WHERE `CreatureID` = 18586;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextID`, `TextRange`, `comment`) VALUES
(18586, 0, 0, 'F\'woooroonn! Coosh\'coosh pay nothing! Die!', 12, 0, 100, 0, 0, 0, 15565, 0, 'Coosh\'coosh');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7730;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 7730, 0, 0, 0, 9, 0, 10009, 0, 0, 0, 0, 0, '', 'Show gossip menu 7730 option id 0 if quest Crackin\' Some Skulls has been taken.');

View File

@@ -19,13 +19,12 @@
/* ScriptData
SDName: Zangarmarsh
SD%Complete: 100
SDComment: Quest support: 9752, 9785, 10009. Mark Of ... buffs.
SDComment: Quest support: 9752, 9785, Mark Of ... buffs.
SDCategory: Zangarmarsh
EndScriptData */
/* ContentData
npcs_ashyen_and_keleth
npc_cooshcoosh
npc_kayra_longmane
EndContentData */
@@ -155,91 +154,6 @@ public:
}
};
/*######
## npc_cooshcoosh
######*/
#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!"
enum Cooshhooosh
{
SPELL_LIGHTNING_BOLT = 9532,
QUEST_CRACK_SKULLS = 10009
};
class npc_cooshcoosh : public CreatureScript
{
public:
npc_cooshcoosh() : CreatureScript("npc_cooshcoosh") { }
struct npc_cooshcooshAI : public ScriptedAI
{
npc_cooshcooshAI(Creature* creature) : ScriptedAI(creature)
{
m_uiNormFaction = creature->GetFaction();
Initialize();
}
void Initialize()
{
LightningBolt_Timer = 2000;
}
uint32 m_uiNormFaction;
uint32 LightningBolt_Timer;
void Reset() override
{
Initialize();
if (me->GetFaction() != m_uiNormFaction)
me->SetFaction(m_uiNormFaction);
}
void EnterCombat(Unit* /*who*/) override { }
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
if (LightningBolt_Timer <= diff)
{
DoCastVictim(SPELL_LIGHTNING_BOLT);
LightningBolt_Timer = 5000;
} else LightningBolt_Timer -= diff;
DoMeleeAttackIfReady();
}
bool GossipHello(Player* player) override
{
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
SendGossipMenuFor(player, 9441, me->GetGUID());
return true;
}
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
{
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
ClearGossipMenuFor(player);
if (action == GOSSIP_ACTION_INFO_DEF)
{
CloseGossipMenuFor(player);
me->SetFaction(FACTION_OGRE);
AttackStart(player);
}
return true;
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_cooshcooshAI(creature);
}
};
/*######
## npc_kayra_longmane
######*/
@@ -322,6 +236,5 @@ public:
void AddSC_zangarmarsh()
{
new npcs_ashyen_and_keleth();
new npc_cooshcoosh();
new npc_kayra_longmane();
}