Advertisement
Guest User

Untitled

a guest
May 25th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.58 KB | None | 0 0
  1. return {
  2. keywords: [ 'rule', 'event', 'conditions', 'actions', 'Null', 'True', 'False' ],
  3.  
  4. variables: [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Event Player' ],
  5.  
  6. constants: [ 'All Teams', 'Ongoing - Each Player', 'Primary Fire', 'Secondary Fire', 'Ability 1', 'Ability 2', 'Ultimate', 'Interact', 'Jump', 'Crouch', 'Hacked', 'Burning', 'Knocked Down', 'Asleep', 'Frozen', 'Unkillable', 'Invincible', 'Phased Out', 'Rooted', 'Stunned', 'All', 'Team 1', 'Team 2', 'Sphere', 'Light Shaft', 'Orb', 'Ring', 'Cloud', 'Sparkles', 'Good Aura', 'Bad Aura', 'Energy Sound', 'Pickup Sound', 'Good Aura Sound', 'Bad Aura Sound', 'Sparkles Sound', 'Smoke Sound', 'Decal Sound', 'Beacon Sound', 'White', 'Yellow', 'Green', 'Purple', 'Red', 'Blue', 'Visible To Position and Radius', 'Position And Radius', 'Clip Against Surfaces', 'Up', 'Down', 'Nearest', 'Voice Line Up', 'Voice Line Left', 'Voice Line Right', 'Voice Line Down', 'Emote Up', 'Emote Left', 'Emote Right', 'Emote Down', 'Ultimate Status', 'Hello', 'Need Healing', 'Group Up', 'Thanks', 'Acknowledge', 'Left', 'Top', 'Right', 'Visible To and String', 'String', 'Arrow Down', 'Arrow Left', 'Arrow Right', 'Arrow Up', 'Aterisk', 'Bolt', 'Checkmark', 'Circle', 'Club', 'Diamond', 'Dizzy', 'Exclamation Mark', 'Eye', 'Fire', 'Flag', 'Halo', 'Happy', 'Heart', 'Moon', 'No', 'Plus', 'Poison 1', 'Poison 2', 'Question Mark', 'Radioactive', 'Recycle', 'Ring Thick', 'Ring Thin', 'Sad', 'Skull', 'Spade', 'Spiral', 'Stop', 'Trashcan', 'Warning', 'X', 'Visible To Position and String', 'Visible To and Position', 'Position', 'Visible To', 'Good Explosion', 'Bad Explosion', 'Ring Explosion', 'Good Pickup Effect', 'Bad Pickup Effect', 'Debuff Impact Sound', 'Buff Impact Sound', 'Ring Explosion Sound', 'Buff Explosion Sound', 'Explosion Sound', 'Ana', 'Ashe', 'Baptiste', 'Bastion', 'Brigitte', 'Dva', 'Doomfist', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'Mccree', 'Mei', 'Mercy', 'Moira', 'Orisa', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Wrecking Ball', 'Zarya', 'Zenyatta', 'Enemies', 'Direction Rate And Max Speed', 'Receivers Damagers And Damage Percent', 'Receivers And Damagers', 'Direction And Turn Rate', 'None', 'No Barriers Block', 'Enemy Barriers Block', 'All Barriers Block', 'Off', 'Surfaces', 'Surfaces And Enemy Barriers', 'Surfaces And All Barriers', 'Rotation', 'Rotation And Translation', 'Ignore Condition', 'Abort When False', 'Restart When True', 'To World', 'To Player', 'Cancel', 'Incorporate', 'Destination and Rate' ],
  7.  
  8. builtins: [ 'Absolute Value', 'Add', 'All Dead Players', 'All Heroes', 'All Living Players', 'All Players', 'All Players Not On Objective', 'All Players On Objective', 'Allowed Heroes', 'Altitude Of', 'And', 'Angle Difference', 'Append To Array', 'Array Contains', 'Array Slice', 'Attacker', 'Backward', 'Closest Player To', 'Compare', 'Control Point Scoring Percentage', 'Control Point Scoring Team', 'Count Of', 'Cross Product', 'Current Array Element', 'Direction From Angles', 'Direction Towards', 'Distance Between', 'Divide', 'Dot Product', 'Down', 'Empty Array', 'Entity Exists', 'Event Player', 'Eye Position', 'Facing Direction Of', 'Farthest Player From', 'Filtered Array', 'First Of', 'Flag Position', 'Forward', 'Global Variable', 'Has Spawned', 'Has Status', 'Health', 'Health Percent', 'Hero', 'Hero Icon String', 'Hero Of', 'Horizontal Angle From Direction', 'Horizontal Angle Towards', 'Horizontal Facing Angle Of', 'Horizontal Speed Of', 'Index Of Array Value', 'Is Alive', 'Is Assembling Heroes', 'Is Between Rounds', 'Is Button Held', 'Is Communicating', 'Is Communicating Any', 'Is Communicating Any Emote', 'Is Communicating Any Voice Line', 'Is Control Mode Point Locked', 'Is Crouching', 'Is CTF Mode In Sudden Death', 'Is Dead', 'Is Firing Primary', 'Is Firing Secondary', 'Is Flag At Base', 'Is Game In Progress', 'Is Hero Being Played', 'Is In Air', 'Is In Line Of Sight', 'Is In Setup', 'Is In Spawn Room', 'Is In View Angle', 'Is Match Complete', 'Is Moving', 'Is Objective Complete', 'Is On Ground', 'Is On Objective', 'Is On Wall', 'Is Portrait On Fire', 'Is Standing', 'Is Team On Defense', 'Is Team On Offense', 'Is True For All', 'Is True For Any', 'Is Using Ability 1', 'Is Using Ability 2', 'Is Using Ultimate', 'Is Waiting For Players', 'Last Created Entity', 'Last Damage Over Time ID', 'Last Heal Over Time ID', 'Last Of', 'Last Text ID', 'Left', 'Local Vector Of', 'Match Round', 'Match Time', 'Max', 'Max Health', 'Min', 'Modulo', 'Multiply', 'Nearest Walkable Position', 'Normalize', 'Not', 'Null', 'Number', 'Number Of Dead Players', 'Number Of Deaths', 'Number Of Eliminations', 'Number Of Final Blows', 'Number Of Heroes', 'Number Of Living Players', 'Number Of Players', 'Number Of Players On Objective', 'Objective Index', 'Objective Position', 'Opposite Team Of', 'Or', 'Payload Position', 'Payload Progress Percentage', 'Player Carrying Flag', 'Player Closest To Reticle', 'Player Variable', 'Players In Slot', 'Players In View Angle', 'Players On Hero', 'Players Within Radius', 'Point Capture Percentage', 'Cosine From Radians', 'Position Of', 'Raise To Power', 'Random Integer', 'Random Real', 'Random Value In Array', 'Randomized Array', 'Ray Cast Hit Normal', 'Ray Cast Hit Player', 'Ray Cast Hit Position', 'Remove From Array', 'Right', 'Round To Integer', 'Score Of', 'Sine From Degrees', 'Sine From Radians', 'Slot Of', 'Sorted Array', 'Speed Of', 'Speed Of In Direction', 'Square Root', 'String', 'Subtract', 'Z Component Of', 'Team', 'TeamOf', 'TeamScore', 'Throttle Of', 'Total Time Elapsed', 'Ultimate Charge Percent', 'Up', 'Value In Array', 'Vector', 'Vector Towards', 'Velocity Of', 'Vertical Angle From Direction', 'Vertical Angle Towards', 'Vertical Facing Angle Of', 'Vertical Speed Of', 'Victim', 'World Vector Of', 'X Component Of', 'Y Component Of', 'Abort', 'Abort If', 'Abort If Condition Is False', 'Abort If Condition Is True', 'Allow Button', 'Apply Impulse', 'Big Message', 'Chase Global Variable At Rate', 'Chase Global Variable Over Time', 'Chase Player Variable At Rate', 'Chase Player Variable Over Time', 'Clear Status', 'Communicate', 'Create Effect', 'Create HUD Text', 'Create Icon', 'Create In-World Text', 'Damage', 'Declare Match Draw', 'Declare Player Victory', 'Declare Round Victory', 'Declare team Victory', 'Destroy All Effects', 'Destroy All HUD Text', 'Destroy All Icons', 'Destroy Effect', 'Destroy Effect', 'Destroy HUD Text', 'Destroy In-World Text', 'Disable Built-In Game Mode Announcer', 'Disable Built-In Game Mode Completion', 'Disable Built-In Game Mode Music', 'Disable Built-In Game Mode Respawning', 'Disable Built-In Game Mode Scoring', 'Disable Death Spectate All Players', 'Disable Death Spectate Target HUD', 'Disallow Button', 'Enable Built-In Game Mode Announcer', 'Enable Built-In Game Mode Completion', 'Enable Built-In Game Mode Music', 'Enable Built-In Game Mode Respawning', 'Enable Built-In Game Mode Scoring', 'Enable Death Spectate All Players', 'Enable Death Spectate Target HUD', 'Go To Assemble Heroes', 'Heal', 'Kill', 'Loop', 'Loop If', 'Loop If Condition Is False', 'Loop If Condition Is True', 'Modify Global Variable', 'Modify Player Score', 'Modify Player Variable', 'Modify Team Score', 'Pause Match Time', 'Play Effect', 'Preload Hero', 'Press Button', 'Reset Player Hero Availability', 'Respawn', 'Resurrect', 'Set Ability 1 Enabled', 'Set Ability 2 Enabled', 'Set Aim Speed', 'Set Damage Dealt', 'Set Damage Recieved', 'Set Facing', 'Set Global Variable', 'Set Global Variable At Index', 'Set Gravity', 'Set Healing Dealt', 'Set Healing Received', 'Set Invisible', 'Set Match Time', 'Set Max Health', 'Set Move Speed', 'Set Objective Description', 'Set Player Allowed Heroes', 'Set Player Score', 'Set Player Variable', 'Set Player Variable At Index', 'Set Primary Fire Enabled', 'Set Projectile Gravity', 'Set Projectile Speed', 'Set Respawn Max Time', 'Set Secondary Fire Enabled', 'Set Slow Motion', 'Set Status', 'Set Team Score', 'Set Ultimate Ability Enabled', 'Set Ultimate Charge', 'Skip', 'Skip If', 'Small Message', 'Start Accelerating', 'Start Camera', 'Start Damage Modification', 'Start Damage Over Time', 'Start Facing', 'Start Forcing Player To Be Hero', 'Start Forcing Spawn Room', 'Start Forcing Throttle', 'Start Heal Over Time', 'Start Holding Button', 'Stop Accelerating', 'Stop All Damage Modifications', 'Stop All Damage Over Time', 'Stop All Heal Over Time', 'Stop Camera', 'Stop Chasing Global Variable', 'Stop Chasing Player Variable', 'Stop Damage Modifications', 'Stop Damage Over Time', 'Stop Facing', 'Stop Forcing Player To Be Hero', 'Stop Forcing Spawn Room', 'Stop Forcing Throttle', 'Stop Heal Over Time', 'Stop Holding Button', 'Teleport', 'Unpause Match Time', 'Wait', 'Index Of Array Value', 'Player Variable' ],
  9.  
  10. operators: [ '=', '==', '>', '<', '>=', '<=', '!=', '-', '+' ],
  11.  
  12. // Strings
  13. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  14.  
  15. // Tokenizer
  16. tokenizer: {
  17. root: [
  18. // Matches identifiers / keywords starting with an alphabetical character until it reaches
  19. // a non-alphanumeric character (that is not a space). This ensures " True " matches as a keyword
  20. // but the "True" in "Is True For Any" does not
  21. [/([a-zA-Z])([\w -]*[\w])*/, {
  22. cases: {
  23. '@keywords': { token: 'keyword.$0' },
  24. '@variables': { token: 'variable' },
  25. '@constants': { token: 'constant' },
  26. '@builtins': { token: 'predefined' },
  27. '@default': 'identifier'
  28. }
  29. }],
  30.  
  31. // whitespace
  32. { include: '@whitespace' },
  33.  
  34. // delimiters and operators
  35. [/[{}()]/, '@brackets'],
  36. [/[=><!\-\+]+/, { cases: { '@operators': 'operator'} } ],
  37.  
  38. // numbers
  39. [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
  40. [/\d+/, 'number'],
  41.  
  42. // delimiter: after number because of .\d floats
  43. [/[;,.]/, 'delimiter'],
  44.  
  45. // strings
  46. [/"([^"\\]|\\.)*$/, 'string.invalid' ], // non-teminated string
  47. [/"/, { token: 'string.quote', bracket: '@open', next: '@string' } ],
  48. ],
  49.  
  50. comment: [
  51. [/[^\/*]+/, 'comment' ],
  52. [/\/\*/, 'comment', '@push' ], // nested comment
  53. ["\\*/", 'comment', '@pop' ],
  54. [/[\/*]/, 'comment' ]
  55. ],
  56.  
  57. string: [
  58. [/[^\\"]+/, 'string'],
  59. [/@escapes/, 'string.escape'],
  60. [/\\./, 'string.escape.invalid'],
  61. [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' } ]
  62. ],
  63.  
  64. whitespace: [
  65. [/[ \t\r\n]+/, 'white'],
  66. [/\/\*/, 'comment', '@comment' ],
  67. [/\/\/.*$/, 'comment'],
  68. ],
  69. },
  70. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement