Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 1.52 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class item_the_bundle_of_bloodthistle : public ItemScript
  2. {
  3. public:
  4.     item_the_bundle_of_bloodthistle() : ItemScript("item_the_bundle_of_bloodthistle") { }
  5.  
  6.     bool OnUse(Player* player, Item *pItem, SpellCastTargets const& targets)
  7.     {
  8.  
  9.         if (player->GetQuestStatus(10570) == QUEST_STATUS_INCOMPLETE)
  10.         {
  11.             if (player){
  12.                 Creature *Icarius = player->SummonCreature(21409, player->GetPositionX() + 5 , player->GetPositionY() - 63, player->GetPositionZ() - 6, player->GetAngle(player) - 180 , TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000);
  13.                 Creature *Zarath = player->SummonCreature(21410, player->GetPositionX() + 5 , player->GetPositionY() - 60, player->GetPositionZ() - 6, player->GetAngle(player) - 180, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000);
  14.  
  15.                 if (Zarath && Icarius){
  16.                      Icarius->GetMotionMaster()->MovePoint(0,player->GetPositionX() + 3 ,player->GetPositionY() - 10 ,player->GetPositionZ());
  17.                      Icarius->SetHomePosition(player->GetPositionX() + 3 ,player->GetPositionY() - 10 ,player->GetPositionZ(), player->GetOrientation());
  18.                      Zarath->GetMotionMaster()->MovePoint(0,player->GetPositionX() + 1 ,player->GetPositionY() - 8 ,player->GetPositionZ());
  19.                      Zarath->SetHomePosition(player->GetPositionX() + 1 ,player->GetPositionY() - 8 ,player->GetPositionZ(), player->GetOrientation());
  20.                 }
  21.             }
  22.             return false;
  23.         }
  24.         return true;
  25.     }
  26. };