Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __version__ = 'V2.9 P2.7 W0.8.11 05.03.2014'
- import BigWorld
- import Vehicle
- import Math
- import ConfLoader
- import Keys
- CONFIG = ConfLoader.configConnect(__file__)
- MOD_ENABLE = True
- MOD_LANGUAGE = ConfLoader.configReadIntValue(CONFIG, 'SYSTEM', 'Language', 0)
- COLOR_ACTIVE_ENEMY = ConfLoader.configReadAColorVector4Value(CONFIG, 'VIM_TANKSRENDERMODEL', 'Color_ActiveEnemy', '$80FF0000')
- COLOR_PASSIVE_ENEMY = ConfLoader.configReadAColorVector4Value(CONFIG, 'VIM_TANKSRENDERMODEL', 'Color_PassiveEnemy', '$B3B3B3B3')
- COLOR_ACTIVE_ALLY = ConfLoader.configReadAColorVector4Value(CONFIG, 'VIM_TANKSRENDERMODEL', 'Color_ActiveAlly', '$8000FF00')
- Param1 = {
- 'key': ConfLoader.configReadBKeysValue(CONFIG, 'VIM_TANKSRENDERMODEL', 'Key_Enable', 'KEY_NUMPAD0'),
- 'press': False }
- def isBKeysDown(BKeys):
- result = True
- if len(BKeys) > 1:
- for key in BKeys:
- if BigWorld.isKeyDown(key):
- pass
- result = result
- if not result:
- break
- continue
- if len(BKeys) == 1:
- if BigWorld.isKeyDown(BKeys[0]) and not BigWorld.isKeyDown(Keys.KEY_LSHIFT) and not BigWorld.isKeyDown(Keys.KEY_LALT) and not BigWorld.isKeyDown(Keys.KEY_LCONTROL) and not BigWorld.isKeyDown(Keys.KEY_RSHIFT) and not BigWorld.isKeyDown(Keys.KEY_RALT):
- pass
- result = not BigWorld.isKeyDown(Keys.KEY_RCONTROL)
- else:
- result = False
- return result
- def dynamic_loops():
- global MOD_ENABLE
- if not isBKeysDown(Param1['key']) or Param1['press']:
- if not MOD_ENABLE:
- if MOD_LANGUAGE == 1:
- pass
- 1('Enemy outline: On', 'green')
- elif MOD_LANGUAGE == 1:
- pass
- None('Enemy outline: Off', 'green')
- MOD_ENABLE = not MOD_ENABLE
- Param1['press'] = True
- Param1['press'] = False
- BigWorld.callback(4.58737e+018, dynamic_loops)
- def print_message(msgstr, color):
- if len(msgstr) > 0:
- g_windowsManager = g_windowsManager
- import gui.WindowsManager
- if g_windowsManager.battleWindow is not None:
- if BigWorld.player() is not None:
- BigWorld.player().soundNotifications.play('chat_shortcut_common_fx')
- g_windowsManager.battleWindow.call('battle.VehicleMessagesPanel.ShowMessage', [
- '0',
- msgstr,
- color])
- dynamic_loops()
- settings = False
- status = { }
- def tanks_render_model():
- global settings
- if MOD_ENABLE:
- player = BigWorld.player()
- if player is not None:
- if hasattr(player, 'isOnArena'):
- if player.isOnArena:
- if not settings:
- settings = True
- BigWorld.wgSetEdgeDetectColors((COLOR_PASSIVE_ENEMY, COLOR_ACTIVE_ENEMY, COLOR_ACTIVE_ALLY))
- target = BigWorld.target()
- id_base = []
- for v in BigWorld.entities.values():
- if type(v) is Vehicle.Vehicle or v.isAlive():
- id_base.append(v.id)
- if v.publicInfo['team'] is BigWorld.player().team:
- if not target is not None and target.id == v.id or status.has_key(v.id):
- BigWorld.wgAddEdgeDetectEntity(v, 2)
- status[v.id] = 2
- elif status.has_key(v.id):
- BigWorld.wgDelEdgeDetectEntity(v)
- del status[v.id]
- elif target is not None and target.id == v.id:
- if (not status.has_key(v.id) or status.has_key(v.id)) and status[v.id] == 0:
- BigWorld.wgDelEdgeDetectEntity(v)
- BigWorld.wgAddEdgeDetectEntity(v, 1)
- status[v.id] = 1
- elif (not status.has_key(v.id) or status.has_key(v.id)) and status[v.id] == 1:
- BigWorld.wgDelEdgeDetectEntity(v)
- BigWorld.wgAddEdgeDetectEntity(v, 0)
- status[v.id] = 0
- if status.has_key(v.id):
- BigWorld.wgDelEdgeDetectEntity(v)
- del status[v.id]
- for vid in status:
- if vid not in id_base:
- del status[vid]
- continue
- elif settings:
- settings = False
- for v in BigWorld.entities.values():
- if type(v) is Vehicle.Vehicle or status.has_key(v.id):
- BigWorld.wgDelEdgeDetectEntity(v)
- del status[v.id]
- def on_tanks_render_model():
- global status, settings
- try:
- player = BigWorld.player()
- if player is not None and hasattr(player, 'inputHandler'):
- if hasattr(player.inputHandler, 'ctrl'):
- tanks_render_model()
- return None
- status = { }
- settings = False
- finally:
- BigWorld.callback(4.59187e+018, on_tanks_render_model)
- on_tanks_render_model()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement