Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. local waterpos = {
  2. Position({x = 33282, y = 31036, z = 10}),
  3. Position({x = 33282, y = 31037, z = 10}),
  4. Position({x = 33283, y = 31037, z = 10}),
  5. Position({x = 33283, y = 31036, z = 10}),
  6. Position({x = 33283, y = 31038, z = 10}),
  7. Position({x = 33283, y = 31035, z = 10})
  8. }
  9.  
  10. local function revertWater(position)
  11. local waterTile = Tile(position):getItemById(11030)
  12. if waterTile then
  13. waterTile:transform(11450)
  14. end
  15. end
  16.  
  17.  
  18. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
  19. local player = Player(player)
  20. -- clay with the sacred earth
  21. if (item.itemid == 12285 and target.itemid == 12297) or (item.itemid == 12297 and target.itemid == 12285) then
  22. player:say("You carefully mix the clay with the sacred earth.", TALKTYPE_MONSTER_SAY)
  23. Item(item.uid):remove()
  24. Item(target.uid):remove()
  25. player:addItem(12300, 1)
  26. -- sacred clay
  27. elseif item.itemid == 12300 and target.itemid == 12287 then
  28. player:say("You carefully coat the inside of the wooden bowl with the sacred clay.", TALKTYPE_MONSTER_SAY)
  29. Item(target.uid):remove()
  30. Item(item.uid):transform(12303)
  31. -- sacred bowl of purification
  32. elseif item.itemid == 12303 and target.itemid == 11450 then
  33. player:say("Filling the corrupted water into the sacred bowl completly purifies the fluid.", TALKTYPE_MONSTER_SAY)
  34. Item(item.uid):transform(12289)
  35. -- bowl with sacred water
  36. elseif item.itemid == 12289 and target.itemid == 12301 then
  37. Item(item.uid):transform(12290)
  38. toPosition:sendMagicEffect(CONST_ME_POFF)
  39. -- sacred coal
  40. elseif item.itemid == 12290 and target.actionid == 8025 then
  41. player:say("As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_MONSTER_SAY)
  42. Item(item.uid):remove()
  43. if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 4 then
  44. player:setStorageValue(Storage.WrathoftheEmperor.Questline, 5)
  45. player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 2) --Questlog, Wrath of the Emperor "Mission 02: First Contact"
  46. end
  47. for i = 1, 4 do
  48. waterpos[i]:sendMagicEffect(CONST_ME_GREEN_RINGS)
  49. end
  50. for i = 1, 6 do
  51. Tile(waterpos[i]):getItemById(11450):transform(11030)
  52. addEvent(revertWater, 60 * 1000, waterpos[i])
  53. end
  54. end
  55. return true
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement