PDA

Просмотр полной версии : [QUEST=10930] The Big Bone Worm


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 связываешь - можешь кинуть им скриптик...

virusav
07.11.2010, 17:29
Сниффы бы увидеть, тогда можно спокойно внедрять патч, иначе всегда возникает много вопросов на форуме СД2, пока кусок из сниффа не покажешь.

KiriX
07.11.2010, 21:15
Снифами я точно не располагаю...

virusav
13.11.2010, 18:52
Опубликовал 2 варианта патча: твой и мой на основе твоего.
http://www.scriptdev2.com/project.php?issueid=1163

Мой вариант патча:
Index: scripts/world/spell_scripts.cpp
================================================== =================
--- scripts/world/spell_scripts.cpp (revision 1864)
+++ scripts/world/spell_scripts.cpp (working copy)
@@ -34,6 +34,7 @@
spell 50706
spell 45109
spell 45111
+spell 39246
EndContentData */

#include "precompiled.h"
@@ -252,6 +253,12 @@
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_SAND_GNOME = 22483,
+ NPC_MATURE_BONE_SIFTER = 22482,
};

bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply)
@@ -671,6 +678,40 @@

return true;
}
+ case SPELL_FUMPING:
+ {
+ if (uiEffIndex == EFFECT_INDEX_2)
+ {
+ switch(urand(0,2))
+ {
+ case 0:
+ {
+ pCaster->CastSpell(pCreatureTarget, SPELL_SUMMON_HAISHULUD, true);
+ break;
+ }
+ case 1:
+ {
+ for (uint8 i = 0; i<2; ++i)
+ {
+ if (Creature* pSandGnome = pCaster->SummonCreature(NPC_SAND_GNOME, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ pSandGnome->AI()->AttackStart(pCaster);
+ }
+ break;
+ }
+ case 2:
+ {
+ for (uint8 i = 0; i<2; ++i)
+ {
+ if (Creature* pMatureBoneSifter = pCaster->SummonCreature(NPC_MATURE_BONE_SIFTER, pCreatureTarget->GetPositionX(), pCreatureTarget->GetPositionY(), pCreatureTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
+ pMatureBoneSifter->AI()->AttackStart(pCaster);
+ }
+ break;
+ }
+ }
+ pCreatureTarget->ForcedDespawn();
+ }
+ return true;
+ }
}

return false;

virusav
14.11.2010, 11:58
В 1871 принят мой вариант патча.