Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. local pos = {
  2. {x = 33258, y = 31079, z = 8},
  3. {x = 33259, y = 31089, z = 8},
  4. {x = 33266, y = 31084, z = 8},
  5. {x = 33263, y = 31093, z = 8}
  6. }
  7.  
  8. function doClearMissionArea(fromPos, toPos)
  9. for x = fromPos.x, toPos.x do
  10. for y = fromPos.y, toPos.y do
  11. for z = fromPos.z, toPos.z do
  12. if(getTopCreature({x = x, y = y, z = z}).uid > 0) then
  13. if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
  14. doTeleportThing(getTopCreature({x = x, y = y, z = z}).uid, {x = 33353, y = 31410, z = 8})
  15. doSendMagicEffect({x = 33353, y = 31410, z = 8}, CONST_ME_TELEPORT)
  16. else
  17. doRemoveCreature(getTopCreature({x = x, y = y, z = z}).uid)
  18. end
  19. end
  20. end
  21. end
  22. end
  23. return true
  24. end
  25.  
  26. function TirarEscada()
  27. local escada = getTileItemById({x = 33265, y = 31116, z = 8}, 3687)
  28. local escada2 = getTileItemById({x = 33265, y = 31116, z = 7}, 3219)
  29. if escada then
  30. doRemoveItem(escada.uid, 1)
  31. doRemoveItem(escada2.uid, 1)
  32. doCreateItem(11097, 1, {x = 33265, y = 31116, z = 7})
  33. end
  34. return true
  35. end
  36.  
  37.  
  38. function onStepIn(cid, item, position, lastPosition)
  39. local player = Player(cid)
  40. start = 0
  41. if item.actionid == 8014 then
  42. for i = 1, 4 do
  43. local creature = getTopCreature(pos[i]).uid
  44. if creature > 0 then
  45. if isPlayer(creature) then
  46. if creature:getStorageValue(Storage.ChildrenoftheRevolution.Questline) == 19
  47. or Game.getStorageValue(Storage.ChildrenoftheRevolution.Mission05) == 1 then
  48. start = start + 1
  49. if creature == cid then
  50. doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
  51. end
  52. end
  53. end
  54. end
  55. end
  56. end
  57. if start == 4 then
  58. player:say("The army is complete again. You hear a hatch opening elsewhere, followed by a grinding sound.", TALKTYPE_MONSTER_YELL, false, cid, {x = 33261, y = 31086, z = 8})
  59. doCreateItem(3687, 1, {x = 33265, y = 31116, z = 8})
  60. doCreateItem(3219, 1, {x = 33265, y = 31116, z = 7})
  61. addEvent(TirarEscada, 30 * 1000)
  62. setGlobalStorageValue(8014, 1)
  63. addEvent(setGlobalStorageValue, 5 * 30 * 1000, 8014, 0)
  64. creature = ""
  65. for k = 1, 4 do
  66. for j = 1, 20 do
  67. if(k < 3) then
  68. creature = "eternal guardian"
  69. else
  70. creature = "lizard chosen"
  71. end
  72. summonPos = {x = math.random(33239, 33295), y = math.random(31100, 31132), z = 7}
  73. addEvent(doSummonCreature, k * 30 * 1000, creature, summonPos)
  74. addEvent(doSendMagicEffect, k * 30 * 1000, summonPos, CONST_ME_TELEPORT)
  75. end
  76. end
  77. addEvent(doClearMissionArea, 5 * 30 * 1000, {x = 33236, y = 31093, z = 7}, {x = 33284, y = 31138, z = 7})
  78. end
  79. end
  80. return true
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement