home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 1.5)
-
- import darfuncs
- import Bladex
- import Damage
- import AbreCam
- import Actions
- import EnemyTypes
- import PhantonFX
- import GenFX
- import ItemTypes
- import Reference
- import Auras
- import Blood
- import Menu
- import types
- import AuxFuncs
-
- def GetSectorIdx(pos):
- if type(pos) == types.StringType:
- return pos
- else:
- return Bladex.GetSector(pos[0], pos[1], pos[2]).Index
-
- _AppearsCagazo = Bladex.CreateSound('..\\..\\Sounds\\AparicionEnric2.wav', 'AppearsCagazo')
- _AppearsCagazo.MaxDistance = 200000.0
- _AppearsCagazo.MinDistance = 20000.0
- ChaosKnightActivated = 1
-
- def MuereCaos(caosname):
- chaosk1 = Bladex.GetEntity(caosname)
- chaosk1.Data.PrepareDisappearance()
- chaosk1.Data.Disappear(caosname)
-
-
- def ChaosAbreCam(per):
- AbreCam.PTS = []
- AbreCam.PTS.append((per.Position[0] - 3000, per.Position[1] - 1000, per.Position[2] - 3000), per.Position, 0.01)
- AbreCam.PTS.append((per.Position[0] - 3000, per.Position[1] - 1000, per.Position[2] + 3000), per.Position, 3.5)
- AbreCam.PTS.append((per.Position[0] + 3000, per.Position[1] - 1000, per.Position[2] + 3000), per.Position, 3.5)
- AbreCam.PTS.append((per.Position[0] + 3000, per.Position[1] - 1000, per.Position[2] - 3000), per.Position, 3.5)
- AbreCam.PTS.append((per.Position[0] - 3000, per.Position[1] - 1000, per.Position[2] - 3000), per.Position, 3.5)
- AbreCam.LastTime = 0.01
- AbreCam.AbreCam()
-
-
- def CreateChaosKnightBak(Position, Angle):
- chaosk1 = Bladex.CreateEntity('ChaosKnightBak', 'ChaosKnight', Position[0], Position[1], Position[2], 'Person')
- chaosk1.ActionAreaMin = pow(2, 0)
- chaosk1.ActionAreaMax = pow(2, 1)
- chaosk1.Angle = Angle
- chaosk1.Level = CHAOS_KNIGHT_LEVEL
- EnemyTypes.EnemyDefaultFuncs(chaosk1)
- chaosk1.ImDeadFunc = MuereCaos
- chaosk1.Data.DamageFactorNone = 0.15
- chaosk1.Data.DamageFactorLight = 0.35
- chaosk1.Data.DamageFactorHeavy = 0.35
- chaosk1.Data.PrepareWeapons('Espadon', 'Escudon')
- chaosk1.SetOnFloor()
- darfuncs.HideBadGuy(chaosk1.Name)
-
-
- def ParticulateAppears(PersonName = 'Player1'):
- wps = Bladex.CreateEntity(PersonName + 'WPS', 'Entity Particle System Dperson', 0.0, 0.0, 0.0)
- wps.PersonName = PersonName
- wps.ParticleType = 'EnergyConc'
- wps.Time2Live = 60
- wps.RandomVelocity = 0
- wps.Velocity = (0, 0, 0)
- wps.NormalVelocity = -5.0
- wps.YGravity = 0
- wps.DeathTime = Bladex.GetTime() + 1.5
- wps.PPS = 600
- Bladex.GetEntity(PersonName).Alpha = 0.0
- PhantonFX.Delta = 0.015
- Bladex.AddScheduledFunc(Bladex.GetTime() + 0.0, PhantonFX.AppearsChar, (PersonName,))
-
-
- def AppearsChaosKnightBak():
- if not ChaosKnightActivated:
- return None
-
- chaosk1 = Bladex.GetEntity('ChaosKnightBak')
- darfuncs.UnhideBadGuy(chaosk1.Name)
- Bladex.AddScheduledFunc(Bladex.GetTime() + 15.0, darfuncs.UnhideBadGuy, (chaosk1.Name,))
- chaosk1.Blind = 1
- chaosk1.Deaf = 1
- chaosk1.Alpha = 0.0
- chaosk1.Data.Appear()
- ChaosAbreCam(chaosk1)
- ParticulateAppears(chaosk1.Name)
- Actions.TurnToFaceEntityNow('ChaosKnightBak', 'Player1')
- for pos in CHAOS_KNIGHT_DEACTIVATE:
- darfuncs.EnterSecIdEvent(pos, TranslateChaos)
-
-
-
- def ParticulateDisappears(PersonName = 'Player1'):
- wps = Bladex.CreateEntity(PersonName + 'WPS', 'Entity Particle System Dperson', 0.0, 0.0, 0.0)
- wps.PersonName = PersonName
- wps.ParticleType = 'EnergyDissip'
- wps.Time2Live = 60
- wps.RandomVelocity = 0
- wps.Velocity = (0, 0, 0)
- wps.NormalVelocity = 5.0
- wps.YGravity = 0
- wps.DeathTime = Bladex.GetTime() + 1.5
- wps.PPS = 600
- Bladex.GetEntity(PersonName).Alpha = 1.0
- PhantonFX.Delta = 0.015
- PhantonFX.SecAgo = 0
- Bladex.AddScheduledFunc(Bladex.GetTime() + 0.0, PhantonFX.DisappearsChar, (PersonName, BorraCaos))
-
-
- def BorraCaos(ent):
- Bladex.AddScheduledFunc(Bladex.GetTime() + 0.2, PrepareChaosAppears2, ())
- ch = Bladex.GetEntity('ChaosKnightBak')
- ch.Data.InteruptActions('ChaosKnightBak')
- darfuncs.HideBadGuy('ChaosKnightBak')
-
-
- def TranslateChaos():
- chaosk1 = Bladex.GetEntity('ChaosKnightBak')
- if chaosk1:
- if chaosk1.Life > 0:
- chaosk1.Freeze()
- ParticulateDisappears('ChaosKnightBak')
-
-
-
-
- def AppearsChaosKnightBak2():
- if not ChaosKnightActivated:
- return None
-
- chaosk1 = Bladex.GetEntity('ChaosKnightBak')
- darfuncs.UnhideBadGuy(chaosk1.Name)
- ParticulateAppears(chaosk1.Name)
- Actions.TurnToFaceEntityNow('ChaosKnightBak', 'Player1')
- for pos in CHAOS_KNIGHT_DEACTIVATE:
- darfuncs.EnterSecIdEvent(pos, TranslateChaos)
-
-
-
- def DeactivateChaosWeapon(EntityName, EventName):
- if EventName == 'ChkDisapR':
- weapon = Bladex.GetEntity(Bladex.GetEntity(EntityName).InvRight)
- else:
- weapon = Bladex.GetEntity(Bladex.GetEntity(EntityName).InvLeft)
- weapon.RasterMode = 'Read'
- weapon.Alpha = 0
- wps = Bladex.CreateEntity('WPS', 'Entity Particle System Dobj', 0.0, 0.0, 0.0)
- wps.ObjectName = weapon.Name
- wps.ParticleType = 'EnergyDissip'
- wps.PPS = 400
- wps.YGravity = 0.0
- wps.Friction = 0.0
- wps.Velocity = (0.0, 0.0, 0.0)
- wps.RandomVelocity = 2.0
- wps.NormalVelocity = 6.0
- wps.Time2Live = 60
- wps.DeathTime = Bladex.GetTime() + 1.5
-
-
- def PrepareChaosAppears2():
- pers = Bladex.CreateEntity('ChaosKnightBak', 'ChaosKnight', CHAOS_KNIGHT_POSITION[0], CHAOS_KNIGHT_POSITION[1], CHAOS_KNIGHT_POSITION[2], 'Person')
- pers.ActionAreaMin = pow(2, 0)
- pers.ActionAreaMax = pow(2, 1)
- pers.Angle = CHAOS_KNIGHT_ANGLE
- EnemyTypes.EnemyDefaultFuncs(pers)
- pers.Data.PrepareWeapons('Espadon', 'Escudon')
- Actions.TakeObject(pers.Name, 'EspadonChaosKnightBak')
- Actions.TakeObject(pers.Name, 'EscudonChaosKnightBak')
- pers.ImDeadFunc = MuereCaos
- pers.AddAnmEventFunc('ChkDisapL', DeactivateChaosWeapon)
- pers.AddAnmEventFunc('ChkDisapR', DeactivateChaosWeapon)
- pers.SetOnFloor()
- darfuncs.HideBadGuy(pers.Name)
- for pos in CHAOS_KNIGHT_ACTIVATE:
- darfuncs.EnterSecIdEvent(pos, AppearsChaosKnightBak2)
-
-
- CHAOS_KNIGHT_LEVEL = 15
- CHAOS_KNIGHT_POSITION = (300029.603984, 8180.76682918, -1209.8189804)
- CHAOS_KNIGHT_ANGLE = 0
- CHAOS_KNIGHT_ACTIVATE = []
- CHAOS_KNIGHT_DEACTIVATE = []
- TIME_BEFORE_PLAYER_APPEARING = 1.5
- EXEC_IN_PLAYER_APPEARING = ''
- EXEC_IN_CHAOS_KNIGHT_APPEARING = ''
-
- def PlayerAppears():
- import Scorer
- darfuncs.UnhideBadGuy('Player1')
- GenFX.PersonMagicallyAppearing()
- Bladex.AddScheduledFunc(Bladex.GetTime() + 2.0, Bladex.ActivateInput, ())
- Bladex.AddScheduledFunc(Bladex.GetTime() + 2.0, Scorer.SetVisible, (1,))
- if EXEC_IN_PLAYER_APPEARING:
- EXEC_IN_PLAYER_APPEARING()
-
-
-
- def PrevPlayerAppears():
- import Scorer
- darfuncs.HideBadGuy('Player1')
- Scorer.SetVisible(0)
- Bladex.DeactivateInput()
- AuxFuncs.FadeFrom(2.0, TIME_BEFORE_PLAYER_APPEARING)
- Bladex.AddScheduledFunc(Bladex.GetTime() + TIME_BEFORE_PLAYER_APPEARING + 2.0, PlayerAppears, ())
-
-
- def PrepareChaosAppears():
- CreateChaosKnightBak(CHAOS_KNIGHT_POSITION, CHAOS_KNIGHT_ANGLE)
- Blood.Evaporation = 1
- Bladex.AddScheduledFunc(Bladex.GetTime(), PrevPlayerAppears, ())
- for pos in CHAOS_KNIGHT_ACTIVATE:
- darfuncs.EnterSecIdEvent(pos, AppearsChaosKnightBak)
-
-
-
- def AddChaosAppearsSector(x, y, z):
- CHAOS_KNIGHT_ACTIVATE.append(Bladex.GetSector(x, y, z).Index)
-
-
- def AddChaosAppearsTSector(id):
- CHAOS_KNIGHT_ACTIVATE.append(id)
-
-
- def AddChaosDisappearsSector(x, y, z):
- CHAOS_KNIGHT_DEACTIVATE.append(Bladex.GetSector(x, y, z).Index)
-
-
- def AddChaosDisappearsTSector(id):
- CHAOS_KNIGHT_DEACTIVATE.append(id)
-
-
- def DeactivateChaos():
- global ChaosKnightActivated
- ChaosKnightActivated = 0
-
-
- def AddChaosDeactivationTs(id):
- darfuncs.EnterSecIdEvent(id, DeactivateChaos)
-
- Bladex.ReadBitMap('..\\..\\Data\\SmokePrtl3.bmp', 'SmokePart3')
- Bladex.AddParticleGType('DeathCloud', 'SmokePart3', Reference.B_PARTICLE_GTYPE_MUL, 16)
- for i in range(16):
- aux = (16.0 - i) / 16
- r = 255
- g = 255
- b = 255
- a = 0
- Bladex.SetParticleGVal('DeathCloud', i, r, g, b, a, size)
-
-
- def DeathAppears(PersonName = 'Player1', pos = (0, 0, 0)):
- time = Bladex.GetTime()
- aura = Auras.MakeAura(PersonName, 0.4, (50, 1.0, 0.0, 0, 0, 0), (), (), (2, 0.9, 0.9, 0.0, 0.9, 0.0, 0.9, 0.9, 0.0, 0.9, 0.8))
- aura.Data.AddEvent(time + 0.2, (150, 0.5, 0.0, 0, 0, 0), (), (), (2, 0.9, 0.9, 0.0, 0.9, 0.0, 0.9, 0.9, 0.0, 0.9, 0.8))
- aura.Data.AddEvent(time + 0.4, (200, 0.01, 0.0, 0, 0, 0), (), (), (2, 0.9, 0.9, 0.0, 0.9, 0.0, 0.9, 0.9, 0.0, 0.9, 0.8))
- wps = Bladex.CreateEntity(PersonName + 'WPS', 'Entity Particle System Dperson', 0.0, 0.0, 0.0)
- wps.PersonName = PersonName
- wps.ParticleType = 'DeathCloud'
- wps.Time2Live = 16
- wps.RandomVelocity = 2.0
- wps.Velocity = (0, 0, 0)
- wps.NormalVelocity = 20
- wps.YGravity = 0
- wps.DeathTime = Bladex.GetTime() + 0.25
- wps.PPS = 1024
- per = Bladex.GetEntity(PersonName)
- darfuncs.UnhideBadGuy(per.Name)
- per.Alpha = 1.0
- per.SetTmpAnmFlags(1, 1, 1, 0, 5, 1, 0)
- per.Wuea = Reference.WUEA_ENDED
- per.LaunchAnmType('rlx')
- per.Position = pos
- per.SetOnFloor()
- per.SetActiveEnemy('Player1')
- Actions.TurnToFaceEntityNow(per.Name, 'Player1')
- _AppearsCagazo.Play(per.Position[0], per.Position[1], per.Position[2], 0)
-
-
- def DeathDisappears(PersonName = 'Player1'):
- wps = Bladex.CreateEntity(PersonName + 'WPS', 'Entity Particle System Dperson', 0.0, 0.0, 0.0)
- wps.PersonName = PersonName
- wps.ParticleType = 'DeathCloud'
- wps.Time2Live = 16
- wps.RandomVelocity = 2.0
- wps.Velocity = (0, 0, 0)
- wps.NormalVelocity = 2
- wps.YGravity = 0
- wps.DeathTime = Bladex.GetTime() + 0.25
- wps.PPS = 1024
- per = Bladex.GetEntity(PersonName)
- per.Data.InteruptActions(per.Name)
- darfuncs.HideBadGuy(per.Name)
- _AppearsCagazo.Play(per.Position[0], per.Position[1], per.Position[2], 0)
-
- SECTOR_PROCS = { }
- LastSectorIdx = None
- SECTOR_COUNT = { }
-
- def RemoveSector(idx):
- if SECTOR_PROCS.has_key(idx):
- del SECTOR_PROCS[idx]
-
-
-
- def AddSectorCount(pos, Demons, Vampires):
- idx = GetSectorIdx(pos)
- SECTOR_COUNT[idx] = [
- Demons,
- Vampires,
- []]
- return idx
-
-
- def AddSectorDelete(idx, pos):
- SECTOR_COUNT[idx][2].append(GetSectorIdx(pos))
-
-
- def OnEnterSectorProc(sector):
- global LastSectorIdx
- pass
-
-
- def ActivateSectorProcs():
- for i in SECTOR_PROCS.keys():
- darfuncs.EnterSecIdEvent(i, OnEnterSectorProc)
-
-
-
- def AddSectorFunction(pos, func, param):
- idx = GetSectorIdx(pos)
- if SECTOR_PROCS.has_key(idx):
- SECTOR_PROCS[idx].append((func, param))
- else:
- SECTOR_PROCS[idx] = [
- (func, param)]
-
- L_Vamp = []
- L_Little_Demon = []
-
- def AddVampires(Num, ValidPos, Level):
- for i in range(Num):
- pers = Bladex.CreateEntity('VMP_' + `Level` + '_' + `i`, 'Vamp', ValidPos[0], ValidPos[1], ValidPos[2], 'Person')
- pers.Angle = 6.26312373572
- pers.Level = Level
- Cimitarra1 = Bladex.CreateEntity('VampWeapon' + `Level` + '_' + `i`, 'VampWeapon', 0, 0, 0, 'Weapon')
- VampShield = Bladex.CreateEntity('VampShield' + `Level` + '_' + `i`, 'VampShield', 0, 0, 0, 'Weapon')
- ItemTypes.ItemDefaultFuncs(Cimitarra1)
- ItemTypes.ItemDefaultFuncs(VampShield)
- Actions.TakeObject(pers.Name, Cimitarra1.Name)
- Actions.TakeObject(pers.Name, VampShield.Name)
- EnemyTypes.EnemyDefaultFuncs(pers)
- pers.SetOnFloor()
- darfuncs.HideBadGuy(pers.Name)
- pers.ImDeadFunc = MuerteBichoMolesto
- L_Vamp.append([
- pers.Name,
- 0])
-
-
-
- def AddDemons(Num, ValidPos, Level):
- for i in range(Num):
- pers = Bladex.CreateEntity('Little_Demon_' + `Level` + '_' + `i`, 'Little_Demon', ValidPos[0], ValidPos[1], ValidPos[2], 'Person')
- pers.Angle = 6.26312373572
- pers.Level = Level
- EnemyTypes.EnemyDefaultFuncs(pers)
- pers.SetOnFloor()
- pers.ImDeadFunc = MuerteBichoMolesto
- darfuncs.HideBadGuy(pers.Name)
- L_Little_Demon.append([
- pers.Name,
- 0])
-
-
-
- def EnemyAppear(List, Position, Time):
- EneName = None
- for i in List:
- pass
-
-
-
- def HideEnemies():
- print 'HideEnemies'
- for i in L_Vamp:
- pass
-
- for i in L_Little_Demon:
- pass
-
-
-
- def HideEnemiesSector(pos):
- AddSectorFunction(pos, HideEnemies, ())
-
-
- def AddVampireAppears(secPos, enePos, Time):
- AddSectorFunction(secPos, EnemyAppear, (L_Vamp, enePos, Time))
-
-
- def AddDemonAppears(secPos, enePos, Time):
- AddSectorFunction(secPos, EnemyAppear, (L_Little_Demon, enePos, Time))
-
-
- def MuerteBichoMolesto(Name):
- me = Bladex.GetEntity(Name)
-
-