-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathpvm_pvp_zombieland.py
38 lines (35 loc) · 1.64 KB
/
pvm_pvp_zombieland.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from Scripts.glossary.enemies import GetEnemyNotorieties
def AttackEnemy():
mobilesFilter = Mobiles.Filter()
mobilesFilter.RangeMax = 1
mobilesFilter.RangeMin = 1
mobilesFilter.Friend = 0
mobilesFilter.Notorieties = GetEnemyNotorieties()
mobile = Mobiles.ApplyFilter( mobilesFilter )
if len( mobile ) > 0:
mobile = Mobiles.Select( mobile, 'Weakest' )
else:
return
while Mobiles.FindBySerial( mobile.Serial ) != None and mobile.DistanceTo( Mobiles.FindBySerial( Player.Serial ) ) < 2:
mobPosition = mobile.Position
playerPosition = Player.Position
if mobPosition.X == playerPosition.X and mobPosition.Y > playerPosition.Y:
Player.ChatSay( 0, '!1' )
elif mobPosition.X > playerPosition.X and mobPosition.Y > playerPosition.Y:
Player.ChatSay( 0, '!2' )
elif mobPosition.X > playerPosition.X and mobPosition.Y == playerPosition.Y:
Player.ChatSay( 0, '!3' )
elif mobPosition.X < playerPosition.X and mobPosition.Y > playerPosition.Y:
Player.ChatSay( 0, '!4' )
elif mobPosition.X > playerPosition.X and mobPosition.Y < playerPosition.Y:
Player.ChatSay( 0, '!6' )
elif mobPosition.X < playerPosition.X and mobPosition.Y == playerPosition.Y:
Player.ChatSay( 0, '!7' )
elif mobPosition.X < playerPosition.X and mobPosition.Y < playerPosition.Y:
Player.ChatSay( 0, '!8' )
elif mobPosition.X == playerPosition.X and mobPosition.Y < playerPosition.Y:
Player.ChatSay( 0, '!9' )
Misc.Pause( 1200 )
while True:
AttackEnemy()
Misc.Pause( 200 )