aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/world
diff options
context:
space:
mode:
authorQAston <>2010-02-20 20:28:31 +0100
committerQAston <>2010-02-20 20:28:31 +0100
commit2e3f89b61fa33e83b8f70702777549e25e5fc481 (patch)
tree904060daaf9fb782a20e5b2aea3e9febe813de65 /src/scripts/world
parent4cd4c4170f70a0715daad52b2f1831b6017d647a (diff)
parent8e146c309de73160252ae538689d28660273d459 (diff)
*Move summon water elemental handler to correct place.
--HG-- branch : trunk
Diffstat (limited to 'src/scripts/world')
-rw-r--r--src/scripts/world/go_scripts.cpp29
-rw-r--r--src/scripts/world/item_scripts.cpp75
2 files changed, 104 insertions, 0 deletions
diff --git a/src/scripts/world/go_scripts.cpp b/src/scripts/world/go_scripts.cpp
index cd71124c4f5..ee75698ddf6 100644
--- a/src/scripts/world/go_scripts.cpp
+++ b/src/scripts/world/go_scripts.cpp
@@ -736,6 +736,30 @@ bool GOHello_go_soulwell(Player *pPlayer, GameObject* pGO)
return true;
}
+/*######
+## Quest 11560: Oh Noes, the Tadpoles!
+## go_tadpole_cage
+######*/
+
+enum eTadpoles
+{
+ QUEST_OH_NOES_THE_TADPOLES = 11560,
+ NPC_WINTERFIN_TADPOLE = 25201
+};
+
+bool GOHello_go_tadpole_cage(Player *pPlayer, GameObject *pGO)
+{
+ Creature *pTadpole;
+ if (pPlayer->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE &&
+ (pTadpole = pGO->FindNearestCreature(NPC_WINTERFIN_TADPOLE,1.0f)))
+ {
+ pGO->UseDoorOrButton();
+ pTadpole->DisappearAndDie();
+ pPlayer->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE,0);
+ //FIX: Summon minion tadpole
+ }
+ return true;
+}
void AddSC_go_scripts()
{
@@ -891,4 +915,9 @@ void AddSC_go_scripts()
newscript->Name = "go_soulwell";
newscript->pGOHello = &GOHello_go_soulwell;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_tadpole_cage";
+ newscript->pGOHello = &GOHello_go_tadpole_cage;
+ newscript->RegisterSelf();
}
diff --git a/src/scripts/world/item_scripts.cpp b/src/scripts/world/item_scripts.cpp
index 658ee379fdf..6787e8df303 100644
--- a/src/scripts/world/item_scripts.cpp
+++ b/src/scripts/world/item_scripts.cpp
@@ -316,6 +316,76 @@ bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const Spell
return false;
}
+/*######
+# item_dehta_trap_smasher
+# For quest 11876, Help Those That Cannot Help Themselves
+######*/
+enum eHelpThemselves
+{
+ QUEST_CANNOT_HELP_THEMSELVES = 11876,
+ NPC_TRAPPED_MAMMOTH_CALF = 25850,
+ GO_MAMMOTH_TRAP_1 = 188022,
+ GO_MAMMOTH_TRAP_2 = 188024,
+ GO_MAMMOTH_TRAP_3 = 188025,
+ GO_MAMMOTH_TRAP_4 = 188026,
+ GO_MAMMOTH_TRAP_5 = 188027,
+ GO_MAMMOTH_TRAP_6 = 188028,
+ GO_MAMMOTH_TRAP_7 = 188029,
+ GO_MAMMOTH_TRAP_8 = 188030,
+ GO_MAMMOTH_TRAP_9 = 188031,
+ GO_MAMMOTH_TRAP_10 = 188032,
+ GO_MAMMOTH_TRAP_11 = 188033,
+ GO_MAMMOTH_TRAP_12 = 188034,
+ GO_MAMMOTH_TRAP_13 = 188035,
+ GO_MAMMOTH_TRAP_14 = 188036,
+ GO_MAMMOTH_TRAP_15 = 188037,
+ GO_MAMMOTH_TRAP_16 = 188038,
+ GO_MAMMOTH_TRAP_17 = 188039,
+ GO_MAMMOTH_TRAP_18 = 188040,
+ GO_MAMMOTH_TRAP_19 = 188041,
+ GO_MAMMOTH_TRAP_20 = 188042,
+ GO_MAMMOTH_TRAP_21 = 188043,
+ GO_MAMMOTH_TRAP_22 = 188044,
+};
+
+bool ItemUse_item_dehta_trap_smasher(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
+{
+ Creature* pMammoth;
+ GameObject* pTrap;
+
+ if (pPlayer->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) == QUEST_STATUS_INCOMPLETE &&
+ (pMammoth = pPlayer->FindNearestCreature(NPC_TRAPPED_MAMMOTH_CALF,5.0f)) &&
+ ((pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_1,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_2,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_3,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_4,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_5,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_6,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_7,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_8,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_9,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_10,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_11,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_12,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_13,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_14,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_15,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_16,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_17,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_18,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_19,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_20,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_21,5.0f)) ||
+ (pTrap = pPlayer->FindNearestGameObject(GO_MAMMOTH_TRAP_22,5.0f))))
+ {
+ pMammoth->AI()->DoAction(1);
+ pTrap->SetGoState(GO_STATE_READY);
+ pPlayer->KilledMonsterCredit(NPC_TRAPPED_MAMMOTH_CALF,0);
+ }
+
+ return false;
+}
+
void AddSC_item_scripts()
{
Script *newscript;
@@ -374,4 +444,9 @@ void AddSC_item_scripts()
newscript->Name = "item_petrov_cluster_bombs";
newscript->pItemUse = &ItemUse_item_petrov_cluster_bombs;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "item_dehta_trap_smasher";
+ newscript->pItemUse = &ItemUse_item_dehta_trap_smasher;
+ newscript->RegisterSelf();
}