KiriX
07.11.2010, 16:14
Скрипт для квеста Большой костяной червь (http://ru.wowhead.com/quest=10930)
Index: scripts/world/spell_scripts.cpp
================================================== =================
--- scripts/world/spell_scripts.cpp (revision 1863)
+++ scripts/world/spell_scripts.cpp (working copy)
@@ -252,6 +252,13 @@
SAY_BLESS_3 = -1000596,
SAY_BLESS_4 = -1000597,
SAY_BLESS_5 = -1000598,
+
+ // quest "The Big Bone Worm" 10930
+ SPELL_FUMPING = 39246,
+ SPELL_SUMMON_HAISHULUD = 39248,
+ NPC_DECREPIT_CLEFTHOOF = 22105,
+ NPC_SAND_GNOME = 22483,
+ NPC_MATURE_BONE_SIFTER = 22482,
};
bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply)
@@ -671,6 +678,44 @@
return true;
}
+ case SPELL_FUMPING:
+ {
+ if (uiEffIndex == EFFECT_INDEX_2)
+ {
+ if (pCreatureTarget->GetEntry() != NPC_DECREPIT_CLEFTHOOF || !pCreatureTarget->isDead())
+ return true;
+
+ switch(urand(1,3))
+ {
+ case 1:
+ {
+ pCaster->CastSpell(pCreatureTarget, SPELL_SUMMON_HAISHULUD, true);
+ pCreatureTarget->ForcedDespawn();
+ break;
+ }
+ case 2:
+ {
+ if (Creature* pOther1 = pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ pOther1->AI()->AttackStart(pCaster);
+ pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCreatureTarget->ForcedDespawn();
+ break;
+ }
+ case 3:
+ {
+ if (Creature* pOther2 = pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ pOther2->AI()->AttackStart(pCaster);
+ pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCreatureTarget->ForcedDespawn();
+ break;
+ }
+ }
+ return true;
+ }
+ return true;
+ }
}
return false;
+ SQL
DELETE FROM `spell_script_target` WHERE `entry`='39248';
INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('39248', '2', '22105');
UPDATE `creature_template` SET `ScriptName`='spell_dummy_npc' WHERE (`entry`='22105');
UPDATE `creature_template` SET `lootid` = '0' WHERE `entry` =22483;
DELETE FROM `creature_loot_template` WHERE `entry` = 22483;
DELETE FROM `creature` WHERE `id` = 22483;
DELETE FROM `creature` WHERE `id` = 22482;
Немного смущает способ вызова 3-х мобов, может есть какой-то более изящный способ?
virusav - помогай =) И ты ведь там с девами СД2 связываешь - можешь кинуть им скриптик...
Index: scripts/world/spell_scripts.cpp
================================================== =================
--- scripts/world/spell_scripts.cpp (revision 1863)
+++ scripts/world/spell_scripts.cpp (working copy)
@@ -252,6 +252,13 @@
SAY_BLESS_3 = -1000596,
SAY_BLESS_4 = -1000597,
SAY_BLESS_5 = -1000598,
+
+ // quest "The Big Bone Worm" 10930
+ SPELL_FUMPING = 39246,
+ SPELL_SUMMON_HAISHULUD = 39248,
+ NPC_DECREPIT_CLEFTHOOF = 22105,
+ NPC_SAND_GNOME = 22483,
+ NPC_MATURE_BONE_SIFTER = 22482,
};
bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply)
@@ -671,6 +678,44 @@
return true;
}
+ case SPELL_FUMPING:
+ {
+ if (uiEffIndex == EFFECT_INDEX_2)
+ {
+ if (pCreatureTarget->GetEntry() != NPC_DECREPIT_CLEFTHOOF || !pCreatureTarget->isDead())
+ return true;
+
+ switch(urand(1,3))
+ {
+ case 1:
+ {
+ pCaster->CastSpell(pCreatureTarget, SPELL_SUMMON_HAISHULUD, true);
+ pCreatureTarget->ForcedDespawn();
+ break;
+ }
+ case 2:
+ {
+ if (Creature* pOther1 = pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ pOther1->AI()->AttackStart(pCaster);
+ pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCreatureTarget->ForcedDespawn();
+ break;
+ }
+ case 3:
+ {
+ if (Creature* pOther2 = pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ pOther2->AI()->AttackStart(pCaster);
+ pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ pCreatureTarget->ForcedDespawn();
+ break;
+ }
+ }
+ return true;
+ }
+ return true;
+ }
}
return false;
+ SQL
DELETE FROM `spell_script_target` WHERE `entry`='39248';
INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('39248', '2', '22105');
UPDATE `creature_template` SET `ScriptName`='spell_dummy_npc' WHERE (`entry`='22105');
UPDATE `creature_template` SET `lootid` = '0' WHERE `entry` =22483;
DELETE FROM `creature_loot_template` WHERE `entry` = 22483;
DELETE FROM `creature` WHERE `id` = 22483;
DELETE FROM `creature` WHERE `id` = 22482;
Немного смущает способ вызова 3-х мобов, может есть какой-то более изящный способ?
virusav - помогай =) И ты ведь там с девами СД2 связываешь - можешь кинуть им скриптик...