Advertisement
Turkeygrease

Untitled

Aug 17th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.97 KB | None | 0 0
  1. function Yavin4DarkEnclaveScreenPlay:notifyEnteredEnclave(pArea, pLifeform)
  2. return ObjectManager.withCreatureObject(pLifeform, function(lifeform)
  3. if (pLifeform == nil) then
  4. return 0
  5. end
  6.  
  7. if (not SceneObject(pLifeform):isCreature()) then
  8. return 0
  9. end
  10.  
  11. if (SceneObject(pLifeform):isPlayerCreature()) then
  12.  
  13. if (not CreatureObject(pLifeform):hasSkill(self.knight) or not CreatureObject(pLifeform):isImperial()) then
  14. CreatureObject(pLifeform):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  15. CreatureObject(pLifeform):teleport(self.forceEnergy.x, self.forceEnergy.z, self.forceEnergy.y, 0)
  16. else
  17. CreatureObject(pLifeform):sendSystemMessage("The Darkside is within you.") --REMOVE THIS NEE WHEN DONE TESTING
  18. end
  19. end
  20.  
  21. if (SceneObject(pLifeform):isAiAgent() and AiAgent(pLifeform):isPet()) then
  22. local pPetowner = CreatureObject(pLifeform):getOwner()
  23. AiAgent(pLifeform):clearCombatState()
  24. AiAgent(pLifeform):doDespawn()
  25. CreatureObject(pPetowner):sendSystemMessage("@pvp_rating:enclave_deny_pet_entry")
  26. end
  27.  
  28. if (not SceneObject(pLifeform):isPlayerCreature()) and (SceneObject(pLifeform):isAiAgent() and not AiAgent(pLifeform):isPet()) then
  29. AiAgent(pLifeform):clearCombatState()
  30. AiAgent(pLifeform):leash()
  31. end
  32.  
  33. return 0
  34. end)
  35. end
  36.  
  37. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierOneRoom(pArea, pJedi)
  38. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  39.  
  40. if (pJedi == nil) then
  41. return 0
  42. end
  43.  
  44. if (not SceneObject(pJedi):isCreature()) then
  45. return 0
  46. end
  47.  
  48. if (not CreatureObject(pJedi):hasSkill(self.enforcerfour)) then
  49. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  50. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  51. else
  52. CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you.") --REMOVE THIS NEE WHEN DONE TESTING
  53. end
  54.  
  55. return 0
  56. end)
  57. end
  58.  
  59. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierTwoRoom(pArea, pJedi)
  60. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  61.  
  62. if (pJedi == nil) then
  63. return 0
  64. end
  65.  
  66. if (not SceneObject(pJedi):isCreature()) then
  67. return 0
  68. end
  69.  
  70. if (not CreatureObject(pJedi):hasSkill(self.templarthree)) then
  71. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  72. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  73. else
  74. CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you further.") --REMOVE THIS NEE WHEN DONE TESTING
  75. end
  76.  
  77. return 0
  78. end)
  79. end
  80.  
  81. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierThreeRoom(pArea, pJedi)
  82. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  83.  
  84. if (pJedi == nil) then
  85. return 0
  86. end
  87.  
  88. if (not SceneObject(pJedi):isCreature()) then
  89. return 0
  90. end
  91.  
  92. if (not CreatureObject(pJedi):hasSkill(self.oppressortwo)) then
  93. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  94. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  95. else
  96. CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you even further.") --REMOVE THIS NEE WHEN DONE TESTING
  97. end
  98.  
  99. return 0
  100. end)
  101. end
  102.  
  103. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierThreeFourChmbrRoom(pArea, pJedi)
  104. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  105.  
  106. if (pJedi == nil) then
  107. return 0
  108. end
  109.  
  110. if (not SceneObject(pJedi):isCreature()) then
  111. return 0
  112. end
  113.  
  114. if (not CreatureObject(pJedi):hasSkill(self.oppressortwo)) then
  115. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  116. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  117. else
  118. CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you even further.") --REMOVE THIS NEE WHEN DONE TESTING
  119. end
  120.  
  121. return 0
  122. end)
  123. end
  124.  
  125. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierFourRoom(pArea, pJedi)
  126. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  127.  
  128. if (pJedi == nil) then
  129. return 0
  130. end
  131.  
  132. if (not SceneObject(pJedi):isCreature()) then
  133. return 0
  134. end
  135.  
  136. if (not CreatureObject(pJedi):hasSkill(self.councilmember)) then
  137. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  138. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  139. else
  140. CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you onto a greater path.") --REMOVE THIS NEE WHEN DONE TESTING
  141. end
  142.  
  143. return 0
  144. end)
  145. end
  146.  
  147. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierFiveRoom(pArea, pJedi)
  148. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  149.  
  150. if (pJedi == nil) then
  151. return 0
  152. end
  153.  
  154. if (not SceneObject(pJedi):isCreature()) then
  155. return 0
  156. end
  157.  
  158. if (not CreatureObject(pJedi):hasSkill(self.councilleader)) then
  159. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  160. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  161. else
  162. CreatureObject(pJedi):sendSystemMessage("The Dark Council beckons you, Sith Lord.") --REMOVE THIS NEE WHEN DONE TESTING
  163. end
  164.  
  165. return 0
  166. end)
  167. end
  168.  
  169. function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierFiveTooRoom(pArea, pJedi)
  170. return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
  171.  
  172. if (pJedi == nil) then
  173. return 0
  174. end
  175.  
  176. if (not SceneObject(pJedi):isCreature()) then
  177. return 0
  178. end
  179.  
  180. if (not CreatureObject(pJedi):hasSkill(self.councilleader)) then
  181. CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
  182. CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
  183. else
  184. CreatureObject(pJedi):sendSystemMessage("The Dark Council beckons you, Sith Lord.") --REMOVE THIS NEE WHEN DONE TESTING
  185. end
  186.  
  187. return 0
  188. end)
  189. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement