Advertisement
Kaiquegabriel

Untitled

Jul 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. function onDeath(cid, corpse, killer)
  2.  
  3. registerCreatureEvent(cid, "inquisitionPortals")
  4.  
  5. local creaturename = getCreatureName(cid)
  6.  
  7. local ushuriel_in_position = {x=246, y=351, z=12, stackpos=2}
  8. local annihilon_in_position = {x=637, y=472, z=13, stackpos=2}
  9. local hellgorak_in_position = {x=335, y=581, z=10, stackpos=2}
  10. local madareth_in_position = {x=340, y=460, z=13, stackpos=2}
  11. local zugurosh_in_position = {x=390, y=525, z=13, stackpos=2}
  12. local brothers_in_position = {x=505, y=345, z=13, stackpos=1}
  13.  
  14. local ushuriel_to_position = {x=172, y=559, z=13, stackpos=1}
  15. local annihilon_to_position = {x=294, y=681, z=13, stackpos=1}
  16. local hellgorak_to_position = {x=255, y=467, z=13, stackpos=1}
  17. local madareth_to_position = {x=287, y=365, z=13, stackpos=1}
  18. local zugurosh_to_position = {x=314, y=474, z=13, stackpos=1}
  19. local brothers_to_position = {x=408, y=413, z=13, stackpos=1}
  20.  
  21. local time_to_pass = 180
  22. local tpID = 5023
  23. local doEffect = CONST_ME_ENERGYHIT
  24. local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."
  25.  
  26. if creaturename == 'Ushuriel' then
  27.  
  28. teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)
  29.  
  30. doSendMagicEffect(ushuriel_in_position, CONST_ME_ENERGYHIT)
  31.  
  32. doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
  33.  
  34. addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
  35.  
  36. elseif creaturename == 'Annihilon' then
  37.  
  38. teleport = doCreateTeleport(tpID, annihilon_to_position, annihilon_in_position)
  39.  
  40. doSendMagicEffect(annihilon_in_position, CONST_ME_ENERGYHIT)
  41.  
  42. doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
  43.  
  44. addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))
  45.  
  46. elseif creaturename == 'Madareth' then
  47.  
  48. teleport = doCreateTeleport(tpID, madareth_to_position, madareth_in_position)
  49.  
  50. doSendMagicEffect(madareth_in_position, CONST_ME_ENERGYHIT)
  51.  
  52. doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
  53.  
  54. addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))
  55.  
  56. elseif creaturename == 'Hellgorak' then
  57.  
  58. teleport = doCreateTeleport(tpID, hellgorak_to_position, hellgorak_in_position)
  59.  
  60. doSendMagicEffect(hellgorak_in_position, CONST_ME_ENERGYHIT)
  61.  
  62. doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
  63.  
  64. addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))
  65.  
  66. elseif creaturename == 'Zugurosh' then
  67.  
  68. teleport = doCreateTeleport(tpID, zugurosh_to_position, zugurosh_in_position)
  69.  
  70. doSendMagicEffect(zugurosh_in_position, CONST_ME_ENERGYHIT)
  71.  
  72. doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
  73.  
  74. addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))
  75.  
  76. elseif creaturename == 'Latrivan' then
  77.  
  78. teleport = doCreateTeleport(tpID, brothers_to_position, brothers_in_position)
  79.  
  80. doSendMagicEffect(brothers_in_position, CONST_ME_ENERGYHIT)
  81.  
  82. doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
  83.  
  84. addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
  85.  
  86.  
  87. end
  88. end
  89.  
  90. function removeTeleportInUshurielWard()
  91. if getThingfromPos({x=246, y=351, z=12, stackpos=1}).itemid == 5023 then
  92. doRemoveItem(getThingfromPos({x=246, y=351, z=12, stackpos=1}).uid,1)
  93. doSendMagicEffect({x=246, y=351, z=12, stackpos=1}, CONST_ME_POFF)
  94. return TRUE
  95. end
  96. end
  97.  
  98. function removeTeleportInAnnihilonWard()
  99. if getThingfromPos({x=637, y=472, z=13, stackpos=1}).itemid == 5023 then
  100. doRemoveItem(getThingfromPos({x=637, y=472, z=13, stackpos=1}).uid,1)
  101. doSendMagicEffect({x=637, y=472, z=13, stackpos=1}, CONST_ME_POFF)
  102. return TRUE
  103. end
  104. end
  105.  
  106. function removeTeleportInHellgorakWard()
  107. if getThingfromPos({x=335, y=581, z=10, stackpos=1}).itemid == 5023 then
  108. doRemoveItem(getThingfromPos({x=335, y=581, z=10, stackpos=1}).uid,1)
  109. doSendMagicEffect({x=335, y=581, z=10, stackpos=1}, CONST_ME_POFF)
  110. return TRUE
  111. end
  112. end
  113.  
  114. function removeTeleportInMadarethWard()
  115. if getThingfromPos({x=340, y=460, z=13, stackpos=1}).itemid == 5023 then
  116. doRemoveItem(getThingfromPos({x=340, y=460, z=13, stackpos=1}).uid,1)
  117. doSendMagicEffect({x=340, y=460, z=13, stackpos=1}, CONST_ME_POFF)
  118. return TRUE
  119. end
  120. end
  121.  
  122. function removeTeleportInZuguroshWard()
  123. if getThingfromPos({x=390, y=525, z=13, stackpos=1}).itemid == 5023 then
  124. doRemoveItem(getThingfromPos({x=390, y=525, z=13, stackpos=1}).uid,1)
  125. doSendMagicEffect({x=390, y=525, z=13, stackpos=1}, CONST_ME_POFF)
  126. return TRUE
  127. end
  128. end
  129.  
  130. function removeTeleportInBrothersWard()
  131. if getThingfromPos({x=505, y=345, z=13, stackpos=1}).itemid == 5023 then
  132. doRemoveItem(getThingfromPos({x=505, y=345, z=13, stackpos=1}).uid,1)
  133. doSendMagicEffect({x=505, y=345, z=13, stackpos=1}, CONST_ME_POFF)
  134. return TRUE
  135. end
  136. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement