*GO Script: Zul'Farrak Shallow Grave, by totoro
--HG-- branch : trunk
This commit is contained in:
@@ -38,7 +38,7 @@ EndContentData */
|
||||
#define SPELL_SHIELD_BASH 11972
|
||||
#define SPELL_REVENGE 12170
|
||||
|
||||
#define GOSSIP_BLY "[PH] In that case, i will take my reward!"
|
||||
#define GOSSIP_BLY "[PH] In that case, I will take my reward!"
|
||||
|
||||
struct TRINITY_DLL_DECL npc_sergeant_blyAI : public ScriptedAI
|
||||
{
|
||||
@@ -202,6 +202,32 @@ bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature, uin
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## go_shallow_grave
|
||||
######*/
|
||||
|
||||
enum {
|
||||
ZOMBIE = 7286,
|
||||
DEAD_HERO = 7276,
|
||||
ZOMBIE_CHANCE = 65,
|
||||
DEAD_HERO_CHANCE = 10
|
||||
};
|
||||
|
||||
bool GOHello_go_shallow_grave(Player* pPlayer, GameObject* pGo)
|
||||
{
|
||||
// randomly summon a zombie or dead hero the first time a grave is used
|
||||
if (pGo->GetUseCount() == 0)
|
||||
{
|
||||
uint32 randomchance = urand(0,100);
|
||||
if (randomchance < ZOMBIE_CHANCE)
|
||||
pGo->SummonCreature(ZOMBIE, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
else if ((randomchance-ZOMBIE_CHANCE) < DEAD_HERO_CHANCE)
|
||||
pGo->SummonCreature(DEAD_HERO, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
}
|
||||
pGo->AddUse();
|
||||
return false;
|
||||
}
|
||||
|
||||
void AddSC_zulfarrak()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -219,5 +245,9 @@ void AddSC_zulfarrak()
|
||||
newscript->pGossipHello = &GossipHello_npc_weegli_blastfuse;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="go_shallow_grave";
|
||||
newscript->pGOHello = &GOHello_go_shallow_grave;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user