Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredEnclave(pArea, pLifeform)
- return ObjectManager.withCreatureObject(pLifeform, function(lifeform)
- if (pLifeform == nil) then
- return 0
- end
- if (not SceneObject(pLifeform):isCreature()) then
- return 0
- end
- if (SceneObject(pLifeform):isPlayerCreature()) then
- if (not CreatureObject(pLifeform):hasSkill(self.knight) or not CreatureObject(pLifeform):isImperial()) then
- CreatureObject(pLifeform):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pLifeform):teleport(self.forceEnergy.x, self.forceEnergy.z, self.forceEnergy.y, 0)
- else
- CreatureObject(pLifeform):sendSystemMessage("The Darkside is within you.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- end
- if (SceneObject(pLifeform):isAiAgent() and AiAgent(pLifeform):isPet()) then
- local pPetowner = CreatureObject(pLifeform):getOwner()
- AiAgent(pLifeform):clearCombatState()
- AiAgent(pLifeform):doDespawn()
- CreatureObject(pPetowner):sendSystemMessage("@pvp_rating:enclave_deny_pet_entry")
- end
- if (not SceneObject(pLifeform):isPlayerCreature()) and (SceneObject(pLifeform):isAiAgent() and not AiAgent(pLifeform):isPet()) then
- AiAgent(pLifeform):clearCombatState()
- AiAgent(pLifeform):leash()
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierOneRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.enforcerfour)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierTwoRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.templarthree)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you further.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierThreeRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.oppressortwo)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you even further.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierThreeFourChmbrRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.oppressortwo)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you even further.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierFourRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.councilmember)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council seduces you onto a greater path.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierFiveRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.councilleader)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council beckons you, Sith Lord.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
- function Yavin4DarkEnclaveScreenPlay:notifyEnteredTierFiveTooRoom(pArea, pJedi)
- return ObjectManager.withCreaturePlayerObject(pJedi, function(playerObject)
- if (pJedi == nil) then
- return 0
- end
- if (not SceneObject(pJedi):isCreature()) then
- return 0
- end
- if (not CreatureObject(pJedi):hasSkill(self.councilleader)) then
- CreatureObject(pJedi):sendSystemMessage("@pvp_rating:enclave_deny_entry")
- CreatureObject(pJedi):teleport(self.forcePush.x, self.forcePush.z, self.forcePush.y, 3435634)
- else
- CreatureObject(pJedi):sendSystemMessage("The Dark Council beckons you, Sith Lord.") --REMOVE THIS NEE WHEN DONE TESTING
- end
- return 0
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement