Advertisement
deutscher_Adler

Blindhit python script

Oct 4th, 2014
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. import BigWorld
  2. from gui import SystemMessages
  3. from gui.Scaleform.daapi.view.lobby.LobbyView import LobbyView
  4. from gui.WindowsManager import g_windowsManager
  5. from Avatar import PlayerAvatar
  6. import datetime
  7. shotList = {}
  8.  
  9. old_PlayerAvatar_stopTracer = PlayerAvatar.stopTracer
  10.  
  11.  
  12. def new_PlayerAvatar_stopTracer(self, shotID, endPoint):
  13. old_PlayerAvatar_stopTracer(self, shotID, endPoint)
  14. player = BigWorld.player()
  15. if player is None:
  16. return
  17. elif not hasattr(player, 'isOnArena'):
  18. return
  19. else:
  20. for f in shotList:
  21. if shotID == f:
  22. currTime = datetime.datetime.now().strftime('%H:%M:%S')
  23. g_windowsManager.battleWindow.call('battle.VehicleMessagesPanel.ShowMessage',
  24. ['0', 'Something was hit! ' + str(currTime),
  25. 'purple'])
  26. continue
  27.  
  28. return
  29.  
  30.  
  31. PlayerAvatar.stopTracer = new_PlayerAvatar_stopTracer
  32. old_PlayerAvatar_showTracer = PlayerAvatar.showTracer
  33.  
  34. def new_PlayerAvatar_showTracer(self, shooterID, shotID, isRicochet, effectsIndex, refStartPoint, velocity, gravity, maxShotDist):
  35. old_PlayerAvatar_showTracer(self, shooterID, shotID, isRicochet, effectsIndex, refStartPoint, velocity, gravity, maxShotDist)
  36. player = BigWorld.player()
  37. if player is None:
  38. return
  39. elif not player.isOnArena:
  40. return
  41. else:
  42. if shooterID == player.playerVehicleID:
  43. shotList[shotID] = shotID
  44. return
  45.  
  46.  
  47. PlayerAvatar.showTracer = new_PlayerAvatar_showTracer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement