Advertisement
Rochet2

Untitled

Dec 1st, 2014
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local QuestId_Cluck = 3861
  2. local NpcChicken = 620
  3. local GobIdFarmChickenEgg = 161513
  4.  
  5. function OnQuestReward(event, player, creature, quest)
  6.     -- Quest: Cluck!
  7.     if (quest:GetId() == QuestId_Cluck) then
  8.         -- spawn the cleansed plant
  9.         local x, y = creature:GetRelativePoint(math.random()*9, math.random()*math.pi*2);
  10.         local z = creature:GetMap():GetHeight(x, y) or creature:GetZ()
  11.         creature:SummonGameObject(GobIdFarmChickenEgg, x, y, z, 0, 30);
  12.     end
  13. end
  14.  
  15. RegisterCreatureEvent(NpcChicken, 34, OnQuestReward) -- 34 for creature OnQuestReward event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement